ARP

Hi it’s the address resolution protocol!

Unit Goals

To understand the need for a link layer protocol and to examine the extremely popular ARP in some detail.

What ARP Is

So... an IP address is not a hardware address. A MAC address is. ARP is a protocol for mapping between them.

How ARP Works

Here’s the idea:

arp.png

  1. An IP packet destined for 157.242.71.101 arrives at host A from the outside.
  2. Host A broadcasts the message “Which one of you is 157.242.71.101?”
  3. The correct host unicasts back to A the message “I am, and my hardware address is ___.”
  4. Host A unicasts the IP packet to the right host.

Hosts SHOULD maintain an ARP cache so that every IP datagram that comes is does not require the whole APR exchange thing to take place.

ARP Message Format

The ARP message is embedded inside a frame. ARP messages look like this:

0 Hardware address type -- 1 for Ethernet
2 Protocol address type -- 1024 for IP
4 Number of octets in hardware address -- 6 for Ethernet
5 Number of octets in protocol address -- 4 for IPv4
6 Operation -- 1 for ARP Request, 2 for ARP Reply
8 Sender Hardware Address
Sender Protocol Address
Target Hardware Address
Target Protocol Address
Exercise: An IPv4 packet arrives at an Ethernet network’s router (MAC address 22:11:AB:C2:20:09). The packet is from 233.0.0.22 and is destined for 12.3.255.11 (MAC DB:C4:32:11:99:0B). Show the contents of the ARP request message broadcast from the router.

In the event that the local network uses Ethernet, here’s how the ARP message would be embedded inside the Ethernet frame:

Preamble Dest Src 0806 ARP Message CRC

Summary

We’ve covered:

  • What ARP is
  • How ARP works
  • How ARP messages are embedded in an Ethernet frame.