netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Stefan Tomanek <stefan.tomanek@wertarbyte.de>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 v2 2/2] ip rule: add route suppression options
Date: Sun, 4 Aug 2013 11:56:22 -0700	[thread overview]
Message-ID: <20130804115622.0f3d26c7@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20130803122316.GN21970@zirkel.wertarbyte.de>

On Sat, 3 Aug 2013 14:23:16 +0200
Stefan Tomanek <stefan.tomanek@wertarbyte.de> wrote:

> When configuring a system with multiple network uplinks and default routes, it
> is often convenient to reference a routing table multiple times - but reject
> its routing decision if certain constraints are not met by it.
> 
> Consider this setup:
> 
> $ ip route add table secuplink default via 10.42.23.1
> 
> $ ip rule add pref 100            table main suppress_prefixlength 0
> $ ip rule add pref 150 fwmark 0xA table secuplink
> 
> With this setup, packets marked 0xA will be processed by the additional routing
> table "secuplink", but only if no suitable route in the main routing table can
> be found. By suppressing entries with a prefixlength of 0 (or less), the
> default route (/0) of the table "main" is hidden to packets processed by rule
> 100; packets traveling to destinations via more specific routes are processed
> as usual.
> 
> It is also possible to suppress a routing entry if a device belonging to
> a specific interface group is to be used:
> 
> $ ip rule add pref 150 table main suppress_group 1
> 
> Signed-off-by: Stefan Tomanek <stefan.tomanek@wertarbyte.de>

Applied to net-next-3.11 branch

      reply	other threads:[~2013-08-04 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-03 12:23 [PATCH iproute2 v2 2/2] ip rule: add route suppression options Stefan Tomanek
2013-08-04 18:56 ` Stephen Hemminger [this message]

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=20130804115622.0f3d26c7@nehalam.linuxnetplumber.net \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    --cc=stefan.tomanek@wertarbyte.de \
    /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;
as well as URLs for NNTP newsgroup(s).