摘要 |
A method and an apparatus for classifying packets are provided to simultaneously search protocol types and source/destination port numbers, store the shortest prefix with respect to various source/destination addresses having the same prefix, and perform the packet classification based on the stored prefix, thereby acquiring a fast packet classification time in comparison with existing one-dimensional processes. A method for classifying packets comprises the following steps of: searching protocol types and source/destination port numbers for packet classification in a router; searching source/destination IP(Internet Protocol) address based on a rule having the shortest address among addresses having the same prefix relation(S20,S40); performing sequential searching from a rule having high priority on rules satisfying both of the above search results, and searching a consistent rule; and classifying corresponding packets according to the final search result.
|