Reverse Address Resolution Protocol
Fundamentals
Definition and Purpose
The Reverse Address Resolution Protocol (RARP) is a networking protocol designed to enable devices to discover their Internet Protocol (IP) address by broadcasting their Media Access Control (MAC) address to a RARP server.[1] This inverse mapping from layer 2 hardware addresses (such as MAC) to layer 3 protocol addresses (such as IP) serves as the counterpart to the Address Resolution Protocol (ARP), which performs the forward resolution.[1] RARP operates at the network access layer, utilizing broadcast frames to solicit responses from servers that maintain databases of address mappings.[4] Its primary purpose is to facilitate initial network configuration for devices lacking local storage or preconfigured IP addresses, particularly in environments predating dynamic host configuration protocols like DHCP.[1] For instance, diskless workstations or thin clients booting over a network rely on RARP to obtain their assigned IP address during startup, allowing them to proceed with further protocol exchanges such as file transfers or remote booting.[1] This mechanism was essential for early networked systems where manual IP assignment was impractical for resource-constrained hardware.[1]Comparison with ARP
The Reverse Address Resolution Protocol (RARP) shares several foundational elements with the Address Resolution Protocol (ARP), both designed to facilitate address mapping within local broadcast networks such as Ethernet.[1][5] Both protocols rely on broadcast transmissions for requests, assuming a shared medium where packets reach all devices on the local segment without requiring routing.[1][5] Additionally, they employ similar message formats within the payload, including fields for hardware and protocol types, address lengths, opcodes, and sender/target addresses, enabling efficient encapsulation in Ethernet frames.[1] However, RARP uses EtherType 0x8035 in the Ethernet header, distinct from ARP's 0x0806, to differentiate the protocol at the link layer.[6][5] Both protocols maintain mappings through tables: ARP via dynamic caches on individual hosts that store resolved pairs for reuse, and RARP via centralized databases on dedicated servers that provide authoritative responses.[5][1] Despite these parallels, RARP and ARP differ fundamentally in purpose and mechanics, reflecting their complementary roles in network communication. ARP performs forward resolution, mapping a known protocol address (e.g., IP) to a hardware address (e.g., MAC) to enable packet transmission to a specific destination during ongoing sessions.[5] In contrast, RARP conducts reverse resolution, allowing a device to obtain its own protocol address from its known hardware address, primarily for initial configuration in environments like diskless workstations.[1] Operationally, ARP requests use opcode 1 and elicit unicast replies with opcode 2, directed solely to the requester to minimize network overhead.[5] RARP, however, employs opcode 3 for requests and 4 for replies, also using unicast for responses after the initial broadcast query, but it depends on external servers rather than peer hosts for resolution.[1] A core distinction lies in their usage patterns and network implications. ARP supports repeated, dynamic discoveries essential for sustained data exchange, with caches updated on-demand to adapt to changing topologies.[5] RARP, by design, serves as a one-time bootstrap mechanism, invoked infrequently during device startup to acquire an IP address before further protocols like ARP can take over.[1] This positions RARP as a specialized, server-reliant tool for address acquisition, whereas ARP empowers decentralized, host-driven communication within the local network.[5][1]Operation
Request and Response Process
The Reverse Address Resolution Protocol (RARP) operates through a straightforward request-response exchange designed to enable a client device to obtain its Internet Protocol (IP) address when it only knows its Media Access Control (MAC) address. The process begins when a client, typically a diskless workstation booting up, generates a RARP request packet containing its own MAC address in both the sender and target hardware address fields. This request is broadcast across the local network using the Ethernet broadcast address ff:ff:ff:ff:ff:ff, ensuring that all devices on the shared medium receive it.[1] Upon receiving the broadcast request, any RARP server on the network examines the MAC address and consults its internal database, which maps hardware addresses to corresponding IP addresses. If a match is found, the server constructs a RARP reply packet, populating the target protocol address field with the client's assigned IP address while including its own IP address in the sender protocol address field for potential further communication. Unlike the request, the reply is sent as a unicast frame directly to the client's MAC address, allowing targeted delivery without unnecessary network flooding. The client then configures its network interface with the received IP address, enabling subsequent network operations such as mounting remote filesystems.[1] This mechanism employs a simple, Ethernet-layer protocol akin to the User Datagram Protocol (UDP) in its lack of connection establishment, relying instead on direct frame encapsulation without higher-layer involvement. RARP includes no built-in authentication to verify the requester's identity, nor does it provide error packets for unmatched addresses; instead, the client relies on timeouts—typically after several unanswered requests—to detect failure and retry or halt the boot process. Multiple servers may respond if configured, with the client accepting the first valid reply.[1] For instance, in 1980s local area networks, a Sun Microsystems diskless workstation would broadcast a RARP request during boot to a central server, receive its IP address via unicast reply, and proceed to access networked resources like shared storage.[7]Packet Format
The Reverse Address Resolution Protocol (RARP) packet is encapsulated in an Ethernet frame with an EtherType value of 0x8035, distinguishing it from ARP packets which use 0x0806.[1][6] The payload is a fixed 28-byte structure, mirroring the ARP format defined in RFC 826, consisting of an 8-byte header followed by 20 bytes of address fields.[1][5] The header fields specify the address types and operation, while the subsequent fields hold the hardware (MAC) and protocol (IP) addresses involved in the exchange. For Ethernet and IPv4, the hardware type is 1 (10 bits unused, padded with zeros), the protocol type is 0x0800, the hardware address length is 6 bytes, and the protocol address length is 4 bytes.[1] The opcode field indicates the packet type: 3 for a RARP request and 4 for a reply.[1] In a request packet (opcode 3), the sender hardware address and target hardware address are both set to the requester's 6-byte MAC address, while the sender protocol address and target protocol address are both zeroed (0.0.0.0).[1] This setup allows the server to identify the requester by MAC and respond with the appropriate IP. In a reply packet (opcode 4), the sender hardware and protocol addresses carry the 6-byte MAC and 4-byte IP of the responding server, the target hardware address repeats the requester's MAC from the request, and the target protocol address provides the assigned 4-byte IP for the requester.[1] The following table illustrates the RARP packet structure for Ethernet/IPv4:| Field | Size (bits) | Value in Request | Value in Reply | Description |
|---|---|---|---|---|
| Hardware Type | 16 | 1 (Ethernet) | 1 (Ethernet) | Identifies the hardware address format.[1] |
| Protocol Type | 16 | 0x0800 (IPv4) | 0x0800 (IPv4) | Identifies the protocol address format.[1] |
| Hardware Addr Length | 8 | 6 | 6 | Length of hardware addresses in bytes.[1] |
| Protocol Addr Length | 8 | 4 | 4 | Length of protocol addresses in bytes.[1] |
| Opcode | 16 | 3 | 4 | 3 for request, 4 for reply.[1] |
| Sender Hardware Addr | 48 | Requester's MAC | Server's MAC | Hardware address of sender.[1] |
| Sender Protocol Addr | 32 | 0.0.0.0 | Server's IP | Protocol address of sender (zero in request).[1] |
| Target Hardware Addr | 48 | Requester's MAC | Requester's MAC | Hardware address of target.[1] |
| Target Protocol Addr | 32 | 0.0.0.0 | Requester's IP | Protocol address of target (zero in request).[1] |