Mapping Internet Addresses To Physical Addresses (ARP)
Mapping Internet Addresses To Physical Addresses (ARP)
Addresses to Physical
Addresses (ARP)
Chapter 5
Each host has 32-bit address (IP address)
applications
Send
Answering requests
First extract sender’s binding
If cache entry exists, update it
Next, process the packet
If target of request, then answer
If not target, ignore rest of packet
ARP Encapsulation
ARP messages travel in data portion of a frame
Sender assigns special type value in header
ARP Protocol Format
ARP packets do not have fixed format
header
Length of fields with addresses depend
on the type of network
Header includes fixed fields near beginning
Format is general enough to be used with
arbitrary physical addresses and arbitrary
protocol addresses
Example ARP message format for Ethernet
0 8 16 24 31
Hardware Type Protocol Type
HLEN PLEN Operation
Sender HA (octets 0-3)
Sender HA (octets 4-5) Sender IP (octets 0-1)
Sender IP (octets 2-3) Target HA (octets 0-1)
Target HA (octets 2-5)
Target IP (octets 0-3)
Automatic Cache Revalidation
Jitter
Variance in packet transfer times
ARP timer expires; next datagram has extra delay
Automatic revalidation
Use a second (revalidation) timer for each entry
Goes off early; sends ARP request
Can still use ARP cache entry
If station replies, both timers reset
If no reply, act as normal when traditional timer expires
Reverse ARP (RARP)
Operation field can specify Reverse ARP
Allows system to obtain its IP address at startup
Computer can know its hardware address, but perhaps
not its IP address (ex.: diskless systems)
When booting, system broadcasts a RARP request
RARP server has to be configured and listening
RARP server sends reply giving requester’s IP address
RARP no longer used
At one time was essential for computers without
stable storage (see DHCP, Chap. 22)
Summary
IP addresses are independent of physical
addresses
To send packets, must do mapping
Direct mapping
If physical addresses smaller than IP addresses
Dynamic mapping
ARP performs dynamic address resolution
ARP broadcast finds physical addresses
All machines receive ARP broadcast
If IP address matches machine’s, answer request
Replies directed to one machine only (not
broadcast)
For efficiency, bindings are cached
Cache helps eliminate many broadcast
Early revalidation can be used to avoid jitter
RARP
Could be used to obtain IP address at startup
Now obsolete