Method and system for performing longest prefix matching for network address lookup using bloom filters
First Claim
1. A method of performing a network address lookup, comprising:
- grouping forwarding prefixes from a routing table by prefix length;
associating each of a plurality of Bloom filters with a unique prefix length;
programming each of said plurality of Bloom filters with said prefixes corresponding to said associated unique prefix length;
performing membership probes to said Bloom filters by using predetermined prefixes of a network address; and
utilizing a direct lookup array for initial prefix lengths and asymmetric Bloom filters for the rest of the prefix lengths;
wherein said direct lookup array comprises;
storing prefixes of not more than a predetermined number for a predetermined length, in a binary trie;
performing Controlled Prefix Expansion (CPE) in a CPE trie for a stride length equal to said predetermined number;
writing a next hop associated with each leaf at a level of said CPE trie corresponding to said predetermined number to an array slot addressed by bits that label a path from a root of said CPE trie to said leaf; and
searching said array using bits of said network address of said predetermined number to index into said array.
2 Assignments
0 Petitions
Accused Products
Abstract
The present invention relates to a method and system of performing parallel membership queries to Bloom filters for Longest Prefix Matching, where address prefix memberships are determined in sets of prefixes sorted by prefix length. Hash tables corresponding to each prefix length are probed from the longest to the shortest match in the vector, terminating when a match is found or all of the lengths are searched. The performance, as determined by the number of dependent memory accesses per lookup, is held constant for longer address lengths or additional unique address prefix lengths in the forwarding table given that memory resources scale linearly with the number of prefixes in the forwarding table. For less than 2 Mb of embedded RAM and a commodity SRAM, the present technique achieves average performance of one hash probe per lookup and a worst case of two hash probes and one array access per lookup.
340 Citations
34 Claims
-
1. A method of performing a network address lookup, comprising:
- grouping forwarding prefixes from a routing table by prefix length;
associating each of a plurality of Bloom filters with a unique prefix length;
programming each of said plurality of Bloom filters with said prefixes corresponding to said associated unique prefix length;
performing membership probes to said Bloom filters by using predetermined prefixes of a network address; and
utilizing a direct lookup array for initial prefix lengths and asymmetric Bloom filters for the rest of the prefix lengths;
wherein said direct lookup array comprises;
storing prefixes of not more than a predetermined number for a predetermined length, in a binary trie;
performing Controlled Prefix Expansion (CPE) in a CPE trie for a stride length equal to said predetermined number;
writing a next hop associated with each leaf at a level of said CPE trie corresponding to said predetermined number to an array slot addressed by bits that label a path from a root of said CPE trie to said leaf; and
searching said array using bits of said network address of said predetermined number to index into said array. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19)
- grouping forwarding prefixes from a routing table by prefix length;
-
20. A system for performing a network address lookup, comprising:
- means for sorting forwarding prefixes from a routing table by prefix length;
means for associating each of a plurality of Bloom filters with a unique prefix length;
means for programming each of said plurality of Bloom filters with said prefixes corresponding to said associated unique prefix length;
means for performing membership queries to said Bloom filters by using predetermined prefixes of a network address; and
a direct lookup array for initial prefix lengths and asymmetric Bloom filters for the rest of the prefix lengths;
wherein said direct lookup array comprises;
prefixes of not more than a predetermined number for a predetermined length, in a binary trie;
means for performing Controlled Prefix Expansion (CPE) in a CPE trie for a stride length equal to said predetermined number;
means for writing a next hop associated with each leaf at a level of said CPE trie corresponding to said predetermined number to an array slot addressed by bits labeling a path from a root of said CPE trie to said leaf; and
means for searching said array using bits of said network address of said predetermined number to index into said array. - View Dependent Claims (21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34)
- means for sorting forwarding prefixes from a routing table by prefix length;
Specification