double domain-search

Thursday, 07 July 2011

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

Trackbacks

    No Trackbacks

Comments

Display comments as (Linear | Threaded)

    No comments


Add Comment


Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.
E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA 1CAPTCHA 2CAPTCHA 3CAPTCHA 4CAPTCHA 5