Date: Thu, 31 Dec 2009 11:53:39 +0100 From: martinko <gamato@users.sf.net> To: freebsd-mobile@freebsd.org Subject: Re: Switching from wired to wireless getting "network down" Message-ID: <hhhvrk$s50$1@ger.gmane.org> In-Reply-To: <200912300852.57010.jhb@freebsd.org> References: <1238217783.00093348.1238205603@10.7.7.3> <49CFBA6D.9070208@freebsd.org> <4B3A74B3.10808@users.sf.net> <200912300852.57010.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
John Baldwin wrote: > On Tuesday 29 December 2009 4:29:23 pm martinko wrote: >> Sam Leffler wrote: >>> >>> r190526 makes it possible to do the wired/wireless failover in HEAD. The >>> only caveat is you must manually set the mac address of the wireless >>> device to match the wired device because lagg's automatic setting of the >>> wlanX ifnet doesn't propagate to the underlying device (the way >>> if_setlladdr works makes it difficult). In the mean time you can do: >>> >>> ifconfig ath0 ether 00:11:22:33:44:55 >>> >>> where the mac address is whatever your wired nic's address is and then >>> setup lagg0 using the wlan; e.g. >>> >>> ifconfig ath0 ether 00:11:22:33:44:55 >>> ifconfig wlan create wlandev ath0 ssid my_net up >>> ifconfig lagg create laggproto failover laggport em0 laggport wlan0 ... >>> >>> I also verified it works with WPA. In fact I tested this on a thinkpad >>> in a docking station and it did the right thing just un-docking and >>> re-docking. My only complaint is my ping running during all this lost >>> one packet in the transition; not sure where. >>> >>> Sam >> >> Hallo, >> >> I've tried to figure out how to make this persistant via rc.conf and I'm >> running into a dependency issue -- lagg is created before wlan: >> >> This is in my rc.conf: >> >> ifconfig_sk0="up" >> ifconfig_iwi0="ether 00:11:22:33:44:55" # match wired (sk0) >> wlans_iwi0="wlan0" >> ifconfig_wlan0="wpa" >> >> cloned_interfaces="lagg0" >> ifconfig_lagg0="laggproto failover laggport sk0 laggport wlan0 dhcp" >> >> And this is the result of /etc/rc.d/netif restart : >> >> Stopping Network: lo0 sk0 fwe0 fwip0 iwi0 wlan0. >> [...] >> ifconfig: interface wlan0 does not exist >> Starting wpa_supplicant. >> ifconfig: SIOCSLAGGPORT: Device busy >> Starting Network: lo0 sk0 iwi0 lagg0. >> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 >> options=3<RXCSUM,TXCSUM> >> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 >> inet6 ::1 prefixlen 128 >> inet 127.0.0.1 netmask 0xff000000 >> sk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 >> options=b<RXCSUM,TXCSUM,VLAN_MTU> >> ether 00:11:22:33:44:55 >> media: Ethernet autoselect (none) >> status: no carrier >> iwi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290 >> ether 00:11:22:33:44:55 >> media: IEEE 802.11 Wireless Ethernet autoselect mode 11g >> status: associated >> lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 >> options=b<RXCSUM,TXCSUM,VLAN_MTU> >> ether 00:11:22:33:44:55 >> media: Ethernet autoselect >> status: no carrier >> laggproto failover >> laggport: sk0 flags=1<MASTER> >> >> Please note that wlan0 is not part of lagg0 (!) >> If I create it from command line it works as described in previous email. >> It looks to me that wlan0 is not created fast enough and thus not added >> to lagg0. :-/ >> Any suggestions how to solve this please ? > > Use an explicit 'network_interfaces' value in rc.conf that puts lagg0 last. > Hallo, Thanks for the hint. However it behaves very strangely.. This is what I added to my rc.conf (above): network_interfaces="lo0 sk0 iwi0 wlan0 lagg0" After /etc/rc.d/netif restart I see various funny things: 1) wpa_supplicant not running? (check /var/run/wpa_supplicant/wlan0.pid). even though it seems to be running (checked before): $ cat /var/run/wpa_supplicant/wlan0.pid 10349 $ PS wpa root 10349 1 10349 10349 0 Ss ?? 0:00.00 /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D 2) ifconfig: interface wlan0 does not exist even though as checked before: $ ifconfig wlan0 wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 00:11:22:33:44:55 media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated ssid gamato channel 1 (2412 Mhz 11g) bssid 00:01:02:03:04:05 country US authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit txpower 0 bmiss 24 scanvalid 60 protmode CTS wme roaming MANUAL 3) lagg0 listed twice (!): Stopping Network: lo0 sk0 iwi0 wlan0 lagg0 lagg0. [...] Starting wpa_supplicant. ifconfig: SIOCSLAGGPORT: Device busy ifconfig: SIOCSLAGGPORT: Device busy Starting Network: lo0 sk0 iwi0 wlan0 lagg0 lagg0. [...] lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 [...] lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 4) Right now, as if it was not enough, something new is happening: Starting wpa_supplicant. ioctl[SIOCS80211, op 26, arg 0x0]: Operation not supported ELOOP: remaining socket: sock=5 eloop_data=0x28407140 user_data=0x2840e040 handler=0x8069f40 /etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant ifconfig: SIOCSLAGGPORT: Device busy ifconfig: SIOCSLAGGPORT: Device busy and in /var/log/messages: Dec 31 11:40:10 mb-aw1n-bsd kernel: iwi0: timeout processing command blocks for iwi_bss firmware Dec 31 11:40:10 mb-aw1n-bsd kernel: iwi0: could not load boot firmware iwi_bss Dec 31 11:40:10 mb-aw1n-bsd kernel: iwi0: timeout waiting for master [...] Dec 31 11:40:10 mb-aw1n-bsd wpa_supplicant[12833]: ctrl_iface exists and seems to be in use - cannot override it Dec 31 11:40:10 mb-aw1n-bsd wpa_supplicant[12833]: Delete '/var/run/wpa_supplicant/wlan0' manually if it is not used anymore Dec 31 11:40:10 mb-aw1n-bsd wpa_supplicant[12833]: Failed to initialize control interface '/var/run/wpa_supplicant'. You may have another wpa_supplicant process already ru Dec 31 11:40:10 mb-aw1n-bsd wpa_supplicant[12833]: Failed to disable WPA in the driver. Dec 31 11:40:10 mb-aw1n-bsd root: /etc/rc.d/wpa_supplicant: WARNING: failed to start wpa_supplicant while there is nothing to delete: $ ll /var/run/wp* ls: /var/run/wp*: No such file or directory Something seems to be broken. :-/ With regards, Martin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hhhvrk$s50$1>