tech-net archive

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

Re: connect to 0.0.0.0 vs ::



> We have a different behavior for ipv4 and ipv6:
> antioche:/tmp#telnet :: 80
> Trying ::...
> telnet: Unable to connect to remote host: Network is unreachable
> antioche:/tmp#telnet 0.0.0.0 80
> Trying 0.0.0.0...
> Connected to 0.0.0.0.
> Escape character is '^]'.

4291 says

2.5.2.  The Unspecified Address

   The address 0:0:0:0:0:0:0:0 is called the unspecified address.  It
   must never be assigned to any node.  It indicates the absence of an
   address.  One example of its use is in the Source Address field of
   any IPv6 packets sent by an initializing host before it has learned
   its own address.

   The unspecified address must not be used as the destination address
   of IPv6 packets or in IPv6 Routing headers.  An IPv6 packet with a
   source address of unspecified must never be forwarded by an IPv6
   router.

Apache should be using ::1, not ::, and IMO Linux is broken for
treating :: as usable.  (Surprise surprise, Linux misbehaving. :-þ)

The case for v4 is less clear.  Numerous protocols use 0.0.0.0 as
indicating the lack of any address; those which include a mask (eg,
RIP) use 0.0.0.0 mask 0.0.0.0 for a default route (which makes at least
some sense) and some RFCs speak of 0.0.0.0 as an obsolete form of the
limited local broadcast address 255.255.255.255 and clearly state that
routers must not pass it along.  1700 says, early in page 4,

Special Addresses
...
There are certain special cases for IP addresses.  These special cases
can be concisely summarized using the earlier notation for an IP
address:

      IP-address ::=  { <Network-number>, <Host-number> }
...
      (a)   {0, 0}

         This host on this network.  Can only be used as a source
         address (see note later).

(However, I've been unable to find the "note later".)  This seems to me
to be an argument, but I'm not sure which way; FWLIMBW, I prefer the
interpretation that forbids use of 0.0.0.0 as a loopback address.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index