Generate valid MAC addresses with explicit control over unicast/multicast and locally administered bits. Designed for testing, virtualization, and documentation.
Generating MAC addresses is commonly required in networking and software development scenarios where real hardware identifiers cannot or should not be used.
A MAC (Media Access Control) address is a 48-bit identifier used to identify network interfaces at the data link layer (Layer 2). It is commonly written as six hexadecimal bytes:
XX:XX:XX:XX:XX:XX
Each pair of hexadecimal digits represents one byte (8 bits).
The two least significant bits of the first byte have special meaning:
0 indicates a unicast address,
1 indicates a multicast address.
0 indicates a globally unique (vendor-assigned) address,
1 indicates a locally administered address.
Locally administered MAC addresses are not assigned to hardware vendors. They are commonly used for:
Such addresses avoid conflicts with real network hardware and are safe for temporary or test environments.
MAC addresses can be classified as unicast or multicast based on the value of the I/G bit (the least significant bit of the first byte).
A unicast MAC address identifies a single network interface. Frames sent to a unicast address are delivered to exactly one device.
For unicast addresses, the I/G bit is set to 0.
Unicast MAC addresses are used in most common networking scenarios, including device configuration, testing, and virtual network interfaces.
A multicast MAC address identifies a group of network interfaces. Frames sent to a multicast address may be received by multiple devices that are members of the multicast group.
For multicast addresses, the I/G bit is set to 1.
Multicast MAC addresses are commonly used for protocols such as ARP, IPv6 Neighbor Discovery, and various discovery and streaming mechanisms.
Most network testing and virtualization scenarios require unicast MAC addresses rather than multicast ones.
The first three bytes of a MAC address are known as the Organizationally Unique Identifier (OUI). An OUI identifies the organization or vendor that assigned the address.
OUI:XX:XX:XX
For globally unique MAC addresses, OUIs are assigned by the IEEE and are used to identify hardware manufacturers.
When the U/L bit is set to 1 (locally administered),
the address is not associated with a real vendor,
and the OUI field does not represent an IEEE-assigned manufacturer.
Vendor-based MAC addresses use a real IEEE-assigned OUI and are typically found on physical network interfaces.
Using real vendor OUIs in test environments may lead to address conflicts or unintended interaction with network equipment.
For locally administered MAC addresses, the OUI field can be used freely for internal or experimental purposes.
This generator produces locally administered MAC addresses, which ensures that generated addresses do not collide with real hardware vendor assignments.