From owner-freebsd-mobile@FreeBSD.ORG Sat Mar 28 16:26:16 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 5BA691065672 for ; Sat, 28 Mar 2009 16:26:16 +0000 (UTC) (envelope-from clarkjp@charter.net) Received: from mail.cluebytwelve.org (clueby12.org [198.186.190.239]) by mx1.freebsd.org (Postfix) with ESMTP id 223DA8FC0A for ; Sat, 28 Mar 2009 16:26:15 +0000 (UTC) (envelope-from clarkjp@charter.net) Received: from localdomain.local (24-158-157-74.dhcp.jcsn.tn.charter.com [24.158.157.74]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cluebytwelve.org (Postfix) with ESMTPSA id B29151B5D0 for ; Sat, 28 Mar 2009 11:08:59 -0500 (CDT) Received: by localdomain.local (Postfix, from userid 1001) id A3C4A4AC44; Sat, 28 Mar 2009 11:08:58 -0500 (CDT) Date: Sat, 28 Mar 2009 11:08:58 -0500 From: "J. Porter Clark" To: freebsd-mobile@freebsd.org Message-ID: <20090328160858.GA57695@auricle.charter.net> References: <1238217783.00093348.1238205603@10.7.7.3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Orig-To: "Kevin Oberman" User-Agent: Mutt/1.5.19 (2009-01-05) 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: Sat, 28 Mar 2009 16:26:16 -0000 >> Date: Fri, 27 Mar 2009 10:04:29 -0700 >> From: Jason Nordwick >> Sender: owner-freebsd-mobile@freebsd.org >> >> This appears to be the case. "route get 192.168.1.1" (my netgear wireless) >> shows that it still wants to use bfe0 instead of the wpi0 interface. How do >> I get it so that when I unplug my cable and my wireless is up, it changes >> the routing table? >> >> -j >> >> >> On Fri, Mar 27, 2009 at 9:31 AM, Jason Nordwick wrote: >> >> > I just updated to the current -STABLE (7.2-PRERELEASE is the same thing? >> > hopefully). >> > >> > When I boot with the network cable plugged in, but then try to unplug it >> > and up my wireless, it doesn't seem to work although the ifconfig shows I am >> > joined to my wireless network. Is there some magic I need to do to reset the >> > routing tables or something? >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 " and "route add -ifp default". Might be a good idea to "arp -a -d", too. -- J. Porter Clark