Systemd-networkd: How can I prepend a static nameserver entry to DHCP-discovered nameservers?

Posted by runiq on Super User See other posts from Super User or by runiq
Published on 2014-06-12T09:16:42Z Indexed on 2014/06/12 9:27 UTC
Read the original article Hit count: 243

Filed under:
|
|
|
|

I'm using systemd 213 on Arch Linux, and systemd-networkd with DHCP to connect to the internet. I'm also running a caching DNS server on 127.0.0.1. I'd like to make this server the first DNS server in the list, but I'd also like to use the nameservers discovered by systemd-networkd's DHCP facility. Using a static resolv.conf isn't really possible, because I connect to networks with different DNS settings.

I know I can set fallback DNS servers in /etc/systemd/resolved.conf, but is there a way with systemd-networkd to prepend my local DNS server to those discovered by DHCP?

© Super User or respective owner

Related posts about linux

Related posts about networking