Latest

CCNA: Address Resolution Protocol (ARP)

CCNA: Address Resolution Protocol (ARP)

In this article, we will talk about ARP that maps the layer 3 address to the layer 2 MAC address. Before we talk technical, let’s imagine you are in a conference. Someone hands over a notebook to you to hand it over to John. You don’t know which person is John Heard so you say, “Excuse me who is John Heard?”. Everyone in the conference hears you but only John responds, “I am John Heard”. Now you know John Heard and can associate with him and know his location.

This is similar to Address Resolution Protocol, which maps layer 3 IP addresses to the layer MAC addresses.

Figure 1: ARP In Action

In Figure 1, PC 1 knows that it must communicate with PC-2 using a 1.1.1.2 IP address. To do that it builds the Ethernet Frame and puts its MAC address as the Source MAC address (SMAC) and layer 2 broadcast address (ff:ff:ff:ff:ff:ff). A switch forwards the broadcast out all the ports in same VLAN (except the port where broadcast was received). All hosts in same VLAN received this ARP request including PC-2. All other hosts will ignore this ARP request as their IP address is not 1.1.1.2. Only PC-2 is configured with 1.1.1.2 will process this request and respond to PC-1.

PC-2 now creates an Ethernet frame to respond to the ARP. It puts its own MAC Address (0x4a::56) as SMAC and PC-1 MAC address (0x4a::55) as the Destination MAC address (DMAC). PC-2 knows about the PC-1 MAC address from the SMAC value of the ARP request that it received from PC-1.

Remember PC-2 knows the MAC address of the PC-1 when responding to ARP Request, so ARP Response is NOT broadcast, it is Unicast communication between PC-2 and PC-1. PC-1 gets the response and creates an entry in the ARP table also known as ARP cache. PC-1 maps the IP address 1.1.1.2 with 0x4a::56. The benefit of this process is, that next time when PC-1 wants to communicate with PC-2, it doesn’t need to send a broadcast on the network.

PC-2 also creates ARP entry in the cache when it received the ARP request from PC-1. ARP request had both the information PC-1 MAC address and the IP address.

You can see the ARP table from any IP device as it is must to make communication happen. You can try the same on the PC you are reading this article on using arp -a from command prompt.

I hope you find this informative!

Continue Reading...