[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: foo.baz.edu ???
On 27-Jun-08, at 5:57 AM, Bryan Pierce wrote:
But I still have not been able to figure out what the... "NIS
domain name" formerly Internet YP and not
to be confused with an internet domain name" ... is.
Well if you're talking about the string stored in the kernel with the
setdomainname(3) function call, retrieved by the getdomainname(3)
function call, both available through the domainname(1) command line
utility, then that's all it is: a string stored in the kernel.
The NIS/YP subsystem happens to use this string for something called
the "NIS domain name". If your system is not part of a NIS
environment then you need not concern yourself with NIS/YP, nor its
use of the kernel domain name string and you may use that string for
your own purposes.
For example I use the kernel domain name string to store the site DNS
Note that usually I store only the basic unqualified hostname in the
kernel hostname string. This saves me and all the other sysadmins I
work with quite a lot of redunant typing, especially at sites with
rather long and cumbersome site DNS domain names. I do not use NIS/YP
at any site -- indeed all systems I build have all NIS/YP commands and
libraries removed and omitted.
There are some third party programs which, without explicit overriding
configuration of their own, may use the kernel domainname string to
make some assumptions about what the site DNS domain name might be.
In retrospect the "foo.baz.edu" example does clarify that Hostname
is not just "foo" and so that
we can assume that Domain name is not "baz.edu"
Strictly speaking it is _impossible_ to make any assumptions about the
site DNS domain name when you have only been given the fully qualified
host domain name. In your example the site DNS domain name may also
be "foo.baz.edu". Many far more complex examples exist in real life.
This is one of the reasons I like to use the kernel domain name to
store the site DNS domain name on my systems. It gives me a reliable
way to determine the site DNS domain name regardless of what I've set
the kernel hostname string to.
Note that a host may be a member of many DNS domains and it may have
many host domain names (even if it only has one public IP address).
The kernel hostname and domainname strings are only used for internal
identification of the host itself. They are not, and cannot, be used
externally to the host for any purpose.
Note also that in order to use simple unqualified hostnames to contact
other hosts within the same site, e.g. when making an ssh connection
to them, you will want to set the site DNS domain name in /etc/
resolv.conf. That's the only place where the site DNS domain name
currently really has any meaning (though I've got a patch for my own
builds of NetBSD which allows the resolver to use the kernel
domainname string for this purpose too however since resolv.conf still
must be customized for each site to specify site local cache servers
it doesn't really save anything).
Greg A. Woods; Planix, Inc.
Main Index |
Thread Index |