|  | 1.2 | LANs
| 1.2.5 | MAC addressing
In order for multiple stations to share the same media and still identify each other, the MAC sublayers define hardware or data link addresses called the MAC addresses. Each LAN interface has a unique MAC address. In most NICs, the MAC address is burned into ROM. When the NIC initializes, this address is copied into RAM. Before directly connected devices on the same LAN can exchange a data frame, the sending device must have the destination device's MAC address. One way in which the sender can ascertain the MAC address that it needs is to use an ARP (Address Resolution Protocol). The graphic illustrates two ways in which a TCP/IP example, ARP, is used to discover a MAC address. In the first example, Host Y and Host Z are on the same LAN. Host Y broadcasts an ARP request to the LAN looking for Host Z. Because Host Y has sent out a broadcast, all devices including Host Z will look at the request; however, only Host Z will respond with its MAC address. Host Y receives Host Z's reply and saves the MAC address in local memory, often called an ARP cache. The next time Host Y needs to directly communicate with Host Z, it uses the stored MAC address. In the second example, Host Y and Host Z are on different LANs, but can access each other through Router A. When Host Y broadcasts its ARP request, Router A determines that Host Z cannot recognize the request because Router A detects that the IP address for Host Z is for a different LAN. Because Router A also determines that any packets for Host Z must be relayed, Router A provides its own MAC address as a proxy reply to the ARP request. Host Y receives Router A's response and saves the MAC address in its ARP cache memory. The next time Host Y needs to communicate with Host Z, it uses the stored MAC address of Router A.