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

Sam Leffler <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Organization FreeBSD Project
Message-ID <[email protected]>
Andrew Thompson wrote:
> On Sat, Mar 28, 2009 at 09:35:46AM -0700, Sam Leffler wrote:
>   
>> J. Porter Clark wrote:
>>     
>>>   
>>>       
>>>> Depends on your configuration. Do you use DHCP or static network
>>>> configurations? If it is DHCP, I suspect /etc/rc.d/dhclient restart
>>>> would do the trick. If it is status:
>>>> route add default abc.def.gh.ij
>>>> should do the trick.     
>>>>         
>>>   
>>>       
>>>> Going the other way can be a tiny bit more involved. 'ifconfig wlan0
>>>> down' first or 'route delete default' to get rid of the current
>>>> static. (Note: wlan0 on stable needs to be replaced with the name of
>>>> your wireless interface.)
>>>>     
>>>>         
>>> I've been playing around with this sort of setup, too, where I
>>> want a command line to change from wired to wireless (at the
>>> same IP address, even) and back again.  I haven't found the
>>> magic solution, particularly one that doesn't have a lot of
>>> hardcoded network config in it.  I'm also somewhat ticked that
>>> "route flush" doesn't really flush all routes like the man page
>>> says.  8-) Eventually, I usually arrive at a point where I can't
>>> find my way back and have to reboot to get some work done.
>>>
>>> Some things I've been using are "route delete <my ip address>"
>>> and "route add -ifp <interface> default".  Might be a good idea
>>> to "arp -a -d", too.
>>>
>>>   
>>>       
>> If this is 7.x or later, have you tried using lagg(4) to do automatic 
>> failover?  The man page says wpa doesn't work but after talking to Andrew 
>> we think that's no longer true.  I haven't had a chance to try it myself.
>>     
>
> This is becuase lagg(4) will set the interface down/up when grabbing it
> and wpa_supplicant does not get restarted. This may work now but looking
> through /etc/devd.conf I dont see a rule to handle it (only ATTACH and
> LINK_UP events). A new devd event may need to be added to handle this
> situation. Patches welcome.
>   

I believe LINK_UP should be sufficient but we need to check.

    Sam

_______________________________________________
[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.