The Data Link Layer

a MAC address

/ mack /

Every network interface — your laptop's Wi-Fi chip, its Ethernet port, your phone's radio — is stamped at the factory with a unique 48-bit identifier called a MAC address, written as six pairs of hex digits like 00:1A:2B:3C:4D:5E. Think of it as the permanent serial number engraved on the hardware itself, as opposed to the IP address, which is more like a mailing address assigned based on where the device currently plugs in. On a local link, frames are addressed to and from MAC addresses so the right interface picks them up.

A MAC address has two defining properties. It is flat, meaning it carries no location information: unlike an IP address whose structure tells routers which network it belongs to, a MAC address is just a globally unique number with no hint of where the device is. And it is meant to be permanent, burned into the hardware (the first half identifies the manufacturer), though it can be changed in software. Because it is flat, MAC addressing does not scale to the whole Internet — there is no way to aggregate or route by it — which is exactly why it is used only within a single link or LAN, while IP handles getting across networks.

This split is the source of a classic beginner confusion, so be clear: the MAC address answers which physical interface on this local link, while the IP address answers which network and host across the whole Internet. A frame travels hop by hop, and at each hop the destination MAC address is rewritten to the next node, while the IP packet's source and destination addresses stay fixed end to end. The Address Resolution Protocol (ARP) is the glue that, on a local network, looks up the MAC address that goes with a given IP address. And note the unlucky naming overlap: this MAC (the address) is a different concept from media access control (the procedure for sharing a channel) and from a message authentication code (a security checksum) — three different things wearing the same three letters.

Your laptop wants to reach 192.168.1.1 (the router). It uses ARP to learn that this IP currently sits at MAC 00:1A:2B:3C:4D:5E, then builds a frame addressed to that MAC. Move the laptop to a friend's network and its IP changes, but the Wi-Fi chip's MAC address stays the same.

MAC names the interface (local, flat); IP names the network location (global, hierarchical).

A MAC address names an interface, not a person or a fixed device — it can be changed in software, and a device with two interfaces has two MACs. Don't confuse it with media access control (a procedure) or a message authentication code (a security tag): same letters, unrelated ideas.

Also called
physical addresshardware addressEthernet address實體位址硬體位址