RARP (Reverse Address Resolution Protocol) is a protocol that works in reverse to ARP.

 ARP gets the MAC address from the IP address, while RARP gets the IP address from the MAC address. RARP is mainly used by terminals that cannot store IP addresses, such as diskless computers.

 Since diskless computers do not have hardware that can store IP addresses, they only know their own MAC addresses when they join the network.

So, use the following steps to get your own IP address.

1. Send a RARP request packet with blanks in your own MAC address and own IP address with the broadcast address.

2. The RARP server receives the RARP request packet and looks up the IP address corresponding to the queried MAC address from the list.

3. Returns a RARP response to the diskless computer that made the inquiry. This packet contains the MAC address and the discovered IP address.

RARP gets the IP address from the MAC address. 

The operation of RARP consists of two exchanges:

RARP request

Send a packet with your own MAC address and your own IP address blanked to the broadcast address.

RARP response

The RARP server sends a packet containing the assigned IP address to the source of the RARP request.

Structure of RARP header

The RARP header structure is common with the ARP header. It is designed to be used properly by the operation code.

*For Ethernet

Operation code (ARP/RARP)

Contains a code to represent the type of ARP operation.

1ARP request
2ARP response
3RARP request
FourRARP response

 The only information that can be obtained with RARP is the IP address. It is not possible to obtain information that is essential for today's IP configuration, such as subnet mask, gateway address, and DNS server address.

Currently, automatic configuration using BOOTP and DHCP, which have more functions, is the mainstream.