[1246] in linux-net channel archive
Re: ip aliasing support ...
daemon@ATHENA.MIT.EDU (Jim Binkley)
Wed Oct 25 03:19:49 1995
To: linux-net@vgers.rutgers.edu
cc: srb@cuci.nl (Stephen R. van den Berg), linux-net@vger.rutgers.edu,
jrb@cs.pdx.edu
In-reply-to: Your message of "Mon, 23 Oct 1995 14:49:22 BST."
<199510231349.OAA15924@snowcrash.cymru.net>
Date: Tue, 24 Oct 1995 10:04:00 -0700
From: Jim Binkley <jrb@cs.pdx.edu>
>BSD uses a patricia tree. I can see a binary search without netmasks working
>rather well to the same effect.
Forgive me for shooting my mouth off but...
I think to be correct you need to have the routing algorithm
find the longest matching prefix too. You want
broadcast route before host route before subnet before net before
default... I believe the current BSD patricia tree
algorithm does that. See Steven's book TCP/IP Illustrated, Volume 2.
E.g., in the predecessor BSD stack, they had two tables, a host
and network table and used a hash to get into them. In effect,
this meant that host routes were matched before net routes, which
is something you want. E.g., 121.12.1.2 before 121.12.0.0, assuming
both are in the routing table. But in point of fact that older
BSD code did not support 121.12.1.0 and 121.12.0.0 since subnet masks
weren't taken into account (accept as guesses from interfaces and well...
never mind. The results could be totally wrong and very interesting
if you tried to have two different classes on different interfaces with
different subnet masks. Ouch!). That was a simpler version of the
improved patricia tree based stuff that is used now in 4.4. BSD stacks.
regarding # of routes and a linear search. Something would be nice here.
A netstat -rn | wc gets me 120 on this here SunOS system. This is
normal in a couple of bigger sites I have seen. Basically they are running
rip in a very large routing domain and routing tables are not small.
Sorry for being long winded.
regards,
Jim Binkley
jrb@cs.pdx.edu