RE: what to do after an IP change

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

 



On Wed, 2004-08-04 at 08:03, Roger Grosswiler wrote:
> so, strangerwise, i choosed my hosts-file and changed the 127.0.0.1-entry. to the following
> 
> 127.0.0.1     my_hostname my_hostname.my_domain.tld localhost

No, do not do that, that is not correct. It may work, but it is not the
correct way to do it.

The /etc/hosts file is a manual coupling between static IP-numbers and
hostnames (in fqdn and short form), remaining from the god old days of
flat files for hostnames, and without DNS servers etc.

The IP-number 127.0.0.1 has the hostname localhost.localdomain, or, in
short form, localhost. This is *the* name corresponding to the IP number
127.0.0.1. The 127.0.0.1 IP-number has no other hostname, so no other
hostname should be placed at that line in the /etc/hosts file.

If you have other static IP-numbers, whose name you know, you may *add*
these to /etc/hosts, but do *not* alter the 127.0.0.1 line (as it is
correct as written in the pristine file.)

If you use dyndns, or whatever, the coupling between IP-number and
hostname is taken care of via the DNS system, so make sure that your
/etc/resolve.conf file contains valid information about the DNS servers
you use.

I.e. static information about IP-numbers/hostnames goes into /etc/hosts
(with an un-altered 127.0.0.1 line), and dynamic IP-numbers/hostnames is
taken care of by the DNS system set up via /etc/resolv.conf

/Lars
-- 
Lars E. Pettersson <lars@xxxxxxxx>
http://www.sm6rpz.se/



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

  Powered by Linux