# FreeBSD 10->11: How can I change the WiFi interface mac address?



## eldaemon (Sep 29, 2016)

Hi everyone,

I upgraded to FreeBSD 11 yesterday. Seems like you can't manage interface settings with ifconfig anymore.

For instance, I used to do this:


```
ifconfig ath0 ether ff:ff:ff:...
ifconfig wlan0 create wlandev ath0
```

Now, I can't do anything to ath0. If I set the mac address on wlan0, it doesn't work.

This seems to have changed here: https://lists.freebsd.org/pipermail/freebsd-current/2015-August/056956.html

How can I change the mac address for ath0 now?

Thanks!


----------



## tobik@ (Sep 30, 2016)

Works as expected for me (though with bwn(4)).

```
ifconfig wlan0 create wlandev bwn0
ifconfig wlan0 ether ff:ff:ff:...
```


----------



## ljboiler (Sep 30, 2016)

I had the same problem after updating to FreeBSD 11 with what used to work for setting up a lagg interface to auto-switch between wired (msk) and wireless (ath) on my laptop.

I solved it in my case by setting the mac address of the wired interface to that of the wireless one, rather than the other way around.


----------



## `Orum (Oct 1, 2016)

tobik said:


> Works as expected for me (though with bwn(4)).
> 
> ```
> ifconfig wlan0 create wlandev bwn0
> ...


Hrm, you're setting this on the wlan interface instead of the parent (bwn0) as eldaemon was, so I wonder if that's why it worked for you and not him (though he said setting it on wlan0 had no effect).

Either way I'm curious to know as I have more than a few machines in this situation.


----------



## eldaemon (Oct 4, 2016)

Thank you for the replies!

If I set wlan0's MAC, I can scan, but it will never associate.

I opened a bug for it here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213207

I wonder if this is a wlan->ath driver bug, or if there's a different mechanism to set the MAC for ath devices. I didn't see anything in sysctl for it.


----------

