ARP vs RARP: Key Differences Explained
Advertisement
This article explores the differences between ARP (Address Resolution Protocol) and RARP (Reverse Address Resolution Protocol). It covers ARP requests and responses, ARP commands, and clarifies various networking terms.
As we know, a source computer (host) needs to know the Ethernet or physical address of the destination network adapter to send IP data. Therefore, ARP and RARP are crucial protocols because they convert IP addresses to physical addresses and vice versa.
What are ARP and RARP?
- ARP (Address Resolution Protocol): Converts an IP address to a physical address (i.e., Ethernet address).
- RARP (Reverse Address Resolution Protocol): Converts a physical address to an IP address.
Although these protocols operate behind the scenes, they are essential for TCP/IP to send IP packets between computers on a network.
ARP in Detail
Each host on the network maintains an ARP table (also often called an ARP cache). This table stores mappings between physical addresses and the IP addresses of other hosts on the same network segment.
How ARP Works
- Data Transmission Initiation: When a host wants to send data, it first checks its ARP table to see if the destination’s Ethernet address is already known.
- Address Found: If the Ethernet address is found in the table, the host uses it to send the data.
- Address Not Found: ARP Request: If the address is not found, the host broadcasts an ARP request to all hosts on the network. This request essentially asks, “Who has this IP address?”
- ARP Response: The host with the matching IP address responds with an ARP response, which contains its Ethernet address.
- ARP Table Update: The originating host then adds this newly acquired IP address-to-physical address mapping to its ARP table/cache. This is called dynamic entry addition.
ARP Commands
arp -a
: Displays the ARP table.arp -s 157.55.85.212 00-aa-00-62-c6-09
: Adds a static entry to the ARP table, associating IP address157.55.85.212
with the MAC address00-aa-00-62-c6-09
. Static entries are generally used for important, rarely changing devices on the network.
RARP in Detail
As mentioned earlier, RARP is the inverse of ARP. It’s used when the Ethernet (physical) address is known, but the IP address is not.
How RARP Works
RARP is often used with the BOOTP protocol to boot diskless workstations. A diskless workstation knows its own MAC address but needs to obtain an IP address to participate on the network. RARP allows it to discover its IP address.
Key Differences Between ARP and RARP
Feature | ARP | RARP |
---|---|---|
Purpose | IP address to Physical Address | Physical Address to IP address |
Use Case | General network communication | Diskless workstation booting |
Direction | Resolves IP address based on known destination IP | Resolves IP based on own MAC address |
Further Learning
Understanding the difference between ARP and RARP is crucial. To expand your knowledge, you can also explore the structure of ARP request and response commands, and the fields they contain.