The Hardware Address
Every network device โ your laptop, your phone, your router โ has a MAC address (Media Access Control address) burned into its network interface card (NIC) at the factory. It's a 48-bit number written as six pairs of hexadecimal digits, like 00:1A:2B:3C:4D:5E.
Think of a MAC address like a fingerprint โ it uniquely identifies your device on the local network. While IP addresses can change (your phone gets a different IP on different Wi-Fi networks), the MAC address stays the same.
MAC Address Structure
00 : 1A : 2B : 3C : 4D : 5E
โ โ โ
โ โ โโโ Device ID (assigned by manufacturer)
โ โโโ Manufacturer ID (OUI)
โโโ Unicast/Multicast bit
- First 24 bits (OUI) โ The Organizationally Unique Identifier. Assigned to the manufacturer by the IEEE. This tells you who made the NIC (Intel, Cisco, Apple, etc.).
- Last 24 bits โ Assigned by the manufacturer to uniquely identify each NIC they produce.
The first octet also contains special bits:
- Bit 0 of first octet โ 0 = unicast (one device), 1 = multicast (group of devices).
- Bit 1 of first octet โ 0 = globally unique, 1 = locally administered (fake MAC).
Unicast, Broadcast, and Multicast
- Unicast โ Frame is sent to one specific device. The destination MAC is the target device's address. Most network traffic is unicast.
- Broadcast โ Frame is sent to all devices on the network. The destination MAC is
FF:FF:FF:FF:FF:FF. Used by protocols like ARP and DHCP. - Multicast โ Frame is sent to a group of devices. The destination MAC starts with a specific pattern. Used by streaming and routing protocols.
MAC vs. IP Address
This is one of the most common questions in networking. Both are addresses, but they serve different purposes:
MAC Address IP Address
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Layer 2 (Data Link) Layer 3 (Network)
Hardware address Software address
Permanent (burned in) Temporary (assigned by network)
Used for local delivery Used for end-to-end delivery
Flat structure Hierarchical structure
Not routable Routable
Analogy: Your MAC address is like your face โ everyone on the same street can see it. Your IP address is like your mailing address โ it's how the postal system finds you across the entire city (or world).
On your local network, the switch uses MAC addresses to deliver frames. When data needs to leave your network (to the internet), the router uses IP addresses to route it to the right destination.
Can You Change Your MAC Address?
Yes โ you can spoof your MAC address by changing it in software. This is sometimes done for:
- Privacy โ Preventing websites from tracking your device across networks.
- Testing โ Network administrators testing different configurations.
- Bypassing restrictions โ Some networks restrict access based on MAC addresses.
MAC spoofing is legal but can be used for malicious purposes. It's a reminder that MAC addresses aren't a strong security mechanism โ they can be faked.