Re: /etc/hosts
From: Douglas O'Neal (oneal_at_dbi.udel.edu)
Date: 03/22/04
- Next message: Bonnell Frost: "NVIDIA and eth0"
- Previous message: Clifford Kite: "Re: How to set up dial-up on debian after a wrong pppoe config"
- In reply to: Floyd L. Davidson: "Re: /etc/hosts"
- Next in thread: Baho Utot: "Re: /etc/hosts"
- Reply: Baho Utot: "Re: /etc/hosts"
- Reply: Floyd L. Davidson: "Re: /etc/hosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 22 Mar 2004 11:05:30 -0500
Floyd L. Davidson wrote:
> Douglas O'Neal <oneal@dbi.udel.edu> wrote:
>
>>>Except, "thing" should be spelled "gross mistake". There
>>>should
>>>only be *one* host name for 127.0.0.1, "localhost". If a
>>>loopback is desired for some other name, it can be done with any
>>>of the other valid 127.x.x.x addresses, but should not be added
>>>to 127.0.0.1.
>
>
>
>>>From 'man hosts'
>>Aliases provide for name changes, alternate spellings, shorter
>>hostnames, or generic hostnames (for example, localhost).
>>
>>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
>>loghost or mailhost. It does not break anything to do this. localhost
>>will still resolve to 127.0.0.1 and 127.0.0.1 with still resolve to
>>localhost. What problems do you anticipate with aliases here and more
>>to the point what problems can you document?
>
>
> See RFC-1537 and RFC-1912, and read any good book on network
> administration. Here are at least three,
>
> "TCP/IP Network Administration", 2nd Ed., Hunt,
> O'Reilly 1998. See pages 50-51, plus
>
> "Running Linux", 3rd Ed., Welsh, Dalheimer and
> Kaufman, O'Reilly 1999. See page 530.
>
> "Linux Network Administrator's Guide", Kirch,
> O'Reilly 1995. See pages 64 and 65.
>
> --
> Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
> Ukpeagvik (Barrow, Alaska) floyd@barrow.com
RFC 1537 and 1912 are both concerned with DNS server configuration. I
have never set up a DNS server to run off of /etc/hosts and I'm not even
sure what hacks are necessary to do so. Also, quoting from RFC1912:
Translating 127.0.0.1 into "localhost.domain" can cause some
software to connect back to the loopback interface when it didn't
want to because "localhost" is not equal to "localhost.domain".
This seems to be the problem that the RFC authors anticipate when
the 127.0.0.1 address is messed with. However, an /etc/hosts line
127.0.0.1 localhost localhost.localdomain
*will not* translate 127.0.0.1 into localhost.localdomain. The
third field on a /etc/hosts line is an alias. Programs using /etc/hosts
to resolve addresses can go from the alias to the numeric address but
resolving the numeric address will return the primary name, e.g.
localhost. I don't think your RFC references apply.
While you're suggesting references, try "Unix Network Programming,
Vol. 1", Stevens, Prentice Hall, 1998. On page 891 it says "By
convention the address 127.0.0.1 is assigned to the loopback interface.
[ ... ] Any address on the network 127/8 can be assigned to the
loopback interface, but 127.0.0.1 is common."
-- Dr. Douglas O'Neal Manager, Bioinformatics Center Delaware Biotechnology Institute (302) 831-3456
- Next message: Bonnell Frost: "NVIDIA and eth0"
- Previous message: Clifford Kite: "Re: How to set up dial-up on debian after a wrong pppoe config"
- In reply to: Floyd L. Davidson: "Re: /etc/hosts"
- Next in thread: Baho Utot: "Re: /etc/hosts"
- Reply: Baho Utot: "Re: /etc/hosts"
- Reply: Floyd L. Davidson: "Re: /etc/hosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|