David C. Rankin wrote:
On 12/31/2010 02:55 AM, Per Jessen wrote:
David C. Rankin wrote:
Guys,
What is the proper entry for 127.0.0.1 in /etc/hosts?
My systems all have:
127.0.0.1 localhost
I have seen discussion that 127.0.0.2 is deprecated
Like John says, 127.0.0.0/8 are usually assigned to the loopback interface, and are usually = localhost.
Well,
The documentation shows (man hosts):
IP_address canonical_hostname [aliases...]
showing you can have any number of aliases for a given IP_address canonical_hostname pair. So I have always included the hostname as an alias after localhost:
127.0.0.1 localhost phoenix
which provides resolution for localhost as well as your hostname on loopback. I have run across several web apps that want to be able to resolve the loopback address with the hostname. The 127.0.0.2 SuSE has used is a hack and there is talk about doing away with it completely.
I can't quite figure out what that is good for, and I've certainly never used it. All of my hostnames resolve to the primary IP-address of the host.
The real problem is with dnsdomainname (or hostname -d) which will not resolve to anything unless you include the full canonical_hostname in /etc/hosts:
127.0.0.1 providence.rlfpllc.com localhost providence
It works fine on my systems - dnsdomainname and hostname -d both return the domain-name. -- Per Jessen, Zürich (0.8°C) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org