I'm running Debian 8 + systemd215. I'm trying to setup domain suffix to be appended automatically, when I ping other hosts in LAN. Before systemd I'd just add below line to:
#/etc/resolv.conf
search sub2.sub1.mydomain
But now on modern system resolve.conf
is linked to /var/run/systemd/resolve/resolv.conf
. So added below lines:
#/etc/systemd/network/eth.network
[DHCP]
UseDomains=true
#/etc/systemd/resolved.conf
[Resolve]
Domains=sub2.sub1.mydomain
Restart networkd/resolved and got below messages in journal:
systemd-networkd[15171]: [/etc/systemd/network/eth.network:9] Unknown lvalue 'UseDomains' in section 'DHCP'
...
systemd-resolved[16332]: [/etc/systemd/resolved.conf:12] Unknown lvalue 'Domains' in section 'Resolve'
I found, this might be actually a bug in systemd prior to 228. I do not see any fresh versions of systemd available for my Debian from stable repo. So should I just go and unlink /etc/resolve.conf
and add searched domains in old fashioned way? Or am I missing something here?
Best Answer
Welcome to Serverfault.
The list of all directives available in your currently installed version of
systemd
is available inman systemd.directives
. Search in that document to see if "Domains" is available in your version.If the directives you need are not available, then, yes, you should use the traditional resolver instead of the
systemd
resolver.