Sub topic 4
The OUI: who made this network interface?
This chapter assumes you can read hexadecimal and binary, and that you know how a MAC address is split into six octets and what the group and locally administered bits are. Here you will learn how the first half of a MAC address ties an interface to a registered organization, how to look that organization up, and why the answer is often only a hint.
What the OUI is
The first three octets of a universally administered MAC address are the Organizationally Unique Identifier (OUI). The IEEE Registration Authority hands out OUIs to organizations that apply and pay for them. A holder then builds addresses by appending its own 24-bit values, usually one per interface it ships.
00 : 50 : 56 : aa : bb : cc
\_______________/ \_______________/
OUI (assigned by device-specific part
IEEE to a company) (assigned by the company)A 24-bit OUI block contains 2^24 = 16,777,216 addresses. A company that runs out can request another OUI, so large vendors hold many. This is why one vendor name shows up under dozens of different prefixes.
The first octet of an OUI also carries the group bit and the locally administered bit. IEEE-assigned OUIs always have both bits set to 0, so only 22 bits of the OUI actually vary between organizations. Any address whose first octet has either bit set cannot be an ordinary vendor-assigned unicast address. That fact drives the lookup procedure later in this chapter.
Three block sizes: MA-L, MA-M, and MA-S
A full 24-bit OUI is too much for a small company that makes a few thousand devices. The IEEE therefore sells three sizes of block. All three come out of the same address space, so the prefix length you must match differs by entry.
| Registry name | Prefix the holder owns | Addresses in the block | Typical holder |
|---|---|---|---|
| MA-L (large) | 24 bits (the classic OUI) | 16,777,216 | Large vendors |
| MA-M (medium) | 28 bits | 1,048,576 | Mid-size makers |
| MA-S (small) | 36 bits | 4,096 | Small product lines |
An MA-M or MA-S holder shares its first 24 bits with other organizations. The IEEE assigns the 24-bit prefix to itself as a container, and the holder is identified only by the longer prefix. If you look up just the first three octets of such an address, you get the IEEE Registration Authority, not the real vendor. A correct lookup tries the longest prefix first: 36 bits, then 28 bits, then 24 bits.
Looking up an OUI
The IEEE publishes the full registry as downloadable text and CSV files, and many tools bundle a copy. Examples are the ieee-data package on Debian-based systems and the manufacturer database shipped with Wireshark and nmap. In the IEEE text format, an entry looks like this:
00-50-56 (hex) VMware, Inc.
005056 (base 16) VMware, Inc.A few prefixes are worth recognizing on sight. The vendor names are the registry holders at the time of writing, and holders can change.
| Prefix | Holder | What you usually find |
|---|---|---|
| 00:50:56, 00:0C:29 | VMware, Inc. | Virtual machines on VMware hypervisors |
| 00:15:5D | Microsoft Corporation | Hyper-V virtual machines |
| 08:00:27 | PCS Systems AG (now associated with Oracle) | VirtualBox virtual machines |
| B8:27:EB | Raspberry Pi Foundation | Older Raspberry Pi boards |
| 00:00:0C | Cisco Systems, Inc. | Cisco routers and switches |
| 00:00:5E | IANA | Protocol-defined addresses such as VRRP virtual routers |
Notice that the first column answers "who registered this prefix", not "who sold me this laptop".
Looking up an address correctly
A trustworthy lookup does three checks in a fixed order. The flowchart shows them.
The Python function below implements this order. It uses a tiny embedded registry so it runs without downloading anything. The 70B3D5123 entry is fictional. It shows how an MA-S assignment sits under the 24-bit prefix 70:B3:D5, which the IEEE uses as a container for small blocks.
import re
# Keys are uppercase hex prefixes. Length decides the block size:
# 6 digits = MA-L (24 bits), 7 = MA-M (28 bits), 9 = MA-S (36 bits).
REGISTRY = {
"005056": "VMware, Inc.",
"000C29": "VMware, Inc.",
"00155D": "Microsoft Corporation",
"B827EB": "Raspberry Pi Foundation",
"00000C": "Cisco Systems, Inc.",
"70B3D5": "IEEE Registration Authority (container for MA-S)",
"70B3D5123": "Example Sensors Ltd (fictional MA-S holder)",
}
def lookup_vendor(mac: str) -> str:
digits = re.sub(r"[^0-9a-fA-F]", "", mac).upper()
if len(digits) != 12:
raise ValueError("a MAC address has 12 hex digits")
first = int(digits[:2], 16)
if first & 0x01:
return "group address (multicast or broadcast): no vendor"
if first & 0x02:
return "locally administered: no vendor"
for n in (9, 7, 6): # longest prefix first
prefix = digits[:n]
if prefix in REGISTRY:
return REGISTRY[prefix]
return "unregistered prefix"
tests = [
"00:50:56:aa:bb:cc",
"52:54:00:12:34:56",
"01:00:5e:00:00:fb",
"70-B3-D5-12-34-56",
"70:B3:D5:00:00:01",
"02:00:5e:10:00:01",
]
for mac in tests:
print(f"{mac:20} {lookup_vendor(mac)}")Running it prints:
00:50:56:aa:bb:cc VMware, Inc.
52:54:00:12:34:56 locally administered: no vendor
01:00:5e:00:00:fb group address (multicast or broadcast): no vendor
70-B3-D5-12-34-56 Example Sensors Ltd (fictional MA-S holder)
70:B3:D5:00:00:01 IEEE Registration Authority (container for MA-S)
02:00:5e:10:00:01 locally administered: no vendorThree results are worth studying. 52:54:00 is the default prefix used by QEMU and KVM. It looks like a vendor prefix, but 0x52 has the locally administered bit set, so no organization owns it. The same applies to 02:00:5e, which resembles IANA's 00:00:5e but has the local bit set. Finally, 70-B3-D5-00-00-01 falls back to the container entry because no 36-bit entry matches. A real lookup against the full registry would find the real holder if one exists.
Reading OUIs on your own machine
On Linux, the sysfs files expose each interface's address. This loop prints the first three octets, which you can compare against the registry.
for dev in /sys/class/net/*; do
printf '%s %s\n' "$(basename "$dev")" "$(cut -c1-8 "$dev/address")"
doneThe loopback interface lo prints 00:00:00, which is not a registered OUI. The kernel uses an all-zero address for it because it never touches a wire. A physical Ethernet card prints its manufacturer's prefix, and a virtual machine's adapter prints its hypervisor's prefix or a locally administered one.
What an OUI does and does not tell you
A vendor lookup is useful, and it also has limits that cause real mistakes.
- It names the registrant of the address block, not the product. Many laptops and phones use a Wi-Fi module from another company. The module's vendor supplies the MAC address, so a laptop may report the chipset or module maker instead of the brand on the lid.
- Large vendors hold many OUIs, and the same OUI can change hands. A vendor name from an old registry copy may be out of date after an acquisition or rename. Refresh your copy of the registry before relying on it.
- Virtual and software-defined interfaces borrow prefixes. A VMware prefix tells you that the interface is virtual, not who owns the machine. Containers and bridges often use locally administered addresses, which have no vendor at all.
- Randomization removes the signal. Modern phones and laptops often use a private, locally administered address for Wi-Fi. Those addresses carry no OUI, so a lookup can only report that fact. Later chapters on randomization and spoofing cover this in more detail.
- Anyone can set an address. A user can change an interface's MAC address, including to one that carries a real vendor's OUI. The OUI therefore says what the address claims, not what the device is.
- Some prefixes are reserved for protocols. The
01:00:5eprefix marks IPv4 multicast and33:33marks IPv6 multicast. They belong to the group address space and are not vendor assignments.
Putting it together
When you meet an unfamiliar MAC address, work through it in this order:
- Look at the first octet. If the group bit is set, you are looking at a multicast or broadcast address.
- If the locally administered bit is set, stop. The address came from software, a hypervisor, or a privacy feature, and a registry cannot help.
- Otherwise, match the longest prefix in a current copy of the IEEE registry.
- Treat the result as a lead and confirm it with another source, such as the switch port, the DHCP hostname, or the physical device.
Exercise
The address da:a1:19:3c:5e:07 appears in your DHCP log. Can you look up its vendor in the IEEE registry? Explain using the first octet.
Show answer
No. The first octet 0xda is 1101 1010 in binary. The lowest bit (group bit) is 0, so it is unicast. The second-lowest bit (locally administered bit) is 1, so the address was assigned by software, such as a privacy feature or a hypervisor, and no vendor owns it.
Exercise
A company holds a 36-bit MA-S assignment. How many addresses does it own, and why does a lookup of only the first three octets fail to identify it?
Show answer
It owns 2^(48-36) = 2^12 = 4,096 addresses. The first 24 bits belong to a container prefix held by the IEEE Registration Authority and are shared by many small holders, so only the full 36-bit prefix identifies the company. A correct lookup tries 36 bits, then 28, then 24.
Exercise
A laptop labeled with one brand shows a MAC address whose OUI belongs to a different company. Give two plausible explanations that do not involve spoofing.
Show answer
The laptop's Wi-Fi or Ethernet module was made by the company that owns the OUI, so its address comes from that company's block. Alternatively, the interface is virtual (for example, a VM or VPN adapter) and uses a hypervisor's prefix. In both cases the OUI names the address block's registrant, not the laptop's brand.