A MAC address (Media Access Control address) is like the serial number of your network card.
Every device that connects to a network your phone, laptop, printer, or router has one.
It lives at the data link layer (Layer 2) of the OSI model and is used to identify devices inside a local network (LAN).
Think of it as the "name tag" your device wears when talking to other devices on the same network.
A MAC address is 48 bits long (6 bytes) and is usually written as six pairs of hexadecimal numbers.
| Notation | Example |
|---|---|
| Standard (colon) | 00:1A:2B:3C:4D:5E |
| Windows (hyphen) | 00-1A-2B-3C-4D-5E |
| Cisco (dot) | 001A.2B3C.4D5E |
- OUI (Organizationally Unique Identifier): The first 3 bytes (
00:1A:2B) → identifies the manufacturer. - Device Identifier: The last 3 bytes (
3C:4D:5E) → unique to the device.
👉 Example: If the OUI is registered to Apple, then the device is likely an iPhone, MacBook, or another Apple product.
Not all MAC addresses are unique device IDs some are special-purpose:
| Type | Address | Meaning |
|---|---|---|
| Broadcast | FF:FF:FF:FF:FF:FF |
Sent to all devices on the local network. Example: ARP request "Who has 192.168.1.10?" |
| Multicast | 01:00:5E:xx:xx:xx |
Sent to a group of devices (e.g., streaming video to multiple clients). |
| Unicast | Any normal MAC | Sent directly to one device. |
- Local Communication: Within a LAN, devices don’t talk directly using IP addresses they use MAC addresses.
- ARP Resolution: When you type
ping 192.168.1.5, your computer asks, “Which MAC address belongs to this IP?” via ARP. - Network Security: Some Wi-Fi networks use MAC filtering to allow/deny specific devices.
- Switching: Ethernet switches learn which MAC addresses live on which ports to forward traffic efficiently.
Imagine Host A wants to send data to Host B in the same LAN:
- Host A knows Host B’s IP but not its MAC.
- Host A sends a broadcast ARP request to
FF:FF:FF:FF:FF:FF. - Host B replies with its MAC address.
- Host A now sends frames directly to Host B using its MAC.
Although MAC addresses are "burned" into hardware, many operating systems let you change (spoof) them.
- To bypass MAC-based access control.
- To impersonate another device on the network.
- For privacy (hide your real device identity when connecting to Wi-Fi).
- A MAC address is a unique hardware identifier for devices on a local network.
- It’s 48 bits long, written in hexadecimal notation.
- There are special addresses like broadcast (
FF:FF:FF:FF:FF:FF) and multicast. - It’s crucial for local communication, ARP, and switching.
- Can be spoofed, so it’s useful but not foolproof for security.