From owner-freebsd-mobile@FreeBSD.ORG Sun Nov 27 01:04:44 2005 Return-Path: X-Original-To: freebsd-mobile@freebsd.org Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0771416A41F for ; Sun, 27 Nov 2005 01:04:44 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B20943D60 for ; Sun, 27 Nov 2005 01:04:34 +0000 (GMT) (envelope-from kjelderg@gmail.com) Received: by zproxy.gmail.com with SMTP id z31so737897nzd for ; Sat, 26 Nov 2005 17:04:33 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jN4wGQKgZHWfCMRY0Z6juo18Fz8UE5p1z54C7kvDDkisQ0MEBoR3n6yvK9lJJoD45oGDPnkF1hgD3vqGfQS5dR91mxT6UV9eq1EzX5A23LfxyeKoeUHWS4aqykd1fCT2PBwtsTD8HuuruiWU3u3qKTYFTajsbU9A78kQgLOhLVk= Received: by 10.65.11.14 with SMTP id o14mr1975471qbi; Sat, 26 Nov 2005 17:04:33 -0800 (PST) Received: by 10.65.22.9 with HTTP; Sat, 26 Nov 2005 17:04:33 -0800 (PST) Message-ID: Date: Sun, 27 Nov 2005 10:04:33 +0900 From: Eric Kjeldergaard To: Hans Nieser In-Reply-To: <4388B53F.9020905@nieser.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4388B53F.9020905@nieser.net> Cc: freebsd-mobile@freebsd.org Subject: Re: Switching wired <-> wireless in a user-friendly manner, possible? 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: Sun, 27 Nov 2005 01:04:44 -0000 On 11/27/05, Hans Nieser 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.