Address Resolution Protocol (ARP)
ARP table:
- Used to determine the interface’s MAC address given its IP address
- Entries are
<IP address; MAC address; TTL>
- TTL - Time after which address mapping will be forgotten (typically 20 minutes)
- Because devices can die without telling server
Steps
- A wants to send datagram to B
- B’s MAC address not in A’s ARP table
- A broadcasts ARP query packet, containing B’s IP address
- Destination MAC address =
FF-FF-FF-FF-FF-FF
- All nodes on LAN receive ARP query
- Query includes A’s MAC address so B can respond
- Destination MAC address =
- B receives ARP packet, replies to A with B’s MAC address
- Frame sent to A’s MAC address (unicast)
- A caches (saves) IP-to-MAC address pair in its ARP table until TTL
- Soft state: Information that times out unless refreshed
- ARP is “plug-and-play”:
- Nodes create their own ARP tables without intervention from net administrator
ARP Packet Format
- HardwareType: type of physical network (e.g. Ethernet)
- HLen: length of physical address
- PLen: length of protocol address
- Operation: Request or Response