From: Indi <thebeelzebubtrigger@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Re: configure wlan0 route metric
Date: Wed, 13 Apr 2011 15:27:11 -0400 [thread overview]
Message-ID: <20110413192711.GA30568@gaurahari> (raw)
In-Reply-To: <gHdBT-5Tb-3@gated-at.bofh.it>
On Wed, Apr 13, 2011 at 09:10:01PM +0200, Mick wrote:
> 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 <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.
> >
> > 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.
> >
> > Am I doing it wrong? :)
>
> No, not at all. It's only that the OP wanted to prioritise the wired
> interface against the wireless, but *only* for connections to the LAN.
> --
> Regards,
> Mick
Ah, sorry I missed that part. It does seem to do just I wanted though.
--
/\ /\
<\ />
^ caveat utilitor
'v-v'
next parent reply other threads:[~2011-04-13 19:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
[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 ` [gentoo-user] Re: configure wlan0 route metric 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
[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 ` Indi
2011-04-13 16:03 ` Mick
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
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=20110413192711.GA30568@gaurahari \
--to=thebeelzebubtrigger@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