mac address odd 2nd number - error?

Sundar Nagarajan sundar.personal at gmail.com
Sat Oct 24 05:18:11 UTC 2009


Eugeneapolinary Ju wrote:
> google:
> http://preview.tinyurl.com/mac-change-error
> 
> if I want to change the wlan0 mac address to e.g.:
> 
> 34:41:26:06:66:ac
> 
> I just can't, because it says:
> 
> SIOCSIFHWADDR: Cannot assign requested address
> 
> It gives error if the mac address has odd 2nd character. :D
> 
> ??? I didn't know that every 2nd character can't be an odd number :|
> 
> Why? :D

Take a look here:
http://en.wikipedia.org/wiki/MAC_address

Quoting relevant parts from the article:

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 02-00-00-00-00-01 the most 
significant byte is 02 (hex). The binary is 00000010 and the second 
least significant bit is 1. Therefore, it is a locally administered 
address.[3] The bit is 0 in all OUIs.

If the least significant bit of the most significant byte is set to a 0, 
the packet is meant to reach only one receiving NIC. This is called 
unicast. If the least significant bit of the most significant byte is 
set to a 1, the packet is meant to be sent only once but still reach 
several NICs. This is called multicast.

in your address, the MSB is 34(Hex), which translates to 110100 
(Binary). The second least significant bit (second bit from the right) 
of this byte is 0, making it a Universally administered address. Perhaps 
the hardware disallows changing to a different universally administered 
address, but allows you to change it to a locally administered address - 
i.e. MSB=31/33/35 etc making second least significant bit of MSB = 1







-- 
Sundar Nagarajan
Linux User #170123 | Ubuntu User #2805





More information about the ubuntu-users mailing list