Address Resolution Protocol (ARP)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Address Resolution Protocol

(ARP)

Chapter 8
Address Mapping

 Static Mapping
 Involves list of logical and physical addresses
 Maintenance of list requires high overhead
 Dynamic Mapping
 Finds physical address given logical address
 Address Resolution Protocol (ARP)

2
Position of ARP in TCP/IP Protocol Suite

3
ARP Operation

LAN

System A System B

Request

Looking for physical address of a


node with IP address 141.23.56.23

a. ARP request is broadcast


multicast

LAN

System A System B

Reply

The node physical address


is A4:6E:F4:59:83:AB

b. ARP reply is unicast

4
ARP Packet

5
Encapsulation of ARP Packet

Type: 0x0806

Preamble Destination Source


Type Data CRC
and SFD address address
8 bytes 6 bytes 6 bytes 2 bytes 4 bytes

6
Example of ARP Request and Reply

7
Four Cases using ARP

8
Proxy ARP (RFC 1027)

 Proxy ARP can help machines on a subnet reach remote


subnets without the need to configure routing or a
default gateway
*Cisco: Document ID:13718

Added subnetwork
The proxy ARP router replies 141.23.56.21 141.23.56.22 141.23.56.23
to any ARP request received
for destinations 141.23.56.21,
141.23.56.22, and 141.23.56.23.

Request

Proxy ARP
Router or host router

9
Proxy ARP: Example

Host A on
Subnet A needs
to send packets
to Host D on
Subnet B

*Cisco: Document ID:13718 10


Proxy ARP: Example

 Host A broadcasts an ARP request on Subnet A:


Sender's MAC Address Sender's IP Address Target MAC Address Target IP Address

00-00-0c-94-36-aa 172.16.10.100 00-00-00-00-00-00 172.16.20.200

 Proxy ARP reply that the router sends to Host A:


Sender's MAC Address Sender's IP Address Target MAC Address Target IP Address

00-00-0c-94-36-ab 172.16.20.200 00-00-0c-94-36-aa 172.16.10.100

 ARP cache of Host A:


IP Address MAC Address

172.16.20.200 00-00-0c-94-36-ab
172.16.20.100 00-00-0c-94-36-ab
172.16.10.99 00-00-0c-94-36-ab
172.16.10.200 00-00-0c-94-36-bb
*Cisco: Document ID:13718 11
ARP Cache Table

 Most recent address mappings are kept in


cache table
 Mappings in cache table have time-to-live and
updated periodically

12
ARP Cache Table

13
ARP Components

14
Output Module

 Receive IP packet from IP layer


 Check cache table for IP destination addr.
 RESOLVED
 Send packet to data link layer
 PENDING
 Enqueue packet to corresponding queue
 No entry
 Create entry  PENDING & set Attempt to 1
 Create queue and enqueue packet
 Send ARP request
15
Input Module

 Receive ARP packet (request or reply)


 Check cache table for corresponding entry
 PENDING
 Update entry  RESOLVED & set Time-out
 Dequeue IP packets and send to data link layer
 RESOLVED
 Update entry & reset Time-out
 No entry
 Create entry  RESOLVED & set Time-out
 If ARP request, send ARP reply
16
Cache-Control Module

 Periodically check cache table entries


 FREE
 Continue to next entry
 PENDING
 Increment Attempt by 1
 Attempt > Max  FREE
 Attempt < Max  send ARP request
 RESOLVED
 Decrement Time-out
 Time-out  0  FREE
17

You might also like