Packet classification search device and method
First Claim
1. A packet classification search device which, based upon fields included in packets which are used to classify the flow of said packets, searches through a rule table comprising a plurality of rules which combine said fields and actions to be performed in relation to packets of which the flow is classified by said fields, and determines actions to be performed in relation to said packets, comprising:
- a content addressable memory which combines and stores grouped fields which have been grouped from fields included in said rules into a plurality of groups determined in advance, and number of searches information and search related information which respectively show the groups and the rules to which said grouped fields are related;
a search result storage device which stores, in correspondence to said combinations which are stored in said content addressable memory, actions which are to be performed when combinations of grouped fields, number of searches information and search related information that have been inputted to said content addressable memory are found in said content addressable memory, and comparison related information which show the rules to search when next searching in said content addressable memory; and
;
a processing device which;
extracts said fields from packets which have been inputted and generates said grouped fields;
inputs into said content addressable memory and searches said number of searches information and said search related information which show the groups and rules which should be searched, and said grouped fields which correspond to said groups;
obtains said actions and said comparison related information which are stored in said search result storage device in correspondence to combinations which have been searched in said content addressable memory; and
, until the details of the actions which are to be performed as said actions upon said packets are obtained, again inputs to said content addressable memory said number of searches information which shows the groups which should next be searched, said grouped fields which correspond to said groups, and said comparison related information which has been obtained, and performs said searching again.
1 Assignment
0 Petitions
Accused Products
Abstract
A packet classification search device and method are implemented which are capable of searching rules of packet classification having very long search bit width at high speed while using a CAM which has a limited bit width. The fields of rules of packet classification are grouped into groups, and the grouped fields of each rule are stored along with search related information (except for the initial group) and number of searches information in a CAM. The next number of searches information (if further groups exist which must be searched), comparison related information, and actions related to packets (if further groups exist which must be searched, directing searching again, while if no further groups exist which must be searched, actions for packet classification) are stored in a search result storage device. By doing this it is made possible to search with the bit width of the group unit.
-
Citations
13 Claims
-
1. A packet classification search device which, based upon fields included in packets which are used to classify the flow of said packets, searches through a rule table comprising a plurality of rules which combine said fields and actions to be performed in relation to packets of which the flow is classified by said fields, and determines actions to be performed in relation to said packets, comprising:
-
a content addressable memory which combines and stores grouped fields which have been grouped from fields included in said rules into a plurality of groups determined in advance, and number of searches information and search related information which respectively show the groups and the rules to which said grouped fields are related;
a search result storage device which stores, in correspondence to said combinations which are stored in said content addressable memory, actions which are to be performed when combinations of grouped fields, number of searches information and search related information that have been inputted to said content addressable memory are found in said content addressable memory, and comparison related information which show the rules to search when next searching in said content addressable memory; and
;
a processing device which;
extracts said fields from packets which have been inputted and generates said grouped fields;
inputs into said content addressable memory and searches said number of searches information and said search related information which show the groups and rules which should be searched, and said grouped fields which correspond to said groups;
obtains said actions and said comparison related information which are stored in said search result storage device in correspondence to combinations which have been searched in said content addressable memory; and
, until the details of the actions which are to be performed as said actions upon said packets are obtained, again inputs to said content addressable memory said number of searches information which shows the groups which should next be searched, said grouped fields which correspond to said groups, and said comparison related information which has been obtained, and performs said searching again.- View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
and if, during searching after expanding and storing the rule table to which said new rule has been added in said content addressable memory and said search result storage device, the combination of said grouped fields, said number of searches information, and said search related information which have been inputted into said content addressable memory matches a plurality of combinations which are stored in said content addressable memory, said processing device inserts said new rule into said rule table so that said content addressable memory outputs as search result the physical address which contains the grouped field which has the narrowest range from among the grouped fields which are included in said plurality of combinations.
-
-
9. A packet classification search device according to claim 2, wherein said processing device determines whether or not, among the rules in said rule table, there are present a plurality of rules the ranges of whose fields mutually overlap, and, if such a plurality of rules are present, for those rules among said plurality of rules excluding certain rules which are determined in advance, obtains ranges which do not overlap by excluding the range of overlap from the range of fields which are included in said rules, generates new rules corresponding to said ranges which do not overlap and replace said plurality of rules with said new rules, and stores information in said content addressable memory and in said search result storage device based upon a rule table in which said rules have been replaced.
-
10. A packet classification search device according to claim 1, wherein said fields are grouped so that the sum of the bit widths of said number of searches information, said search related information, and said grouped fields which are stored at each physical address of said content addressable memory agrees with the bit width of said content addressable memory.
-
11. A packet classification search method, which, based upon fields included in packets which are used to classify the flow of said packets, searches through a rule table comprising a plurality of rules which combine said fields and actions to be performed in relation to packets of which the flow is classified by said fields, and determines actions to be performed in relation to said packets, comprising the steps of:
-
a step of providing a content addressable memory to combine and store grouped fields which have been grouped from fields included in said rules into a plurality of groups determined in advance, and number of searches information and search related information which respectively show the groups and the rules to which said grouped fields are related, and of providing a search result storage device which stores, in correspondence to said combinations which are stored in said content addressable memory, actions which are to be performed when combinations of grouped fields, number of searches information and search related information that have been inputted to said content addressable memory are found in said content addressable memory, and comparison related information which show the rules to search when next searching in said content addressable memory;
a step of extracting said fields from packets which have been inputted and generating said grouped fields;
a step of inputting into said content addressable memory and searching said grouped fields which correspond to said groups which are to be initially searched and number of searches information which designates said groups;
a step of obtaining said actions and said comparison related information which are stored in said search result storage device in correspondence to search results which have been outputted from said content addressable memory;
a step of, if the action which has been obtained shows re-searching of said content addressable memory, again inputting number of searches information which shows the groups which should next be searched, said grouped fields which correspond to said groups and search related information which has the same contents as said comparison related information which has been obtained to said content addressable memory and performing searching; and
a step of, if said actions show details of actions which are to be performed upon the packets which are inputted, terminating the searching of said content addressable memory and outputting said details of said actions. - View Dependent Claims (12, 13)
a step of, when grouping said fields which are included in said rules, determining whether or not there is a possibility of a plurality of grouped fields which are related to the same group matching to specified data, and, if there is a possibility of such matching, for said grouped fields with the exception of the grouped field among said plurality of grouped fields which has the narrowest range, generating and inserting into said rule table a new rule which has the same contents as those of the grouped field which has the narrowest range as contents of the grouped fields for which there is a possibility of matching, and which has the same contents as the rule to which said grouped fields are related as the contents of the grouped fields other than said grouped fields for which there is a possibility of matching and as the action; and
a step of storing information in said content addressable memory and in said search result storage device based upon a rule table to which said new rule has been added.
-
-
13. A packet classification search method according to claim 11, further comprising:
-
a step of determining whether or not among the rules in said rule table there exist a plurality of rules of which the ranges of the fields which are included in said rules mutually overlap, and, if such a plurality of rules exist, for said rules among said plurality of rules with the exception of a previously determined rule, obtaining ranges in which there is no overlap by excluding the range of overlap from the range of fields which are included in said rules, and generating new rules which correspond to said range in which there is no overlap to replace said plurality of rules with said new rules; and
a step of storing information in said content addressable memory and in said search result storage device based upon a rule table into which said rules have been replaced.
-
Specification