From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QA5GX-0001zy-B5 for garchives@archives.gentoo.org; Wed, 13 Apr 2011 18:58:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DC6961C047; Wed, 13 Apr 2011 18:56:19 +0000 (UTC) Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com [74.125.82.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 9280E1C047 for ; Wed, 13 Apr 2011 18:56:19 +0000 (UTC) Received: by wyi11 with SMTP id 11so1115576wyi.40 for ; Wed, 13 Apr 2011 11:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:reply-to:to:subject:date:user-agent :references:in-reply-to:mime-version:content-type :content-transfer-encoding:message-id; bh=7nlSPkvb3aio5HfNcioYpAw3gTUrNICiTSy+yYJsCnU=; b=c78kZw5qfGDR/rn294D1ADfIZgFk9znwJOgtVyRfDcEzANEZQlXk1q+H7y6oxPn6LV 16iZojK4ivlk20Ox0wwPfH8FZpev+7nX5Xz4wk6Yidv4DWM2PSprmaQMECWQXQusUdSc n4OEthy3ThNQybW3yK0PpyiClInsj9CMeW7KE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=Z/c9mcTV8d8VwTALWWdfMwxeNMz/spjdpySgIyc1XsrjN5kFxeeOS+MudvTpGbmIlR YkOOE8Wj6GRTLzGOwDPaApiiBVdmR1qP+JvzcHSqmWmSK6sZ/ZizyJF9OZqNQMCKjvFJ gLzmnpF5GhoXmHQzsugJ/LmFlJPWL1OmPBPDs= Received: by 10.216.24.92 with SMTP id w70mr5617054wew.43.1302720978682; Wed, 13 Apr 2011 11:56:18 -0700 (PDT) Received: from dell_xps.localnet (230.3.169.217.in-addr.arpa [217.169.3.230]) by mx.google.com with ESMTPS id s40sm422833weq.28.2011.04.13.11.56.17 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Apr 2011 11:56:17 -0700 (PDT) From: Mick To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: configure wlan0 route metric Date: Wed, 13 Apr 2011 19:56:44 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.36-gentoo-r8; KDE/4.4.5; x86_64; ; ) References: <20110413170730.GA3549@gaurahari> In-Reply-To: <20110413170730.GA3549@gaurahari> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart3338395.l06cKHN04k"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201104131956.45551.michaelkintzios@gmail.com> X-Archives-Salt: X-Archives-Hash: 47eb0d26ab11d2b1821ff1c7259b663d --nextPart3338395.l06cKHN04k Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Wednesday 13 April 2011 18:07:30 Indi wrote: > On Wed, Apr 13, 2011 at 06:10:05PM +0200, Mick wrote: > > On 13 April 2011 16:35, Indi wrote: > > > On Wed, Apr 13, 2011 at 01:50:02PM +0200, deadeyes wrote: > > >> I was searching around the gentoo forums for ifmetric and found this > > >> piece of code that can be added in /etc/conf.d/net: > > >> postup() { > > >> local metric=3D0 > > >>=20 > > >> case "${IFACE}" in > > >> eth0) metric=3D0 ;; > > >> eth1) metric=3D1 ;; > > >> esac > > >> ifmetric "${IFACE}" "${metric}" > > >>=20 > > >> return 0 > > >> } > > >=20 > > > Hey, that works very well here -- thanks! > > > Been wanting that solution for some time now. > > >=20 > > > :) > >=20 > > My apologies! It took some time between reading your message and > > replying to it - by which time I had forgotten the finer points. > >=20 > > Whether you set NIC priority in the /etc/conf.d/net file or in a post > > up script, the result is the same. One NIC will have a higher > > priority than another for ALL connections. This is because NICs do > > not do NATing. They will send all packets out to the gateway > > (192.168.1.1) and the router at the gateway will determine which > > packet is forwarded to the Internet and which to the LAN. So, if you > > do not want to prioritise one NIC over another, it may be better to > > use iptables to route LAN packets via a particular NIC instead. >=20 > Actually I do want to prioritise one over the other, when both are > connected. Using netplug with one wired and one wireless, and the > referenced script in /etc/conf.d/net. >=20 > Am I doing it wrong? :) No, not at all. It's only that the OP wanted to prioritise the wired=20 interface against the wireless, but *only* for connections to the LAN. =2D-=20 Regards, Mick --nextPart3338395.l06cKHN04k Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iEYEABECAAYFAk2l8e0ACgkQVTDTR3kpaLbrEgCgwrHB+JAhrCL4WK6953gmbwv4 xAQAn2uLRuRs310DZ5RsKIG/5mpJDHMB =G9O3 -----END PGP SIGNATURE----- --nextPart3338395.l06cKHN04k--