Refresh the OUI vendor registry
The TUI shows manufacturer names next to MACs — Cisco Systems, Inc
next to 00:1A:A1:… — when the oui_vendor table is populated. This
guide is how to populate it.
make oui-refreshThat’s it. ~5 seconds against IEEE, ~52k rows inserted.
What just happened
Section titled “What just happened”The loader pulled three CSVs from IEEE’s Standards Association:
| URL | Registry | Size | Bit length | Rows (typical) |
|---|---|---|---|---|
https://standards-oui.ieee.org/oui/oui.csv | MA-L | ~3.8 MB | 24-bit | ~39k |
https://standards-oui.ieee.org/oui28/mam.csv | MA-M | ~700 KB | 28-bit | ~6k |
https://standards-oui.ieee.org/oui36/oui36.csv | MA-S | ~650 KB | 36-bit | ~7k |
Each row landed via UPSERT into oui_vendor keyed on (prefix, prefix_length).
“Private” allocations (IEEE redacts the company name on customer request)
are dropped — Private as a vendor label tells operators nothing the
raw hex doesn’t already.
The TUI’s HISTORY and OPS screens will now show the organization name on matching MACs.
Why refresh again?
Section titled “Why refresh again?”IEEE updates the registries weekly-ish — new MA-M and MA-S allocations get added all the time. A cron job is reasonable:
# 02:17 UTC every Sunday17 2 * * 0 cd ~/l2trace && make oui-refreshThe refresh uses UPSERT so concurrent TUI lookups never see a gap. TRUNCATE-then-INSERT would have shown blank vendor labels for the duration of the load.
Lookup precedence
Section titled “Lookup precedence”When a MAC matches prefixes in multiple registries (common — MA-M and MA-S
are carve-outs of MA-L blocks), the longest prefix wins. A MAC like
70:B3:D5:D7:20:01:
| Check | Prefix tested | What’s there |
|---|---|---|
| MA-S (36-bit) | 70b3d5d72 | ”OnYield Inc Ltd” — specific assignee |
| MA-M (28-bit) | 70b3d5d | (none) |
| MA-L (24-bit) | 70b3d5 | ”IEEE Registration Authority” — generic parent |
Without longest-wins you’d see every small allocation labelled “IEEE
Registration Authority”, which is true-but-useless. The lookup query
uses ORDER BY prefix_length DESC LIMIT 1 to pick the most specific
match.
Trouble
Section titled “Trouble”oui refresh: fetch failed for MA-M (https://...); skippingMeans one of the three CSVs couldn’t be fetched but the others did
their work. Common causes: transient network issue, IEEE infra hiccup,
firewall blocking standards-oui.ieee.org. Re-run make oui-refresh;
it’s safe to do so as many times as you like.
See also
Section titled “See also”- How the lookup is wired into the TUI
- The loader source at
src/l2trace/oui/loader.py