Problem
Set the MAC address 11: 22: 33: 44: 55: 66. There is no siocsifhwaddr: cannot assign requested address on the master trunk being developed by openwrt.
However, it appears on the latest trunk of attitude adjustment. It is estimated that the kernel version is different, resulting in different MAC address restrictions.
What is the latest but not strict? This is unscientific.
Solution:
Http://blog.csdn.net/evenness/article/details/7674038
Http://blog.csdn.net/hds_yx/article/details/17285873
Run the following command to modify the MAC address of the NIC in Linux:
/Sbin/ifconfig eth0 down
/Sbin/ifconfig eth0 HW ether 47: 72: 65: 65: 6e: 00
/Sbin/ifconfig eth0 up
When you enter the second command, the following message is displayed: siocsifhwaddr: cannot assign requested address. It turns out that the MAC address is set incorrectly.
There are three types of IP addresses: broadcast, multicast, and unicast. Broadcast is: FF: ff. Multicast: the last bit of the first byte is 1, for example, 47: 72: 65: 65: 6e: 00,
The last digit of 47 is 1. Unicast: the last bit of the first byte is 0, for example, 48: 72: 65: 65: 6e: 00.. If you change the above address to 48, this problem will not occur.
In-depth study:
IEEE 802 defines the MAC address
| <--------- 24 bit ---------> | <--------- 24 bit --------> |
| Ccccccug cccccccc cccccc | XXXXXXXX xxxxxxx XXXXXXXX |
MAC address types controlled by UG:
U: 0: uniformly managed by the specified IEEE ID
1: Local Management
G: 0: unicast
1: Multicast
That is, 12-bit MAC addresses are divided into four categories, which are determined by the second.
The second digit is
0 | 4 | 8 | C :( 00) uniformly managed unicast Mac
1 | 5 | 9 | D :( 01) uniformly managed multicast MAC
2 | 6 | A | E :( 10) locally managed unicast Mac
3 | 7 | B | f: (11) locally managed multicast MAC
========================================================== ======================================
Because network terminals such as ADSL routes generally use a uniformly managed unicast Mac
Therefore, 02: 10: 18: 01: 00: 01 or (11: 01: 18: 00: 00: 30) are invalid Mac, leading to ineffective wireless functions, or network connection failure.
However, Mac 00: 25: 5E: 08: de: 43 is considered valid.