Address Resolution Protocol
Address Resolution Protocol
System1 System 2
Sender Request destination
When this system 1 request system 2 for finding MAC address i.e.
known as ARP Request.
When we get reply from destination i.e. always unicast.
Address Resolution Protocol
• ARP request is used in only IPV4 environment
• Arp is never generated for the device of other network
• If two different networks are there then no ARP request is
generated.
• ARP request is generated for similar networks.
Types of ARP
1) ARP
2) Proxy ARP
3) Reverse ARP
4) Gratuitous ARP
Format of ARP Packet
Address Resolution Protocol
• If router is there
Router
C D
0/0 0/1
PC 1 PC 2
A B
10.0.0.1 20.0.0.1
ARP
DATA Source IP Destination IP Source MAC Destination
MAC
10.0.0.2 20.0.0.2
Router
C D
0/0 0/1
PC 1 PC 2
A B
10.0.0.1 20.0.0.1
ARP Request for default Gateway
ARP Request 10.0.0.1 10.0.0.2 A FF:FF:FF:FF:FF:F
F
ARP Reply
ARP Reply 10.0.0.2 10.0.0.1 C A
Routing Table
0/0 10.0.0.0
0/1 20.0.0.0
Terms associated with ARP
• ARP Cache: After resolving MAC address
✓ The ARP sends it to the source where it stores in a table for future reference.
✓ The subsequent communications can use the MAC address from the table.
• ARP Cache Timeout: It indicates the time for which the MAC address in the ARP cache can reside
• ARP request: This is nothing but broadcasting a packet over the network to validate whether we came
across destination MAC address or not.
✓ ARP request packet contains:
✓ The physical address of the sender.
✓ The IP address of the sender.
✓ The physical address of the receiver is 0s.
✓ The IP address of the receiver
✓ Note, that the ARP packet is encapsulated directly into data link frame.
• ARP response/reply: It is the MAC address response that the source receives from the destination
which aids in further communication of the data.
Gratuitous ARP
• Used when a node (end system) has selected an IP
address and then wishes to defend its chosen address
on the local area network (i.e. to check no other
node is using the same IP address).
• It can also be used to force a common view of the
node's IP address (e.g. after the IP address has
changed).
• Use of this is common when an interface is first
configured, as the node attempts to clear out any
stale caches that might be present on other hosts.
• The node simply sends an arp request for itself.
Gratuitous ARP
Gratuitous ARP
GARP Source IP Destination IP Source MAC Destination MAC
Request 10.0.0.1 10.0.0.1 A FF:FF:FF:FF:FF:FF
CAM Table
10.0.0.1 A
10.0.0.1 F
10.0.0.2 E
10.0.0.3 D
10.0.0.4 B
10.0.0.5 C
Reverse ARP
• Network layer protocol
• To obtain an IP address for given MAC address
• Limitation: each MAC address must be configured
manually on a centralized server
• Useful for diskless system
MAC address
IP address
Reverse ARP