To discover the destination MAC address of another node on the same LAN, devices uses ARP.
How ARP works in LAN
When a device on the LAN needs to send data to another device, it first checks its ARP cache, which is a table maps IP addresses to the corresponding MAC addresses. If the destination IP address is found in the ARP cache, the corresponding MAC address is used.
If the destination IP address is not found in the cache, the sender broadcast an ARP request packet onto the LAN. This APR request contains the sender’s IP address and requests the MAC address corresponding to the target IP address.
ARP broadcasting
If the IP address is not found in the cache, the device will send an ARP message to the broadcast address that looking for the device that holds the wanted destination IP address. The target device or node will reply with a message directly to the source node and so the source will discover the MAC address of the target.
LAN broadcast address
In LAN, the broadcast address is a special IP address that used to send data packets to all devices on the LAN. The broadcast address varies depending on the IP addressing scheme used within the LAN (e.g. IPv4, IPv6). In modern network design, the use of broadcasts is minimised to reduce network traffic and improve efficiency, as uncontrolled broadcast traffic can lead to network congestion.
Beyond the LAN
The ARP tackles the situation when a destination address is outside the LAN.
Back to parent node: Internet Layer
Computer_networks INFO1112 IP Internet_layer LAN MAC_address Address_Resolution_Protocol_ARP LAN_broadcast