Changing MAC address, through registry does not work
i am using visual studio 2010 and Windows XP on a macbook through bootcamp.
I realized that i could not change the MAC a开发者_如何学JAVAddress through the registry(through RegSetValueEx), if my adapter selected is the one integrated to the laptop, Eg: Broadcom wireless adapter for macbook.However certain values like AA-BB-CC-DD-EE-FF worked.
However if i plug in a wireless usb network adapter it worked flawlessly.My guess is that it is not my code that is having the problem,since i tried other downloaded from the internet and it is the same thing. Can anyone explained why this is happening?
Thanks to your answer I managed to solve the problem. AA-BB-CC-DD-EE-FF-GG works because of a big luck. The idea is that Windows 7 imposes some restrictions, as you can se on the Wikipedia page: http://en.wikipedia.org/wiki/MAC_spoofing . So, "Under Windows 7, the possible range of spoofed addresses that can be set is limited for wireless and wired network adapters. To be used by Windows 7, a spoofed MAC address should have 0 as a least significant bit (unicast) and 1 as a second least significant bit (locally administered) in the second nibble. Thus possible values for the second nibble are limited to 2, 6, A and E." The two specified bits, as I could see from the page http://en.wikipedia.org/wiki/MAC_address correspond to the second character of the MAC address, thus, any address that have the second character 2,6,A, or E works. No other one could.
T
The custom MAC address may need to conform to the following format:
- x2-xx-xx-xx-xx-xx-xx
- x6-xx-xx-xx-xx-xx-xx
- xA-xx-xx-xx-xx-xx-xx
- xE-xx-xx-xx-xx-xx-xx
x
can be any number from 0 to F.
The reason is as follows:
MAC address - I/G bit
The least significant bit of an MAC address's first octet is referred to as the I/G (Individual/Group) bit.
- 0: Unicast MAC Address
- 1: Multicast MAC Address
The I/G bit of a custom mac address needs to be set to 0.
MAC address - U/L bit
the second-least-significant bit of an MAC address's first octet is referred to as the U/L (Universal/Local) bit.
- 0: Universally Administered MAC Address
- 1: Locally Administered MAC Address
The U/L bit of a custom mac address needs to be set to 1.
精彩评论