ARP and RARP protocols

๐Ÿ”น 1. ARP (Address Resolution Protocol)

ARP is used to translate an IP address (logical address) into a MAC address (physical address).

Why do we need ARP?

  • Devices communicate on a LAN using MAC addresses.
  • But applications use IP addresses.
  • ARP connects these two.

โญ How ARP Works

  1. A device wants to send data to IP: 192.168.1.5.
  2. It does NOT know the MAC address of that device.
  3. It sends a broadcast message to the entire LAN: โ€œWho has IP 192.168.1.5? Please send me your MAC address.โ€
  4. The device with that IP replies: โ€œI have IP 192.168.1.5. My MAC is AA:BB:CC:DD:EE:FF.โ€
  5. The first device stores this mapping in its ARP table.

โญ Key Points about ARP

  • Works only within a LAN
  • Uses broadcast for requests
  • Operates at Layer 2 (Data Link Layer) but helps Layer 3 (Network Layer)
  • Essential for sending packets to the correct hardware device

๐Ÿ”น 2. RARP (Reverse Address Resolution Protocol)

Purpose

RARP converts a MAC address โ†’ IP address.
(Exactly opposite of ARP.)

Why was RARP used?

Older devices like diskless workstations did not have storage to save IP addresses.
So, they asked the network for their IP.


โญ How RARP Works (Simple Steps)

  1. Device sends a RARP request: โ€œMy MAC address is 00:1A:2B:3C:4D:5E. What is my IP address?โ€
  2. A RARP server looks up a table.
  3. The server replies with the IP address.

โญ Key Points about RARP

  • Works at Layer 2
  • Requires a RARP server
  • Used for devices without permanent storage
  • No longer used today

๐Ÿ”น 3. ARP vs RARP

FeatureARPRARP
Full FormAddress Resolution ProtocolReverse Address Resolution Protocol
DirectionIP โ†’ MACMAC โ†’ IP
PurposeFind MAC addressFind IP address
Used ByAny device sending packetsDiskless devices needing IP
Request TypeBroadcastSent to RARP server
Works OnLocal network (LAN)Local network (LAN)
Modern Replacementโ€”BOOTP, DHCP

๐Ÿ”น 4. ARP Table (Also Called ARP Cache)

What is it?

A small memory table that stores IP-to-MAC mappings.
This helps avoid sending ARP requests repeatedly.

Why is ARP table important?

  • Speeds up communication
  • Reduces network load
  • Helps troubleshoot network issues

How to view ARP table?

  • In Windows: arp -a
  • Shows IP address, MAC address, and entry type (dynamic/static)

๐Ÿ”น 5. Why RARP Is No Longer Used?

RARP was replaced because it had limitations:

  • Could not give gateway, DNS, or subnet mask
  • Needed a separate RARP server
  • Limited flexibility

Modern replacements

โญ BOOTP (Bootstrap Protocol)

  • Assigns IP address
  • Gives subnet mask, gateway, DNS, etc.

โญ DHCP (Dynamic Host Configuration Protocol)

  • Most widely used today
  • Automatically assigns IP + all configurations
  • Works for all devices (phones, routers, PCs)

๐Ÿ”น 6. Easy Mnemonics

โœ” ARP โ†’ IP to MAC

Ask for MAC
โžก IP โ†’ MAC

โœ” RARP โ†’ MAC to IP

Request Address
โžก MAC โ†’ IP


๐Ÿ”น 7. Exam Focus Points (Very Important)

โœ” ARP converts IP โ†’ MAC
โœ” RARP converts MAC โ†’ IP
โœ” ARP uses broadcast request
โœ” RARP requires a server
โœ” ARP works at Layer 2 (helps Layer 3)
โœ” RARP is outdated โ†’ replaced by BOOTP and DHCP
โœ” ARP table command: arp -a

These points appear frequently in IBPS SO (IT), SBI PO, RBI Grade B, internal bank promotions, and general IT awareness exams.


๐Ÿ”น 8. Quick Revision

  • ARP finds MAC address, works in LAN, uses broadcast.
  • RARP finds IP address, used by old diskless systems.
  • ARP table stores mappings โ†’ view using arp -a.
  • RARP is outdated โ†’ replaced by BOOTP and DHCP.
  • ARP helps devices send packets to the correct hardware.


MCQ

What does ARP stand for?
a) Address Routing Protocol
b) Address Resolution Protocol
c) Advanced Routing Protocol
d) Address Request Protocol

Answer: b) Address Resolution Protocol

What does RARP stand for?
a) Reverse Address Routing Protocol
b) Reverse Address Resolution Protocol
c) Reverse Advanced Routing Protocol
d) Routing Address Resolution Protocol

Answer: b) Reverse Address Resolution Protocol

What is the primary function of ARP?
a) To map an IP address to a MAC address
b) To map a MAC address to an IP address
c) To route packets between networks
d) To assign IP addresses dynamically

Answer: a) To map an IP address to a MAC address

What is the primary function of RARP?
a) To map an IP address to a MAC address
b) To map a MAC address to an IP address
c) To resolve DNS queries
d) To broadcast data packets

Answer: b) To map a MAC address to an IP address

At which layer of the OSI model does ARP operate?
a) Physical Layer
b) Data Link Layer
c) Network Layer
d) Transport Layer

Answer: b) Data Link Layer

At which layer of the OSI model does RARP operate?
a) Physical Layer
b) Data Link Layer
c) Network Layer
d) Application Layer

Answer: b) Data Link Layer

Which protocol has largely replaced RARP for IP address assignment?
a) DNS
b) DHCP
c) ICMP
d) ARP

Answer: b) DHCP

Which protocol is responsible for mapping IP addresses to MAC addresses?
a) DNS
b) RARP
c) ARP
d) DHCP

Answer: c) ARP

How does ARP find a MAC address for a given IP address?
a) By sending a unicast request to all devices
b) By sending a broadcast request to all devices on the network
c) By querying the DNS server
d) By using the routing table

Answer: b) By sending a broadcast request to all devices on the network

How does RARP work?
a) Sends a broadcast request for a MAC address
b) Sends a unicast request for an IP address from a server
c) Sends a request to a RARP server to map a MAC address to an IP address
d) Uses DNS for reverse resolution

Answer: c) Sends a request to a RARP server to map a MAC address to an IP address

What happens if the ARP cache does not have the MAC address for an IP address?
a) The ARP request is broadcasted to the entire network.
b) The DNS server is queried for the MAC address.
c) The router assigns a random MAC address.
d) The request fails.

Answer: a) The ARP request is broadcasted to the entire network.

What is the limitation of RARP?
a) It cannot work on LANs.
b) It requires a server to be configured in the network.
c) It does not support dynamic IP address assignment.
d) Both b and c.

Answer: d) Both b and c.

Which command is used in Windows to view the ARP table?
a) ping -a
b) netstat -arp
c) arp -a
d) ipconfig /arp

Answer: c) arp -a

What is an ARP cache?
a) A database storing IP-to-MAC address mappings
b) A database storing MAC-to-IP address mappings
c) A table of all active IP addresses in the network
d) A routing table for DNS lookups

Answer: a) A database storing IP-to-MAC address mappings

In which type of communication is ARP most commonly used?
a) Between two devices on the same LAN
b) Between devices on different networks
c) In assigning IP addresses dynamically
d) In DNS queries

Answer: a) Between two devices on the same LAN

Which protocol is used to resolve MAC addresses for IP addresses in IPv6 networks?
a) ARP
b) RARP
c) NDP (Neighbor Discovery Protocol)
d) DHCP

Answer: c) NDP (Neighbor Discovery Protocol)

What type of message does ARP send when requesting a MAC address?
a) Unicast request
b) Broadcast request
c) Multicast request
d) Encrypted request

Answer: b) Broadcast request

Which field is included in an ARP reply packet?
a) Sender’s MAC address only
b) Sender’s IP address only
c) Sender’s MAC and IP address
d) Receiver’s MAC and IP address

Answer: c) Sender’s MAC and IP address

What type of device maintains the RARP server?
a) Router
b) Switch
c) Gateway or dedicated RARP server
d) Any host on the network

Answer: c) Gateway or dedicated RARP server

Key Focus Areas for Exams

  1. ARP: IP โ†’ MAC address mapping, broadcast request, ARP cache.
  2. RARP: MAC โ†’ IP address mapping, used for diskless systems, replaced by DHCP.
  3. Commands: arp -a to view ARP table.
  4. Advanced Concepts: Proxy ARP, Gratuitous ARP, ARP in IPv6 (NDP).
  5. Layer Knowledge: ARP and RARP operate at Layer 2 (Data Link).