The mini-tool has a CLI-Interface with the following options:
- Unicast or Multicast? Default: Unicast
- Locally Administered or Globally Unique? Default: Locally Administered
- Prescribe specific OUI (overwrites the above two)
TODO
- Add an option to generate a number of MACs without collisions.
- MAC Adress on Wikipedia
- redhat's virtualization guide on Generating a new unique MAC address
- A Perl Script that does the same: randmac.pl
- The python module
netaddr
can help you work with MAC addresses.
Thanks for all the comments. I updated my code today with the possibility to specify LAA/UAA and Unicast/Multicast or even prescribe a specific OUI. The code is optimized for clarity not speed but still quite fast compared to a simplistic approach neglecting UAA/LAA or Unicast/Multicast:
For any application that I could think of, generating a random MAC in under 10 μs shouln't be a showstopper 😄.