> Can someone explain to me why we can't simply use a block of addresses > with the 0200 (local administration) bit or'ed in. Out of 48 bits of > addressing, we can use 46 bits of them for anything we want as long as > that bit is set and the 0100 bit (multicast) is clear. By the > standard, those are locally managed and allocated MAC addresses that > are not guaranteed to be globally unique. They don't even need to be > unique in an entire network, only on the local subnet. Use any > convention you want. Stuff the 32 bit IP address of the host in the > lower 32 bits and you've still got 14 bits worth of assignable > addressing per host. That's what that bit is intended for. > > > - Walter
isn't that what the script does? :
==snip==
rndbit=""
while [[ $rndbit != "2" && $rndbit != "6" && $rndbit != "A" && $rndbit != "E"
]]; do
rndbit="$(hexdump -n 1 -v -e '/1 "%02X"' /dev/urandom |sed 's,^.,,g' |tr -d
'\n')"
done
macaddr=$(echo -n "0${rndbit}"; hexdump -n 5 -v -e '/1 ":%02X"' /dev/urandom)
==/snip==
I agree it's not as pretty as or'ing a random mac with 0200 but the result
should be the same. Of course if someone finds a way to bitwise or on the
commandline i'll be happy to update the patch.
Thanks,
(whoops, ok so how to be sure the adress is not multicast)
--
Sticky bits on disk.
signature.asc
Description: PGP signature
------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d
_______________________________________________ Lxc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxc-users
