What is the purpose of Address Resolution Protocol and Reverse Address Resolution Protocol?
ARP is used to mediate between ethernet (or other broadcast link-level protocols) and the network layer,
or IP protocols. Put more simply, ARP converts IP addresses to ethernet addresses.
ARP is necessary because the underlying ethernet hardware communicates using ethernet addresses, not IP addresses.
Suppose that one machine, with IP address 2 on an ethernet network, wants to speak to another machine on the same network with IP address 8.
The two machines use ARP to conduct the following dialogue:
- ARP RequestMachine 1 (IP=2) broadcasts to all machines on the network:
Question: Who has IP address 8?
- ARP ReplyMachine 2 (IP=8) replies: I do.
The reply of Machine 2 contains its ethernet address, so now Machine 1 knows it.
Machine 1 stashes that address temporarily in a kernel memory
area called the ARP cache.
That way, if it needs to speak to Machine 2 again soon, it does not have to repeat the ARP request.
Sometimes, ARP is the easiest way to find a machine's ethernet address.
For example, the Solaris
ifconfig command will not tell you a device's ethernet address,
but viewing the ARP cache on the machine will show it to you.
RARP is used for the opposite purpose; namely, to convert an ethernet address to an IP address.
Its linux-network-administration purpose is to enable diskless machines, such as X workstations, to find out their IP address at boot time.
Such a machine broadcasts a reverse-ARP request, such as: RARP request My ethernet address is such and such, what should my IP address be?
: RARP reply
Your IP address is
The RARP reply must come from an RARP server, which linux-network-administrationtains a file (/etc/ethers) listing the mapping from ethernet addresses to IP addresses.
Click the Quiz link below to take a short multiple-choice quiz on ARP and RARP.
Address Resolution Protocol - Quiz