Re: default domain searching

Shawn Bayern (shawn.bayern@yale.edu)
Thu, 10 Dec 1998 02:18:57 -0500 (EST)

On Wed, 9 Dec 1998, Chad Glendenin wrote:

> Add the domains you want to /etc/resolv.conf, which may be a symlink
> to /etc/dhcpc/resolv.conf.

But /etc/dhcpc/resolv.conf may be overwritten by the DHCP client. It's
where the DNS-related information obtained from the DHCP server is stored.
Since our DHCP server will currently always give you the same DNS servers
(we have 'static' load-balancing -- i.e., different parts of campus get
different orderings for the DNS servers), there shouldn't be much harm in
wiping away the symlink and setting your own static /etc/resolv.conf.

See dhcpcd(8) or dhcpcd's "hostinfo.c" for more info, or let me know if
you've got any other questions about our DHCP server. (The man page is
wrong, and you're right: the file is /etc/dhcpc/resolv.conf; it lists it
differently.)

On Wed, 9 Dec 1998, Rolf Mueller wrote:

> BTW, I have:
> search eng.yale.edu yale.edu cs.yale.edu
> If I reverse the order of the last 2 entries, I get e.g. for "mars"
> (mars.its.yale.edu) the answer "unknown host". Any idea why this is so? It
> seems that in either case serv1.net.yale.edu is contacted.

Right, but there's quite a bit of subtlety here. I'm not a DNS expert, so
some of this could be wrong, but let's try to work through this. (Sounds
like a traumatic event or something. We *can* work through this...)

There are, in effect, a bunch of completely different DNS entries for
machines called "mars"; this is probably for stupid historical reasons.
The Mars that you're thinking of -- the friendly member of the Pantheon
that we all love -- is canonically mars.its.yale.edu. mars.yale.edu is an
alias (cname entry) pointing to mars.its.yale.edu.

There's ALSO mars.cs.yale.edu, which is a cname for mars.ycc.yale.edu.
THIS, in turn, doesn't resolve anymore. So what's happening -- I *think*
-- is that if you reverse the last two entries in your resolv.conf, you
hit "mars.cs.yale.edu" first; it *exists* as a cname but doesn't
ultimately resolve, so the lookup fails. When you restore the order, you
hit "mars.yale.edu" first, and this successfully resolves to the familiar
Mars. This should be fixed by whoever manages the "cs.yale.edu" domain.
I'll let them know if I remember.

All this makes using numerical IP addresses look comparatively simple...
(Or, well, maybe not.)

Hope that helps,

Shawn