On Tue, Nov 14, 2006 at 11:37:15AM -0500, Jeff Dike wrote:
> This address range is documented - look for assignment of MAC ranges
> to NIC manufacturers. This range will be documented as reserved for
> private use or something similar.
Half of all MAC-48 addresses are "locally administered": those with the
second-least-significant bit of the first byte set.
> BTW, recent UMLs changed to using entirely random MACs.
Not entirely random. random_ether_addr() makes sure the generated
address has the "locally administered" bit set, and the broadcast bit
cleared:
include/linux/etherdevice.h:
/**
* random_ether_addr - Generate software assigned random Ethernet address
* @addr: Pointer to a six-byte array containing the Ethernet address
*
* Generate a random Ethernet address (MAC) that is not multicast
* and has the local assigned bit set.
*/
static inline void random_ether_addr(u8 *addr)
{
get_random_bytes (addr, ETH_ALEN);
addr [0] &= 0xfe; /* clear multicast bit */
addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
}
Jason
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user