Does systemd-networkd / systemd-resolved add search domains specified in DHCP?

by user59156   Last Updated October 09, 2019 15:01 PM - source

I'm using systemd-networkd and systemd-resolved to manage my network configuration and DNS resolution. I thought it would include search domains specified by the DHCP server, but it doesn't appear to.

# /etc/systemd/network/wlan0.network
[Match]
Name=wlan0
[Network]
DHCP=yes

The DHCP server response includes "Option: (15) Domain Name" (I've checked with wireshark), and I've also tried adding "Option: (119) Domain Search", but nothing I've tried results in a "search" line being added to the resolv.conf file:

# /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
...
nameserver 192.168.1.1
nameserver fe80::...

I know I can specify Domains=.... in the wlan0.network or /etc/systemd/resolved.conf, but I would expect systemd would respect the DHCP options.

I've restarted the network system and confirmed /etc/resolv.conf is properly symlinked:

$ systemctl daemon-reload && sysetmctl restart systemd-networkd && systemctl restart systemd-resolved
$ ll /etc/resolv.conf
lrwxrwxrwx 1 root root 32 Oct  4  2017 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
$ pacman -Qi systemd | grep Version
Version         : 243.51-1
Tags : dns dhcp systemd


Related Questions





How can I set ip addres for wlan adapter using systemd?

Updated September 16, 2019 13:01 PM