UNDERSTANDING
ARP and RARP
ARP - ADDRESS RESOLUTION PROTOCOL
RARP - REVERSE ADDRESS RESOLUTION
PROTOCOL
•
•
HET PATEL 202307100110119
MANN PATEL 202307100110066
•
Address Resolution
Protocol (ARP)
Understanding ARP and RARP
Introduction to Address
Mapping
At the Network Layer, we use logical addresses (IP addresses) for routing packets across
networks. However, at the Data Link Layer, communication relies on physical addresses
(MAC addresses).
To enable communication, we need a mechanism to map IP addresses to MAC addresses.
This mapping can be done in two ways:
Logical Address Physical Address
IP Address MAC Address
Used at the Network Layer Used at the Data Link Layer
For communication within a local network
For routing across networks
Static Mapping: Manually configuring the mapping between IP and MAC addresses.
Dynamic Mapping: Using protocols like ARP and RARP to automatically discover the
mappings.
Static vs Dynamic
Mapping
Static Mapping Dynamic Mapping (ARP/RARP)
Manual configuration Automatic discovery
Not scalable for large networks Scalable
Difficult to maintain Faster and more efficient
Error-prone
Preferred approach
What is
ARP?
Address Resolution Protocol (ARP) maps an IP address to its corresponding MAC
address.
It is essential for communication within a Local Area Network (LAN).
ARP operates before IP packets reach the Data Link Layer, ensuring that the packets have
the correct destination MAC address.
How ARP Works
1. ARP Request: The sender broadcasts an ARP Request onto the LAN, asking "Who has
IP address X? Tell Y."
2. ARP Reply: The device with IP address X replies with an ARP Reply containing its
MAC address.
3. Caching: The sender caches the IP-MAC address mapping for future use, reducing the need
for frequent ARP requests.
4. Data Transmission: The sender can now send data directly to the recipient using the
obtained MAC address.
ARP Packet Structure
An ARP packet contains the following key fields:
Hardware Type: Specifies the type of network hardware (e.g., Ethernet).
Protocol Type: Indicates the protocol being used (e.g., IP).
Operation Code: Defines the type of ARP packet (Request or Reply).
Sender MAC Address: The MAC address of the sender.
Sender IP Address: The IP address of the sender.
Target MAC Address: The MAC address of the target (0 in ARP
Request).
Target IP Address: The IP address of the target.
The Operation Code is particularly important:
1: ARP Request
2: ARP Reply
ARP Use
Cases
ARP is used in various scenarios:
Host to Host: Direct communication between devices on the same LAN.
Host to Router: A host needs to send data to a destination outside its local network and
needs to find the router's MAC address.
Router to Router: Routers communicating within the same network segment.
Router to Host: A router delivering data to a host on its local network.
Proxy ARP
Proxy ARP is a technique where a router answers ARP requests on behalf of another host.
It makes different networks appear as a single subnet.
Useful in scenarios where subnetting is required, but hosts are not configured to handle
multiple subnets.
Reverse address
resolution protocol
(RARP)
RARP Overview
Reverse ARP (RARP) maps a MAC address to an IP address.
It was primarily used by diskless devices to discover their IP address during boot-up.
RARP has been largely replaced by DHCP (Dynamic Host Configuration Protocol)
and BOOTP (Bootstrap Protocol), which provide more comprehensive configuration
options.
Summary
RARP (Reverse Address Resolution Protocol) maps a MAC address to an IP address,
opposite of ARP.
It was used for diskless devices to discover their IP address during boot-up.
At boot time, the device sends its MAC address to a RARP server to request an IP.
The RARP server replies with the correct IP address assigned to that MAC.
🔶 Limitations :
Requires a RARP server on every network and only provides the IP address — no full
configuration.