Re: Switching from wired to wireless getting "network down"

John Baldwin <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
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.

-- 
John Baldwin
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.