public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mick <michaelkintzios@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: configure wlan0 route metric
Date: Wed, 13 Apr 2011 17:03:36 +0100	[thread overview]
Message-ID: <BANLkTimfKz-VVBRG8paJk1dbPqd=XH9ZzQ@mail.gmail.com> (raw)
In-Reply-To: <20110413153534.GA13724@gaurahari>

On 13 April 2011 16:35, Indi <thebeelzebubtrigger@gmail.com> 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=0
>>
>>    case "${IFACE}" in
>>       eth0) metric=0 ;;
>>       eth1) metric=1 ;;
>>    esac
>>    ifmetric "${IFACE}" "${metric}"
>>
>>    return 0
>> }
>>
>
> Hey, that works very well here -- thanks!
> Been wanting that solution for some time now.
> :)

My apologies!  It took some time between reading your message and
replying to it - by which time I had forgotten the finer points.

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.

-- 
Regards,
Mick



  reply	other threads:[~2011-04-13 16:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <gGTjR-4Xq-33@gated-at.bofh.it>
     [not found] ` <gH4Ii-7li-33@gated-at.bofh.it>
     [not found]   ` <gH5kZ-8uC-5@gated-at.bofh.it>
     [not found]     ` <gH6qK-1Rf-19@gated-at.bofh.it>
     [not found]       ` <gH6K6-2j1-11@gated-at.bofh.it>
2011-04-13 15:35         ` [gentoo-user] Re: configure wlan0 route metric Indi
2011-04-13 16:03           ` Mick [this message]
2011-04-13 19:52             ` deadeyes
2011-04-14  9:50               ` Mick
     [not found]         ` <gHpWp-7Ds-3@gated-at.bofh.it>
     [not found]           ` <gHrvc-1HW-15@gated-at.bofh.it>
2011-04-14 22:25             ` Indi
     [not found] <gHbTt-2Ui-33@gated-at.bofh.it>
     [not found] ` <gHbTt-2Ui-45@gated-at.bofh.it>
     [not found]   ` <gHbTt-2Ui-31@gated-at.bofh.it>
     [not found]     ` <gHdBT-5Tb-3@gated-at.bofh.it>
2011-04-13 19:27       ` Indi
     [not found] <gHakF-8vF-15@gated-at.bofh.it>
     [not found] ` <gHakF-8vF-17@gated-at.bofh.it>
     [not found]   ` <gHakG-8vF-19@gated-at.bofh.it>
     [not found]     ` <gHakG-8vF-21@gated-at.bofh.it>
     [not found]       ` <gHakG-8vF-23@gated-at.bofh.it>
     [not found]         ` <gHakF-8vF-13@gated-at.bofh.it>
     [not found]           ` <gHaNL-12f-85@gated-at.bofh.it>
2011-04-13 17:07             ` Indi
2011-04-13 18:56               ` Mick
     [not found]         ` <gHDd0-5d8-25@gated-at.bofh.it>
     [not found]           ` <gHDd0-5d8-27@gated-at.bofh.it>
     [not found]             ` <gHDd0-5d8-23@gated-at.bofh.it>
2011-04-15  2:06               ` Indi
2011-04-15  5:08                 ` Mick
2011-04-12 21:14 [gentoo-user] " deadeyes
2011-04-13  9:33 ` Kfir Lavi
2011-04-13 10:06   ` [gentoo-user] " deadeyes
2011-04-13 11:20     ` Mick
2011-04-13 11:40       ` deadeyes
2011-04-14  8:13         ` deadeyes
2011-04-14  9:53           ` Mick
2011-04-14 20:22             ` deadeyes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTimfKz-VVBRG8paJk1dbPqd=XH9ZzQ@mail.gmail.com' \
    --to=michaelkintzios@gmail.com \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox