Networking‎ > ‎

ARP\RARP

ARP (Address Resolution Protocol)

ARP maps logical address to physical address.

ARP Packet Format
 S. No. FieldField Description Size (bits) Description
     
 1HTYPE    Hardware Type     16         Ethernet = 1
 2PTYPE Protocol Type  16 IPv4 = (0800) 16
 3HLEN Hardware Length  8             Physical Address in bytes, 48 bits = 6
 4PLEN Protocol Length  8  Logical Address in bytes, 32 bits = 4 
 5OPER Operation  16  Type of Packet ARP request (1), ARP reply (2) 
 6SHA Sender Hardware Address Variable Length Ethernet = 6 bytes
 7SPA         Sender Protocol AddressVariable Length IPv4 Protocol = 4 bytes 
 8THA Target Hardware Address Variable Length Ethernet = 6 bytes 
 9TPA Target Protocol AddressVariable Length IPv4 Protocol = 4 bytes 

An ARP packet in encapsulated directly into data link frame (Ethernet frame).
An ARP request is a broadcast and an ARP reply is unicast.

Proxy ARP
A technique called proxy ARP is used to create a subnetting effect. A proxy ARP is an ARP that acts on behalf of a set of hosts.
Whenever a router running a proxy ARP receives an ARP request looking for the IP address of one of these hosts, the router sends as ARP reply announcing its own hardware (physical) address.


RARP (Reverse Address Resolution protocol)

RARP finds the logical address for a machine that only knows its physical address.

A diskless machine is usually booted from ROM. A RARP request is created and broadcast on the local network.
Another machine on the local network that knows all the IP addresses will respond with a RARP reply. The requesting machine must be running a RARP client program, the responding machine must be running a RARP server program.

The RARP request packets are broadcast and the RARP reply packets are unicast. A RARP packet is encapsulated directly into a data link frame.

RARP Packet Format
 S. No. FieldField Description Size (bits) Description
     
 1HTYPE    Hardware Type     16         Ethernet = 1
 2PTYPE Protocol Type  16 IPv4 = (0800) 16
 3HLEN Hardware Length  8             Physical Address in bytes, 48 bits = 6
 4PLEN Protocol Length  8  Logical Address in bytes, 32 bits = 4 
 5OPER Operation  16  Type of Packet RARP request (3), RARP reply (4) 
 6SHA Sender Hardware Address Variable Length Ethernet = 6 bytes
 7SPA         Sender Protocol AddressVariable Length IPv4 Protocol = 4 bytes 
 8THA Target Hardware Address Variable Length Ethernet = 6 bytes 
 9TPA Target Protocol AddressVariable Length IPv4 Protocol = 4 bytes 



Alternate Solutions to RARP
When a diskless computer is booted, it needs more information in addition to its IP address. It needs to know its subnet mask, the IP address of a router, and the IP address of a name server. RARP cannot provide this extra information, BOOTP and DHCP are used instead of RARP.
Comments