hostname doesn't stick

Matthew Saltzman mjs at ces.clemson.edu
Mon Sep 18 12:24:59 UTC 2006


On Mon, 18 Sep 2006, Jeff Vian wrote:

>>[...]
> 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.
>
>>[...]
> 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.
>
>>[...]
> 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.

Thanks for a very clear explanation.  One or two last questions I have 
from following this discussion:

Is there any real harm in having other names associated with the loopback 
address in /etc/hosts as well?

Is there any issue if the real HOSTNAME is associated with some other 
nonroutable address in /etc/hosts if (a) the machine is not connected to a 
network or (b) if it is connected to a network but has some other IP 
(possibly routable) address on that network--either where other machines 
on the network know the machine name and IP (from DNS, e.g.) or where they 
don't?

Thanks.
-- 
 		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs




More information about the fedora-list mailing list