From: Amin Azez <azez@ufomechanic.net>
To: lartc@vger.kernel.org
Subject: [LARTC] Re: BUG? re-ordering of tos routes in table
Date: Tue, 13 Mar 2007 11:18:02 +0000 [thread overview]
Message-ID: <et6190$sig$1@sea.gmane.org> (raw)
* Amin Azez wrote, On 13/03/07 11:01:
> It strikes me that the re-ordering that seems to be based on netmask
> size should occur only in a larger ordering by tos, with tos of zero
> appearing last.
>
> i.e. when inserting routes, sort by descending order of tos and then by
> descending order of netmask size.
>
> For the last case this would give:
> 1.1.0.0/24 tos 0x15 via 192.168.0.23 dev eth3
> 1.1.0.1 via 192.168.0.24 dev eth3
>
> as tos 0x0 (any) appears last.
>
> Sam
>
perhaps not... it would cause:
# ip route add 1.1.0.1/32 table 3 nexthop via 192.168.0.24
# ip route add 1.1.0.0/24 tos 0x15 table 3 nexthop via 192.168.0.23
# ip route show table 3
to result in (with tos 0 (any) last)
1.1.0.0/24 tos 0x15 via 192.168.0.23 dev eth3
1.1.0.1 via 192.168.0.24 dev eth3
Which again is not what is wanted.
The conditions when route-creation order trumps subnet size seem to be:
1. that non-0-tos smaller subneted routes can't be automatically moved before any 0-tos route whose subnet contains the smaller subnet.
2. that 0-tos smaller subneted routes can't be automatically moved before any non-0-tos route whose subnet contains the smaller subnet.
because in both cases the tos mismatch would cause the smaller subnet to steal packets belonging to the other route, by virtue of route-creation order, which otherwise would result in sequences that could not easily be specified.
However this may result in islands of 0-tos, non-0-tos, 0-tos in the table that don't get merged in some cases because of the particular subnets in use but do in others.
There is a simpler solution... not to use tos in a table at all, but relegate it solely to rules; or not to use tos in tables in such cases (being where tos is intended to trump subnet size ordering).
Sam
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
reply other threads:[~2007-03-13 11:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='et6190$sig$1@sea.gmane.org' \
--to=azez@ufomechanic.net \
--cc=lartc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.