Claims
- 1. A method for an intermediate network node to efficiently lookup routing information associated with a network address, the method comprising:
(a) selecting a lookup table from a set of one or more lookup tables in the intermediate network node, each lookup table being associated with a different range of subnet mask lengths, wherein the selected lookup table is associated with the largest subnet mask lengths not yet searched; (b) searching the selected lookup table based on the value of the network address to locate a memory location of the network address's routing information; (c) if the network address is not found in the selected lookup table, then repeating steps (a) and (b) until the memory location of the network address's routing information is found or until all the lookup tables have been searched; and (d) searching an MTRIE for the memory location of the network address's routing information if the network address is not found in any of the lookup tables.
- 2. The method according to claim 1, further comprising:
receiving a data packet containing the network address at the intermediate network node; and extracting the network address from the received data packet.
- 3. The method according to claim 1, wherein the step (b) searching the selected lookup table comprises searching the selected lookup table using a bounded number of dependent lookups.
- 4. The method according to claim 1, wherein the step (b) searching the selected lookup table comprises searching selected lookup table in order of decreasing prefix lengths.
- 5. The method according to claim 1, further comprising organizing each lookup table in the set of one or more lookup tables as a first-level hash table having a plurality of indexed hash lines, each indexed hash line associated with a corresponding second-level table configured to store a memory location of routing information for at least one network address.
- 6. The method according to claim 5, further comprising storing, in the second-level tables, the location of routing information for network addresses in order of decreasing prefix length.
- 7. The method according to claim 5, wherein each hash line in a first-level hash table includes a valid bit, a hash-function identifier, a pointer to the hash line's corresponding second-level table and a value indicating a number of pages which may be indexed in the hash line's corresponding second-level table.
- 8. The method according to claim 5, further comprising indexing a hash line in a first-level hash table based on the result of applying a first hash function to a first set of prefix bits in the network address.
- 9. The method according to claim 8, further comprising indexing a page in a second-level table based on the result of applying a second hash function to a second set of prefix bits in the network address.
- 10. The method according to claim 9, wherein the first and second hash functions are CRC32 hash functions.
- 11. The method according to claim 9, wherein the first and second set of prefix bits in the network address are the same prefix bits.
- 12. The method according to claim 1, wherein the network address is an IPv6 address.
- 13. An intermediate network node adapted to lookup routing information associated with a network address using a bounded number of dependent lookups, the node comprising:
a network interface for receiving a packet containing the network address; a memory configured to store:
(a) at least one first-level hash table having a plurality of indexed hash lines, each indexed hash line associated with a corresponding second-level table configured to store a memory location of routing information for at least one network address, and (b) at least one MTRIE configured to store a memory location of routing information for at least one network address; and, a forwarding engine including one or more processing elements configured to lookup the location of the network address's associated routing information in the at least one first-level hash table or in the at least one MTRIE.
- 14. The intermediate node according to claim 13, wherein the second-level tables store the location of routing information for network addresses in order of decreasing prefix length.
- 15. The intermediate node according to claim 13, wherein each hash line in a first-level hash table includes a valid bit, a hash-function identifier, a pointer to the hash line's corresponding second-level table and a value indicating a number of pages which may be indexed in the hash line's corresponding second-level table.
- 16. The intermediate node according to claim 13, wherein a hash line in a first-level hash table is indexed based on the result of applying a first hash function to a first set of prefix bits in the network address.
- 17. The intermediate node according to claim 16, wherein a page in a second-level table is indexed based on the result of applying a second hash function to a second set of prefix bits in the network address.
- 18. The method according to claim 17, wherein the first and second set of prefix bits in the network address are the same prefix bits.
- 19. The intermediate node according to claim 13, wherein the network address is an IPv6 address.
- 20. An apparatus adapted to lookup routing information associated with a network address using a bounded number of dependent lookups, the apparatus comprising:
means for selecting a lookup table from a set of one or more lookup tables in the intermediate network node, each lookup table being associated with a different range of subnet mask lengths, wherein the selected lookup table is associated with the largest subnet mask lengths not yet searched; means for searching the selected lookup table based on the value of the network address to locate a memory location of the network address's routing information; and means for searching an MTRIE for the memory location of the network address's routing information if the network address is not found in any of the lookup tables.
- 21. The apparatus according to claim 20, further comprising:
means for receiving a data packet containing the network address at the intermediate network node; and means for extracting the network address from the received data packet.
- 22. The apparatus according to claim 20, wherein the means for searching the selected lookup table further comprises means for searching the selected lookup table in order of decreasing prefix lengths.
- 23. A computer-readable media including instructions for execution by a processor, the instructions for a method of efficiently lookup routing information associated with a network address, the method comprising the steps:
(a) selecting a lookup table from a set of one or more lookup tables in the intermediate network node, each lookup table being associated with a different range of subnet mask lengths, wherein the selected lookup table is associated with the largest subnet mask lengths not yet searched; (b) searching the selected lookup table based on the value of the network address to locate a memory location of the network address's routing information; (c) if the network address is not found in the selected lookup table, then repeating steps (a) and (b) until the memory location of the network address's routing information is found or until all the lookup tables have been searched; and (d) searching an MTRIE for the memory location of the network address's routing information if the network address is not found in any of the lookup tables.
RELATED APPLICATIONS
[0001] This application is related to U.S. patent application Ser. No. ______ [Attorney Docket No. CISCP808], entitled HIERARCHICAL HASH METHOD FOR PERFORMING FORWARD ROUTE LOOKUP, by Felix Yuan, et al., the teachings of which are expressly incorporated herein by reference.