ARP table updates - how do they work??



I was under the assumption that any received packet would update the
ARP table but apparently only incoming ARP requests help populate the
ARP table. I set up the following experiment:

1) clear out ARP tables on machine A and B
2) ping from A to B
3) clear out ARP table on machine B
4) ping from A to B again

I expected to see machine A send an ARP request in step 2 and machine
B to cache the ARP entry for machine A as a result. That's exactly
what happened, good.

For step 3) I expected to see the ARP table on machine B (the target
of the ping) to update itself from the as soon as the next ping came
in. Instead I see machine B do an ARP request before sending the first
ping reply because I had wiped out the ARP cache. Why doesn't B simply
enter machine A in the arp cache when it gets the ping packet? Seems
like that would save time and be just as safe as taking the address
from arp requests.

So here's what happend when A had an ARP entry for B but B did not
have an entry for A:

A -> B ping req
B -> bcast ARP req
A -> B ARP resp
B -> A ping reply
A -> B ping req
B -> A ping reply
....


.



Relevant Pages

  • Re: ebtables processing...
    ... I can no longer ping the router. ... The client wants to send an IP packet with an ICMP echo request to 192.168.1.1. ... Before it must learn the associated MAC address using the ARP protocol, ... The ARP query arrives at the interface eth0, which is part of the bridge br0, so the packet goes through ebtables and reaches the BROUTING chain in the broute table. ...
    (comp.os.linux.networking)
  • Re: Problem when using 2 APs WAP54GP
    ... The connection to AP2 is fine and I can ping it. ... by the AP from the wireless to the wire but the traffic from the wire ... the wire, but any arp reply ...
    (alt.internet.wireless)
  • Re: multi-homed systems stop answering ARP on local addresses w/ifconfig aliases
    ... multi-homed systems stop answering ARP on local addresses ... hence anything on that network completely stops functioning. ... routing to a locally assigned address via another interface, ... you can't even ping the affected locally ...
    (freebsd-net)
  • Re: Cannot ping client, even on LAN
    ... if just after a ping, you can't get the arp then it's not alive, at least on this ip ... Mathieu CHATEAU ... I have one client on a small LAN that I cannot use Remote Desktop Connection to access, even fromt the LAN, although I can access all other clients with no problem. ...
    (microsoft.public.windows.server.general)
  • Re: Catalyst 1900 Configuration {lost} sorry
    ... However, from Machine #2, I can ping #1 and itself... ... machine A to be able to ARP for machine B ... MAC broadcast to reach machine B ... MAC unicast to reach machine B ...
    (comp.dcom.sys.cisco)