Skip to main content

MAC Address Generator

Developer

Cloning VMs, testing container networking, or writing switch config samples all need addresses that look plausible. Hand-writing them goes wrong in two ways: inconsistent formatting, and setting the multicast bit — the lowest bit of the first byte — which makes switches treat the address as a group destination and breaks the link. This generates unicast addresses by default and accepts a vendor prefix when you need a fixed OUI.

Loading tool…

How to use

4 steps
  1. 01

    Set the count; fill the first three bytes (e.g. `02:00:4c`) to pin a vendor prefix, or leave it empty for fully random.

  2. 02

    Pick a separator (colon, dash, dotted, none) and letter case; one address per line, ready for a config file.

  3. 03

    With no prefix, the multicast bit of the first byte is cleared so the result is unicast.

  4. 04

    For test data prefer the `02:` prefix — that is the locally administered range and cannot collide with a real vendor OUI.

Technical Notes & Guide

1

The two special bits in a MAC address

The lowest bit of the first byte is I/G: 0 unicast, 1 multicast. The next bit is U/L: 0 globally unique (a burned-in vendor OUI), 1 locally administered (software-assigned). So `02:…` is locally administered plus unicast — exactly what a virtual NIC should use — while `01:00:5e:…` is the IPv4 multicast mapping range and must never be a host address.

FAQ

2 questions
Q1Why was my prefix modified?

Only the no-prefix case rewrites the first byte, to clear the multicast bit. With a prefix the bytes are emitted exactly as given, and unicast correctness is your call.

Q2Can I use a real vendor's OUI?

Avoid it. Reusing a real OUI in the same broadcast domain can clash with actual hardware and make switch MAC tables flap. Stick to locally administered addresses in test environments.

Developer