Random MAC Address Set Generator

Generate unique normalized 48-bit MAC addresses under explicit local/global and individual/group bit policies for test data.

Description

Generate unique normalized 48-bit MAC addresses under explicit administration and group-bit policies.

A 48-bit MAC address is represented by six octets. Two low-order bits in the first octet distinguish individual/group addressing and universal/local administration. Setting those bits alone does not establish an assigned hardware identity.1

This generator returns addresses and a descriptive addressPolicy. Choose locallyAdministered and multicast explicitly: these affect the two bits, while the other bits are drawn as test data. Uniqueness is enforced within one result, not across devices or separate runs.

When to use Random MAC Address Set Generator

Use it for MAC-format fixtures or a synthetic inventory under a stated bit policy.

How to use Random MAC Address Set Generator and understand its results

  1. Enter integer addressCount from 1 through 1,000 and choose both locallyAdministered and multicast.
  2. Run and read addresses with addressPolicy. Use the normalized strings in your fixture or parser test.
  3. Treat the results as synthetic identifiers. Verify actual assignments and uniqueness separately before using addresses on an operational network.
byte = floor(256 × randomDraw); firstByte = (firstByte AND 252) OR localBit OR groupBit

Six draws sample six bytes per requested address. localBit is 2 when locallyAdministered is true, and groupBit is 1 when multicast is true.

The implementation fixes those two bits, then checks for duplicates. A collision increments the last five octets as one 40-bit suffix, wrapping that suffix while preserving the first octet, until an unused address is found.

The MAC normalizer converts the candidate to its normalized colon-separated representation before it is added to the output and the seen set. Collision probing consumes no additional random draws.

json
{
  "input": {
    "addressCount": 3,
    "locallyAdministered": true,
    "multicast": false
  },
  "randomDraw": 0.25,
  "output": {
    "addresses": [
      "42:40:40:40:40:40",
      "42:40:40:40:40:41",
      "42:40:40:40:40:42"
    ],
    "addressPolicy": "locally administered, unicast"
  }
}

The local and multicast settings can be combined independently. A repeated random candidate triggers suffix probing rather than a repeated output. Invalid draws and counts outside 1–1,000 fail.

Limitations and assumptions

The default source is Math.random; no seed input or cryptographic entropy guarantee is provided. Repeated runs may select the same result, and the distribution depends on the random source.

Clearing the local bit does not obtain an IEEE allocation or validate a manufacturer prefix. No vendor lookup, device assignment, network discovery, or collision check against real interfaces occurs.

Incrementing collisions introduces a different distribution from ideal sampling without replacement. A valid bit pattern need not be suitable for a particular interface or protocol use.

Alternative or Complementary methods

Use normalization for an address you already have. An IPv4 host set generates another kind of network identifier from a supplied subnet using a different selection algorithm.

References

  1. IEEE RA Guidelines for Use of EUI, OUI, and CID — IEEE Registration Authority

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies