For IPv4 addresses to resolve to MAC addresses, the frames to be placed in a LAN environment must be the destination MAC address.
When a packet is sent to the data link layer to be enclosed in a frame, the node queries a table in its memory to find the address of the data link layer assigned to the destination IPv4 address. This table is called the ARP table or ARP cache. The ARP table is stored in the RAM hardware of the device.
Each entry or row in the ARP table links an IP address to a MAC address. The relationship between the two values is called a map, which means that you can find an IP address in the table and find the corresponding MAC address. In the ARP table, device assignments are temporarily stored (cached) in the local LAN.
To begin processing, a transmitting node attempts to find the MAC address assigned to an IPv4 destination. If this map is found in the table, the node uses the MAC address as the target MAC in the frame that contains the IPv4 packet. The frame is then encoded in the network environment.
Understanding ARP (Address Resolution Protocol)
The ARP table is maintained dynamically. There are two ways in which a device can collect MAC addresses. The first is to monitor the traffic that occurs in the segment of the local network. Because a node receives frames from the media, it can save the source IP and MAC addresses as mappings in the table. When frames are transmitted on the network, the device completes the ARP table with address pairs.
A device can also receive address pairs by sending an request as shown in the figure. An ARP request is a Layer 2 broadcast transmitted to all devices on an Ethernet LAN. The ARP request includes the IP address and the broadcast MAC address of the target host, FFFF.FFFF.FFFF. Because it is a broadcast, all nodes in the Ethernet LAN receive and examine the content. The IP address responds to the node that matches the IP address in the request. The response is a unicast frame containing the MAC address corresponding to the IP address in the request. This response is used to create a new entry in the ARP table of the sending node.
The entries in the ARP table have a timestamp similar to the MAC table entries in the switches. If a device does not receive a frame from a particular device before the time stamp expires, its entry is removed from the table.
Additionally, static assignment entries can be entered in an table, but this is not very common. Static entries in the ARP table do not expire over time and must be manually removed.
How Does ARP Protocol Work?
What does the node do when a frame needs to create a frame and the ARP cache does not include an IP address assigned to a destination MAC address? When the ARP receives a request to map an IPv4 address to a MAC address, it searches for the map stored in the table. If no input is found, IPv4 packet encapsulation is not performed, and Layer 2 operations notify the ARP that a map is needed.
The ARP then sends an request packet to find the MAC address of the target device of the local network. If a device receiving the request has a destination IP address, it responds with an response. A map is created in the table. Packets of this IPv4 address can now be placed in frames. If no device responds to an request, the packet is discarded because no frames can be created. This encapsulation error is reported to the upper layers of the device.
What is Packet Tracer?
What is CCIE?
Download Packet Tracer
What is RIPv2
What is EIGRP