logoCndocs
Osi model/Network Layer

Reverse Address Resolution Protocol (RARP)

Reverse Address Resolution Protocol (RARP) is a network protocol used to obtain an IP address for a given MAC address. It operates in the opposite direction of ARP, which maps IP addresses to MAC addresses. RARP was primarily used by diskless workstations that needed to discover their IP addresses during the boot process.

How RARP Works

RARP operates through the following steps:

  1. RARP Request: A client device broadcasts a RARP request containing its MAC address to all devices on the local network.

  2. RARP Server Processing: A RARP server (or multiple servers) on the network maintains a database of MAC-to-IP mappings. When it receives a RARP request, it looks up the MAC address in its database.

  3. RARP Reply: If the MAC address is found, the RARP server sends a RARP reply containing the corresponding IP address back to the requesting device.

  4. IP Configuration: The client device receives the reply and configures itself with the provided IP address.

RARP Process

RARP Packet Format

The RARP packet format is similar to the ARP packet format, with the following fields:

FieldSize (bytes)Description
Hardware Type2Specifies the network link protocol type (1 for Ethernet)
Protocol Type2Specifies the internetwork protocol (0x0800 for IPv4)
Hardware Address Length1Length of hardware addresses (6 bytes for Ethernet)
Protocol Address Length1Length of protocol addresses (4 bytes for IPv4)
Operation2Specifies the operation (3 for RARP request, 4 for RARP reply)
Sender Hardware Address6MAC address of sender
Sender Protocol Address4IP address of sender (zeros in request)
Target Hardware Address6MAC address of target (same as sender in RARP)
Target Protocol Address4IP address of target (zeros in request, filled in reply)

RARP Server Requirements

For RARP to function properly, the following requirements must be met:

  1. RARP Server: At least one RARP server must be present on each physical network segment.

  2. MAC-to-IP Database: The RARP server must maintain a database mapping MAC addresses to IP addresses.

  3. Administrative Setup: Network administrators must configure the RARP server with the appropriate mappings.

Limitations of RARP

RARP had several significant limitations that led to its eventual replacement:

  1. Limited Information: RARP only provides an IP address, with no additional network configuration information like subnet mask, default gateway, or DNS servers.

  2. Layer 2 Dependency: RARP operates at the Data Link Layer (Layer 2), making it difficult to use across routers or different network segments.

  3. Multiple Servers: Each network segment requires its own RARP server, increasing administrative overhead.

  4. Static Configuration: RARP requires manual configuration of MAC-to-IP mappings, making it difficult to scale.

Replacement Protocols

Due to its limitations, RARP has been largely replaced by more advanced protocols:

  1. BOOTP (Bootstrap Protocol): Extends RARP functionality by providing additional configuration information and working across routers.

  2. DHCP (Dynamic Host Configuration Protocol): Further extends BOOTP with dynamic address allocation, lease times, and additional configuration options.

  3. IPv6 Stateless Address Autoconfiguration: In IPv6 networks, devices can automatically configure their own IP addresses without the need for a server.

Historical Significance

Despite being largely obsolete today, RARP played an important role in the evolution of network protocols:

  • It was one of the first protocols to address the need for automatic IP address configuration.
  • It highlighted the importance of bidirectional address resolution (both IP-to-MAC and MAC-to-IP).
  • Its limitations directly influenced the development of more sophisticated protocols like BOOTP and DHCP.

Comparison with ARP

FeatureARPRARP
PurposeMaps IP addresses to MAC addressesMaps MAC addresses to IP addresses
DirectionNetwork Layer to Data Link LayerData Link Layer to Network Layer
UsageUsed by all IP-enabled devicesPrimarily used by diskless workstations
Server RequirementNo server requiredRequires a RARP server
Current StatusStill widely usedLargely obsolete

Conclusion

While RARP is no longer commonly used in modern networks, understanding its principles and limitations provides valuable insight into the evolution of network protocols. The challenges addressed by RARP—particularly the need for automatic IP address configuration—remain relevant today, though they are now solved by more sophisticated protocols like DHCP.

Test Your Knowledge

Take a quiz to reinforce what you've learned

Exam Preparation

Access short and long answer questions for written exams

Share this page

On this page

Edit on Github