Difference between ARP and RARP

Address Resolution Protocol (ARP):

A host can send the packet to a destination by knowing its IP address. But IP packets must be delivered by the underlying network technology that is called Ethernet which uses a 48 bit MAC address. The source host must also know the destination MAC address if the packet is to be delivered to the destination successfully. but in a network that consists of several nodes, it is not always possible for each node to know the MAC address of the rest of the nodes NIC.

A better solution is to use Address Resolution Protocol (ARP). Almost every machine on the Internet runs it. To use Address Resolution Protocol (ARP), the system administrator assigns the IP address to each machine and decides the subnet mask. ARP does the rest, it is defined in RFC 826.

Main Purpose of ARP:

The main purpose of ARP is that the source host broadcasts an ARP packet in the network with IP address of the destination host. Every machine in the network receives the packet but only the destination host responds to it. The destination host then sends a response packet containing the MAC and IP addresses of itself. The source host updates its configuration table with this information.

If the destination host is in a remote network then the source host may use proxy ARP in which all remote traffic is sent to a local router that is configured for remote networks. Otherwise, the source host sends all traffic to a default Ethernet address that handles all remote traffic.

Address Resolution Protocol (ARP)

Reverse Address Resolution Protocol (RARP):

Sometimes it is required to get the IP address from the MAC address. This problem can be handled by Reverse Address Resolution Protocol (RARP). To obtain an IP address, the host first sends a RARP request packet containing the MAC address on the network. The RARP server receives the packet, looks up the Ethernet address in its configuration table send back the corresponding IP address.

Disadvantages of RARP:

  • It uses a destination address of all 1’s (limited broadcasting) to reach RARP server.

    ARP vs RARP:

    ARP
    RARP
    1. It stands for Address Resolution Protocol1. It stands for Reverse Address Resolution Protocol
    2. It maps 32-bit IP address to 48-bit MAC address2. It maps 48-bit MAC address to 32-bit IP address
    3. It retrieves the physical address of the receiver.3. It retrieves the logical address for a computer from the server.