From owner-freebsd-mobile@FreeBSD.ORG Thu Dec 31 10:54:06 2009 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A9AA1065672 for ; Thu, 31 Dec 2009 10:54:06 +0000 (UTC) (envelope-from freebsd-mobile@m.gmane.org) Received: from lo.gmane.org (lo.gmane.org [80.91.229.12]) by mx1.freebsd.org (Postfix) with ESMTP id 142CD8FC15 for ; Thu, 31 Dec 2009 10:54:05 +0000 (UTC) Received: from list by lo.gmane.org with local (Exim 4.50) id 1NQIfL-0006Oh-VD for freebsd-mobile@freebsd.org; Thu, 31 Dec 2009 11:54:03 +0100 Received: from 200.41.broadband11.iol.cz ([90.178.41.200]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Dec 2009 11:54:03 +0100 Received: from gamato by 200.41.broadband11.iol.cz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 31 Dec 2009 11:54:03 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-mobile@freebsd.org From: martinko Date: Thu, 31 Dec 2009 11:53:39 +0100 Lines: 174 Message-ID: References: <1238217783.00093348.1238205603@10.7.7.3> <49CFBA6D.9070208@freebsd.org> <4B3A74B3.10808@users.sf.net> <200912300852.57010.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 200.41.broadband11.iol.cz User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.1.6) Gecko/20091220 SeaMonkey/2.0.1 In-Reply-To: <200912300852.57010.jhb@freebsd.org> Sender: news Subject: Re: Switching from wired to wireless getting "network down" X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Dec 2009 10:54:06 -0000 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 metric 0 mtu 16384 >> options=3 >> inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 >> inet6 ::1 prefixlen 128 >> inet 127.0.0.1 netmask 0xff000000 >> sk0: flags=8843 metric 0 mtu 1500 >> options=b >> ether 00:11:22:33:44:55 >> media: Ethernet autoselect (none) >> status: no carrier >> iwi0: flags=8843 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 metric 0 mtu 1500 >> options=b >> ether 00:11:22:33:44:55 >> media: Ethernet autoselect >> status: no carrier >> laggproto failover >> laggport: sk0 flags=1 >> >> 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 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 metric 0 mtu 1500 [...] lagg0: flags=8843 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