HomeNetwork ToolsMAC Address Generator
Network Tool

MAC Address Generator

Generate random, locally administered MAC addresses in colon, hyphen, or Cisco dotted notation. Safe for virtual machines, containers, and network lab environments.

Generates
Random LAA MACs
Locally administered, no OUI conflict risk.
Formats
3 Notation Styles
Colon, hyphen, and Cisco dotted output.
Use Cases
Virtual machines, Docker containers, Kubernetes networking, DHCP pool simulation, and authorized network security testing.
MAC Address Generator — Start Here
Waiting for input
Enter input and press Check
How to Use

Use MAC Address Generator in 4 Steps

01
Choose format
Select colon-separated (Linux/macOS), hyphen-separated (Windows), or dotted (Cisco) notation.
02
Generate MAC
Click Generate to create a cryptographically random, locally administered MAC address.
03
Copy and apply
Copy the generated address and apply it to your VM, container, or test environment.
04
Verify uniqueness
On shared networks, confirm the address is not already in use before assigning it.

What is MAC Address Generator?

MAC Address Generator creates random, syntactically valid MAC addresses in any format you need — with colons (AA:BB:CC:DD:EE:FF), hyphens (AA-BB-CC-DD-EE-FF), or dotted notation (AABB.CCDD.EEFF). Use this tool to generate test addresses for lab environments, network simulators, virtual machines, and development scenarios where real hardware MAC addresses would conflict or be inappropriate.

MAC Address Structure and Format

A MAC (Media Access Control) address is a 48-bit hardware identifier assigned to network interface controllers (NICs). It is expressed as 6 groups of 2 hexadecimal digits, totaling 12 hex characters. The IEEE divides the 48 bits into two halves: the first 24 bits are the OUI (Organizationally Unique Identifier) assigned to the manufacturer, and the last 24 bits are the device-specific serial number assigned by the manufacturer.

Notation StyleFormat ExampleWhere Used
Colon-separatedAA:BB:CC:DD:EE:FFLinux, macOS, most Unix systems
Hyphen-separatedAA-BB-CC-DD-EE-FFWindows Device Manager and ipconfig
Dotted (Cisco)AABB.CCDD.EEFFCisco IOS, Catalyst switches
No separatorAABBCCDDEEFFSome database fields and scripts

The most significant bit of the first octet has two special meanings: the U/L bit (bit 1) indicates whether the address is universally administered (0) or locally administered (1), and the I/G bit (bit 0) indicates whether the address is for a unicast (0) or multicast (1) destination. Generated MAC addresses should set the U/L bit to 1 to mark them as locally administered and avoid collisions with registered OUIs.

Locally Administered vs. Universally Administered Addresses

Universally administered addresses (UAAs) are burned in at the factory and are globally unique. Locally administered addresses (LAAs) are manually assigned and intended for use in closed environments where you control the address space. When generating a random MAC for a VM or a test scenario, always generate a locally administered address by ensuring bit 1 of the first octet is set to 1.

; To mark a MAC as locally administered, the first octet must have bit 1 set.
; This means the first octet (in binary) ends in ...10 — for example:
;   x2:xx:xx:xx:xx:xx
;   x6:xx:xx:xx:xx:xx
;   xA:xx:xx:xx:xx:xx
;   xE:xx:xx:xx:xx:xx

; Valid locally administered unicast MAC examples:
02:00:00:00:00:01   ; Safe for VMs and containers
06:AB:CD:EF:12:34   ; Safe for lab environments

Common Use Cases for Generated MAC Addresses

  • Virtual Machines: Hypervisors like VMware, VirtualBox, and KVM need unique MAC addresses for each virtual NIC. Many hypervisors auto-generate these, but manual generation is needed for scripted deployments or infrastructure-as-code tooling.
  • Network Testing Labs: Testing spanning tree, bonding, or VLAN configurations requires multiple fake MACs without real hardware.
  • Container Networking: Docker and Kubernetes bridge networks may require specific MAC assignments for reproducible network topologies.
  • NAC Bypass Testing: Security researchers testing Network Access Control (NAC) systems use generated MACs to simulate spoofing scenarios in authorized lab environments.
  • DHCP Pool Simulation: Load-testing DHCP servers requires generating large numbers of fake client MACs to verify pool exhaustion behavior.

CLI Commands for MAC Address Work

# Generate a random MAC address on Linux (locally administered):
python3 -c "
import random
mac = [random.randint(0, 255) for _ in range(6)]
mac[0] = (mac[0] & 0xfe) | 0x02  # Set locally administered, unicast
print(':'.join(f'{b:02x}' for b in mac))"

# Display the MAC address of a network interface on Linux:
ip link show eth0 | grep link/ether

# Display the MAC address on macOS:
ifconfig en0 | grep ether

# Display the MAC address on Windows (PowerShell):
Get-NetAdapter | Select-Object Name, MacAddress

MAC Address Spoofing for Authorized Testing

In authorized security testing and lab environments, temporarily changing a MAC address is a standard network debugging technique. Note that MAC address changes are not persistent across reboots unless made to the network configuration file.

# Temporarily change MAC address on Linux (requires root):
ip link set dev eth0 down
ip link set dev eth0 address 02:ab:cd:ef:12:34
ip link set dev eth0 up

# Verify the change took effect:
ip link show eth0 | grep link/ether

Always confirm you have explicit authorization before performing MAC address changes on production or shared networks. MAC address spoofing on networks you do not own or control may violate acceptable use policies.

Related Reference: OUI Vendor Lookup

The first 24 bits (first 3 octets) of a real MAC address identify the manufacturer via the OUI registry. Generated MACs using this tool do not correspond to any real manufacturer — they use the locally administered range to avoid OUI conflicts. To look up the manufacturer of a real device's MAC address, use our MAC Address Lookup tool, which queries the IEEE OUI database directly.

Frequently Asked Questions

What is the difference between a locally administered and universally administered MAC address?
Universally administered addresses (UAAs) are burned in at the factory and are globally unique per IEEE registration. Locally administered addresses (LAAs) are manually assigned for use within a closed network. Always use locally administered MACs when generating random addresses for VMs or labs — set bit 1 of the first octet to 1 to mark it as locally administered.
Can a generated MAC address conflict with a real device on my network?
The risk is very low if you generate locally administered addresses (first octet with bit 1 set, e.g., 02:xx:xx:xx:xx:xx). Locally administered addresses occupy a separate namespace from vendor-assigned OUI addresses. On a large network with many VMs, use a centralized MAC allocation scheme to eliminate even the small chance of collision.
Why does my virtual machine keep getting a new MAC address on each boot?
By default, many hypervisors (like VirtualBox or VMware) generate a new random MAC each time you clone or import a VM. To keep a stable MAC address across reboots and clones, explicitly set the MAC in your VM network adapter settings and disable automatic MAC generation.
Can I change the MAC address of a physical network interface?
Yes, on most operating systems. On Linux use ip link set dev eth0 address xx:xx:xx:xx:xx:xx (requires root). On macOS use ifconfig en0 ether xx:xx:xx:xx:xx:xx. On Windows, change it via Device Manager under Advanced properties. Note that changes made this way are usually not persistent across reboots unless saved to your network configuration.
What format should I use for Cisco switches?
Cisco IOS uses dotted notation: AABB.CCDD.EEFF (groups of 4 hex digits separated by dots). Most other systems use colon-separated (AA:BB:CC:DD:EE:FF) or hyphen-separated (AA-BB-CC-DD-EE-FF) formats. This tool can generate MACs in all three formats.
Output Formats
AA:BB:CC:DD:EE:FF
Linux, macOS, Unix
AA-BB-CC-DD-EE-FF
Windows Device Manager
AABB.CCDD.EEFF
Cisco IOS / Catalyst
Safe for Labs
✓ Locally administered (LAA) range
✓ No OUI collision risk
✓ Unicast (not multicast)
✓ Suitable for VMs and containers
Free Newsletter

Get guides like this by email

DNS, email auth, and security playbooks delivered when they publish. No spam.