# FreeBSD wlan no mac address change possible



## eyebone (Oct 23, 2011)

hello folks,

I am stuck on the following problem, I only recognize with FreeBSD. I am using aiwn0:

```
<Intel(R) Centrino(R) Ultimate-N 6300> mem 0xf2500000-0xf2501fff irq 17 at device 0.0 on pci3
```
which works by now for WPA quite good. However I am stuck at changing my MAC address of the device. If I do so wpa_supplicant, which was working before perfectly is not able anymore to keep the association:


```
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='myWPAnet' freq=2412 MHz)
Associated with xx:xx:xx:xx:xx:xx
CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
Trying to associate with xx:05:43:f5:xx:xx (SSID='myWPAnet' freq=2412 MHz)
Associated with xx:xx:xx:xx:xx:xx
CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='myWPAnet' freq=2412 MHz)
Associated with xx:xx:xx:xx:xx:xx
CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='myWPAnet' freq=2412 MHz)
Associated with xx:xx:xx:xx:xx:xx
CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='myWPAnet' freq=2412 MHz)
Associated with xx:xx:xx:xx:xx:xx
CTRL-EVENT-DISCONNECTED bssid=xx:xx:xx:xx:xx:xx reason=0
Trying to associate with xx:xx:xx:xx:xx:xx (SSID='myWPAnet' freq=2412 MHz)
Associated with xx:xx:xx:xx:xx:xx
```

I changed the MAC address like:

```
ifconfig wlan0 mac 00:55:55:55:55:55
```

all this is working without any problem for ethernet cards.

*UPDATE:*

During writing this I tried to change the MAC of the iwn0 as well, and it works!  

```
ifconfig iwn0 mac 00:55:55:55:55:55
```

So, it is crucial to adjust both addresses to get it proper working, which makes sense as wlan0 is just a virtual device of iwn0.

Thanks for the help


----------

