Patent ID: 6266706
Filing Date: 2001-07-24
Classification: H04L

Abstract:
A method of IP routing lookup in a routing table to determine where IP datagrams are to be forwarded, said routing table comprising entries of arbitrary length prefixes with associated next-hop information in a next-hop table, said method comprising the steps of:(a) storing in a storage means a representation of said routing table, in the form of a complete prefix tree (7), defined by prefixes of all of said entries, completed such that each node has one of no and two children, all of said children added are leaves with said next-hop information being same as a closest ancestor with said next-hop information or an undefined next-hop if no such closest ancestor exists;(b) storing in said storage means a representation of a bit vector (8), said bit vector comprising data of a cut through said prefix tree (7) at a current depth (D) with one bit per possible node at said current depth, wherein said one bit is set when there is such a node in said prefix tree (7);(c) storing in said storage means an array of pointers, for genuine heads an index to said next-hop table, and for root heads an index to a next-level chunk;(d) dividing said bit-vector (8) into bit-masks of a certain length;(e) storing in said storage means a maptable comprising a representation of said bit-masks that are possible;(f) storing in said storage means an array of code words, each of said code words encoding a row index into said maptable and a pointer offset;(g) storing in said storage means an array of base addresses;(h) accessing a code word at a location corresponding to a first index part (ix) of an IP address in said array of code words;(i) accessing a maptable entry part at a location corresponding to a column index part (bit) of said IP address and a row index part (ten) of said code word in said maptable;(j) accessing a base address at a location corresponding to a second index part (bix) of said IP address in said array of base addresses; and(k) accessing a pointer at a location corresponding to said base address plus a pointer offset (six) of said code word plus said maptable entry part in said array of pointers.