KR100657107B1 - Method and apparatus for routing packet data - Google Patents

Method and apparatus for routing packet data Download PDF

Info

Publication number
KR100657107B1
KR100657107B1 KR1020050092756A KR20050092756A KR100657107B1 KR 100657107 B1 KR100657107 B1 KR 100657107B1 KR 1020050092756 A KR1020050092756 A KR 1020050092756A KR 20050092756 A KR20050092756 A KR 20050092756A KR 100657107 B1 KR100657107 B1 KR 100657107B1
Authority
KR
South Korea
Prior art keywords
rule
source
destination
address
port number
Prior art date
Application number
KR1020050092756A
Other languages
Korean (ko)
Inventor
이보미
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Priority to KR1020050092756A priority Critical patent/KR100657107B1/en
Application granted granted Critical
Publication of KR100657107B1 publication Critical patent/KR100657107B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

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.

Description

패킷 분류 방법과 장치{METHOD AND APPARATUS FOR ROUTING PACKET DATA}Packet classification method and apparatus {METHOD AND APPARATUS FOR ROUTING PACKET DATA}

도1은 본 발명에 따른 라우팅 시스템 구조를 나타낸 도면1 illustrates a routing system structure according to the present invention.

도2는 본 발명에 따른 포트번호 검색방법의 예를 나타낸 도면2 is a view showing an example of a port number search method according to the present invention;

도3은 본 발명에서 포트번호와 프로토콜 종류를 결합한 구조의 예를 나타낸 도면3 is a view showing an example of a structure combining a port number and a protocol type in the present invention;

도4는 본 발명에서 검색된 라우팅 규칙에 대한 정보를 저장하기 위한 테이블 구조의 예를 나타낸 도면4 is a diagram showing an example of a table structure for storing information on a routing rule retrieved in the present invention.

도5는 본 발명에 따른 패킷 분류방법의 플로우차트5 is a flowchart of a packet classification method according to the present invention.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

100: 검색부 110: 출발지 포트번호 및 프로토콜 메모리100: search unit 110: source port number and protocol memory

120: 도착지 포트번호 및 프로토콜 메모리120: destination port number and protocol memory

130,170: 출발지 규칙 메모리 140,180: 도착지 규칙 메모리130,170: origin rule memory 140,180: destination rule memory

150: 출발지 IP 주소 메모리 160: 도착지 IP 주소 메모리150: source IP address memory 160: destination IP address memory

190: 규칙 대응 테이블 메모리190: rule match table memory

본 발명은 라우터에서 패킷(PACKET DATA)를 분류하는 방법과 그 장치에 관한 것이다. 더욱 상세하게는, 본 발명은 라우터에서 패킷 분류시, 프로토콜의 종류와 출발지/도착지 포트번호의 검색을 동시에 수행하고, 같은 프리픽스를 갖는 여러 출발지/도착지 주소에 대해서 가장 짧은 프리픽스만을 저장하여, 이를 기반으로 우선 순위가 높은 규칙에 대한 검색을 선행함으로써 패킷 분류 속도와 성능을 향상시킬 수 있도록 한 패킷 분류방법과 그 장치에 관한 것이다.The present invention relates to a method and apparatus for classifying a packet in a router. More specifically, the present invention simultaneously searches for the type of protocol and the source / destination port number when classifying packets in a router, and stores only the shortest prefix for several source / destination addresses having the same prefix. The present invention relates to a packet classification method and apparatus for improving packet classification speed and performance by preceding a search for a high priority rule.

인터넷의 서비스가 다양해지면서 인터넷 라우터에 다양하고 복잡한 기능을 요구하게 되었다. 그 중 하나의 기능이 패킷분류이다. 패킷분류는 패킷의 정보값에 따라 패킷의 흐름을 여러 가지로 분류하고 그에 따른 차별화된 처리를 수행하는 것이다.As the services of the Internet are diversified, various and complex functions are required for Internet routers. One function is packet classification. Packet classification is to classify the packet flow into various types according to the information value of the packet and perform differentiated processing accordingly.

알려진 바와 같이 라우터는 복수의 정보 통신망을 상호 접속하여 데이터를 주고받을 수 있게 하는 장치의 하나로서, 그 기능은 기본적으로 브리지와 같지만 라우터는 OSI 기본 참조 모델의 네트워크층(제3계층)에서 경로 선택을 함으로써 논리 링크 제어(LLC) 프로토콜과 매체 접근 제어(MAC) 프로토콜이 서로 다른 복수의 정보 통신망(LAN 등)을 상호 접속한다. 브리지는 단순히 데이터를 통과시킬 것인가의 여부만을 판단하지만, 라우터는 데이터에 포함되어 있는 프로토콜을 해석하고 최적의 경로를 선택하여 데이터를 송출한다.As is known, a router is a device that interconnects multiple telecommunication networks to send and receive data, and its function is basically a bridge, but the router selects a path at the network layer (third layer) of the OSI basic reference model. By doing so, the logical link control (LLC) protocol and the medium access control (MAC) protocol are interconnected with a plurality of information communication networks (LAN, etc.) different from each other. The bridge simply determines whether to pass the data, but the router interprets the protocol contained in the data and selects the optimal path to send the data.

패킷의 흐름은 패킷 헤더의 여러 항목들로 구성된 규칙들에 의해 정의되며, 특정 응용 프로그램의 요구에 의해 결정된 규칙들의 집합을 'classifier'라고 한다. 'classifier'를 구성하고 있는 규칙들이 복수개의 항목으로 이루어져 있을 때, 규칙의 각 항목들과 패킷의 해당 항목들이 모두 일치하는 규칙들을 찾고 그 중에서 가장 순위가 놓은 규칙을 선택하여, 패킷을 선택된 규칙에서 규정하는 바와 같이 처리하는 과정이다.The flow of a packet is defined by rules composed of several items of a packet header, and a set of rules determined by a specific application program is called a 'classifier'. When the rules constituting 'classifier' consist of a plurality of items, each item in the rule and the corresponding items in the packet are matched and the rule with the highest priority is selected, and the packet is selected from the selected rule. It is the process of processing as prescribed.

패킷 분류 기능은 패킷 필터링(packet filtering), 트래픽 레이트(traffic rate), 리미팅(limiting), 라우팅 기반 폴리시(policy based routing), 어카운팅(accounting), 빌링(billing) 등의 서비스를 제공한다. 'Classifier'를 이루는 규칙의 각 항목들은 네트워크 계층 헤더에서 어플리케이션 계층 헤더까지 다양한 헤더 항목들을 갖는다. 각각의 항목은 IP주소 검색에서 사용되는 것과 같이 <값,길이>를 사용하거나 '1024보다 큰', '80과 같은', '0부터 1024사이인'과 같은 제한을 사용한다. 또한 특정 필드는 그 값을 고려하지 않겠다는 와일드 카드 연산이 추가된다.The packet classification function provides services such as packet filtering, traffic rate, limiting, policy based routing, accounting, and billing. Each item of a rule that constitutes a 'classifier' has various header items from the network layer header to the application layer header. Each entry uses either <value, length>, as used in IP address lookup, or restrictions such as 'greater than 1024', 'like 80', 'between 0 and 1024'. It also adds a wildcard operation that certain fields will not consider their values.

기존의 패킷 분류 방식은 출발지 주소를 먼저 검색하고 도착지 주소를 검색하는 방식으로 출발지 주소 혹은 도착지 주소 정보를 통해서 입력 패킷과 일치하는 규칙을 찾아내는 것이다. 이를 위해 기존에 제안된 방식으로는 크게 4가지 방식이 있다.Conventional packet classification method searches the source address first and then the destination address to find a rule matching the input packet through the source address or destination address information. To this end, there are four methods that have been proposed.

첫번째 방법은 전체 규칙에 대해 순서대로 검색을 수행하는 방법으로 N개의 규칙에 대해 O(N)의 검색 횟수를 필요로 한다.The first method is to perform the search in order for the entire rule, which requires the number of O (N) searches for the N rules.

두번째 방법은 순차적 검색으로 출발지 주소에 대한 검색을 수행한 후 각각 일치하는 출발지 주소에 해당하는 도착지 주소에 대한 검색을 수행하는 방법이다. 이때 각 필드에 대한 검색은 트리 구조를 적용하여 수행하게 되는데 앞에서 언급한 패킷 분류의 특성으로 인해 역추적을 수행해야 하는 단점이 있다.The second method is a sequential search that searches for a starting address and then searches for a destination address corresponding to a matching starting address. In this case, the search for each field is performed by applying a tree structure, but there is a disadvantage in that the backtracking should be performed due to the characteristics of the packet classification mentioned above.

세번째 방법은 규칙에 기하학적인 특징을 적용하는 방식이다. 각 필드의 범위를 나누고 범위를 좁혀가며 검색하는 방식으로 주로 출발지 주소와 도착지 주소 두 가지 필드를 이용한 방식이다. 이 방법의 경우 다차원 검색으로의 확장이 어려운 단점이 있다.The third way is to apply geometrical features to the rules. By dividing the range of each field and narrowing down the search, two fields are mainly used: the source address and the destination address. This method is difficult to extend to multidimensional retrieval.

네번째 방법은 경험적 특성을 사용한 방식이다. 패킷분류를 위한 다양한 접근의 결과로 다양한 방식들을 종합한 방식이다. 이러한 특징을 가진 기존 방식들의 경우 규칙의 분포나 크기에 의해 그 성능이 결정되는 단점이 있다.The fourth method is to use empirical features. As a result of various approaches for packet classification, various methods are combined. In the case of existing methods having such characteristics, the performance is determined by the distribution or size of the rule.

이러한 패킷분류 기능은 패킷이 가지고 있는 헤더 정보 중에서 여러 개 필드에 대한 검색을 수행해야 하므로 복잡도가 높고 시간이 오래 걸리는 단점이 있다. 기존의 방식들은 대부분의 규칙 중에서 그 분포가 가장 다양한 출발지 IP, 도착지 IP 주소를 먼저 검색하여 전체 검색 범위를 줄이려고 하였으나 패킷 분류가 갖는 IP 주소 검색은 그 특성 때문에 역추적을 해야하는 단점이 생기거나 검색 횟수가 증가하는 단점이 있었다.This packet classification function has a disadvantage of high complexity and time since it has to search for several fields among header information of the packet. Conventional methods attempt to reduce the total search range by searching the source IP and destination IP addresses that have the most distribution among most rules, but the IP address search of packet classification has the disadvantage of having to trace back because of its characteristics or the number of searches. There was a downside to increasing.

정리하면, 종래에는 라우터에서 패킷 분류시, 출발지/도착지 주소를 먼저 검색하고, 검색된 주소 정보를 통해서 입력 패킷과 일치하는 규칙을 검색하고, 검색딘 규칙 중에서 우선 순위가 가장 높은 규칙을 선택하여 해당 규칙대로 패킷 분류 처리를 수행하고 있다. 따라서, 헤더 정보 중에서 여러 개의 필드에 대한 검색을 수행해야 하므로 복잡도가 높고 분류 처리 시간이 길어지며, 검색 횟수가 증가하여 패킷 분류 성능이 저하되는 단점이 따른다.In summary, conventionally, when classifying a packet in a router, the source / destination address is searched first, then the rule matching the input packet is searched through the searched address information, and the rule having the highest priority among the searched rules is selected. As soon as the packet classification process is performed. Therefore, since the search for several fields in the header information must be performed, the complexity is high, the classification processing time is long, and the number of searches is increased, thereby degrading packet classification performance.

본 발명의 목적은 라우터에서 입력 패킷을 분류하는 시간을 줄이고, 복잡도를 낮추며, 검색 횟수 감소를 통해 패킷 분류 처리 성능을 향상시킬 수 있도록 한 패킷 분류 방법과 그 장치를 제공하는데 있다.SUMMARY OF THE INVENTION An object of the present invention is to provide a packet classification method and apparatus for improving packet classification processing performance by reducing the time for classifying input packets in a router, reducing complexity, and reducing the number of searches.

본 발명의 또 다른 목적은 라우터에서 패킷 분류시, 프로토콜의 종류와 출발지/도착지 포트번호의 검색을 동시에 수행하고, 같은 프리픽스를 갖는 여러 출발지/도착지 주소에 대해서 가장 짧은 프리픽스만을 저장하여, 이를 기반으로 우선 순위가 높은 규칙에 대한 검색을 선행함으로써 패킷 분류 속도와 성능을 향상시킬 수 있도록 한 패킷 분류방법과 그 장치를 제공하는데 있다.It is another object of the present invention to simultaneously search for the type of protocol and source / destination port number when classifying packets in a router, and store only the shortest prefix for several source / destination addresses having the same prefix. The present invention provides a packet classification method and apparatus for improving packet classification speed and performance by prioritizing a search for a high priority rule.

상기 목적을 달성하기 위한 본 발명에 따른 패킷 분류 방법은, 라우터에서 패킷 분류를 위하여 프로토콜의 종류 및 출발지/도착지 포트번호를 검색하는 단계; 같은 프리픽스 관계를 갖는 주소 중에서 가장 짧은 주소를 갖는 규칙을 기반으로 출발지/도착지 IP 주소를 검색하는 단계; 상기 검색 결과를 모두 만족하는 규칙들에 대해서 우선 순위가 높은 규칙부터 순차 검색을 수행하여 일치하는 규칙을 검색하는 단계; 및, 상기 최종 검색 결과에 따라 해당 패킷을 분류하는 단계를 포함하여 이루어지는 것을 특징으로 한다.Packet classification method according to the present invention for achieving the above object, the step of retrieving the type of protocol and the source / destination port number for packet classification in the router; Retrieving a source / destination IP address based on a rule having the shortest address among addresses having the same prefix relationship; Searching for a matching rule by performing a sequential search starting from a rule having a high priority with respect to rules satisfying all of the search results; And classifying the packet according to the final search result.

또한 본 발명에 따른 패킷 분류 방법에서, 상기 출발지 포트번호와 도착지 포트번호 각각의 조합에서 나온 규칙은 'AND' 과정을 통해서 두 가지 경우를 모두 만족하는 규칙만 저장하는 것을 특징으로 한다.In addition, in the packet classification method according to the present invention, the rule derived from the combination of the source port number and the destination port number is characterized in that only the rules satisfying both cases are stored through the 'AND' process.

또한 본 발명에 따른 패킷 분류 방법에서, 상기 출발지 포트번호와 도착지 포트번호 각각의 조합에서 나온 규칙에 대하여 두 가지 경우를 모두 만족하는 규칙은 각각의 규칙에 대해 1비트의 규칙 대응 테이블로 저장하는 것을 특징으로 한다.In addition, in the packet classification method according to the present invention, a rule that satisfies both cases with respect to a rule derived from a combination of the source port number and the destination port number is stored as a 1-bit rule correspondence table for each rule. It features.

또한 본 발명에 따른 패킷 분류 방법에서, 상기 출발지/도착지 IP 주소를 검색하는 단계는, 규칙들이 갖는 출발지/도착지 IP 주소를 차례로 비교하여 프리픽스 관계를 갖는 여러 주소들 중에서 가장 짧은 주소를 갖는 규칙만을 저장하는 것을 특징으로 한다.Also, in the packet classification method according to the present invention, the step of searching for the source / destination IP address may be performed by comparing the source / destination IP address of the rules in order to store only the rule having the shortest address among several addresses having a prefix relationship. Characterized in that.

또한 본 발명에 따른 패킷 분류 방법에서, 상기 패킷 분류를 위하여, 상기 검색된 출발지 포트번호, 도착지 포트번호, 프로토콜 종류, 출발지 IP 주소, 도착지 IP 주소에 관한 항목을 제외한 나머지 항목에 대해서 우선 순위가 높은 규칙부터 순차 검색을 수행하는 것을 특징으로 한다.In addition, in the packet classification method according to the present invention, for the packet classification, a rule having a high priority for the remaining items except for the items related to the searched source port number, destination port number, protocol type, source IP address, and destination IP address. To perform a sequential search.

또한 상기 목적을 달성하기 위한 본 발명에 따른 패킷 분류 장치는, 프로토콜의 종류, 출발지 및 도착지 포트번호를 저장하는 수단; 출발지 및 도착지 주소와 해당 규칙을 저장하는 수단; 입력 패킷에 대하여 상기 프로토콜의 종류, 출발지 및 도착지 포트번호, 출발지 및 도착지 주소와 해당 규칙을 검색하여 저장하며, 상기 검색된 규칙들에 대해 출발지와 도착지 포트 번호 및 프로토콜 종류, 출발지 및 도착지 주소에 관한 항목을 제외한 나머지 항목에 대해 우선순위가 높은 규칙부터 순차적으로 검색을 수행하여 모든 항목에 대해 일치하는 규칙을 검색하는 검색수단; 및, 상기 검색 결과를 저장하기 위한 규칙 대응 테이블 저장수단; 을 포함하여 이루어지는 것을 특징으로 한다.In addition, the packet classification apparatus according to the present invention for achieving the above object, means for storing the type of protocol, the source and destination port number; Means for storing origin and destination addresses and corresponding rules; For the input packet, the protocol type, the source and destination port number, the source and destination address, and the corresponding rule are retrieved and stored, and the items related to the source and destination port number and protocol type, the source and destination address for the retrieved rules. Search means for searching for a matching rule for all items by sequentially searching from a rule having a high priority to the remaining items except for the above; Rule matching table storage means for storing the search results; Characterized in that comprises a.

또한 본 발명에 따른 패킷 분류 장치에서, 상기 출발지 IP 주소와 도착지 IP 주소를 저장하는 수단은 TCAM(Ternary Contents Address Memory)인 것을 특징으로 한다.In the packet classification apparatus according to the present invention, the means for storing the source IP address and the destination IP address is TCAM (Ternary Contents Address Memory).

또한 본 발명에 따른 패킷 분류 장치에서, 상기 프로토콜의 종류와 출발지/도착지 포트번호, 규칙 메모리는 하나의 메모리로 이루어지고 각각의 데이터를 설정된 영역에 분할하여 기록하는 것을 특징으로 한다.In the packet classification apparatus according to the present invention, the protocol type, the source / destination port number, and the rule memory are composed of one memory, and the respective data are divided and recorded in the set area.

이하, 첨부된 도면을 참조하여 본 발명의 실시예에 따른 패킷 분류 방법과 그 장치를 설명한다. 본 발명은 기존의 접근방식과 달리 각 항목에 대한 검색을 나눠 실시함으로써 전체 검색 범위를 줄이는 구조를 제안한다. Hereinafter, a packet classification method and an apparatus thereof according to an embodiment of the present invention will be described with reference to the accompanying drawings. The present invention proposes a structure that reduces the overall search range by dividing the search for each item unlike the conventional approach.

도 1은 본 발명에 따른 라우터에서의 패킷 분류 시스템에 대한 기본 구조를 보여주고 있으며, 여기에 표현된 바와 같이 본 발명은 검색 단계를 나눠 각각의 항목에 대한 검색을 쉽게 하였다. 도 2는 포트 번호 검색의 개념을 보여주고 있으며, 여기서 알 수 있듯이 각각의 규칙이 가진 포트 번호를 직선으로 표현하면 도 2와 같은 모습이 되고, 각각의 범위 속에는 해당하는 규칙들이 들어가게 된다. 본 발명은 프로토콜 종류와 포트번호의 조합을 제안하므로 프로토콜 종류에 따라 포트 번호의 범위를 정리하게 된다. 도 3은 포트번호와 프로토콜 종류의 조합이 메모리에 저장된 모습을 간단히 보여준다. 도 4는 각 단계에서 검색된 규칙에 대한 정보를 저장하기 위한 규칙 대응 테이블의 모습을 보여준다. 도 5는 위와 같은 패킷 분류의 특징을 적용한 본 발명의 패킷 분류 방법의 순서도이다.1 shows a basic structure of a packet classification system in a router according to the present invention. As expressed herein, the present invention divides a search step to facilitate a search for each item. FIG. 2 illustrates the concept of port number search. As can be seen, if the port number of each rule is expressed in a straight line, it is as shown in FIG. 2, and the corresponding rules are included in each range. Since the present invention proposes a combination of protocol type and port number, the range of port numbers is arranged according to the protocol type. 3 simply shows how a combination of port number and protocol type is stored in the memory. 4 shows a state of a rule correspondence table for storing information on a rule retrieved at each step. 5 is a flowchart illustrating a packet classification method of the present invention to which the above characteristics of packet classification are applied.

도1은 본 발명에 따른 라우팅 시스템 구조를 나타낸 도면으로서, 출발지 프 로토콜의 종류와 출발지 포트번호를 저장하기 위한 제 1 메모리(110)와, 도착지 프로토콜의 종류와 도착지 포트번호를 저장하기 위한 제 2 메모리(120)와, 상기 출발지 프로토콜의 종류 및 포트번호에 해당하는 규칙을 저장하기 위한 제 1 규칙 메모리(130)와, 상기 도착지 프로토콜의 종류 및 포트번호에 해당하는 규칙을 저장하기 위한 제 2 규칙 메모리(140)와, 출발지 IP 주소를 저장히기 위한 제 3 메모리(150)와, 도착지 IP 주소를 저장하기 위한 제 4 메모리(160)와, 출발지 IP 주소에 해당하는 규칙을 저장하기 위한 제 3 규칙 메모리(170)와, 도착지 IP 주소에 해당하는 규칙을 저장하기 위한 제 4 규칙 메모리(180)와, 검색 결과를 저장하기 위한 규칙 대응 테이블 메모리(190)와, 입력 패킷에 대하여 상기 프로토콜의 종류, 출발지/도착지 포트번호, 출발지/도착지 IP 주소의 검색을 수행하는 검색부(100)를 포함하여 구성되고 있다.1 is a diagram illustrating a routing system structure according to the present invention, a first memory 110 for storing a type of a source protocol and a source port number, and a second for storing a type of a destination protocol and a destination port number. A first rule memory 130 for storing the memory 120, a rule corresponding to the type and port number of the source protocol, and a second rule for storing a rule corresponding to the type and port number of the destination protocol. Memory 140, third memory 150 for storing the source IP address, fourth memory 160 for storing the destination IP address, and third rule for storing rules corresponding to the source IP address Memory 170, a fourth rule memory 180 for storing a rule corresponding to an destination IP address, a rule correspondence table memory 190 for storing a search result, and an input packet. It includes a search unit 100 for searching the type of the protocol, the source / destination port number, the source / destination IP address.

도1에 나타낸 바와 같이, 본 발명은 포로토콜 종류와 출발지 포트번호, 도착지 포트 번호를 저장하기 위한 메모리(110)(120)로 2개의 SRAM, 출발지와 도착지 IP 주소를 저장하기 위한 메모리(150)(160)로 2개의 TCAM(Ternary Contents Address Memory), 각 엔트리에 해당하는 규칙을 저장하는 규칙 메모리로 4개의 SRAM(130)(140)(170)(180), 검색 결과를 저장하기 위한 1개의 규칙 대응 테이블 메모리로 SRAM(190) 1개를 갖는다.As shown in Fig. 1, the present invention is a memory 110, 120 for storing a protocol type, a source port number, and a destination port number, and a memory 150 for storing two SRAMs, a source and a destination IP address. Two 160 TCAM (Ternary Contents Address Memory), rule memory for storing the rules corresponding to each entry four SRAM (130, 140, 170, 180), one for storing the search results The rule correspondence table memory has one SRAM 190.

여기에서 각각의 메모리(110,120,130,140,170,180,190)는 작은 사이즈를 필요로 하므로 전체 메모리 사이즈는 크지 않으며 TCAM(150,160)을 제외한 나머지 메모리(110,120,130,140,170,180,190)는 하나의 메모리로 사용할 수 있다. 즉, 상기 프로토콜의 종류와 출발지/도착지 포트번호, 규칙 메모리는 하나의 메모리로 이루어지고 각각의 데이터를 설정된 영역에 분할하여 기록하는 방식으로 사용될 수 있는 것이다.Since each of the memories 110, 120, 130, 140, 170, 180 and 190 requires a small size, the total memory size is not large and the remaining memories 110, 120, 130, 140, 170, 180 and 190 except for the TCAM 150 and 160 can be used as one memory. That is, the type of protocol, the source / destination port number, and the rule memory are composed of one memory and can be used by dividing each data into a predetermined area and recording the same.

알려진 바와 가이 TCAM은 기억 장치 내에 자료를 수록하거나 읽어 낼 때 실제의 자료 내용을 주소로 하여 접근하는 기억 장치이며, 일반적인 숫자를 통한 주소 기억 장치보다 강력하고 처리 속도가 빠르다.As is known, Guy TCAM is a memory device that accesses the actual data as an address when storing or reading data in the memory device. It is more powerful and faster than general address memory.

제 1 메모리(SRAM)(110)는 출발지 포트번호(Source Port Number)와 출발지 프로토콜의 종류(Source Protocol Type)를 검색한 결과를 저장하고, 해당 엔트리(Entry)에 대한 규칙은 제 1 규칙 메모리(Rule Memory-Src., SRAM)(130)에 저장한다. 제 2 메모리(SRAM)(120)는 도착지 포트번호(Destination Port Number)와 도착지 프로토콜의 종류(Destination Protocol Type)를 검색한 결과를 저장하고, 해당 엔트리에 대한 규칙은 제 2 규칙 메모리(Rule Memory-Dest., SRAM)(140)에 저장한다.The first memory (SRAM) 110 stores a result of searching for a source port number and a source protocol type, and the rule for the entry includes a first rule memory ( Rule Memory-Src., SRAM) 130. The second memory (SRAM) 120 stores a result of searching for a destination port number and a destination protocol type, and the rule for the entry is a second rule memory. Dest., SRAM) (140).

제 3 메모리(TCAM)(150)는 출발지 IP 주소(Source Address)를 저장하며 해당 엔트리에 대한 규칙은 제 3 규칙 메모리(Rule Memory-Src., SRAM)(170)에 저장한다. 제 4 메모리(TCAM)(160)는 도착지 IP 주소(Destination Address)를 저장하며 해당 엔트리에 대한 규칙은 제 4 규칙 메모리(Rule Memory-Dest., SRAM)(180)에 저장한다.The third memory (TCAM) 150 stores a source IP address and the rules for the corresponding entry are stored in the third rule memory 170 (Rule Memory-Src., SRAM) 170. The fourth memory (TCAM) 160 stores a destination IP address, and the rules for the corresponding entry are stored in the fourth rule memory 180 (RRAM).

검색부(100)는 출발지 및 도착지의 프로토콜 종류와 포트번호를 검색하여 이를 규칙 메모리(130,140)에 저장하고 출발지 포트 번호와 도착지 포트 번호 각각의 조합에서 나온 규칙은 'AND' 과정을 통해서 두 가지 경우를 모두 만족하는 규칙만을 추출하여 이를 규칙 대응 테이블 메모리(190)에 기록한다. 또한 검색부(100)는 출발지 IP 주소와 도착지 IP 주소에 대한 검색을 수행하여 이를 각각 해당 메모리(150)(160)에 저장하고 그 규칙은 각각 해당 규칙 메모리(170)(180)에 저장하며, 선택된 규칙들에 대해 출발지,도착지 포트 번호, 프로토콜 종류 그리고 TCAM에 저장된 출발지,도착지 주소에 관한 항목을 제외한 나머지 항목에 대해 우선순위가 높은 규칙부터 순차적으로 검색을 수행하여 모든 항목에 대해 일치하는 규칙이 발견되는 경우 패킷 분류 프로세스를 마치게 된다.Search unit 100 retrieves the protocol type and port number of the source and destination, and stores it in the rule memory (130,140) and the rule from each combination of the source port number and the destination port number in the case of 'AND' process in two cases Extract only the rules that satisfy all of them and record them in the rule correspondence table memory 190. In addition, the search unit 100 performs a search for a source IP address and a destination IP address and stores them in the corresponding memory 150 and 160, respectively, and the rules are stored in the corresponding rule memory 170 and 180, respectively. For the selected rules, a search is performed sequentially from the high priority rule to the remaining items except for the source, destination port number, protocol type, and the source and destination address stored in the TCAM. If found, the packet classification process is terminated.

도 1에 나타낸 바와 같이 본 발명에서는 검색 단계를 나눠 각각의 항목에 대한 검색을 쉽게 하였는데, 첫 번째는 프로토콜의 종류와 출발지, 도착지의 포트번호를 검색하는 것이고, 두 번째는 출발지와 도착지의 주소를 검색하는 것이며, 세번째는 상기 첫 번째와 두 번째의 검색 결과를 토대로 우선순위 기반의 순차 검색을 통해 패킷 분류를 완성하는 단계이다.As shown in Fig. 1, the present invention divides a search step into an easy search for each item. The first is to search for a protocol type and a source and a port number of a destination, and the second is to search for an address of a source and a destination. The third step is to complete packet classification through priority-based sequential search based on the first and second search results.

상기 첫 번째의 프로토콜 종류와 출발지, 도착지 포트 번호를 검색하는 단계에서는 출발지 포트 번호와 프로토콜 종류의 조합과, 도착지 포트 번호와 프로토콜 종류의 조합을 저장하기 위해 2개의 메모리(110)(120)를 사용하게 된다.In the step of searching for the first protocol type and the source and destination port numbers, two memories 110 and 120 are used to store the combination of the source port number and the protocol type and the combination of the destination port number and the protocol type. Done.

도 2는 포트 번호 검색의 개념을 보여준다. 패킷 분류에서 포트번호 검색은 범위 검색의 특징을 갖는다. 따라서 각각의 규칙이 가진 포트 번호를 직선으로 표현하면 도 2와 같은 모습이 되고 각각의 범위 속에는 해당하는 규칙들이 들어가게 된다. 본 발명은 프로토콜 종류와 포트번호의 조합을 제안하므로 프로토콜 종류에 따라 포트 번호의 범위를 정리하게 된다. 이렇게 일직선으로 표현된 출발지 포트 번호는 순서대로 제 1 메모리(110)에 저장되고, 도착지 포트번호는 순서대로 제 2 메모리(120)에 저장된다.2 shows the concept of port number search. Port number retrieval in packet classification is characterized by range retrieval. Therefore, if the port number of each rule is expressed in a straight line, it becomes as shown in FIG. 2 and the corresponding rules are included in each range. Since the present invention proposes a combination of protocol type and port number, the range of port numbers is arranged according to the protocol type. The source port numbers represented by the straight lines are stored in the first memory 110 in the order, and the destination port numbers are stored in the second memory 120 in the order.

도 3은 상기 포트번호와 프로토콜 종류의 조합이 메모리에 저장된 모습을 간단히 보여준다. 프로토콜의 종류(Protocol Type)와 포트번호(Port number)가 해당 규칙 메모리 포인터(Rule Memory Pointer)값과 함께 저장된 모습을 보여주고 있으며, 규칙 메모리 포인터(Rule Memory Pointer)는 해당되는 규칙 메모리(130)(140)의 포인터 값으로 사용된다.3 simply shows how the combination of the port number and the protocol type is stored in the memory. The protocol type and port number are shown with the rule memory pointer value, and the rule memory pointer is the rule memory 130. It is used as the pointer value of 140.

상기 프로토콜의 종류와 출발지/도착지 포트번호 검색단계 중에서 출발지 포트 번호와 도착지 포트 번호 각각의 조합에서 나온 규칙은 'AND' 과정을 통해서 두 가지 경우를 모두 만족하는 규칙만이 남게 되고 이는 도 4와 같은 구조의 규칙 대응 테이블 메모리(190)에 기록된다. 이 테이블은 각각의 규칙에 대해 1bit를 갖고, 전체 규칙의 개수만큼을 저장하게 된다.The rule from the combination of the source port number and the destination port number in the protocol type and the source / destination port number search step remains the rule that satisfies both cases through the 'AND' process. The structure is recorded in the rule correspondence table memory 190 of the structure. This table has 1 bit for each rule and stores the total number of rules.

본 발명의 패킷 분류는 다음에 설명할 두 번째 단계를 마친 후, 상기 규칙 대응 테이블에 기록된 규칙들에 대해 순차적인 검색을 수행하게 된다.The packet classification of the present invention performs a sequential search for the rules recorded in the rule correspondence table after completing the second step described below.

본 발명의 두 번째 단계는 출발지 IP 주소와 도착지 IP 주소에 대한 검색을 수행하는 과정이다. IP 주소 검색의 경우에는 입력된 패킷의 주소와 가장 길게 일치하는 값(LPM)을 찾는 과정으로 TCAM(150)(160)을 사용하면 한 번의 메모리 검색으로 원하는 값을 찾을 수 있는 특징이 있다. 그러나 패킷 분류의 경우 가장 길게 일치하는 값이 아닌 우선 순위가 가장 높은 규칙을 찾아내는 특징이 있기 때문에 IP 주소 검색을 위해 사용된 방법을 바로 사용할 수가 없게 된다. 그러므로, 최종 단계에서는 상기 선택된 규칙들에 대해 출발지와 도착지 포트 번호, 프로토콜 종류 그리고 TCAM(150)(160)에 저장된 출발지와 도착지 주소에 관한 항목을 제외한 나머지 항목에 대해 우선순위가 높은 규칙부터 순차적으로 검색을 수행한다.The second step of the present invention is the process of performing a search for a source IP address and a destination IP address. In the case of the IP address search, the TCAM 150, 160 is a process of finding the longest value (LPM) that matches the address of the input packet. In this case, the desired value can be found by one memory search. However, in case of packet classification, the method that finds the highest priority rule rather than the longest matching value cannot be used immediately. Therefore, in the final step, the rules having higher priority for the remaining items except for the source and destination port number, the protocol type, and the source and destination address stored in the TCAM 150, 160 are sequentially selected for the selected rules. Perform a search.

도 1의 규칙 메모리(130)(140)(170)(180)는 포트 번호, 프로토콜 종류 조합이나, 출발지 주소가 갖는 여러 가지 규칙들을 저장하기 위해 사용된다. 하나의 조합이나 주소는 다수의 규칙을 가질 수 있기 때문에 규칙 메모리를 사용한다. The rule memories 130, 140, 170, and 180 of FIG. 1 are used to store port numbers, protocol type combinations, or various rules of a source address. Rule memory is used because a combination or address can have multiple rules.

도 5는 위와 같은 패킷 분류의 특징을 적용한 출발지 주소 검색 테이블 구성 방법의 순서도이며, 이 방법은 도착지 주소 검색 테이블을 구성하는 경우에도 마찬가지로 적용된다.FIG. 5 is a flowchart of a method of configuring a source address lookup table applying the characteristics of packet classification as described above. The method is similarly applied to a case of configuring a destination address lookup table.

전체적인 과정을 요약해 보면, 규칙들이 갖는 출발지(도착지) IP 주소를 차례로 비교하며 프리픽스 관계를 갖는 여러 주소들 중 가장 짧은 주소를 갖는 규칙만을 TCAM(170)(180)에 저장한다. 이를 이용해 한번의 TCAM(170)(180) 검색으로 순차적 검색이 수행되어야 할 범위를 줄일 수 있게 된다. TCAM(170)(180)에 저장된 주소는 앞에서도 설명한 것처럼 나머지 규칙들에 대한 정보를 규칙 메모리(170)(180)에 저장하게 된다. 또한 출발지 주소와 도착지 주소에 대한 검색이 끝난 후, 상기 첫 번째 단계의 결과와 두 번째 단계의 결과 규칙들에 대해서 'AND' 과정을 수행하여 두 가지 조건을 모두 만족하는 규칙을 찾아낸다. 마지막으로 이렇게 선택된 규칙들에 대해 출발지와 도착지 포트 번호 및 프로토콜 종류, 그리고 TCAM에 저장된 출발지 및 도착지 주소에 관한 항목을 제외한 나머지 항목에 대해 우선 순위가 높은 규칙부터 순차적으로 검색을 수행한다. 우선순위가 높은 규칙부터 순차적인 검색을 수행하므로 모든 항목에 대해 일치하는 규칙이 발견되는 경우 패킷 분류 프로세스를 마치게 된다.Summarizing the overall process, the source (destination) IP addresses of the rules are sequentially compared, and only the rule having the shortest address among the various addresses having the prefix relationship is stored in the TCAM 170 (180). By using this, it is possible to reduce the range in which the sequential search is to be performed by one TCAM 170, 180 search. The address stored in the TCAM 170, 180 stores information about the remaining rules in the rule memory 170, 180 as described above. After searching for the source address and the destination address, an AND process is performed on the results of the first step and the results of the second step to find a rule that satisfies both conditions. Lastly, the selected rules are sequentially searched from the high priority rules for the remaining items except for the source and destination port numbers and protocol types, and the source and destination addresses stored in the TCAM. Since the sequential search starts from the higher priority rule, the packet classification process is terminated when a matching rule is found for all items.

도5의 출발지(도착지) 주소 검색 테이블 구성방법에 대해서 좀 더 상세하게 살펴본다.A method of constructing a source (destination) address lookup table of FIG. 5 will be described in more detail.

제 1 단계(S10)는 초기화 과정으로서, i=0, j=0으로 설정하고 'A'는 i번째 프리픽스, 'B'는 j+1번째 프리픽스로 각각 설정한다.The first step S10 is an initialization process, in which i = 0 and j = 0 are set, 'A' is set as the i th prefix, and 'B' is set as the j + 1 th prefix.

제 2 단계(S20)는 입력된 패킷에 대하여 같은 프리픽스 관계를 갖는 IP 주소를 검색하기 위한 판별 단계로서, 상기 'A'와 'B'의 크기를 비교해 본다. 즉, 현재 비교 대상인 IP 주소가 같은 프리픽스를 갖는 것인지의 여부를 판별하는 것이다. 여기서 'A=B'이면 제 3 단계(S30)로 이행하여 제 4 단계(S40), 제 5 단계(S50)를 수행함으로써 같은 프리픽스 관계를 갖는 IP 주소 중에서 가장 짧은 주소를 검색 및 저장하는 과정을 수행하고, 'A'와 'B'를 비교하여 서로 다른 값을 갖는다면 제 6 단계(S60)로 이행한다.The second step S20 is a determination step for searching for an IP address having the same prefix relationship with respect to the input packet, and compares the sizes of 'A' and 'B'. That is, it is determined whether or not the IP addresses currently compared with have the same prefix. If 'A = B', the process proceeds to the third step S30 to perform the fourth step S40 and the fifth step S50 to search for and store the shortest address among the IP addresses having the same prefix relationship. If it has a different value by comparing 'A' and 'B', and proceeds to a sixth step (S60).

제 3 단계(S30)에서는 'A'와 'B' 중에서 어떤 것이 더 짧은 IP 주소를 갖는지를 판별하기 위한 단계로서, 'B'의 길이가 'A'의 길이보다 더 길다면 제 4 단계(S40)로 이행하여 출발지 규칙 메모리에 'A'값을 저장하고 'B'값은 삭제하며, 'B'의 길이가 'A'의 길이보다 더 짧다면 제 5 단계(S50)로 이행하여 'A'와 'B' 값을 서로 교환한 후 제 4 단계(S40)를 실행함으로써, 길이가 더 짧은 IP 주소 'A'를 출발지/도착지 규칙 메모리(170)(180)에 저장한다.The third step (S30) is a step for determining which of the 'A' and 'B' has a shorter IP address, if the length of the 'B' is longer than the length of the 'A' fourth step (S40) If the length of 'B' is shorter than the length of 'A', go to the fifth step (S50) and save 'A' in the starting rule memory. By exchanging the 'B' values with each other, the fourth step S40 is executed to store the shorter IP address 'A' in the source / destination rule memory 170 and 180.

제 6 단계(S60)는 j값이 전체 프리픽스의 수(N) 보다 작은지를 판별하는 단계이다. 이 단계에서 j<N 이면 제 7 단계(S70)로 이행하여 j값을 증가시키고 'B=j번째 프리픽스'로 설정한 후 제 2 단계(S20)로부터 반복 실행하여, j값을 증가시키면서 j값이 전체 프리픽스의 수(N)에 도달할 때 까지 가장 짧은 IP 주소를 검색하여 저장하는 과정을 진행한다.The sixth step S60 is a step of determining whether the j value is smaller than the number N of all prefixes. In this step, if j <N, the process proceeds to the seventh step S70 to increase the j value, set it to 'B = j-th prefix', and repeat the process from the second step S20 to increase the j value while increasing the j value. The shortest IP address is retrieved and stored until the total prefix number N is reached.

위와 같은 과정을 반복하여 j≥N 이 되면 다음의 제 8 단계(S80)로 이행하여 상기 i값을 증가시키고 'A=i번째 프리픽스', 'B=j번째 프리픽스'로 설정한 후, 상기 제 2 단계(S20)로부터 반복 실행하여, i값을 증가시키면서 j값이 전체 프리픽스의 수(N)에 도달할 때 까지 가장 짧은 IP 주소를 검색하여 저장하는 과정을 진행한다.When j≥N is repeated by repeating the above process, the process proceeds to the next eighth step S80 to increase the value of i and set 'A = i prefix' and 'B = j prefix', and then By repeating from step 2 (S20), while increasing the value of i, the process of searching for and storing the shortest IP address until the value of j reaches the total number N of prefixes.

이렇게 하면, 같은 프리픽스 관계를 갖는 IP 주소 중에서 가장 짧은 주소를 갖는 규칙만을 검색하여 이를 해당 규칙 메모리(170)(180)에 저장할 수 있게 된다.In this case, only the rule having the shortest address among IP addresses having the same prefix relationship can be searched and stored in the rule memory 170 or 180.

다음에는 상기 첫 번째 단계의 결과(프로토콜의 종류와 출발지 및 도착지 포트번호의 검색 결과)와 두 번째 단계의 결과(출발지 및 도착지 IP 주소 검색의 결과) 규칙들에 대해서 'AND' 과정을 수행하여 두 가지 조건을 모두 만족하는 규칙을 찾아낸다.Next, the 'AND' process is performed on the rules of the first step (protocol type and search result of source and destination port number) and the second step (result of source and destination IP address search). Find a rule that satisfies all four conditions.

마지막으로 이렇게 선택된 규칙들에 대해 출발지와 도착지 포트 번호 및 프로토콜 종류, 그리고 TCAM에 저장된 출발지 및 도착지 주소에 관한 항목을 제외한 나머지 항목에 대해 우선순위가 높은 규칙부터 순차적으로 검색을 수행하여 모든 항목에 대해 일치하는 규칙이 발견되는 경우, 해당 규칙을 토대로 입력 패킷을 분 류함으로써, 본 발명에 따른 패킷 분류 프로세스를 마치게 된다.Lastly, for all selected items, search is performed sequentially from the high-priority rules for the selected items except for the source and destination port number and protocol type, and the source and destination address stored in the TCAM. If a matching rule is found, the packet classification process according to the present invention is completed by classifying the input packet based on the rule.

따라서, 프로토콜의 종류와 포트 번호에 대한 검색을 동시에 수행하여 전체 검색범위를 줄일 수 있고, 같은 프리픽스를 갖는 여러 출발지(도착지) 주소에 대해서 가장 짧은 프리픽스만을 저장함으로써, 일치하는 모든 규칙을 검색하여 검색 횟수가 많은 기존의 패킷 분류의 한계를 극복할 수 있게 된다.Therefore, it is possible to reduce the overall search range by simultaneously searching for the protocol type and port number, and to search and search for all matching rules by storing only the shortest prefix for multiple source (destination) addresses with the same prefix. It is possible to overcome the limitations of conventional packet classification with a large number of times.

특히, 규칙 하나의 1비트를 할당한 작은 사이즈의 메모리를 이용해서 입력된 패킷이 일치하는 규칙에 대한 정보를 저장함으로써 메모리의 부담을 줄일 수 있게 되고, 여러 단계를 통해서 다양한 항목에 모두 일치하는 규칙들을 찾아냄으로써 순차적 검색의 횟수를 감소시킬 수 있다.In particular, the memory burden can be reduced by storing information about the rule that the input packet matches by using a small size of memory that has one bit allocated to a rule. By finding them, the number of sequential searches can be reduced.

또한, 순차 검색 시, 우선 순위가 높은 규칙에 대한 검색을 먼저 수행하기 때문에 전체 검색 횟수를 줄일 수 있게 된다.In addition, during the sequential search, the search for the rule having the highest priority is performed first, thereby reducing the total number of searches.

본 발명에서는 프로토콜의 종류와 출발지/도착지의 포트 번호의 검색을 동시에 수행하고, 같은 프리픽스를 갖는 여러 출발지/도착지 주소에 대해서 가장 짧은 프리픽스만을 저장하여, 이를 기반으로 패킷 분류를 수행하기 때문에 기존의 1차원적인 방식들에 비해 빠른 패킷분류 시간을 얻을 수 있다. 또한 메모리를 효율적으로 사용하고 작은 사이즈의 메모리를 사용하므로 하드웨어나 소프트웨어 모두에 적합한 발명이다. 본 발명에 따르면 규칙이나 항목의 수에 영향 받지 않는 구조로 갈수록 증가하는 복잡한 패킷분류에 대한 요구도 처리 할 수 있다.In the present invention, the protocol type and the port number of the source / destination destination are simultaneously searched, and only the shortest prefix is stored for several source / destination addresses having the same prefix, and the packet classification is performed based on this. Fast packet classification time can be obtained compared to the dimensional methods. In addition, the present invention is suitable for both hardware and software because it uses memory efficiently and uses a small size of memory. According to the present invention, it is possible to deal with the need for a complicated packet classification that increases with the structure that is not affected by the number of rules or items.

Claims (9)

라우터에서 패킷 분류를 위하여 프로토콜의 종류 및 출발지/도착지 포트번호를 검색하는 단계; 같은 프리픽스 관계를 갖는 주소 중에서 가장 짧은 주소를 갖는 규칙을 기반으로 출발지/도착지 IP 주소를 검색하는 단계; 상기 검색 결과를 모두 만족하는 규칙들에 대해서 우선 순위가 높은 규칙부터 순차 검색을 수행하여 일치하는 규칙을 검색하는 단계; 및, 상기 최종 검색 결과에 따라 해당 패킷을 분류하는 단계를 포함하여 이루어지는 것을 특징으로 하는 패킷 분류 방법.Retrieving the type of protocol and source / destination port number for packet classification in a router; Retrieving a source / destination IP address based on a rule having the shortest address among addresses having the same prefix relationship; Searching for a matching rule by performing a sequential search starting from a rule having a high priority with respect to rules satisfying all of the search results; And classifying a corresponding packet according to the final search result. 제 1 항에 있어서, 상기 출발지 포트번호와 도착지 포트번호 각각의 조합에서 나온 규칙은 'AND' 과정을 통해서 두 가지 경우를 모두 만족하는 규칙만 저장하는 것을 특징으로 하는 패킷 분류 방법.2. The method of claim 1, wherein the rule derived from the combination of the source port number and the destination port number stores only the rules satisfying both cases through the 'AND' process. 제 2 항에 있어서, 상기 출발지 포트번호와 도착지 포트번호 각각의 조합에서 나온 규칙에 대하여 두 가지 경우를 모두 만족하는 규칙은 각각의 규칙에 대해 1비트의 규칙 대응 테이블로 저장하는 것을 특징으로 하는 패킷 분류 방법.The packet according to claim 2, wherein a rule satisfying both cases with respect to a rule derived from a combination of the source port number and the destination port number is stored as a 1-bit rule correspondence table for each rule. Classification method. 제 1 항에 있어서, 상기 출발지/도착지 IP 주소를 검색하는 단계는, 규칙들이 갖는 출발지/도착지 IP 주소를 차례로 비교하여 프리픽스 관계를 갖는 여러 주소들 중에서 가장 짧은 주소를 갖는 규칙만을 저장하는 것을 특징으로 하는 패킷 분류 방법.The method of claim 1, wherein the searching of the source / destination IP address comprises comparing the source / destination IP address of the rules in order and storing only the rule having the shortest address among several addresses having a prefix relationship. Packet classification method to do. 제 1 항에 있어서, 상기 패킷 분류를 위하여, 상기 검색된 출발지 포트번호, 도착지 포트번호, 프로토콜 종류, 출발지 IP 주소, 도착지 IP 주소에 관한 항목을 제외한 나머지 항목에 대해서 우선 순위가 높은 규칙부터 순차 검색을 수행하는 것을 특징으로 하는 패킷 분류 방법.The method according to claim 1, wherein the packet is classified in order from the high priority rule to the remaining items except for the searched source port number, destination port number, protocol type, source IP address, and destination IP address. Packet classification method, characterized in that performed. 프로토콜의 종류, 출발지 및 도착지 포트번호를 저장하는 수단; 출발지 및 도착지 주소와 해당 규칙을 저장하는 수단; 입력 패킷에 대하여 상기 프로토콜의 종류, 출발지 및 도착지 포트번호, 출발지 및 도착지 주소와 해당 규칙을 검색하여 저장하며, 상기 검색된 규칙들에 대해 출발지와 도착지 포트 번호 및 프로토콜 종류, 출발지 및 도착지 주소에 관한 항목을 제외한 나머지 항목에 대해 우선순위가 높은 규칙부터 순차적으로 검색을 수행하여 모든 항목에 대해 일치하는 규칙을 검색하는 검색수단; 및, 상기 검색 결과를 저장하기 위한 규칙 대응 테이블 저장수단; 을 포함하여 이루어지는 것을 특징으로 하는 패킷 분류 장치.Means for storing the type of protocol, source and destination port numbers; Means for storing origin and destination addresses and corresponding rules; For the input packet, the protocol type, the source and destination port number, the source and destination address, and the corresponding rule are retrieved and stored, and the items related to the source and destination port number and protocol type, the source and destination address for the retrieved rules. Search means for searching for a matching rule for all items by sequentially searching from a rule having a high priority to the remaining items except for the above; Rule matching table storage means for storing the search results; Packet classification apparatus comprising a. 제 6 항에 있어서, 상기 규칙 대응 테이블은 각각의 규칙에 대해서 1비트를 갖고, 전체 규칙 개수만큼 저장됨을 특징으로 하는 패킷 분류 장치.7. The packet classification apparatus of claim 6, wherein the rule correspondence table has one bit for each rule and is stored as many as the total number of rules. 제 6 항에 있어서, 상기 출발지 IP 주소와 도착지 IP 주소를 저장하는 수단 은 TCAM(Ternary Contents Address Memory)인 것을 특징으로 하는 패킷 분류 장치.7. The apparatus of claim 6, wherein the means for storing the source IP address and the destination IP address is TCAM (Ternary Contents Address Memory). 제 6 항에 있어서, 상기 프로토콜의 종류와 출발지/도착지 포트번호, 규칙 메모리는 하나의 메모리로 이루어지고 각각의 데이터를 설정된 영역에 분할하여 기록하는 것을 특징으로 하는 패킷 분류 장치.7. The packet classification apparatus according to claim 6, wherein the type of protocol, the source / destination port number, and the rule memory are composed of one memory and each data is divided and recorded in a set area.
KR1020050092756A 2005-10-04 2005-10-04 Method and apparatus for routing packet data KR100657107B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050092756A KR100657107B1 (en) 2005-10-04 2005-10-04 Method and apparatus for routing packet data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050092756A KR100657107B1 (en) 2005-10-04 2005-10-04 Method and apparatus for routing packet data

Publications (1)

Publication Number Publication Date
KR100657107B1 true KR100657107B1 (en) 2006-12-13

Family

ID=37733180

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050092756A KR100657107B1 (en) 2005-10-04 2005-10-04 Method and apparatus for routing packet data

Country Status (1)

Country Link
KR (1) KR100657107B1 (en)

Similar Documents

Publication Publication Date Title
US6289013B1 (en) Packet filter method and apparatus employing reduced memory
US9269411B2 (en) Organizing data in a hybrid memory for search operations
US6775737B1 (en) Method and apparatus for allocating and using range identifiers as input values to content-addressable memories
US8233493B2 (en) Packet router having improved packet classification
US7535906B2 (en) Packet classification
JP4482584B2 (en) Apparatus and method for two-stage packet classification using most specific filter matching and transport level sharing
EP1623347B1 (en) Comparison tree data structures and lookup operations
US7545809B2 (en) Packet classification
US8151339B2 (en) Method and apparatus for implementing filter rules in a network element
US7149216B1 (en) M-trie based packet processing
US7706375B2 (en) System and method of fast adaptive TCAM sorting for IP longest prefix matching
CN111937360B (en) Longest prefix matching
EP3276501B1 (en) Traffic classification method and device, and storage medium
US20100110936A1 (en) Method and system for classifying data packets
US6529897B1 (en) Method and system for testing filter rules using caching and a tree structure
US7317723B1 (en) Action based termination of multidimensional lookup
US20040243563A1 (en) Method and system for classifying binary strings
US7624226B1 (en) Network search engine (NSE) and method for performing interval location using prefix matching
US7403526B1 (en) Partitioning and filtering a search space of particular use for determining a longest prefix match thereon
US6970971B1 (en) Method and apparatus for mapping prefixes and values of a hierarchical space to other representations
US7739445B1 (en) Circuit, apparatus, and method for extracting multiple matching entries from a content addressable memory (CAM) device
CN106487769B (en) Method and device for realizing Access Control List (ACL)
US7558775B1 (en) Methods and apparatus for maintaining sets of ranges typically using an associative memory and for using these ranges to identify a matching range based on a query point or query range and to maintain sorted elements for use such as in providing priority queue operations
US7787462B2 (en) Applying features to packets in the order specified by a selected feature order template
US7299317B1 (en) Assigning prefixes to associative memory classes based on a value of a last bit of each prefix and their use including but not limited to locating a prefix and for maintaining a Patricia tree data structure

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
LAPS Lapse due to unpaid annual fee