Re: Two Different Formats for hosts File?

From: W. Watson (wolf_tracks_at_invalid.inv)
Date: 12/06/04


Date: Mon, 06 Dec 2004 15:19:45 GMT

Bit Twister wrote:

> On Mon, 06 Dec 2004 12:00:26 GMT, W. Watson 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
>
>
> Think about it a minute, why would you want an aliases longer than the
> canonical_hostname. The canonical_hostname is the Fully Qualified
> Domain Name (FQDN) . Looking at the man page on Mandrakelinux the examples
> should prove it to you.
>
> EXAMPLE
> 127.0.0.1 localhost
> 192.168.1.10 foo.mydomain.org foo
> 192.168.1.13 bar.mydomain.org bar
> 216.234.231.5 master.debian.org master
> 205.230.163.103 www.opensource.org
So you're saying that if the FQDN appears, then the aliases follow it, and if there
is no FQDN all names are aliases? Or more likely from the two examples above, both
aliases and one FQDN can follow the IP, but in any order. I'm a RHL 9 user.

-- 
              Wayne T. Watson (Watson Adventures, Prop., Nevada City, CA)
                  (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
                   Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet
             (Formerly Homo habilis, erectus, heidelbergensis and now sapiens)
               "The free market is a great thing--we should try it sometime."
                       -- Jim Hightower
                         Web Page: <home.earthlink.net/~mtnviews>


Relevant Pages

  • Re: Dumb??? Dept.: host alias listings?
    ... how do I remove/edit the host alias lists from my ... What I could see was a comparatively long-ish list of aliases that I ... software that's added certain domains to localhost aliases. ...
    (Ubuntu)
  • Re: ntpq no longer working -
    ... the same name as an alias as you've got as a hostname, the aliases are ... It distinguishes the interfaces, but still makes it easy for you to work ... The format of the hosts file is: numerical IP address, white space, ...
    (Fedora)
  • Re: Bug in Graphical Network Configuration???
    ... All the hosts file is doing is associating a name with an numerical IP ... aliases, if you want). ... I understand that the hostname is set in the /etc/sysconfig/network ... Is this the bug of grahical tool? ...
    (Fedora)
  • Re: /etc/hosts
    ... >>hostnames, or generic hostnames. ... >>The man page specifically lists localhost as a candidate for an alias. ... >>Many systems do use aliases on the 127.0.0.1 address for names like ... convention the address 127.0.0.1 is assigned to the loopback interface. ...
    (comp.os.linux.networking)
  • Re: /etc/hosts
    ... >> loopback is desired for some other name, it can be done with any ... >hostnames, or generic hostnames. ... >The man page specifically lists localhost as a candidate for an alias. ... >Many systems do use aliases on the 127.0.0.1 address for names like ...
    (comp.os.linux.networking)