原帖:不详
参考
http://en.wikipedia.org/wiki/MAC_address
http://baike.baidu.com/view/69334.htm
为了能使某网卡发出的帧被正确的网卡接收并处理,IEEE规定:每块网卡都有一个唯一的以太网地址----MAC地址(IEEE之所以将其称为MAC地址,是因为编址细节是由诸如802.3等MAC协议定义的)。MAC地址有48位(6字节),通常用十六进制来表示,如0000.0c12.3456是一个合法的以太网地址。
为确保MAC地址的唯一性,以太网卡制造商将MAC地址固化到网卡中。地址的前半部分(24位)标识网卡的制造商,由IEEE分配,称为OUI(组织唯一标识符);地址的后半部分由网卡制造商为其网卡分配一个唯一的编号。而这个6个字节中的最高有效字节中的最低有效位(b1)用来标识 unicast,和mulcast,即单播 和多播
而次最低有效位(b2)则用来标识 universally administered address 和
locally administered address
其中:universally administered address 是指烧录在固件中由厂商指定的地址,也也即大家通常所理解的MAC地址,
而 locally administered address 则是指由网络管理员为了加强自己对网络管理而指定的地址,由定义可知, locally administered address的U/L位要设置成1.所以 要表示 locally administered address的话,那
MAC 地址的第一个字节应该是 0x02, 因此不能够把MAC地址改成其它已经被厂商占用的 universally administered address了。但是通常情况下,很多人都不会遵守上面的约定。因为
MAC地址通常只能在局域网里发挥作用,因为在网络上传输,MAC地址是会被不断的替换掉的。所以即使你用了 已经被厂商占用的 universally administered address也不用担心会产生冲突。
说到着就更清楚了吧。说到底, locally administered address 和 universally administered address的区别在于是直接由生产的时候确定的还是由你自己修改过的。而它们两者理论是U/L位来区别的,但是在实际应用中,却没有人管这些。所以
locally administered address 的范围是:
1: 0000 0000 0001 - FFFF FFFF FFFD
2:在1中定义的,还不要用第一个字节中的最低有效位为1的地址,因为它们是多播的
3:同时还不要用全是0的和全是1的
http://www.intel.com/support/network/adapter/pro100/sb/CS-029402.htm#laa
http://www.synapse.de/ban/HTML/P_LAYER2/Eng/P_lay207.html
U/L = 1
Locally administered address: the adapter uses a logical address (assigned by network administrator). U/L=1 may result in a hex code of 0x02 in the first byte. The U/L bit is always set when a logical address is assigned (even if the assigned address doesn't follow this convention). Therefore, it is impossible to imitate a burned-in address; but other logical address may be imitated at any time.
而且一旦 locally administered address地址由网管设定,它就会取代(overridding) universally administered address地址代发挥作用了。
至于为什么要设定 locally administered address 地址,则不清楚,留着以后再查。
Locally administered address主要有以下作用:
http://www.irongeek.com/i.php?page=security/changemac
对于 l ocally administered address地址,有些交换机和网桥不会转发包含了这样地址的帧。
而单播和多播就不多说了。The original IEEE 802 MAC address comes from the original Xerox Ethernet addressing scheme.[1] This 48-bit address space contains potentially 248 or 281,474,976,710,656 possible MAC addresses.
All three numbering systems use the same format and differ only in the length of the identifier. Addresses can either be "universally administered addresses" or "locally administered addresses".
A universally administered address is uniquely assigned to a device by its manufacturer; these are sometimes called "burned-in addresses" (BIA). The first three octets (in transmission order) identify the organization that issued the identifier and are known as the Organizationally Unique Identifier (OUI).[2] The following three (MAC-48 and EUI-48) or five (EUI-64) octets are assigned by that organization in nearly any manner they please, subject to the constraint of uniqueness. The IEEE expects the MAC-48 space to be exhausted no sooner than the year 2100;[3] EUI-64s are not expected to run out in the foreseeable future.
A locally administered address is assigned to a device by a network administrator, overriding the burned-in address. Locally administered addresses do not contain OUIs.
Universally administered and locally administered addresses are distinguished by setting the second least significant bit of the most significant byte of the address. If the bit is 0, the address is universally administered. If it is 1, the address is locally administered. In the example address 06-00-00-00-00-01 the most significant byte is 06 (hex), the binary form of which is 00000110, where the second least significant bit is 1. Therefore, it is a locally administered address.[4] Consequently, this bit is 0 in all OUIs.
If the least significant bit of the most significant octet of an address is set to 0 (zero), the frame is meant to reach only one receiving NIC .[citation needed ] This type of transmission is calledunicast . A unicast frame is transmitted to all nodes within the collision domain , which typically ends at the nearest network switch or router . Only the node with the matching hardware MAC address will accept the frame; network frames with non-matching MAC-addresses are ignored, unless the device is in promiscuous mode .[citation needed ]
If the least significant bit of the most significant address octet is set to 1, the packet will still be sent only once; however, NICs will choose to accept it based on different criteria than a matching MAC address: for example, based on a configurable list of accepted multicast MAC addresses. This is called multicast addressing.