ARP (Address Resolution Protocol) explained

Hello ntlipcore

Remember that the IP address provides you with end-to-end connectivity, while the MAC address provides you with “next hop” connectivity. In other words, the destination IP address will remain the same for the whole journey of your ping echo request, but the destination MAC address will change for every hop.

Having this in mind, when you ping 8.8.8.8, this is the destination IP that is used in the IP header. However, the MAC address you need is that of the next-hop router, which in your case is your default gateway. Your PC will look in the ARP table to see if the configured gateway’s MAC address is there. If it is, it will use that MAC address. If it is not, it will send an ARP request for the MAC address of your gateway.

This process is repeated by every router along the path. Your default gateway will receive the packet, decapsulate it to layer 3, read the destination IP address, determine the next-hop IP address, and will then request the MAC address of the next hop address. Each router will do the same until the last router, which is directly connected to the network of 8.8.8.8 requests the MAC address corresponding to this IP address. Only then will the MAC address of Google’s DNS server be inserted in the destination MAC address field.

I hope this has been helpful!

Laz

1 Like