Generate a random MAC address
Syntax:
genmac-random [-m][-p]
Options:
- -m
- Print the MAC address.
- -p
- Toggle the lower bit of the generated MAC address. This permits
the genmac-random utility to be on two
interfaces on the same target.
Description:
The genmac-random generates a random MAC each time it's run
to stdout using the random service and
reading from /dev/random.
If no options are provided, the MAC address is provided
as an ID Number.
Note: This utility uses the
random service and must be able to
read from
/dev/random, otherwise it fails.
Examples:
Generate and assign a random address to the
mac option
of the
io-pkt-v6-hc:
sh -c "io-pkt-v6-hc -drgbe mac=`genmac-random -m`,
-ptcpip pkt_typed_mem=below4G"
Generate MAC addresses for more than two interfaces on the same target,
where the first time
genmac-random is run,
it's for the first interface and the second time it's run,
a MAC address is generated for the second interface:
mac=`genmac-random -m` mac2=`genmac-random -m -p`