Subject: Alternate route

From: Janardhan Iyengar <[email-masked]>
Date: Mon, 19 Jan 2004 16:51:55 -0500 (EST)

Hi Randy,

I have a question regarding the (well detailed !) "why_is_alt_route"
document:

" Note that this route has to be at the same level of the tree, i.e. the
code cannot return a less specific match or a more specific match. The
code basically had to find the exact level of the routing tree that the
existing route was cloned from and see if there are any alternates at that
level, if so it could clone one of these and hand it back. "

Why does the match have to be exact?

regards,
jana

On Sun, 18 Jan 2004, Randall Stewart (cisco) wrote:

> Howdy:
>
> I have just placed two things up on the SCTP web site:
>
> 1) Patch 18 which will go hand and hand with the KAME snap
>     for tommorrow 1/19/2004. This is a very small patch to fix
>     a very big error :-D I, the current code has a bug (from the
>     last patch) that breaks servers using the TCP mode :-<  Its
>     a one line fix. Plus as part of kame, the kame folks added a
>     new time comparison that does not seem to be in kernel
>     land FreeBSD. We have ifdef'd this and restored the old
>     comparison code so that if you don't have the cmp routine
>     you can always use the orginal code (this is the default behaviour
>     i.e. original code).
>
> 2) After Armando sent me an email on the subject I realized that
>     not everyone understands my concept of alternate route. I have
>     thus put an explanation file up that gives a bit of soapbox and
>     some technical info on what you get when you add the alternate
>     route patch. You can reach it via the download page or follow
>     this link:
>
> http://www.sctp.org/what_is_alt_route
>
> Happy SCTPing
>
> R
>
> --
> Randall R. Stewart
> ITD - Transport Technologies
> 815-477-2127(o) or 815-342-5222(c)
>
>
>

---------------------------------------------------------------
         Visit www.narmada.org, www.indiatogether.org
---------------------------------------------------------------

---

From: "Randall Stewart (cisco)" <[email-masked]>
Date: Mon, 19 Jan 2004 16:23:58 -0600

Jana:

Good question

I put that in there to see what kind of response I would get :-D

But it is quite true... it has to do with the way routing is
supposed to work. You are supposed to have the most specific
match to the path.. i.e. the most bits.

So once you select the level that is correct you must stay to that
level.

A way to look at it is with an example.. lets say we have:

route add default gw-1
route add default gw-2
route add host-a host-special
route add host-a host-special-2
route add special-net-a gw-special-1
route add special-net-a gw-special-2

Now if you don't stay at the same level then you will get
one of the defaults (possibly) which may have NO idea on how
to reach host-a or special-net-a.. these are specific. The
admin placed them in the table for a specific reason. Maybe
the network topology has a special access to a specific subnet or
host.. the main default router will have no idea where to
send the packets... but the host or net specific route DOES.. then
in that case you need to stay at that level.. even if there is only
one router at that level you may have to stay there just because
there is no assurance that a router higher in the tree knows
how to get there.

There are cases where it would work.. i.e. that gw-special-1 or 2 had
the same knowledge as gw-1/2 it is just better to go through them to
get to the specific network (maybe closer etc)... but how do you
tell that apart from the case where they do NOT have the same knowledge?

After playing with this, I could never figure out a better way then
staying at the same level.. there may be.. but I could not see it...

If you have an idea let me know and I would be glad to go play
radix tree madness ... these radix trees are so much fun :->

Glad you like the explanation.. I just wish the BSD community would too..

R