Thursday, June 14, 2018

ARP Notes

I am not going to describe more in detail of the packet formatting.  ARP is the protocol primarily used to retrieve MAC address of a known IP address.  In addition to Ethernet header, following are some of the contents that we usually see (in Ethernet network)
  • Size of MAC address
  • Size of IP address
  • Option(request or reply)
  • Sender MAC address
  • Sender IP address
  • Destination MAC address
  • Destination IP address
Scenario 1

For convenience, we say PC1 is PC with IP address 192.168.1.1 and PC10 is PC with IP address 192.168.1.10

PC1 is wants to get MAC address of PC10.


After this packet reaches PC10, "PC10 will update PC1 details in its ARP cache" by looking ARP request. PC10 will reply to PC1.
PC1 will update PC10 details.  From then on, PC1 and PC10 will not ask for the MAC details of its peers.  Once information is received, till the time the MAC entries are not flushed in its ARP cache, it will use the MAC addresses.

Scenario 2

This is about gratuitous ARP.  A new machine connected to a network advertises its details.  It depends on OS implementation.  I say PC100 is the machine.


  • Dest. MAC in Ethernet header is FFFF..... It is destined for all machines.  If destined for unique machine, all machines will drop the packet and not process it.
  • It will always be ARP request
  • Source MAC in Ethernet Header = Source MAC in ARP packet
  • Source IP in ARP packet = Destination IP in ARP packet
  • Target MAC is all 0s, because it has to abide by the packet structure of ARP Request.