On Mon, 06 Dec 2004 12:00:26 GMT, W. Watson <(E-Mail Removed)> wrote:
| I can find two descriptions on the web for the hosts file that appear to be
| different. Here's one:
|
| #
| # Hosts file for Virtual Brewery/Virtual Winery
| #
| # IP local fully qualified domain name
| #
| 127.0.0.1 localhost
| #
| 191.72.1.1 vlager vlager.vbrew.com
| 191.72.1.1 vlager-if1
|
| and another:
|
| # For loopbacking.
| 127.0.0.1 localhost
| #
| 129.6.15.28 time-a.nist.gov synctime
| 44.56.26.10 ka1fsb.ampr.org ka1fsb
| 44.56.26.11 ka1fsb-3.ampr.org ka1fsb-3
|
| Can someone explain this? Is there another file that controls the order?
|
| My man page for hosts shows: ip-address canonical_hostname aliases
|
| but gives no explanation of canonical_hostname
What you actually have is:
ip-address list-of-host-names
When you do a lookup on a name, it will match on any name in the list,
and return the IP address. This search will only return an *exact* match
for a full name.
When you do a lookup on an IP address it
will only return the first name from the list.
Most applications work best when the IP to name request returns the
fully-qualified domain name (ie, the full name with all the domain
information). The remaining names in the list are available for shortcut
and abreviations so you don't have to type the full name every time.
--
Reverend Paul Colquhoun, ULC.
http://andor.dropbear.id.au/~paulcol
Asking for technical help in newsgroups? Read this first:
http://catb.org/~esr/faqs/smart-questions.html#intro