Re: /etc/hosts

From: Floyd L. Davidson (floyd_at_barrow.com)
Date: 03/19/04


Date: Fri, 19 Mar 2004 10:43:00 -0900

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


Relevant Pages

  • Re: Dumb??? Dept.: host alias listings?
    ... how do I remove/edit the host alias lists from my ... What I could see was a comparatively long-ish list of aliases that I ... software that's added certain domains to localhost aliases. ...
    (Ubuntu)
  • Re: Two Different Formats for hosts File?
    ... >>I can find two descriptions on the web for the hosts file that appear to be ... >>127.0.0.1 localhost ... So you're saying that if the FQDN appears, then the aliases follow it, and if there ...
    (comp.os.linux.networking)
  • Re: /etc/hosts
    ... >>hostnames, or generic hostnames. ... >>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 ... convention the address 127.0.0.1 is assigned to the loopback interface. ...
    (comp.os.linux.networking)
  • Re: /etc/hosts
    ... hostnames, or generic hostnames (for example, localhost). ... Many systems do use aliases on the 127.0.0.1 address for names like ... will still resolve to 127.0.0.1 and 127.0.0.1 with still resolve to ...
    (comp.os.linux.networking)
  • gethostbyname() and localhost
    ... If I call gethostbyname with a parameter of "localhost" I see: ... On every Unix system I've tried I see: ...
    (microsoft.public.win32.programmer.networks)