Skip to content
Eddie Kohler edited this page Oct 17, 2017 · 2 revisions

RadixIPLookup Element Documentation

NAME

RadixIPLookup — Click element; IP lookup using a radix trie

SYNOPSIS

RadixIPLookup(ADDR1/MASK1 [GW1] OUT1, ADDR2/MASK2 [GW2] OUT2, ...)

Ports: 1 input, any number of outputs
Processing: push

DESCRIPTION

Performs IP lookup using a radix trie. The first level of the trie has 256 buckets; each succeeding level has 16. The maximum number of levels that will be traversed is thus 7.

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.

Uses the IPRouteTable interface; see IPRouteTable for description.

ELEMENT HANDLERS

  • table (read-only) — Outputs a human-readable version of the current routing table.
  • lookup (read-only) — Reports the OUTput port and GW corresponding to an address.
  • add (write-only) — Adds a route to the table. Format should be `ADDR/MASK [GW] OUT'. Should fail if a route for ADDR/MASK already exists, but currently does not.
  • set (write-only) — Sets a route, whether or not a route for the same prefix already exists.
  • remove (write-only) — Removes a route from the table. Format should be `ADDR/MASK'.
  • ctrl (write-only) — Adds or removes a group of routes. Write `add/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.

NOTES

See IPRouteTable for a performance comparison of the various IP routing elements.

SEE ALSO

IPRouteTable, DirectIPLookup, RangeIPLookup, StaticIPLookup, LinearIPLookup, SortedIPLookup, LinuxIPLookup

Generated by click-elem2man from ../elements/ip/radixiplookup.hh:9 on 2017/10/17.

Clone this wiki locally