double domain-search
I recently revamped my home and business networks and found myself in need of a way to automatically attempt hostname resolution in two different dns domains.
This can be easily acheived by editing /etc/resolv.conf like so:
search alpha.example beta.example
However, I use DHCP so I wanted a DHCP solution. DNS search domains can be specified using DHCP option 119, which is supported by both dnsmasq and isc-dhcp-server on Debian Squeeze. Client-side DHCP support for DNS search domains, especially multiple search domains, is reportedly rather limited; but fortunately it's supported out of the box by Debian and Ubuntu so it's just a matter of getting the server-side configuration correct. I had some trouble finding the correct syntax and as a result my first attempts (using apparently incorrect examples I found on the net) resulted in failure, as indicated by this log message on the client:
dhclient: suspect value in domain_search option - discarded
After fixing the server-side config (isc-dhcp-server 4.1.1) to match the following format, it works great:
option domain-search "alpha.example","beta.example";
If you use dnsmasq for DHCP, this should be useful:
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2005q2/000231.html

