So this a quick post because I spent a few hours resolving this issue and wanted to share. The DHCP option domain-search (code 119) is used to specify the DNS domain search list (i.e. “search example.com sales.example.com marketing.example.com” in /etc/resolv.conf) but it’s not clearly stated the format for dhcpd.conf. After trying many different combinations I finally nailed it down:
subnet 192.168.1.0 netmask 255.255.255.0 { range 192.168.1.101 192.168.1.199; option domain-name "example.com"; option domain-search "example.com", "sales.example.com", "marketing.example.com"; option domain-name-servers 192.168.1.1; option routers 192.168.1.1; }
So the format is: option domain-search “SUFFIX 1”, “SUFFIX 2”, …, “SUFFIX N”;
Cheers,
–The IT Department
Thanks very much!
You can also do a “man dhcp-options” to see the format of this option, and many others..
On a related note, if you’re trying to supersede this setting in your dhclient.conf, so that you end up with multiple domain-search entries that supersede the ones handed out by the dhcp server, the client-side syntax is different:
supersede domain-search “example.com example.net”;
You save me, thank you
Thanks 🙂