[c-nsp] Network Address Response

Lee ler762 at gmail.com
Fri Jun 26 13:52:33 EDT 2009


On 6/25/09, Ray Burkholder <ray at oneunified.net> wrote:

> I was wondering the reasoning for routers/switches to respond for the
> network portion of an ip-address range.
>
> For example, a router interface A with 10.0.0.1/30 and interface B with
> 10.0.0.5/30.
>
> Generate a ping from a device several hops away on the A side to the B side
> network address of 10.0.0.4.  The router will respond with an echo reply
> with an address of 10.0.0.1.
>
> Is this expected behaviour?  And the reason?

Standards compliance?  From RFC-1122
   3.3.6  Broadcasts

         There is a class of hosts* that use non-standard broadcast
         address forms, substituting 0 for -1.  All hosts SHOULD
         recognize and accept any of these non-standard broadcast
         addresses as the destination address of an incoming datagram.
         A host MAY optionally have a configuration option to choose the
         0 or the -1 form of broadcast address, for each physical
         interface, but this option SHOULD default to the standard (-1)
         form.

So {network, 0} is a broadcast address, same as {network, -1}.
Combine that with

   3.2.1.3  Addressing: RFC-791 Section 3.2

             ...   An incoming datagram is destined
            for the host if the datagram's destination address field is:

            (1)  (one of) the host's IP address(es); or

            (2)  an IP broadcast address valid for the connected
                 network; or

and you get the router answering a ping to 10.0.0.4

Off the top of my head, I don't know if it's a ciscoism or 'standard'
behavior to use the IP address of the outgoing interface as the source
address of the ping reply, but that's why you get the response from
10.0.0.1 instead of 10.0.0.5

Regards,
Lee


More information about the cisco-nsp mailing list