From owner-freebsd-net@FreeBSD.ORG Tue Feb 19 23:27:08 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 1670816A421 for ; Tue, 19 Feb 2008 23:27:08 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.232]) by mx1.freebsd.org (Postfix) with ESMTP id C960D13C455 for ; Tue, 19 Feb 2008 23:27:07 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so1985395wxd.7 for ; Tue, 19 Feb 2008 15:27:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=B8r9tGjHgkspR+c/fSanoJUsgvyLozSjjecZuT+QzOw=; b=Sb2iR0koeTvX7DRbHV0Pf0K7ACasiql3Wxar2ThYhhl1EDJ5xuvetTv2GSoyGJtjTmlBqOcpoWV3xTSF8lyA0LriVOQ9vSkkEQ9MXak/uzH8PnLb7NrKIBC55HnDNzY/EOVwvSofF7iqdBG1IkY3vX3Krc/9i44PbHVlY71N2bo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=TtDsie6QEPpqrZzE8jSdkwSX5Om+buTj/Lyd48bWVuqoExhVe0sp6zTFl4yoi59l8gUEaG5eVLYKsRRMuxhGknfdKw+tQ1rVOyVeWCngQx9blhQvaz14mIf82RzXH9d91MXQaJQCJcHrDvP9lF3jf7NJlRdYhZ4hzpSJ700faC0= Received: by 10.141.206.13 with SMTP id i13mr5158950rvq.100.1203463626051; Tue, 19 Feb 2008 15:27:06 -0800 (PST) Received: by 10.141.170.18 with HTTP; Tue, 19 Feb 2008 15:27:05 -0800 (PST) Message-ID: <2e77fc10802191527h4ef5715dof110c77ef15efd94@mail.gmail.com> Date: Wed, 20 Feb 2008 01:27:05 +0200 From: "Niki Denev" Sender: ndenev@gmail.com To: "Jeremie Le Hen" In-Reply-To: <20080219221636.GC5164@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080219221636.GC5164@obiwan.tataz.chchile.org> X-Google-Sender-Auth: aa21f473868690e6 Cc: freebsd-net@freebsd.org Subject: Re: 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 23:27:08 -0000 On Feb 20, 2008 12:16 AM, Jeremie Le Hen wrote: > 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 > lagg(4) can do this. There is an example in the man page. --Niki