The Address Resolution Protocol (ARP)
An Introduction
Prof. David Bernstein
James Madison University
Computer Science Department
bernstdh@jmu.edu
Introduction
Purpose:
Get the link (or access) layer address
(e.g., MAC address) for a given
network layer address (e.g., IP address)
Why?
Suppose an Ethernet host wants to send to another
host on the LAN -- it can use DNS to get the IP
address of the recipient but then what?
Suppose an Ethernet host on LAN 1 wants to send to
an Ethernet host on LAN 2 -- it can use DNS to get the IP
address of the recipient but how does it get the MAC
address of the router?
The target's hardware address (which is ignored for requests)
The target's protocol address
The Process
A check's its ARP table for B's IP address
If B's IP address is not in the table, A broadcasts an ARP request
(to ff:ff:ff:ff:ff:ff)
B (or the router, if the IP address is not on the LAN)
sends an ARP response to A (and
adds A's IP-MAC pair to its ARP table)
A adds the B's information to its ARP table
Gratuitous ARP Messages
What are they?
A way for a machine to announce that its IP or MAC
address has changed
Two Approaches:
A request in which the target's protocol address is the same
as the sender's protocol
address and the target's hardware address is 0
A response in which the target's protocol address is the
same as the sender's protocol address and the target's
hardware address is the same as the sender's hardware
address
Reverse Address Resolution Protocol (RARP)
Purpose:
Get the network layer address (e.g., IP address) for a given
link (or access) layer address
(e.g., MAC address)
Why?
Mostly useful for diskless workstations that have
no way to store their IP addresses