From: Guido Trotter <ultrotter@quaqua.net>
To: netdev@vger.kernel.org
Subject: Policy routing + route "via" gives a strange behavior
Date: Tue, 20 Oct 2009 15:28:20 +0200 [thread overview]
Message-ID: <20091020132820.GA3159@gg.studio.tixteam.net> (raw)
Hi,
I'm seeing what I think might be a strange kernel behavior when setting up a
route "via" a gateway, with policy routing. When adding a route with a gateway,
the kernel accepts it only if the gateway is reachable via that device. For
example:
ip route add default dev eth1 via 192.168.5.254
is only accepted if there is a route like:
192.168.5.0/24 dev eth1 scope link
in the main routing table. which, of course, is ok, otherwise the kernel
wouldn't be able to reach 192.168.5.254 in the first place.
Now, when adding policy routing to the mix, if I do:
ip route add table 100 default dev eth1 via 192.168.5.254
This is also refused unless a route like the one before appears in the default
table, even though it does appear in table 100. Is this the right behavior, and
if yes, why? It seems to me that it should be acceptable to have the network
route as well just in the separate routing table, since the "via" will only be
used by traffic hitting that table anyway.
Thanks a lot,
Guido
next reply other threads:[~2009-10-20 13:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-20 13:28 Guido Trotter [this message]
2009-10-20 16:48 ` Policy routing + route "via" gives a strange behavior Atis Elsts
2009-10-20 17:23 ` Guido Trotter
2009-10-21 8:47 ` Mallika Gautam
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=20091020132820.GA3159@gg.studio.tixteam.net \
--to=ultrotter@quaqua.net \
--cc=netdev@vger.kernel.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