On Thu, 8 Jun 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<44877032$0$26212$(E-Mail Removed)>, McHenry wrote:
>Should the hosts files on the two servers contain entries for the ip add &
>machine name or ipadd and fqdn ?
Not sure what you mean by 'machine name'. If that is the host portion of
the FQDN, no. There should be two entries (minimum) for a host that has
a registered address:
127.0.0.1 localhost
192.0.2.10 full.host.name.example.com alias shortname
The full name is not required for localhost (localhost.localdomain) as this
is a special case. You _can_ put it in if you want it, but it's not required.
The full name of the host _is_ required as it is often needed as part of the
boot scripts. It needs to be the first following the address. You can then
add (optional) shortnames or aliases which would be used by this host. The
whitespace between address and name(s) is a tab or space(s). Note that while
hostnames can be long (63 char between dots, 255 char max in most modern
implementations - 14/80 for ancient stuff), make sure the text editor you
are using isn't "helping" you by auto-inserting line wrapping at some
arbitrary length. If you 'grep' the hosts file for a hostname, grep should
return the entire line, not parts of it.
You can have only one line with a specific IP address. You can have only
one line with a specific hostname. If your systems do not have continuous
access to a name server (DNS, NIS or whatever) that can resolve any hostname
on your local networks, you should include a line for each host on your LAN
that will be connecting to this server.
Old guy
|