Re: hostname doesn't stick

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2006-09-17 at 02:39 -0700, jdow wrote:
> From: "Tim" <ignored_mailbox@xxxxxxxxxxxx>
> 
> > On Sat, 2006-09-16 at 23:31 -0700, jdow wrote:
> >> Given what the hosts file is for the ORDER does not matter. But the
> >> 127.0.0.1 line MUST be present.
> > 
> > I'm not sure that's true.
> > 
> > Localhost ought to be 127.0.0.1 and 127.0.0.1 ought to be localhost.
> > The first one in the list is the one that is returned as an answer to a
> > query about the name for the IP.
> 
> Barring a special use the hosts file is simply used to loop up
> name vs number as a substitute for DNS. If localhost is not there
> your only hope is that DNS is AND has localhost defined. The
> hosts file is basically a safety net for DNS.
> 
The hosts file predated DNS.  As the internet grew a local file became
impossible to maintain and DNS grew from it.

DNS cannot have localhost defined since that is a generic name.  Every
host has it defined and the IP is not routeable so it belongs in the
hosts file on every host.  It has to be accessible even when the host is
not connected to the internet and/or has no DNS available.

> The /etc/sysconfig/network file is the one were important names are
> defined for the system. The hosts file would be expected to relate
> those names to their dotted quad if nothing else did.
> 
Only _one_ name goes in /etc/sysconfig/network and that is the real nave
of the local host in FQDN format.
   HOSTNAME=myhost.mydomain.com
is the format there.

> If the localhost definition is missing I suspect there are tools
> critical to getting the network rolling that would belly up. Now,
> just as to WHY that would be the case is a matter of conjecture.
> The relationship is well enough known it probably could be hard
> coded. Why it isn't is something I'd like to know in an abstract
> sort of way.
> 
Why localhost is required is simple enough.  
Several things (including the X server) require access to network
protocols and require localhost to map to an address that works in order
to start up and run properly.

It isn't hardcoded because the address can be mapped differently if you
chose.

> {^_^}
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux