From owner-freebsd-net@FreeBSD.ORG Tue Feb 19 22:49:07 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD1B016A418 for ; Tue, 19 Feb 2008 22:49:07 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from postfix2-g20.free.fr (postfix2-g20.free.fr [212.27.60.43]) by mx1.freebsd.org (Postfix) with ESMTP id 88CAE13C468 for ; Tue, 19 Feb 2008 22:49:07 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by postfix2-g20.free.fr (Postfix) with ESMTP id 998D42384089 for ; Tue, 19 Feb 2008 21:21:07 +0100 (CET) Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id 9FE623F6193 for ; Tue, 19 Feb 2008 23:21:40 +0100 (CET) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp5-g19.free.fr (Postfix) with ESMTP id 8A6A03F6177 for ; Tue, 19 Feb 2008 23:21:40 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id CF15C9BF12 for ; Tue, 19 Feb 2008 22:16:36 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id BB905405B; Tue, 19 Feb 2008 23:16:36 +0100 (CET) Date: Tue, 19 Feb 2008 23:16:36 +0100 From: Jeremie Le Hen To: freebsd-net@FreeBSD.org Message-ID: <20080219221636.GC5164@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.15 (2007-04-06) Cc: Subject: Two interfaces sharing the same IP address: how to change default route's interface on link change? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Feb 2008 22:49:07 -0000 Hi list, I have two network interfaces that share the same IP address. I would like tochange the default route's interface when the link changes. I think it could be possible to hack up something with devd(8) or net/ifstated, but this would be quite ugly. FWIW, I have a wired (bge0) and a wireless adapter (ral0). What I would like is: - When I unplug the cable, switch to the wireless adapter. - When I plug the cable in, switch to the wired adapter. In summary, favor wired connectivity over the wireless one, at any time: could this be at boot time or not. I'm pretty sure I'm not the only one who wants this kind of setup. So how did you achieve this setup? Thank you. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >