This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
RangeIPLookup -- Click element; IP routing lookup through binary search in a very compact table
RangeIPLookup(ADDR1/MASK1 [GW1] OUT1, ADDR2/MASK2 [GW2] OUT2, ...)
Ports: 1 input, any number of outputs
Drivers: userlevel, bsdmodule
Package: ip (core)
Expects a destination IP address annotation with each packet. Looks up that address in its routing table, using longest-prefix-match, sets the destination annotation to the corresponding GW (if specified), and emits the packet on the indicated OUTput port. Each argument is a route, specifying a destination and mask, an optional gateway IP address, and an output port. No destination-mask pair should occur more than once. RangeIPLookup aims at achieving high lookup speeds through exploiting the CPU cache locality. The routing table is expanded into a very small lookup structure, typically occupying less then 4 bytes per IP prefix. As an example, a lookup structure corresponding to a routing table with 167000 entries (a realistic snapshot taken from a core Internet router) occupies only around 512 KBytes of RAM. Depending on how sucessfully the CPU cache affinity can be maintained, worst-case lookup rates exceeding 20 million lookups per second can be achieved using modern commodity CPUs. RangeIPLookup maintains a large DirectIPLookup table as well as its own tables. Although this subsidiary table is only accessed during route updates, it significantly adds to RangeIPLookup's total memory footprint.
ADDR/MASK [GW] OUT'. Fails if a route for
set ADDR/MASK [GW] OUT' to add a route, and `
remove ADDR/MASK' to remove a route. You can supply multiple commands, one per line; all commands are executed as one atomic operation.
See IPRouteTable for a performance comparison of the various IP routing elements.
Generated by 'click-elem2man' from '../elements/ip/rangeiplookup.hh' on 24/May/2007.