Skip to content
/ macgen Public

Generate random locally administered MAC addresses.

License

Notifications You must be signed in to change notification settings

alfmep/macgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Generate one or more random locally administered MAC addresses.


Usage: macgen [OPTIONS]
  Generate random locally administered MAC address(es).
  Each MAC address is by default printed using format 12-34-56-78-9a-bc

  -m, --multicast    Generate multicast MAC address(es).
  -c, --colon        Print the MAC address using format 12:34:56:78:9a:bc
  -d, --dots         Print the MAC address using format 1234.5678.9abc
  -u, --uppercase    Print hex characters in uppercase instead of lowercase.
  -n, --no-newline   Do not output the trailing newline.
  -r, --repeat=NUM   Generate NUM MAC addresses.
  -s, --seed=NUMBER  Set a specific random seed.
                     Hexadecimal seed numbers begin with prefix 0x or 0X.
                     Octal seed numbers begin with prefix 0.
  -v, --version      Print version and exit.
  -h, --help         Print this help message and exit.


Examples:

    # macgen
    46-a0-35-06-17-e9

    # macgen -c
    36:c2:ba:9a:94:d3

    # macgen -d
    ce26.a99c.0297

    # macgen -c -r4
    12:aa:1c:35:d3:e6
    66:6a:5e:08:28:1c
    2e:28:ec:52:e1:9d
    d6:17:71:cb:bc:c6

    # macgen -r2 -u
    AE-DF-28-B2-A9-45
    E2-AD-61-6A-61-46