0

I made this topology in GNS3 :

enter image description here

I cleared the switches MAC tables. In this way, when PC1 sends an ARP request to know who has the IP 192.168.1.20 (PC2 IP), the request is broadcast through all ports of switch1 and also switch2. I used wireshark to verify this and I saw the ARP request reaching PC3.

enter image description here

However, the ARP table of PC3 is empty. Why doesn't it add a new entry for PC1 in his table ?

enter image description here

Is this an expected behavior?

5

Yes, this is expected behaviour.

Even though PC3 sees the ARP request from PC1, it does not populate it's ARP cache with the IP-to-MAC mapping of PC1.

While this may not seem to be the most efficient method of distributing address to host information, you need to remember that the ARP protocol was developed in 1982[1] and even back then the author made the following very relevant point:

The workstations aren't generally going to be talking to each other (and therefore have 100 useless entries in a table); they will be mainly talking to a mainframe, file server or bridge, but only to a small number of other workstations (for interactive conversations, for example). The protocol described in this paper distributes information as it is needed, and only once (probably) per boot of a machine.

It would be a trivial usage of resource on today's PCs to populate the entire ARP table for the local subnet(s) the machine resides on, but perhaps not so for a networked machine back in 1982.

[1] RFC826 - An Ethernet Address Resolution Protocol - https://tools.ietf.org/html/rfc826

| improve this answer | |
2

ARP replies are unicast, so the switch doesn't forward it to PC 3.

Gratuitous ARPs are broadcast so all nodes can hear it.

| improve this answer | |
  • PC3 don't see the reply (because the switch MAC tables contains PC1) but it is able to see the request as shown in the screenshot I added. – SwissFr Dec 8 '16 at 15:35
  • What you mean is that an ARP entry is only added by the hosts associated to the ARP exchange ? In this case only PC1 and PC2, except for Gratuitous ARP that are destined to all hosts. – SwissFr Dec 8 '16 at 15:39
  • This is really a function of how switches forward frames, not of the ARP protocol itself. When PC2 replies, the switch looks at the destination MAC (PC1) and only forwards the frame out the port attached to PC1. The reply never gets forwarded to SW2 or PC3. The ARP request is a broadcast, so switches flood them out all ports. – Ron Trunk Dec 8 '16 at 15:44
  • Alright, I see. Thank you for explanation. But why doesn't the PC3 benefit from this request and add a new ARP entry for a future use ? – SwissFr Dec 8 '16 at 16:01
  • I don't think you understand. PC3 can't make an entry in its ARP table because switch 1 never forwards the reply to switch 2, so PC 3 never hears it. – Ron Trunk Dec 8 '16 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.