[illumos-Developer] DHCP, DNS domains and search lists in /etc/resolv.conf
Andrew Gabriel
illumos at cucumber.demon.co.uk
Tue May 17 14:11:24 PDT 2011
Hans Rosenfeld wrote:
> Hi,
>
> I got a problem with DHCP-supplied DNS domain names and NWAM.
>
> The dhcp server at work gives me three domain names: foo.bar.com,
> bar.com and baz.com. On OpenSolaris b134 that resulted in a single
> "domain foo.bar.com" statement in /etc/resolv.conf.
>
> Since I upgraded to OI, which includes the new NWAM stuff that was
> integrated into ONNV about a year ago, that results in three domain
> statements in /etc/resolv.conf:
>
> domain foo.bar.com
> domain bar.com
> domain baz.com
> nameserver ...
>
> Resolv.conf(4) states that only one domain or search statement is
> allowed, and that the last one found is used if there are more than one.
> So I now get a DNS domain and search list of "baz.com", and the
> other domains are ignored.
>
> I just hacked together a quick fix which should give some saner
> behaviour. If only one DNS domain name is provided, a domain statement
> will be created in /etc/resolv.conf, otherwise a search statement with
> all domains will be used.
>
With current resolver versions, I don't think there's any difference
between a domain statement, and a search statement with just one
entry, so you can probably simply always use search regardless of
the number of entries.
--
Andrew
More information about the Developer
mailing list