Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 28 Sep 1997 11:26:12 +0200
From:      sthaug@nethelp.no
To:        tlambert@primenet.com
Cc:        freebsd-hackers@freefall.FreeBSD.org
Subject:   Re: r-cmds and DNS and /etc/host.conf
Message-ID:  <22414.875438772@verdi.nethelp.no>
In-Reply-To: Your message of "Sat, 27 Sep 1997 21:29:41 %2B0000 (GMT)"
References:  <199709272129.OAA11592@usr08.primenet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> Technically 127.1 and 127.0.0.1 are synonymous; one would think the
> code should know this...

Technically, 127.0.0.1 for the loopback address is a Berkeley-ism, but
it is now cast in stone, since RFC1700 defines

      (g)   {127, <any>}

         Internal host loopback address.  Should never appear outside
         a host.

As far as I can see, this change occurred in two steps:

- RFC 820 (January 1983 "Assigned Numbers") doesn't mention 127.*.*.*.
- RFC 870 (October 1983 "Assigned Numbers") has 127.*.*.* as "reserved".
- RFC 990 (November 1986 "Assigned Numbers") has 127.*.*.* explicitly
as loopback.

127.1 as an alternative way of writing 127.0.0.1 is also a Berkeley-ism,
as far as I know. The name server (BIND) knows nothing about it, and the
inet_pton() routine (part of POSIX 1003.1g work in progress) does not
recognize this format, even if inet_addr() and inet_ntoa() does. It is
*not* a particularly good idea to depend on 127.1 being interpreted as
127.0.0.1.

Steinar Haug, Nethelp consulting, sthaug@nethelp.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?22414.875438772>