LinuxCommandLibrary

rarp

Request IP address using MAC address

SYNOPSIS

rarp [-v] [-H type] [-a] [-d hostname] [-s hostname hw_addr] [-f filename]

PARAMETERS

-v
    Enables verbose output, showing more details about the actions performed.

-H type
    Specifies the hardware address type. Common types include 'ether' (Ethernet), 'ax25', 'netrom', 'arcnet', 'fddi'.

-a
    Displays all current RARP table entries.

-d hostname
    Deletes the RARP entry associated with the specified hostname.

-s hostname hw_addr
    Adds a static RARP entry. hostname is the IP address or name, and hw_addr is the hardware (MAC) address.

-f filename
    Reads RARP entries from the specified filename. Each line in the file should contain a hostname and a hardware address.

DESCRIPTION

The rarp command manipulates the kernel's Reverse Address Resolution Protocol (RARP) cache. RARP is a deprecated network protocol used by a host to discover its own IP address when it only knows its MAC (hardware) address. This was typically used by diskless workstations during boot-up to obtain their IP configuration. The rarp utility allows system administrators to view existing static RARP entries or add/delete them from the kernel's RARP table. Unlike ARP, which resolves IP to MAC, RARP resolves MAC to IP. Modern networks rarely use RARP, having largely replaced it with BOOTP and subsequently DHCP, which offer more robust and dynamic address assignment capabilities. As such, the rarp command is often not installed by default on contemporary Linux distributions, or its functionality is integrated into more general-purpose tools like ip.

CAVEATS

Obsolete Protocol: RARP is largely deprecated and replaced by DHCP and BOOTP, making the command rarely necessary in modern networks.
Kernel Support: The Linux kernel must be compiled with RARP support for this command to function.
Static Entries Only: This command primarily manages static RARP cache entries; it does not typically send RARP requests to dynamically resolve addresses itself (that's the job of an RARP daemon like rarpd).
Availability: The rarp utility is often part of the net-tools package, which is being superseded by the iproute2 suite on many contemporary Linux distributions. It might not be installed by default.

RARP VS. ARP

While both RARP and ARP are address resolution protocols, they serve inverse functions. ARP (Address Resolution Protocol) maps an IP address to a hardware (MAC) address. RARP (Reverse Address Resolution Protocol) maps a hardware (MAC) address to an IP address.

ROLE OF RARPD

The rarp command line utility manipulates static entries in the kernel's RARP cache. Actual RARP requests from clients are typically handled by a daemon, such as rarpd, which listens for RARP requests and replies with the appropriate IP address configured for the requesting MAC.

HISTORY

RARP was standardized in RFC 903 in 1984 as a simple mechanism for diskless workstations to determine their own IP address based on their known MAC address. It quickly gained adoption for bootstrapping such systems. However, its limitations, such as requiring a RARP server on each network segment and its one-to-one mapping, led to its gradual replacement. BOOTP (RFC 951, 1985) and, more prominently, DHCP (RFC 2131, 1997) emerged as more versatile and dynamic alternatives, providing not just IP addresses but also other network configuration details (netmask, gateway, DNS servers). The rarp command itself is part of the net-tools collection, a set of command-line utilities for network configuration that has seen declining usage in favor of the more modern and powerful iproute2 utilities.

SEE ALSO

arp(8), ip(8), dhcp(8), rarpd(8)

Copied to clipboard