Content deleted Content added
m moved Lulea algorithm to Luleå algorithm: proper Swedish spelling |
proper swedish spelling; eponym |
||
Line 1:
The '''
The key task to be performed in internet routing is to match a given [[IPv4]] address (viewed as a sequence of 32 bits) to the longest [[prefix]] of the address for which routing information is available. This prefix matching problem may be solved by a [[trie]], but trie structures use a significant amount of space (a [[node]] for each bit of each address) and searching them requires traversing a sequence of nodes with length proportional to the number of bits in the address. The
The main advantage of the
==First level==
Line 17:
* An array of "code words", one for each consecutive subsequence of 16 bits in the bit vector. Each code word is 16 bits, and consists of a 10-bit "value" and a 6-bit "offset". The sum of the offset and the associated base index gives a pointer to the first data item associated with a nonzero bit in the given 16-bit subsequence. The 10-bit value gives an index into a "maptable" from which the precise position of the appropriate data item can be found.
To look up the data item for a given address ''x'' in the first level of the data structure, the
#the base index at the position in the base index array indexed by the first 10 bits of ''x''
#the offset at the position in the code word array indexed by the first 12 bits of ''x''
Line 24:
==Second and third levels==
The second and third levels of the data structure are structured similarly to each other; in each of these levels the
If there are few enough different pieces of routing information associated with a chunk, the chunk just stores the list of these routes, and searches through them by a single step of [[binary search]] followed by a [[sequential search]]. Otherwise, an indexing technique analogous to that of the first level is applied.
==Notes==
{{reflist}}
==References==
|