Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

RARP Protocol

RARP Protocol

RARP (Reverse Address Resolution Protocol) is a protocol used to resolve data link layer addresses (such as MAC addresses) into network layer addresses (such as IP addresses).

RARP is the reverse operation of ARP (Address Resolution Protocol), mainly used by devices such as diskless workstations to obtain their own IP address at startup.


How RARP Works

The core function of RARP is to resolve MAC addresses into IP addresses through broadcast requests and unicast responses.

1. RARP Request

When a device starts up and does not know its own IP address, it sends a RARP request broadcast packet asking "Who owns this MAC address?".

2. RARP Response

If a device (usually a RARP server) finds in its configuration an IP address mapping for that MAC address, it sends a RARP response packet informing the corresponding IP address.


3. IP Address Configuration

After receiving the RARP response, the sender uses the obtained IP address to configure its own network interface, enabling communication with other devices.


Key Features of RARP

  1. MAC Address to IP Address Mapping:

  2. Resolves data link layer addresses into network layer addresses.
  3. - Resolves data link layer addresses into network layer addresses.
    1. Broadcast requests and unicast responses:

    2. Uses broadcast to send RARP requests and unicast to send RARP responses.
    3. - Uses broadcast to send RARP requests and unicast to send RARP responses.
      1. Use by Diskless Workstations:

      2. Mainly used by diskless workstations to obtain an IP address at startup.
      3. - Mainly used by diskless workstations to obtain an IP address at startup.
        1. Used within a LAN:

        2. RARP is mainly used in local area networks and is not suitable for cross-network communication.
        3. - RARP is mainly used in local area networks and is not suitable for cross-network communication.

          Applications of RARP

          RARP is widely used in the following scenarios:

          1. Diskless Workstations:
          2. Diskless workstations obtain their IP address through RARP at startup.
          3. - Diskless workstations obtain their IP address through RARP at startup.
            1. Network configuration:
            2. In environments lacking DHCP, RARP is used to assign IP addresses to devices.
            3. - In environments lacking DHCP, RARP is used to assign IP addresses to devices.

              Limitations of RARP

              RARP has the following limitations:

              1. Single function:
              2. Can only provide an IP address and cannot provide other network configuration information (such as subnet mask, gateway).
              3. - Can only provide an IP address and cannot provide other network configuration information (such as subnet mask, gateway).
                1. Depends on a RARP Server:
                2. Requires configuring a dedicated RARP server, increasing management complexity.
                3. - Requires configuring a dedicated RARP server, increasing management complexity.
                  1. Poor Security:
                  2. Vulnerable to spoofing attacks, as attackers can forge RARP responses.
                  3. - Vulnerable to spoofing attacks, as attackers can forge RARP responses.

                    Alternatives to RARP

                    Due to the limitations of RARP, it has been replaced by more powerful protocols, mainly including:

                    1. BOOTP(Bootstrap Protocol):
                    2. Provides IP addresses and other network configuration information.
                    3. - Provides IP addresses and other network configuration information.
                      1. DHCP(Dynamic Host Configuration Protocol):
                      2. Dynamically assigns IP addresses and other network configuration information; it is an extension of BOOTP.
                      3. - Dynamically assigns IP addresses and other network configuration information; it is an extension of BOOTP.

                        In summary, RARP is a protocol used to resolve MAC addresses into IP addresses, achieving address mapping through broadcast requests and unicast responses. It is mainly used by diskless workstations to obtain an IP address at startup, but due to its single function and poor security, it has been replaced by BOOTP and DHCP.