|  | 11.2 | Network-to-Network Communications
| 11.2.4 |
Function of the address resolution protocol (ARP)
Layer 3 protocols determine whether data passes beyond the network layer to higher levels of the OSI model. A data packet must contain both, a destination MAC address and a destination IP address. If it lacks one or the other, the data will not pass from Layer 3 to the upper layers. In this way, MAC addresses and IP addresses act as checks and balances for each other. After devices determine the IP addresses of the destination devices, they can add the destination MAC addresses to the data packets. There are a variety of ways that devices can determine the MAC addresses they need to add to the encapsulated data. Some keep tables that contain all the MAC addresses and IP addresses of other devices that are connected to the same LAN. They are called Address Resolution Protocol (ARP) tables, and they map IP addresses to the corresponding MAC addresses. ARP tables are sections of RAM memory, in which the cached memory is maintained automatically on each of the devices. It is a rare occasion when you must make an ARP table entry manually. Each computer on a network maintains its own ARP table. Whenever a network device wants to send data across a network, it uses information provided by its ARP table. When a source determines the IP address for a destination, the source consults its ARP table in order to locate the MAC address for the destination. If the source locates an entry in its table (destination source address to destination MAC address), it binds, or associates, the IP address to the MAC address and uses it to encapsulate the data. The data packet is then sent out over the networking media to be picked up by the destination.