* Re: FIB LPM algorithm
2004-06-07 12:02 ` Antony Stone
@ 2004-06-07 11:23 ` alex
2004-06-07 12:11 ` Tobias DiPasquale
1 sibling, 0 replies; 4+ messages in thread
From: alex @ 2004-06-07 11:23 UTC (permalink / raw)
To: netfilter
> On Monday 07 June 2004 12:23 pm, Tobias DiPasquale wrote:
>
> > Hello all,
> >
> > I was wondering if someone could point me to a discussion of what LPM
> > algorithm the Linux routing FIB uses?
>
> Er, what do LPM and FIB mean please? I think I know netfilter quite
> well, and I've not come across these abbreviations so far...
Longest Prefix Match and Forwarding Information Base.
To answer your question: Linux has routing cache which stores complete
5-tuples. If it is not found in cache, it is looked up in the FIB which is
stored as 33 hashes (based on netmask size). Hashes are looked up from the
/32 back to /0.
Yes, it is extremely inefficient ;)
-alex
^ permalink raw reply [flat|nested] 4+ messages in thread
* FIB LPM algorithm
@ 2004-06-07 11:23 Tobias DiPasquale
2004-06-07 12:02 ` Antony Stone
0 siblings, 1 reply; 4+ messages in thread
From: Tobias DiPasquale @ 2004-06-07 11:23 UTC (permalink / raw)
To: netfilter
Hello all,
I was wondering if someone could point me to a discussion of what LPM
algorithm the Linux routing FIB uses? Is it detailed in the code
somewhere, or online, or in a book? I have perused the code somewhat
and it appears that it makes use of hash tables to store the FIB(s?),
but I can't seem to find the actual LPM operation used. Any help would
be appreciated. Thanks.
--
Tobias DiPasquale
[ 0x63626367545440676d61696c2e636f6d ]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FIB LPM algorithm
2004-06-07 11:23 FIB LPM algorithm Tobias DiPasquale
@ 2004-06-07 12:02 ` Antony Stone
2004-06-07 11:23 ` alex
2004-06-07 12:11 ` Tobias DiPasquale
0 siblings, 2 replies; 4+ messages in thread
From: Antony Stone @ 2004-06-07 12:02 UTC (permalink / raw)
To: netfilter
On Monday 07 June 2004 12:23 pm, Tobias DiPasquale wrote:
> Hello all,
>
> I was wondering if someone could point me to a discussion of what LPM
> algorithm the Linux routing FIB uses?
Er, what do LPM and FIB mean please? I think I know netfilter quite well,
and I've not come across these abbreviations so far...
Antony.
--
"I estimate there's a world market for about five computers."
- Thomas J Watson, Chairman of IBM
Please reply to the list;
please don't CC me.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FIB LPM algorithm
2004-06-07 12:02 ` Antony Stone
2004-06-07 11:23 ` alex
@ 2004-06-07 12:11 ` Tobias DiPasquale
1 sibling, 0 replies; 4+ messages in thread
From: Tobias DiPasquale @ 2004-06-07 12:11 UTC (permalink / raw)
To: netfilter
On Mon, 7 Jun 2004 13:02:15 +0100, Antony Stone
<antony@soft-solutions.co.uk> wrote:
> Er, what do LPM and FIB mean please? I think I know netfilter quite well,
> and I've not come across these abbreviations so far...
LPM = Longest Prefix Match, the algorithm used to match an IP to a
particular route based on the route's destination network spefication.
FIB = Forwarding Information Base, the data structure used by the
kernel to hold packet routing information.
There are 3 or 4 files in net/ipv4/ devoted entirely to the FIB (which
are called in route.c in the same subdir). Thinking more about this,
though, it was probably a mistake posting this to the netfilter
list... it seems more of a question that should be asked of the
linux-net list.
As well, I just found a small section on the FIB in Chapter 18 of
Understanding the Linux Kernel (2nd Edition) but its not really as
specific as I would like with respect to the exact LPM algorithm used.
I will repost my original message to linux-net but will also be
amenable to any direction that may come from this list, as well.
Thanks again :)
--
Tobias DiPasquale
[ 0x63626367545440676d61696c2e636f6d ]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-06-07 12:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-07 11:23 FIB LPM algorithm Tobias DiPasquale
2004-06-07 12:02 ` Antony Stone
2004-06-07 11:23 ` alex
2004-06-07 12:11 ` Tobias DiPasquale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox