MAC Addressing
A MAC (Media Access Control) address is a hardware address that uniquely identifies a network interface card (NIC) on a LAN (Local Area Network). It works at the Data Link Layer of the OSI model for device-to-device communication within the same local network. A MAC address is also known as
- Hardware address
- Physical address
- Ethernet address
- Burned-in address (BIA)
- LAN address
MAC address of a device is wrong statement, MAC is always of NIC in a device
1. Structure & Format
A standard MAC address is 48 bits (6 bytes) long and is used in most Ethernet and Wi-Fi networks. It uniquely identifies each device on a local network.
Note: There’s also a 64-bit version (EUI-64) used in some cases, like IPv6 auto-configuration. However, EUI-64 is rare in typical LANs, where 48-bit is still the standard.
2. MAC Address Belongs to the NIC, Not the Device
A MAC address is assigned to the Network Interface Card (NIC), not the entire device. Since most devices (like a PC, phone, or printer) have one or more NICs, we often casually say “the MAC address of the device,” but it’s the MAC address of the device’s NIC.
A single device can have multiple MAC addresses if it has multiple network interfaces (e.g., Ethernet, Wi-Fi, Bluetooth). Here are the examples
PC Example: Laptop with both Ethernet and Wi-Fi interfaces, MAC Addresses are
-
Ethernet NIC:
00:1A:2B:3C:4D:5E
-
Wi-Fi NIC:
00:1A:2B:3C:4D:5F
Mobile Example: Smartphone with both Wi-Fi and Bluetooth interfaces, MAC Addresses are
-
Wi-Fi NIC:
00:1A:2B:3C:4D:60
-
Bluetooth NIC:
00:1A:2B:3C:4D:61
Important: A case when a device has 4 interfaces to connect to a network (either local or the internet), it will need 4 unique MAC addresses, one for each interface. Here’s how it might work:
|
3. MAC Address Format Table in Different Devices
MAC addresses can be displayed in various formats depending on the device or operating system. Each format represents the same 48-bit binary value but uses different separators for readability.
Format Style | Example | Common Use (Device/OS) | Binary Representation |
---|---|---|---|
Colon-separated | 00:1A:2B:3C:4D:5E |
Linux, macOS, modern systems | 00000000 00011010 00101011 00111100 01001101 01011110 |
Hyphen-separated | 00-1A-2B-3C-4D-5E |
Windows OS | 00000000 00011010 00101011 00111100 01001101 01011110 |
Dot-separated (Cisco) | 001A.2B3C.4D5E |
Cisco switches, routers | 00000000 00011010 00101011 00111100 01001101 01011110 |
Raw Hexadecimal | 001A2B3C4D5E |
Used in firmware, config files | 00000000 00011010 00101011 00111100 01001101 01011110 |
4. Globally uniquely identify a Device
A MAC (Media Access Control) address is a hardware-level identifier assigned to every network interface card (NIC) by its manufacturer. It is designed to be globally unique, meaning that no two network devices should share the same MAC address anywhere in the world.
This uniqueness is achieved by following a standardized structure:
-
The first 24 bits represent the Organizationally Unique Identifier (OUI), which is a block of addresses assigned by the IEEE to each manufacturer. For example:
00:1A:2B
could be assigned to any manufacturer i.e. Apple . -
The last 24 bits are assigned by the manufacturer to uniquely identify each NIC produced. This gives over 16 million (2²⁴) unique addresses per OUI block. FF:FF:FF and 01:00:5E cannot be used as an OUI in the context of IPv4 or MAC addresses because they are reserved for broadcasting and multicastion respectively
Important: What happened when the manufacturer runs out almost 16 million (2²⁴)
Each OUI assignment comes with a registration fee (typically thousands of dollars). Some companies (e.g., Intel, Apple, Cisco) have dozens or even hundreds of OUIs. |
So, A MAC address consists of a 24-bit OUI (identifying the manufacturer) and a 24-bit Device ID (unique to the network card). Together, they form a globally unique 48-bit address like 00:1A:2B:3C:4D:5E
.
5. Types of MAC Addresses
There are three main types of MAC addresses: One is a regular MAC address called a unicast MAC address, used by all network devices; the remaining two are optional to use according to requirement. Let’s explain all three types
A. Unicast MAC Address
- Purpose: Used to send data to a single, specific device.
- Structure: Regular MAC address (e.g.,
00:1A:2B:3C:4D:5E
). - Usage: Most common in everyday networking, like when a switch sends data directly to your laptop.
B. Multicast MAC Address
- Purpose: Sends data to a specific group of devices, not just one.
- Structure: Always begins with
01:00:5E
for IPv4 multicast addresses and33:33
is the fixed 16-bit prefix reserved for IPv6 multicast. - Usage: Used in applications like video streaming, VoIP, and network discovery protocols.
Important: Any device in the local network can send a multicast or broadcast message to all devices in that network.
C. Broadcast MAC Address
- Purpose: Sends data to all devices on the local network segment.
- Structure: Always
FF:FF:FF:FF:FF:FF
(all bits are 1). - Usage: Used when the sender doesn’t know the target device’s MAC address—e.g., in ARP (Address Resolution Protocol).
Every device on the LAN processes the frame because the broadcast address is recognized by all NICs. All tree types example table is given below
Type | Description | Example |
---|---|---|
Unicast | Identifies a single unique interface | 00:1A:2B:3C:4D:5E |
Multicast | Sent to a specific group of devices | 01:00:5E:xx:xx:xx (IPv4)
33:33:xx:xx:xx:xx (IPV6) |
Broadcast | Sent to all devices on the local network | FF:FF:FF:FF:FF:FF |
7. Static vs Dynamic vs Randomized MACs
A. Static MAC Address (Burned-in Address):
-
Burned-in (Hardware-based): This MAC address is programmed into the device’s hardware (NIC) during manufacturing. It is often permanent and cannot be changed easily, although some systems allow for manual changes in configuration (e.g., using software tools).
-
Example: The MAC address embedded in the Network Interface Card (NIC) of your PC or a printer.
B. Dynamic MAC Address
-
Software-based: A dynamic MAC address is assigned by software based on network conditions or virtual environments. It can change according to configurations, for example in virtual machines or when devices switch between networks.
-
Example: Virtual machines (VMs) often use dynamic MAC addresses assigned by the hypervisor (software layer) and can change when the VM is moved or reassigned.
C. Randomized MAC Address
-
Software-based: Randomized MAC addresses are generated by software (typically by the device’s OS) to enhance privacy and security. They are commonly used when devices connect to public networks (like Wi-Fi) to prevent tracking.
-
Example: Smartphones and laptops generate randomized MAC addresses when searching for Wi-Fi networks to avoid being tracked by the network owner.
8. MAC vs IP Address
You want to send a message to Alex, who lives at 42 Maple Street, asking them to do a specific task — say, check their email in the study room.
-
42 Maple Street = IP address (e.g.,
192.168.0.101
) -
Alex = MAC address (e.g.,
00:1A:2B:3C:4D:5E
) -
Study Room = Port number (e.g.,
110
for POP3 email)
Feature | MAC Address | IP Address |
---|---|---|
Layer | Layer 2 (Data Link) | Layer 3 (Network) |
Scope | Local (LAN) | Global (Internet/intranet) |
Format | Hexadecimal (e.g., 00:1A:2B:3C:4D:5E) | Dotted-decimal (e.g., 192.168.1.1) |
Assigned by | Manufacturer or OS | Network admin / DHCP |
Changeable | Rarely (unless spoofed or randomized) | Frequently (via DHCP or statically) |
Purpose | Device identification on LAN | Routing across networks |
a small, local, specialized network can work without IP, but you can’t build the Internet or a full-featured network without it.
When a Network Can Work Without IP
Local-only, Layer 2 Communication: Devices can communicate using MAC addresses only, through Ethernet frames at Layer 2 (Data Link Layer) of the OSI model. For example, a computer directly connected to a printer via Ethernet or USB-C can send raw frames to the printer without needing IP.
Non-IP Protocols: Some old or specialized systems use non-IP protocols i.e. AppleTalk (old Apple networking), IPX/SPX (used in old Novell networks) and Bluetooth and USB communication. These don’t use IP, but still form a network at lower levels.
Broadcast Protocols: Certain types of communication use broadcast frames (e.g., ARP, DHCP discovery) that are sent without knowing any IP address yet.
When IP Is Compulsory
Most modern networking including Wi-Fi, the Internet, and even communication between apps on the same machine requires IP.
You need IP for:
- Browsing websites
- Streaming videos
- Sending emails
- Any communication across routers or the Internet
Because
- IP allows routing between networks.
- It acts as a universal addressing system for all devices across the world.
So, we can say,
- MAC-only network is like passing notes to people in the same room (you see them, no address needed).
- IP network is like sending mail across cities — you need proper addresses, roads (routers), and a postal system (protocols like TCP/IP).
Important: How do you already know your friend’s house address?
|
8. Finding a MAC Address
On Windows
ipconfig /all
On Linux/macOS
ifconfig
ip a
On Phones
-
Android: Settings > About Phone > Status > Wi-Fi MAC address
-
iOS: Settings > General > About > Wi-Fi Address