How can I clone a mac address on wlan0?
For a variety of boring reasons I need to clone a mac address on wlan0. The documented way to do this: ifconfig wlan0 create wlandev wpi0 wlanaddr 00:11:22:33:44:55:66 works in the sense that it sets up the interface with that mac, but then the wlan0 interface never associates. Doing everything the same but omitting the wlanaddr argument (which causes wlan0 to use the mac of the wpi0 device) works. This also doesn't work in 8.2-RELEASE, so either we've got a long-standing bug, or I'm doing something very wrong. The wpi0 card is an intel 3945abg, I also have a couple of ath cards I can try (although so far they haven't worked either). Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: How can I clone a mac address on wlan0?
The way I'd debug this (without being a developer) is: * get another laptop with say an ath card; * put that interface into monitor mode; * tcpdump -vveni wlan0 -y IEEE802_11_RADIO | grep -v Beacon Then try associating to the access point and see what station MAC it's sending in its packets. adrian On 29 March 2011 14:38, Doug Barton do...@freebsd.org wrote: For a variety of boring reasons I need to clone a mac address on wlan0. The documented way to do this: ifconfig wlan0 create wlandev wpi0 wlanaddr 00:11:22:33:44:55:66 works in the sense that it sets up the interface with that mac, but then the wlan0 interface never associates. Doing everything the same but omitting the wlanaddr argument (which causes wlan0 to use the mac of the wpi0 device) works. This also doesn't work in 8.2-RELEASE, so either we've got a long-standing bug, or I'm doing something very wrong. The wpi0 card is an intel 3945abg, I also have a couple of ath cards I can try (although so far they haven't worked either). Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: How can I clone a mac address on wlan0?
On Tuesday, March 29, 2011 08:38:43 Doug Barton wrote: For a variety of boring reasons I need to clone a mac address on wlan0. The documented way to do this: ifconfig wlan0 create wlandev wpi0 wlanaddr 00:11:22:33:44:55:66 works in the sense that it sets up the interface with that mac, but then the wlan0 interface never associates. Doing everything the same but omitting the wlanaddr argument (which causes wlan0 to use the mac of the wpi0 device) works. This also doesn't work in 8.2-RELEASE, so either we've got a long-standing bug, or I'm doing something very wrong. The wpi0 card is an intel 3945abg, I also have a couple of ath cards I can try (although so far they haven't worked either). I doubt the wlanaddr option is what you are looking for. This option is only used (and valid) in multiple VAP setups. The BSSID is used to filter frames, everything not to the BSSID (or multicast/broadcast) gets dropped. With multiple VAPs you want to use different BSSIDs for each AP. There are two options to achieve that, using the bssid parameter which will generate a semi random MAC (based on the hardware's MAC address) or the wlanaddr parameter which allows a user to define the complete address. Whether the hardware does support setting multiple BSSID filters is another story, I doubt we have one in tree.. mostly the addresses are generated in such a way that for example either the first 4 or last 4 bits are changed and therefore a wildcard filter can be used. Now to the point, wpi(4) has no support at all for multiple VAPs.. therefore no one ever had a look at that. Anyways.. you might want to look into the link option, changing the wpi0's MAC will also change the one of wlan0. -- Bernhard ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: How can I clone a mac address on wlan0?
On Mon, 28 Mar 2011, Doug Barton wrote: For a variety of boring reasons I need to clone a mac address on wlan0. The documented way to do this: ifconfig wlan0 create wlandev wpi0 wlanaddr 00:11:22:33:44:55:66 works in the sense that it sets up the interface with that mac, but then the wlan0 interface never associates. Doing everything the same but omitting the wlanaddr argument (which causes wlan0 to use the mac of the wpi0 device) works. This also doesn't work in 8.2-RELEASE, so either we've got a long-standing bug, or I'm doing something very wrong. The wpi0 card is an intel 3945abg, I also have a couple of ath cards I can try (although so far they haven't worked either). Since wireless went to the cloned wlan device, this hasn't worked. Clone devices don't push the MAC addresses down (at least the wlan clone doesn't). I reported this problem with lagg failover between wired and wireless. Obviously I wanted the wired connection as the primary and the wlan device as secondary, so lagg would always end up using the wired connection's (xl0 in my case) MAC address and then trying to change wlan0's MAC address to the same when it was selected during failover. So I had to put this: ifconfig_ath0=ether 00:08:74:4b:88:b2 wlan_ath0=wlan0 ifconfig_wlan0=ssid FOO_SSID wepkey1:... ifconfig_xl0=up cloned_interfaces=lagg0 ifconfig_lagg0=laggproto failover laggport xl0 laggport wlan0 ifconfig_lagg0_alias0=inet a.b.c.d netmask 0xff00 into rc.conf. ath0's MAC is my primary's (xl0) actual MAC address. So I'm guessing if you put ifconfig_wpi0=ether 00:11:22:33:44:55:66 in rc.conf, that would work. -- DE ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org