Patent ID: 6886073

Claim:
A method for storing prefixes for a plurality of rules in a computer system, the computer system having a ternary content addressable memory (TCAM), the plurality of rules using at least one range of values in at least one dimension and corresponding to a plurality of prefixes, the at least one range being described by at least one prefix, a portion of the plurality of rules capable of intersecting, the method comprising: (a) providing a plurality of priorities for the plurality of rules, the plurality of priorities including at least one different priority for the portion of the plurality of rules that intersect; and (b) storing the plurality of prefixes in the TCAM in at least one block in an order based upon the plurality of priorities of the plurality of rules, wherein the storing step (b) further includes the step of: (b1) storing the plurality of prefixes such that a portion of the plurality of rules having identical priorities are stored in a single block.