Kaigai Blog living abroad in my twenties

【My Study Note】Address Resolution Protocol

Infotech Networking

Address Resolution Protocol


How is MAC address and IP address related to each other? This is where ARP (Address Resolution Protocol) comes into play. 

ARP is a protocol used to discover the hardware address of a node with a certain IP address. Once the IP datagram has been fully formed, it needs to be encapsulated inside an Ethernet frame. 

This means that the transmitting device needs a destination MAC address to complete the Ethernet frame header. Almost all network-connected devices will retain a local ARP table. An ARP table is just a list of IP addresses and the Mac addresses associated with them.

Let’s say we want to send some data to the IP address 10.20.30.40. It might be the case that this destination doesn’t have an entry in the ARP table. When this happens, the node that wants to send data sends a broadcast ARP message to the Mac broadcast address, which is all F’s (FF;FF;FF;FF;FF;FF).

These kinds of broadcasts ARP messages are delivered to all computers on the local network. When the network interface that’s been assigned an IP of 10.20.30.40 receives this ARP broadcast, it sends back what’s known as an ARP response. 

This response message will contain the MAC address for the network interface. Now, the transmitting computer knows what MAC address to put in the destination hardware address field, and the Ethernet frame is ready for delivery. 

It’ll also likely store this IP address in its local ARP table so that it won’t have to send an ARP broadcast the next time it needs to communicate with this IP. ARP table entries generally expire after a short amount of time to ensure changes in the network are accounted for.