Address Resolution Protocol (ARP)

๐ŸŽ‰ Congratulations! You now understand how both MAC addresses are used at the data link layer and how IP addresses are used at the network layer.

Address Types and Their Relationship

MAC addresses and IP addresses are separate address types used in different layers of the network. The Address Resolution Protocol (ARP) establishes the relationship between these two address types.

๐ŸŒ ARP Overview ARP is a protocol used to discover the hardware address (MAC address) of a node with a specific IP address.

๐Ÿ“ฆ Encapsulation Process Once an IP datagram is fully formed, it needs to be encapsulated inside an Ethernet frame. This requires the transmitting device to have the destination MAC address to complete the Ethernet frame header.

๐Ÿ“ Local ARP Table Most network-connected devices maintain a local ARP table, which is a list of IP addresses and their associated MAC addresses.

๐Ÿ” ARP Resolution Process

  1. If the destination IP address does not have an entry in the ARP table, the transmitting node sends a broadcast ARP message to the MAC Broadcast address (FF:FF:FF:FF:FF:FF), which is delivered to all computers on the local network.

  2. When a network interface assigned with the IP address 10.20.30.40 receives the ARP broadcast, it sends an ARP response containing its MAC address.

  3. The transmitting computer now knows the MAC address to put in the destination hardware address field, completing the Ethernet frame.

  4. The transmitting computer may also store this IP address in its local ARP table for future use, reducing the need for future ARP broadcasts.

๐Ÿ”ƒ ARP Table Expiry ARP table entries generally expire after a short period of time to ensure changes in the network are accounted for.

๐ŸŒ๐Ÿ”Œ๐Ÿ“ฆ๐Ÿ“จ๐Ÿ“ฌ๐Ÿ”๐Ÿ’ก

Last updated