Open In App

RARP Packet Format

Last Updated : 25 Oct, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Reverse Address Resolution Protocol (RARP) is a networking protocol that is used to map a physical (MAC) address to an Internet Protocol (IP) address. It is used to obtain the IP address of a host based on its physical address. That is, it performs in a way that is exactly opposite to that of the ARP. RARP works in a very similar way to ARP but in the exact opposite direction.

RARP was developed in the early days of computer networking as a way to provide IP addresses to diskless workstations or other devices that could not store their own IP addresses. With RARP, the device would broadcast its MAC address and request an IP address, and a RARP server on the network would respond with the corresponding IP address.

Uses of RARP

  • To convert the Ethernet address to an IP address.
  • It is available for LAN technologies like FDDI, token ring LANs, etc.

RARP Packet Format

RARP packet format is the same as the ARP packet, except for the operation field in either 3 or 4.

i.e. 3-RARP request and 4-RARP reply

RARP-address-protocol-format

RARP packet

The fields are further explained below:

  • Hardware Address Type : It is 2-byte field. It is type of hardware MAC address present in the packet. For Ethernet, the value of this field is 1.
  • Protocol Address Type (PTYPE): It is 2 byte field. It is type of the protocol address requested for the MAC address. For IP address the value of this field is 0*100.
  • Hardware length(HLEN): It is 1byte field. It indicates the size of the hardware MAC address. For Ethernet, the value of this field is 6.
  • Protocol length(PLEN): It is 1 byte field. It indicates the size of the protocol address. For IP, the value of this field is 4.
  • Operation : It is a 2-byte field. It indicates the type of operation being performed. The value of this field can be 3 (RARP request) or 4 (RARP reply).
  • Sender Hardware Address: It is 6-byte field. In a RARP request packet, this is the hardware MAC address of the source host. In a RARP reply packet, this is the hardware MAC address of the RARP server sending the RARP reply.
  • Sender Protocol Address : It is 4 byte field. In a RARP request packet, this is undefined. In a RARP reply packet, this is the IP address of the RARP server sending the RARP reply.
  • Target Hardware Address : It is 6byte field. In a RARP request packet, this is the hardware MAC address of the source host. In a RARP reply packet, this is the hardware MAC address of the host, that sent the RARP request packet.
  • Target Protocol Address : It is 4 byte field. In a RARP request packet, this is undefined. In a RARP reply packet, this is the IP address of the host that sent the RARP request packet.

FAQs on RARP Packet Format

Q.1: What is the Purpose of the RARP Packet?

Answer:

RARP packets are used to obtain a mapping between a known IP address and an unknown MAC address. This is especially useful for diskless workstations during the bootstrap process.

Q.2: What is the Size of an RARP Packet?

Answer:

The size of an RARP packet can vary depending on the specific implementation and the data it carries. However, the minimum size of an Ethernet frame, which encapsulates an RARP packet, is 64 bytes.

Q.3: How is RARP Different from ARP (Address Resolution Protocol)?

Answer:

RARP and ARP serve similar purposes but in reverse directions. RARP resolves IP addresses to MAC addresses (getting MAC from IP), whereas ARP resolves MAC addresses to IP addresses (getting IP from MAC).


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads