[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

DHCP and search list for DNS domains



With DHCP I can tell a host the DNS server and the domain name of the
network, which is then stored to /etc/resolv.conf.  But how can I add
a list a domain names that should be searched when resolving a host
name?

AFAICS, there is no option in DHCP to provide the search list.  So the
questions is, is there a way to configure locally in the client host a
search list that is added to /etc/resolv.conf?

Say, for example, my domain domain is foo.bar.org and the DHCP server
configuration has

    option domain-name "foo.bar.org";
    option domain-name-servers ns.foo.bar.org;

but I want bar.org also in the DNS domain search list, so I can

    ping host

to get host.bar.org.  That is, in /etc/resolv.conf there should be

    domain foo.bar.org
    search foo.bar.org bar.org
    nameserver <ip-address of ns.foo.bar.org>

AFAIK, some of my client hosts have only resolvconf, others use some
systemd stuff, since the man page for resolvconf is actually the
man page for resolvectl which also refers to systemd-resolved.

Steve


Reply to: