Imagine you’re at a grocery store and can’t find your child. You ask the store manager to make an announcement: “Hi, Bob. Your parent is looking for you. Please come to the front of the store.” This is similar to how ARP works. It sends out a broadcast message that everyone can hear, but only the intended recipient responds. ARP, or Address Resolution Protocol, is used to convert network logical addresses (like IP addresses) into physical hardware addresses (like MAC addresses). Essentially, it translates IP addresses into MAC addresses and stores this information in a device’s ARP table.
When a network device receives a packet with a destination IP address that it owns, but the corresponding MAC address isn’t in its ARP table, it sends out a request to all devices on the network to find out who owns that IP address. The device with the matching IP address replies with its MAC address, and the switch records this information in its ARP table for quicker access in the future.

Here’s an example of how to view the ARP table on a Cisco router:
Terminal Console output
IOU1#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.1.1 0 aabb.cc00.0400 ARPA Ethernet0/0
Internet 192.168.1.2 - aabb.cc00.0100 ARPA Ethernet0/0
Internet 192.168.2.1 0 aabb.cc00.0300 ARPA Ethernet0/1
Internet 192.168.2.2 - aabb.cc00.0110 ARPA Ethernet0/1
Internet 192.168.3.1 0 aabb.cc00.0200 ARPA Ethernet0/2
Internet 192.168.3.2 - aabb.cc00.0120 ARPA Ethernet0/2
Internet 192.168.4.1 0 aabb.cc00.0500 ARPA Ethernet0/3
Internet 192.168.4.2 - aabb.cc00.0130 ARPA Ethernet0/3

The ARP table shows the physical MAC addresses and their corresponding IP addresses. This helps devices quickly send traffic to these IP addresses without needing to broadcast requests each time.
In a typical ARP request scenario, a workstation with the IP address 1.1.1.1 wants to find out the MAC address of the device with the IP address 1.1.1.2. It sends a request to the switch, which then broadcasts an ARP request. The device with IP 1.1.1.2 responds with its MAC address, and the switch records this in its ARP table for future reference, then sends the information back to the requesting workstation.
The Reverse Address Resolution Protocol (RARP)
RARP, or Reverse Address Resolution Protocol, is used to convert physical addresses (MAC addresses) into network layer IP addresses. It works similarly to ARP, but instead of broadcasting an IP address request, it broadcasts a request for an IP address based on a known MAC address. When a device needs to find its IP address but only knows its MAC address, it sends out a RARP request. A device that can map the MAC address to the corresponding IP address will respond with the needed information.