Date: Sun, 27 Nov 2005 10:04:33 +0900 From: Eric Kjeldergaard <kjelderg@gmail.com> To: Hans Nieser <hans@nieser.net> Cc: freebsd-mobile@freebsd.org Subject: Re: Switching wired <-> wireless in a user-friendly manner, possible? Message-ID: <d9175cad0511261704h188cce62o@mail.gmail.com> In-Reply-To: <4388B53F.9020905@nieser.net> References: <4388B53F.9020905@nieser.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/27/05, Hans Nieser <hans@nieser.net> wrote: > Hello, > > I have a laptop that I mainly use at home. It's got both a wired and > wireless interface, both work fine. I used to run Windows XP on it which > allowed me to easily switch from the wired interface to the wireless > interface and vice versa. I found this convenient because I could plugin > the cable when I have my laptop on my desk for better performance. When I > wanted to work with the laptop somewhere else, like downstairs or perhaps > for some reading before I go to sleep, I could just unplug the cable and > could continue reading websites and access my LAN over the wireless > interface. > > I have now installed FreeBSD 6.0 on my laptop and am trying to get it to > behave the same as Windows XP. Right now when I boot the laptop with the > cable plugged in it will access the LAN over the wired interface (fxp0), > as soon as I unplug the cable, I lose connectivity and won't route traffi= c > over the wireless interface (ipw0). > > I am guessing that what needs to happen is, as soon as fxp0 becomes > inactive, the default route needs to be updated so it will route over the > ipw0 interface. What is the best way to accomplish this? Do I have to > write a shellscript that continiously checks for fxp0's status and then > somehow update the default route, or are there facilities available for > this? I could be wrong, but... notify 0 { match "system" "IFNET"; match "type" "LINK_UP"; media-type "ethernet"; action "/etc/rc.d/dhclient start $subsystem"; }; exists in devd.conf . It seems one could copy that and have a rule for LINK_DOWN (if it exists) that did whatever you were after on unplugging. -- If I write a signature, my emails will appear more personalised.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d9175cad0511261704h188cce62o>