The Structure of a MAC Address
The permanent, physical, 48-bit address baked into every network interface
IP addresses are virtual and can change. But to actually deliver data to a piece of hardware, the network needs a permanent, physical address. That is the MAC address. This chapter is all about what it is and how it is structured.
What is a MAC address?
MAC stands for Media Access Control. A MAC address identifies the physical location of a device — the specific network interface hardware — whereas an IP address identifies a virtual/logical location.
Two addresses: IP = virtual (can change, used for routing). MAC = physical (fixed, used for local delivery). Every interface has both.
Interfaces are physical hardware
A network interface is real hardware that needs addressing. Examples: the NIC (Network Interface Card — a chip with an antenna that emits and receives signals), the Ethernet interface (electrical signals), and Bluetooth (a short-range interface). Each physical interface carries its own MAC.
Why not just use the IP?
IP is virtual and mutable. Connect your laptop to the router and it might get 192.168.1.4; disconnect, power-cycle, reconnect, and it might get 192.168.1.9. Same physical device, different IP. That makes IP useless for permanently identifying a piece of hardware.
The need: Hardware needs a permanent, unique identifier that does not change — and that is the MAC address.
Size: 6 bytes = 48 bits
A MAC address is always 6 bytes = 48 bits. Each byte is written as two hexadecimal digits (so FA is one byte). Six bytes × 8 bits = 48 bits. This size is constant everywhere.
Colons vs dashes
The bytes are separated by punctuation, and the style depends on the OS: macOS and Linux use colons (FA:34:AF:09:00:BA), while Windows uses dashes (FA-34-AF-09-00-BA). Same address, different separator.
A quick word on hexadecimal
MAC addresses are hexadecimal (base 16). Decimal uses 0–9, binary uses 0–1, and hex uses sixteen symbols: 0–9 then A, B, C, D, E, F. After 9, instead of rolling to two digits, you continue with letters up to F (which is 15).
Two halves: OUI + device
A MAC address splits into two halves, much like an IP splits into network and host:
- First 3 bytes — OUI
- Organizationally Unique Identifier: assigned to the manufacturer (Cisco, Intel, Apple…).
- Last 3 bytes — device
- Uniquely identifies the specific interface made by that manufacturer.
The OUI identifies the maker
Because the OUI is fixed per manufacturer, you can identify who made a device from the first three bytes of its MAC. Two Intel NICs share the same first three bytes (their OUI) but differ in the last three (the device portion), keeping every MAC unique.
Aside: You rarely set MACs by hand as a developer, but the OUI-vs-device idea matters for understanding the OSI model and how delivery works.