From owner-freebsd-questions@FreeBSD.ORG Thu Aug 20 10:52:47 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F08E1065690 for ; Thu, 20 Aug 2009 10:52:47 +0000 (UTC) (envelope-from ml@infosec.pl) Received: from v027580.home.net.pl (v027580.home.net.pl [89.161.156.148]) by mx1.freebsd.org (Postfix) with SMTP id B91638FC3D for ; Thu, 20 Aug 2009 10:52:46 +0000 (UTC) Received: from localhost (HELO ?192.168.1.66?) (ml.freeside@home@127.0.0.1) by m094.home.net.pl with SMTP; Thu, 20 Aug 2009 10:26:07 -0000 Message-ID: <4A8D329D.5030205@infosec.pl> Date: Thu, 20 Aug 2009 11:25:17 +0000 From: Michal User-Agent: Thunderbird 2.0.0.22 (X11/20090729) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: switching from one network interface to another without reboot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Aug 2009 10:52:47 -0000 Hello, How can I switch from one network interface to another without rebooting my system (7.2R)? Problem description: I've got a laptop with two network interfaces (wired em0 and wireless ath0). Every now and then I have to set up a DSL wireless box which comes with default settings so that I have to start with connecting my laptop via em0. em0 gets IP address from wireless box by DHCP. I log in to web interface and set everything up including WLAN and restart wireless box. At this point I would like to switch to ath0 and start using internet connection via wireless box. I'm taking em0 interface down with "ifconfig em0 down" and unplug the cable. I'm changing /etc/rc.conf entries to: ifconfig_em0="NOAUTO" ifconfig_ath0="WPA DHCP" Then I'm doing "/etc/rc.d/netif restart" and ath0 gets IP address via DHCP and is connected to wireless box (/etc/wpa_supplicant.conf is set up). But whenever I try to ping anything (including wireless box) I get "interface down" message because my system still tries to use em0. What else should I do to tell it that I'm connected to network via ath0 now? Any suggestions are welcome. Michal -- "The quiter you become, the more you can hear." -Ram Dass