KR100421414B1 - Method for searching and updating using node structure of multiway search tree - Google Patents

Method for searching and updating using node structure of multiway search tree Download PDF

Info

Publication number
KR100421414B1
KR100421414B1 KR10-2001-0044274A KR20010044274A KR100421414B1 KR 100421414 B1 KR100421414 B1 KR 100421414B1 KR 20010044274 A KR20010044274 A KR 20010044274A KR 100421414 B1 KR100421414 B1 KR 100421414B1
Authority
KR
South Korea
Prior art keywords
node
tree
search
key
port
Prior art date
Application number
KR10-2001-0044274A
Other languages
Korean (ko)
Other versions
KR20030009707A (en
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 KR10-2001-0044274A priority Critical patent/KR100421414B1/en
Publication of KR20030009707A publication Critical patent/KR20030009707A/en
Application granted granted Critical
Publication of KR100421414B1 publication Critical patent/KR100421414B1/en

Links

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/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate 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/48Routing tree calculation

Abstract

1. 청구범위에 기재된 발명이 속하는 기술분야1. TECHNICAL FIELD OF THE INVENTION

본 발명은 다중 탐색 트리의 노드 구조를 이용한 트리 검색 및 업데이트 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것임.The present invention relates to a tree search and update method using a node structure of a multiple search tree and a computer readable recording medium having recorded thereon a program for realizing the method.

2. 발명이 해결하고자 하는 기술적 과제2. Technical problem to be solved by the invention

본 발명은, 다중 탐색 트리에서 한 노드에서 사용하는 키의 개수에 관계없이 노드에 기록되는 포인터는 한 개만 사용하도록 하여 노드 포인터, 키의 개수, 루트 포트, 키, 2 비트 플래그, 포트 및 영역 포트를 캐시라인 크기와 일치시켜 다중 탐색 트리를 고속화하여, 네트워크 어드레스 검색에서 노드내에 저장 가능한 키의 개수를 늘임으로써 검색 속도를 고속화하고, 비트리(Btree)에서 최대 유효 정합을 가능하게 하기 위한 다중 탐색 트리의 노드 구조를 이용한 트리 검색 및 업데이트 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공함에 그 목적이 있음.In the present invention, regardless of the number of keys used by a node in a multiple search tree, only one pointer is written to a node so that only one node pointer, the number of keys, a root port, a key, a 2-bit flag, a port, and an area port are used. To match the cache line size to speed up the multiple search tree, increasing the number of keys that can be stored in the node in network address searches, to speed up the search, and to enable maximum valid matching in the bittree. It is an object of the present invention to provide a method of searching and updating a tree using a tree structure of a tree and a computer-readable recording medium recording a program for realizing the method.

3. 발명의 해결방법의 요지3. Summary of Solution to Invention

본 발명은, 목적지 IP 주소의 상위 비트 세그먼트를 이용하여 초기의 비트 어레이를 검색하여 노드 포인터가 지시하는 루트 노드로 이동하여 상기 목적지 IP 주소의 하위 비트 오프셋으로 다중 경로를 검색하여 리프 노드가 도달하기 전에 완전 정합(Exact Matching)이 되는지를 판단하는 제 1 단계; 상기 제 1 단계의 판단결과, 리프 노드가 도달하기 전에 완전 정합이 될 경우에는 해당 포트를 반환하고 룩업을 종료하는 제 2 단계; 및 상기 제 1 단계의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 되지 않을 경우에는 검색이 도달한 노드에 따라 키의 영역 포트를 레지스터에 반환 또는 저장하는 제 3 단계를 포함한다.The present invention searches for an initial bit array using an upper bit segment of a destination IP address, moves to a root node indicated by a node pointer, and searches for multiple paths with a lower bit offset of the destination IP address to reach a leaf node. A first step of determining whether Exact Matching has been performed before; A second step of returning the corresponding port and ending the lookup if the match is complete before the leaf node arrives as a result of the determination of the first step; And a third step of returning or storing the area port of the key in a register according to the node where the search has reached, if the result of the determination of the first step is not complete match before the leaf node arrives.

4. 발명의 중요한 용도4. Important uses of the invention

본 발명은 라우터 및 스위치 시스템의 어드레스 탐색 등에 이용됨The present invention is used for address search of routers and switch systems

Description

다중 탐색 트리의 노드 구조를 이용한 트리 검색 및 업데이트 방법{Method for searching and updating using node structure of multiway search tree}Method for searching and updating using node structure of multiway search tree}

본 발명은 다중 탐색 트리의 노드 구조를 이용한 트리 검색 및 업데이트 방법에 관한 것으로, 보다 상세하게는 비트리(Btree)의 한 노드에서 필요한 포인터의 개수를 한 개만 사용하여 노드내에 저장 가능한 키의 수를 증가시켜 트리 경로의 레벨 수를 줄임으로써 검색 시간을 감소시키고, 노드내에 한 개의 포인터 사용으로 인하여 하위 노드들을 연속적인 메모리 위치에 저장하기 위한 다중 탐색 트리의 노드 구조를 이용한 트리 검색 및 업데이트 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것이다.The present invention relates to a tree search and update method using a node structure of a multiple search tree. More particularly, the present invention relates to the number of keys that can be stored in a node by using only one pointer number required in a node of a bittree. Retrieval time by reducing the number of levels of tree paths by increasing the number of tree paths. A computer readable recording medium having recorded thereon a program for realizing the method.

도 1 에 도시된 바와 같이 일반적인 기가비트용 라우터 시스템의 구조에서, 인터페이스(interface)는 패킷을 시스템 내부에서 사용하기 위한 형태와링크(link)에서 사용될 데이터의 형태 사이를 정합하는 기능을 수행하고, 포워딩 엔진(FE : Forwarding Engine)(14)은 수신된 패킷을 분류하고 가공하게 된다. 즉, 상기 포워딩 엔진(14)은 패킷의 목적지가 어느 곳인가를 알아내 어느 링크를 통해 내보내야 할지를 결정한다. 그리고, 스위칭 페브릭(12)은 상기 포워딩 엔진(14)에서 결정된 정보를 이용하여 실제 링크로 데이터를 보내는 기능을 수행한다.In the structure of a general gigabit router system as shown in FIG. 1, an interface performs a function of matching between a form for using a packet inside the system and a form of data to be used in a link, and forwarding. The forwarding engine (FE) 14 classifies and processes the received packets. In other words, the forwarding engine 14 determines where the destination of the packet is and decides on which link to send it. Then, the switching fabric 12 performs a function of sending data to the actual link by using the information determined by the forwarding engine 14.

어드레스 탐색 방법에는 어드레스가 사용되는 방법에 따라 완전 정합(exact match) 방법과 LPM(Longest Prefix Match : 이하, "최대 유효 정합" 이라고함) 방법이 있다. 상기 완전 정합 방법은 이더넷 MAC 어드레스와 같이 모든 어드레스의 비트가 일치하는 경우에 사용되고, 상기 최대 유효 정합 방법은 찾고자 하는 키와 첫 번째 비트부터 가장 길게 일치하는 자료를 찾는 것으로 IP 버전 4(IP version 4)에 사용된다.The address searching method includes an exact match method and an LPM (Longest Prefix Match) method according to how an address is used. The perfect matching method is used when the bits of all addresses match, such as the Ethernet MAC address, and the maximum valid matching method is to find the longest matching data starting from the first bit with the key to be searched for. Is used).

도 2 는 일반적인 캐시라인에 따른 자료 구조를 보여주는 도면이다.2 illustrates a data structure according to a general cache line.

즉, 도 2는 램프슨(Lampson)이 사용한 32 바이트의 캐쉬 라인을 가지는 다중 탐색 트리를 보여주고 있다. 각 노드는 키(K1, K2...) 및 포인터(P0, P1, P2, ...)로 구성되어 있으며, 각 노드는 32 바이트로 구성되어 있다.That is, Figure 2 shows a multiple search tree with a 32-byte cache line used by Lampson. Each node consists of keys K1, K2 ... and pointers P0, P1, P2, ..., and each node consists of 32 bytes.

여기서, 상기 램프슨(Lampson)이 다중 탐색 트리를 사용한 이유는 현대적인 프로세서 구조들이 일반적으로 취하는 계층적 메모리 구조를 최대한 활용하기 위함이다. 즉, 심화되는 메모리 속도와 프로세서 속도 차를 극복하기 위해 점점 대용량의 캐시가 프로세서에 탑재되고 있다.따라서, 캐시의 동작 중에 임의의 메모리 어드레스가 엑세스되면 이 메모리 어드레스를 포함하는 캐시라인 전체가 한꺼번에 프로세서의 캐시로 복사되고 캐시 내에 있는 데이터는 프로세서의 속도로 처리된다. 따라서, 상기 다중 탐색 트리의 한 노드를 한 캐시라인 크기로 만들면 추가적인 메인 메모리 엑세스 없이 분기 수를 대폭 늘릴 수 있다.The reason why Lampson uses multiple search trees is to make the most of the hierarchical memory structure that modern processor structures generally take. In other words, in order to overcome the ever-increasing memory speeds and processor speed differences, an increasing amount of caches are installed in the processor. Therefore, when an arbitrary memory address is accessed during the operation of the cache, the entire cache line including the memory address is processed at the same time. Is copied into the cache and the data in the cache is processed at the processor's speed. Therefore, by making one node of the multiple search tree one cache line size, the number of branches can be greatly increased without additional main memory access.

상기와 같은 다중 탐색 트리는 디스크와 메인 메모리 사이에서 메모리 계층 구조를 고려하여 고안된 방법이기 때문에 저속의 메모리와 상대적으로 고속인 메인 메모리를 고려하여 한 번에 디스크에서 메인 메모리로 읽어들인 디스크 블록을 이용한다.따라서, 추가적인 저속의 디스크 엑세스 없이 분기 수를 메인 메모리의 속도로 늘려야 하는데, 이러한 다중 탐색 트리의 대표적인 예가 비트리(Btree)의 트리 구조이며, 이 비트리(Btree)의 트리 구조는 후술될 도 5 에서 자세히 설명하기로 한다.Since the above-described multiple search tree is designed in consideration of the memory hierarchy between the disk and the main memory, the disk block read from the disk into the main memory at one time in consideration of the low speed memory and the relatively high speed main memory is used. Accordingly, the number of branches must be increased to the speed of main memory without additional slow disk access. A representative example of such a multiple search tree is a tree structure of a bit tree, which is described later in FIG. This will be explained in detail later.

도 3 은 3개의 IP 경로를 IP 영역으로 확장한 구조를 보여주는 일실시예 도면이다.3 is a diagram illustrating a structure in which three IP paths are extended to an IP region.

도 3 에 도시된 바와 같이, 라우팅 테이블에 있는 IP 경로는 라우트 프리픽스(Route Prefix) 및 프리픽스 길이(Prefix Length)로 표현된다. 이러한 IP 경로를 비트리(Btree)를 이용하여 최대 유효 정합 방법을 수행하려면 부가적인 기능이 필요하다. 우선, 6 비트로 제한된 3 개의 IP 경로라고 가정하면, 1*, 101*, 10101*인 3 개의 IP 경로를 해당하는 IP 범위로 표현하기 위해서 IP 쌍으로 나타내어야 한다. 즉, 1*인 경우에 '100000'(Start)과 '111111'(End)로 표현되며, 101*은 '101000'(Start)과 '101111'(End)로, 10101*은 '101010'(Start)과 '101011'(End)로 표현된다.As shown in FIG. 3, the IP paths in the routing table are represented by a Route Prefix and a Prefix Length. In order to perform the maximum valid matching method using the Btree on the IP path, an additional function is required. First, assuming three IP paths limited to 6 bits, three IP paths of 1 *, 101 *, and 10101 * should be represented by IP pairs in order to express corresponding IP ranges. That is, in the case of 1 *, '100000' (Start) and '111111' (End) are represented, 101 * is '101000' (Start) and '101111' (End), and 10101 * is '101010' (Start ) And '101011' (End).

즉, 각 IP 경로사이에 입력되는 목적지 IP 주소는 해당하는 IP 경로의 범위에 해당하는데, 예를 들면 룩업에 입력된 목적지 IP 주소가 '101110'이라면 '101000'과 '101111' 사이에 해당된다. 이러한 IP 경로 쌍은 다중 경로 트리에 키로 입력되며, 업데이트 시에도 동일하게 업데이트되어야 한다.That is, the destination IP address input between each IP path corresponds to the range of the corresponding IP path. For example, if the destination IP address input in the lookup is '101110', it corresponds to '101000' and '101111'. These pairs of IP paths are keyed into the multi-path tree and must be updated identically.

도 4 는 도 3 에 도시된 IP 영역으로 확장된 구조에서 새로운 프리픽스 추가시의 상황을 보여주는 도면이다.4 is a diagram illustrating a situation when adding a new prefix in the structure extended to the IP region illustrated in FIG. 3.

즉, 도 4 는 IP 경로 쌍으로 이루어진 영역 내에서 프리픽스 큐(Prefix Q)가 새로이 추가되는 경우에 고려하여야 할 사항들을 보여주는 것으로, 프리픽스 큐(Prefix Q)의 추가로 이 범위 안에 있는 프리픽스(Prefix)들은 프리픽스 큐(Prefix Q)의 업데이트에 영향을 받게 된다.That is, FIG. 4 shows matters to be considered when a prefix queue (Prefix Q) is newly added in an area consisting of IP path pairs, and a prefix that is within this range by addition of a prefix queue (Prefix Q) is shown. These are affected by the update of the prefix queue (Prefix Q).

단일 프리픽스(Unique Prefix)는 프리픽스(Prefix)의 길이가 32 비트인 경우로 동시에 시작(Start)과 종료(End)로 표시되는 점이며 어떠한 영역도 갖지 않는 IP 경로를 의미한다. 프리픽스 큐(Prefix Q)의 추가로 큐 시작(Q Start)과 시작 1 (Start(1))사이의 영역(A), 종료 1(End(1))과 시작 3(Start(3)) 사이의 영역(B), 종료 3(End(3))과 단일 프리픽스(Unique Prefix) 사이의 영역(C) 및 단일 프리픽스(Unique Prefix)와 큐 종료(Q End) 사이의 영역(D)에 프리픽스 큐(Prefix Q)가 추가로 동시에 업데이트된다.Unique Prefix is a 32-bit prefix and is marked as Start and End at the same time, and means an IP path having no area. The addition of the prefix queue (Prefix Q) adds an area between queue start (Q Start) and start 1 (Start (1)), between end 1 (End (1)) and start 3 (Start (3)). Prefix queues (area C) between region (B), region (C) between End (3) and a single prefix, and region (D) between a single prefix and Q End. Prefix Q) is further updated simultaneously.

다중 탐색 트리의 경우에는 각 키가 완전 정합(Exact matching)에 사용되는 포트 번호와 자기보다 큰 영역을 나타내는 영역 포트 번호를 갖고 있으므로 이 예의 경우에서 수정되어야 할 키들은 큐 시작(Q Start)과 큐 종료(Q End)의 포트와영역 포트 그리고, 종료 1(End(1)), 종료 3(End(3)) 및 단일 프리픽스(Unique Prefix)의 영역 포트가 업데이트되어져야 한다.In the case of multiple navigation trees, each key has a port number that is used for exact matching and an area port number that represents a larger area than itself, so in this case the keys that need to be modified are Q Start and Queue. The ports and zone ports of Q End and the zone ports of End 1 (End (1)), End 3 (End (3)) and Unique Prefix should be updated.

도 5 는 일반적인 비트리(Btree)의 트리 구조를 보여주는 도면이다.5 is a diagram illustrating a tree structure of a general bit tree.

도 5 에 도시된 바와 같이, 비트리(Btree)는 바이너리 트리를 개량한 형태로서, 자료의 탐색이나 검색에 필요한 알고리즘에 주로 사용된다. 즉, 상기 비트리(Btree)는 루트 노드와 비교를 한 다음 그 크기에 따라 좌우로 나누어지는 것은 바이너리 트리와 동일하나, 다음 노드에서는 그 크기에 따라 한번에 여러 개를 비교함으로서 속도가 빠르며 트리의 깊이를 줄일 수 있는 이점이 있다.As shown in Fig. 5, the bit tree (Btree) is an improved version of the binary tree, and is mainly used for algorithms for searching or searching for data. That is, the Btree is compared with the root node and divided into left and right according to its size is the same as the binary tree, but the next node is faster by comparing several at once according to its size and the depth of the tree. There is an advantage to reduce.

그러나, 비트리(Btree)가 사용된 일반적인 경우, 디스크에 저장된 데이터베이스를 엑세스하기 위해 역시 디스크에 저장된 인덱스 파일을 구성하는데 사용하는데, 이 데이터베이스를 엑세스하기 위한 키는 문자열로 구성되어 이 노드에서 비교 결과에 따라 연결될 다음 노드를 가리키기 위한 포인터의 길이에 비해 아주 많은 메모리를 차지하게 되는 문제점이 있었다.However, in the general case where Btree is used, it is also used to configure the index file stored on disk to access the database stored on disk. The key for accessing this database is composed of a string and the result of comparison in this node. As a result, the problem of using a lot of memory compared to the length of the pointer to point to the next node to be connected.

이에 본 발명은, 상기와 같은 문제점을 해결하기 위해 제안된 것으로, 다중 탐색 트리의 노드 구조를 이용하여 트리를 검색하고 업데이트하기 위한 트리 검색 및 업데이트 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공함에 그 목적이 있다.Accordingly, the present invention has been proposed to solve the above-mentioned problems, and includes a tree search and update method for searching and updating a tree using a node structure of a multiple search tree, and a computer recording a program for realizing the method. The purpose is to provide a readable recording medium.

즉, 본 발명은, 다중 탐색 트리에서 한 노드에서 사용하는 키의 개수에 관계없이 노드에 기록되는 포인터는 한 개만 사용하도록 하여 노드 포인터, 키의 개수, 루트 포트, 키, 2 비트 플래그, 포트 및 영역 포트를 캐시라인 크기와 일치시켜 다중 탐색 트리를 고속화하여, 네트워크 어드레스 검색에서 노드내에 저장 가능한 키의 개수를 늘임으로써 검색 속도를 고속화하고, 비트리(Btree)에서 최대 유효 정합을 가능하게 하기 위한 다중 탐색 트리의 노드 구조를 이용한 트리 검색 및 업데이트 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공함에 그 목적이 있다.That is, the present invention uses only one pointer written to a node regardless of the number of keys used by a node in the multiple search tree, so that the node pointer, the number of keys, the root port, the key, the 2-bit flag, the port, By matching the area port with the cache line size, it speeds up the multiple search tree, increasing the number of keys that can be stored in the node in network address search, and thus speeds up the search speed and enables maximum valid matching in the Btree. An object of the present invention is to provide a method of searching and updating a tree using a node structure of a multiple search tree, and a computer-readable recording medium recording a program for realizing the method.

도 1 은 일반적인 기가비트 라우터의 일실시예 구성도.1 is a diagram illustrating an embodiment of a general gigabit router.

도 2 는 일반적인 캐시라인에 따른 자료 구조를 보여주는 도면.2 illustrates a data structure according to a general cache line.

도 3 은 3개의 IP 경로를 IP 영역으로 확장한 구조를 보여주는 도면.3 is a diagram illustrating a structure in which three IP paths are extended to an IP region.

도 4 는 도 3 에 도시된 IP 영역으로 확장된 구조에 새로운 프리픽스 추가 시의 상황을 보여주는 도면.4 is a view showing a situation when adding a new prefix to the structure extended to the IP region shown in FIG.

도 5 는 일반적인 비트리(Btree)의 트리 구조를 보여주는 도면.5 is a diagram illustrating a tree structure of a general bittree.

도 6 은 본 발명에 따른 다중 탐색 트리의 자료 구조에 대한 일실시예 도면.6 is an embodiment diagram of a data structure of a multiple search tree according to the present invention;

도 7 은 도 6 에 도시된 자료 구조에서 다중 탐색 트리의 노드 구조에 대한 일실시예 도면.FIG. 7 is an embodiment diagram of a node structure of multiple search trees in the data structure shown in FIG. 6; FIG.

도 8 은 도 7 에 도시된 다중 탐색 트리의 노드 구조에서 키의 구조에 대한 일실시예 도면.FIG. 8 is an embodiment diagram of the structure of a key in the node structure of the multiple search tree shown in FIG.

도 9 는 본 발명에 따른 다중 탐색 트리의 노드 구조에서 트리의 조건을 보여주는 도면.9 is a diagram showing a tree condition in a node structure of a multiple search tree according to the present invention.

도 10a 는 본 발명에 따른 다중 탐색 트리의 노드 구조에서 트리의 키 값 수정에 의한 업데이트 과정을 설명하는 도면.FIG. 10A illustrates an update process by modifying a key value of a tree in a node structure of a multiple search tree according to the present invention. FIG.

도 10b 는 본 발명에 따른 다중 탐색 트리의 노드 구조에서 트리의 키 값 삽입 및 삭제에 의한 업데이트 과정을 설명하는 도면.FIG. 10B illustrates an update process by inserting and deleting key values of a tree in a node structure of a multiple search tree according to the present invention. FIG.

도 11 은 본 발명에 따른 다중 탐색 트리의 노드 구조를 이용한 트리 검색 방법에 대한 일실시예 흐름도.11 is a flowchart illustrating a tree search method using a node structure of a multiple search tree according to the present invention.

도 12 는 본 발명에 따른 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 방법에 대한 일실시예 흐름도.12 is a flowchart illustrating a tree update method using a node structure of a multiple search tree according to the present invention.

상기와 같은 목적을 달성하기 위한 본 발명의 트리 검색 방법은, 다중 탐색 트리의 노드 구조를 이용한 트리 검색 시스템에 적용되는 트리 검색 방법에 있어서, 목적지 IP 주소의 상위 비트 세그먼트를 이용하여 초기의 비트 어레이를 검색하여 노드 포인터가 지시하는 루트 노드로 이동하여 상기 목적지 IP 주소의 하위 비트 오프셋으로 다중 경로를 검색하여 리프 노드가 도달하기 전에 완전 정합(Exact Matching)이 되는지를 판단하는 제 1 단계; 상기 제 1 단계의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 될 경우에는 해당 포트를 반환하고 룩업을 종료하는 제 2 단계; 및 상기 제 1 단계의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 되지 않을 경우에는 검색이 도달한 노드에 따라 키의 영역 포트를 레지스터에 반환 또는 저장하는 제 3 단계를 포함하는 것을 특징으로 한다.The tree search method of the present invention for achieving the above object is a tree search method applied to a tree search system using a node structure of a multiple search tree, the initial bit array using the upper bit segment of the destination IP address A first step of searching for a path and moving to a root node indicated by a node pointer to search for multiple paths with a lower bit offset of the destination IP address to determine whether Exact Matching is performed before the leaf node arrives; A second step of returning the corresponding port and ending the lookup if the match is complete before the leaf node arrives as a result of the determination of the first step; And a third step of returning or storing the area port of the key in a register according to the node that the search has reached if the result of the determination of the first step is that the match is not completed before the leaf node arrives. .

한편, 본 발명의 트리 업데이트 방법은, 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 시스템에 적용되는 트리 업데이트 방법에 있어서, 해당 엔트리의 프리픽스 길이에 따라 초기의 어레이에서 업데이트를 수행하거나, 노드 포인터가 루트 노드를 지시하는지를 판단하는 제 1 단계; 상기 제 1 단계의 판단 결과, 노드 포인터가 루트 노드를 지시하지 않는 경우에 삭제가 아님을 확인한 후에 새로운 루트 노드를 생성하여 그 생성된 루트 노드에 새로운 키 값을 삽입하는 제 2 단계; 상기 제 1 단계의 판단 결과, 노드 포인터가 루트 노드를 지시할 경우에는 해당 엔트리의 루트 노드로 이동하여 해당 키 값이 존재하는지를 판단하는 제 3 단계; 상기 제 3 단계의 판단 결과, 키 값이 존재하지 않으면 삭제가 아님을 확인한 후에 새로운 키의 쌍을 삽입하고 입력된 IP 경로보다 더 큰 범위의 IP 프리픽스의 포트 번호를 검색하여 해당하는 IP 경로 범위 내에서 트리의 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 4 단계; 및 상기 제 3 단계의 판단 결과, 키 값이 존재하면 업데이트의 수정 및 삭제에 따라 검색한 키 값에서부터 해당하는 키 쌍이 발견될때까지 트리 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 5 단계를 포함하는 것을 특징으로 한다.Meanwhile, the tree update method of the present invention is a tree update method applied to a tree update system using a node structure of a multiple search tree, and performs an update in an initial array according to a prefix length of a corresponding entry, or a node pointer is rooted. Determining whether the node is instructed; A second step of creating a new root node and inserting a new key value into the generated root node after confirming that the node pointer does not indicate the root node as a result of the determination of the first step; A third step of determining whether a corresponding key value exists by moving to a root node of a corresponding entry when the node pointer indicates a root node as a result of the determination of the first step; As a result of the determination of the third step, after confirming that the key value does not exist, the new key pair is inserted, and a port number of an IP prefix of a range larger than the input IP path is searched and found within the corresponding IP path range. Deleting a key pair from the tree after performing the update of the tree at; And a fifth step of deleting a key pair from the tree after performing a tree update from a searched key value to a found key pair according to the modification and deletion of the update as a result of the determination of the third step. It is characterized by including.

한편, 본 발명은, 다중 탐색 트리를 검색하기 위하여, 프로세서를 구비한 다중 탐색 트리 검색 시스템에, 목적지 IP 주소의 상위 비트 세그먼트를 이용하여 초기의 비트 어레이를 검색하여 노드 포인터가 지시하는 루트 노드로 이동하여 상기 목적지 IP 주소의 하위 비트 오프셋으로 다중 경로를 검색하여 리프 노드가 도달하기 전에 완전 정합(Exact Matching)이 되는지를 판단하는 제 1 기능; 상기 제 1 기능에서의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 될 경우에는 해당 포트를 반환하고 룩업을 종료하는 제 2 기능; 및 상기 제 1 기능에서의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 되지 않을 경우에는 검색이 도달한 노드에 따라 키의 영역 포트를 레지스터에 반환 또는 저장하는 제 3 기능을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.Meanwhile, in order to search for multiple search trees, the present invention provides a multiple search tree search system having a processor to search for an initial bit array using an upper bit segment of a destination IP address to a root node indicated by a node pointer. A first function of moving to search for multiple paths with a lower bit offset of the destination IP address to determine whether Exact Matching is made before the leaf node arrives; A second function of returning a corresponding port and ending the lookup if a match is complete before the leaf node arrives as a result of the determination in the first function; And a program for realizing a third function of returning or storing the area port of the key in a register according to the node at which the search has arrived if the result of the determination in the first function is that a full match is not achieved before the leaf node arrives. Provide a computer-readable recording medium for recording.

또한, 본 발명은, 다중 탐색 트리를 업데이트하기 위하여, 프로세서를 구비한 다중 탐색 트리 업데이트 시스템에, 해당 엔트리의 프리픽스 길이에 따라 초기의 어레이에서 업데이트를 수행하거나, 노드 포인터가 루트 노드를 지시하는지를 판단하는 제 1 기능; 상기 제 1 기능에서의 판단 결과, 노드 포인터가 루트 노드를 지시하지 않는 경우에 삭제가 아님을 확인한 후에 새로운 루트 노드를 생성하여 그 생성된 루트 노드에 새로운 키 값을 삽입하는 제 2 기능; 상기 제 1 기능에서의 판단 결과, 노드 포인터가 루트 노드를 지시할 경우에는 해당 엔트리의 루트 노드로 이동하여 해당 키 값이 존재하는지를 판단하는 제 3 기능; 상기 제 3 기능에서의 판단 결과, 키 값이 존재하지 않으면 삭제가 아님을 확인한 후에 새로운 키의 쌍을 삽입하고 입력된 IP 경로보다 더 큰 범위의 IP 프리픽스의 포트 번호를 검색하여 해당하는 IP 경로 범위 내에서 트리의 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 4 기능; 및 상기 제 3 기능에서의 판단 결과, 키 값이 존재하면 업데이트의 수정 및 삭제에 따라 검색한 키 값에서부터 해당하는 키 쌍이 발견될때까지 트리 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 5 기능을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.In addition, the present invention, in order to update the multiple search tree, in the multiple search tree update system with a processor to perform an update in the initial array according to the prefix length of the entry, or determine whether the node pointer indicates the root node A first function of doing; A second function of creating a new root node and inserting a new key value into the generated root node after confirming that the node pointer does not indicate the root node as a result of the determination in the first function; A third function of determining whether a corresponding key value exists by moving to a root node of a corresponding entry when a node pointer indicates a root node as a result of the determination in the first function; As a result of the determination in the third function, after confirming that the key value does not exist, the new key pair is inserted and the port number of the IP prefix of a range larger than the input IP path is searched to confirm that the key value is not deleted. A fourth function of deleting a key pair from the tree after performing an update of the tree within the tree; And a fifth function of deleting a key pair from the tree after performing a tree update from a searched key value until a corresponding key pair is found according to the modification and deletion of the update as a result of the determination in the third function. A computer readable recording medium having recorded thereon a program for realizing the present invention is provided.

여기서 상술된 목적, 특징들 및 장점은 첨부된 도면과 관련한 다음의 상세한설명을 통하여 보다 분명해 질 것이다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.The above objects, features and advantages will be apparent from the following detailed description taken in conjunction with the accompanying drawings. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 6 은 본 발명에 따른 다중 탐색 트리의 자료 구조에 대한 일실시예 도면이다.6 is an embodiment diagram of a data structure of a multiple search tree according to the present invention.

즉, 도 6 은 초기의 16 비트 어레이와 8-웨이 서치 트리(8-way Search Tree)로 구성된 다중 경로 트리를 구성한 예로서, 도면상의 4 비트인 "I,P,U,S"에서 "I"플래그는 16 비트가 노드 포인터인지 포트 수인지를 가리키고, "P" 플래그는 키가 입력되는지 아닌지를 가리키며, "U" 플래그는 키의 길이가 16비트인지 아닌지를 가리키며, 그리고 "S" 플래그는 키가 시작 포인터인지 종료 포인트인지를 가리킨다.That is, FIG. 6 is an example of configuring a multipath tree composed of an initial 16-bit array and an 8-way search tree. "Flag indicates whether 16 bits is a node pointer or port number," P "flag indicates whether a key is entered or not," U "flag indicates whether the key is 16 bits long or not, and" S "flag indicates Indicates whether the key is a start pointer or end point.

라우터에 입력된 목적지 IP 주소는 상위 16비트 세그먼트를 이용하여 초기의 16비트 어레이를 검색한다. 첫 번째 "I" 플래그가 'FALSE'로 설정되어 있으면 노드 포인터에 대한 정보가 없는 경우이므로 해당하는 포트 번호를 반환하고 룩업을 종료한다. "I" 플래그가 'TRUE'라면 노드 포인터가 지시하는 다중 경로 트리의 루트 노드 주소로 이동하고, IP 주소의 하위 오프셋(Offset)을 이용하여 다중 경로 트리의 검색을 시작하여 트리에서 포트 번호가 반환되면 룩업을 종료한다. 이러한 초기의 16비트 어레이를 사용하는 IP 확장 방법은 램프슨(Lampson)에서 사용하는 방법과 동일하지만 다중 경로 트리에서의 노드 구성과 업데이트면에서는 그 차이점이 크다.The destination IP address entered into the router retrieves the initial 16-bit array using the upper 16-bit segment. If the first "I" flag is set to 'FALSE', since there is no information on the node pointer, the corresponding port number is returned and the lookup ends. If the "I" flag is 'TRUE', it moves to the root node address of the multipath tree indicated by the node pointer, starts searching the multipath tree using the low offset of the IP address, and returns the port number from the tree. The lookup ends. This initial 16-bit array IP expansion method is the same as that used by Lampson, but differs greatly in terms of node configuration and updates in a multipath tree.

초기의 16비트 어레이의 "P" 플래그, "U" 플래그 및 "S" 플래그는 16비트 어레이 테이블을 업데이트 시에 사용된다. "P" 플래그는 라우팅 테이블에 해당 엔트리가 입력된 경우에 'TRUE'로 설정되며, "U" 플래그는 해당 엔트리가 라우팅 테이블에 입력될 때, 프리픽스(Prefix) 길이가 16인 경우 즉, 단일 프리픽스(Unique Prefix)에만 'TRUE'로 설정된다.The "P" flag, "U" flag, and "S" flag of the initial 16-bit array are used when updating the 16-bit array table. The "P" flag is set to 'TRUE' when a corresponding entry is entered into the routing table, and the "U" flag is a single prefix when the entry is entered into the routing table, i.e. a single prefix. It is set to 'TRUE' only for (Unique Prefix).

도 7 은 도 6 에 도시된 자료 구조에서 다중 탐색 트리의 노드 구조에 대한 일실시예 도면이다.FIG. 7 is a diagram illustrating an embodiment of a node structure of a multiple search tree in the data structure shown in FIG. 6.

즉, 도 7 은 노드 구조를 비트리(Btree)에 적용하여 8-웨이 서치 트리(8-way search tree)를 구성한 일실시예 노드 구성으로, 즉 한 개의 노드는 총 32바이트로, 7개의 키(K1 내지 K7)와 1개의 노드 포인터(Po), 키의 개수인 넘(Num) 및 루트 포트(Root Port)를 포함하여 32 바이트(Byte)의 캐시라인과 일치시킨다. 여기서, 모든 키(K1 내지 K7)는 32비트로 구성되어 있고, 포인터(Po)는 각각 16비트로 구성되어 있다.That is, FIG. 7 illustrates an embodiment of configuring an 8-way search tree by applying a node structure to a bit tree, that is, one node is 32 bytes in total, and seven keys. (K1 to K7), one node pointer Po, the number of keys, Num, and the Root Port, which are matched with 32 byte cache lines. Here, all the keys K1 to K7 are composed of 32 bits, and the pointer Po is composed of 16 bits, respectively.

여기서, 상기 노드 포인터(Po)는 하위 노드의 주소를 표시하며, 리프 노드(leaf node)일 경우에는 '널(NULL)'을 나타낸다. 키의 개수인 넘(Num)은 노드내 키의 개수에 대한 정보를 표시하며, 루트 포트(Root Port)는 이 16비트 어레이의 엔트리에 해당하는 포트 번호를 표시하며 루트 노드에서만 사용되고 분기 노드나 리프 노드에서는 '널(NULL)'로 설정된다. 또한, 상기 루트 포트(Root Port)는 하위 노드내에 있는 키가 16비트 어레이의 엔트리와 같은 범위에 속해 있는 경우에 루트 노드에 있는 루트 포트(Root Port)를 참조한다. 그러므로, 16비트 어레이의 엔트리의 업데이트로 인하여 루트 포트(Root Port)가 변경된 경우에 하위 노드에서 루트 포트(Root Port)를 참조하는 키들을 같이 업데이트해야 할 필요성을 방지하기위해서 사용된다. 나머지 비트는 키 값과 키 값에 해당하는 포트 번호를 저장하기 위해 사용된다.Herein, the node pointer Po indicates an address of a lower node and, in the case of a leaf node, indicates 'null'. The number of keys, Num, displays information about the number of keys in the node. The root port shows the port number that corresponds to the entry in this 16-bit array and is used only at the root node. Set to 'null' on the node. In addition, the root port refers to the root port in the root node when the key in the lower node belongs to the same range as the entry of the 16-bit array. Therefore, it is used to prevent the necessity of updating keys referring to the root port in the lower node when the root port is changed due to the update of the entry of the 16-bit array. The remaining bits are used to store the key value and the port number corresponding to the key value.

도 8 은 도 7 에 도시된 다중 탐색 트리의 노드 구조에서 키의 구조에 대한 일실시예 도면이다.FIG. 8 is a diagram illustrating the structure of a key in the node structure of the multiple search tree shown in FIG.

즉, 도 8 은 각 32비트로 구성된 7개의 키(K1 내지 K7)에서 하나의 키에 대한 상세 구조로서, 16비트의 키 넘버, 2비트의 플래그, 7비트의 포트 및 7비트의 영역 포트를 포함한다.That is, FIG. 8 is a detailed structure of one key in seven keys K1 to K7 composed of 32 bits each, and includes a 16-bit key number, a 2-bit flag, a 7-bit port, and a 7-bit area port. do.

여기서, 상기 포트는 검색을 요청한 IP의 하위 오프셋(Offset)과 노드내의 16비트 키 값과 비교하며, 키와 동일한 값인 완전 병합(Exact Matching)이 되는 경우에 사용되고, 영역 포트는 노드내의 16비트의 키 값보다 큰 경우에 사용된다.Here, the port is compared with the lower offset of the IP requesting the search and the 16-bit key value in the node. The port is used when the exact matching, which is the same value as the key, is used. Used if greater than the key value.

2비트의 플래그는 트리의 업데이트에 사용되는 것으로, "U" 플래그는 키의 프리픽스(Prefix) 길이가 32비트인 경우에 설정되고, "S" 플래그는 해당 엔트리가 IP 주소 범위에서 시작점인지 아니면 종료점인지를 나타낸다.The two-bit flag is used to update the tree. The "U" flag is set when the prefix length of the key is 32 bits, and the "S" flag is the entry or end point in the IP address range. Indicates cognition.

도 9 는 본 발명에 따른 다중 탐색 트리의 노드 구조에서 트리의 조건을 보여주는 도면이다.9 is a diagram illustrating a tree condition in a node structure of a multiple search tree according to the present invention.

도 9 에 도시된 바와 같이, 키에서 K1의 쌍은 K7이며, K2의 쌍은 K6이고, K3의 쌍은 K5이다. 그리고, K4는 독립된 키인 단일 프리픽스(Unique Prefix)이며 스택 수행 과정에 영향을 주지 않는다.As shown in FIG. 9, the pair of K1 in the key is K7, the pair of K2 is K6, and the pair of K3 is K5. K4 is a unique prefix that is an independent key and does not affect the stack execution process.

도 10a 는 본 발명에 따른 다중 탐색 트리의 노드 구조에서 트리의 키 값 수정에 의한 업데이트 과정을 설명하는 도면이다.10A is a diagram illustrating an update process by modifying a key value of a tree in a node structure of a multiple search tree according to the present invention.

즉, 도 10a 는 도 9 에 도시된 트리의 조건에 의한 수정에 따른 키의 업데이트 과정을 설명하는 것으로, 키 K2의 포트 번호가 수정되어야 한다고 가정하면, 먼저 K2를 검색하여 검색 과정에서 지나온 경로를 레벨마다 존재하는 레지스터에 해당 노드 주소와 통과한 위치 정보를 저장한다(N=0). 이 때, K2가 하위 첫 번째 노드의 두 번째 위치에서 발견되었으므로 K2의 포트(Port) 및 영역 포트(Range Port)를 수정하고 스택에 저장 후에 오른쪽 키(K3)로 이동한다. 그리고, 이동할 때마다 각 키에 저장된 "U" 플래그 및 "S" 플래그를 조사하여 스택의 저장 여부를 판별한다.That is, FIG. 10A illustrates a process of updating a key according to modification by the condition of the tree illustrated in FIG. 9. Assuming that the port number of the key K2 should be modified, first, K2 is searched to find a path passed in the search process. The node address and the passed position information are stored in the register existing for each level (N = 0). At this time, since K2 was found at the second position of the lower first node, the port and range port of K2 are modified, stored in the stack, and then moved to the right key (K3). Each time a move is made, the "U" flag and the "S" flag stored in each key are examined to determine whether the stack is stored.

여기서, "S" 플래그가 설정되어 있으면 시작점 스택에 저장하고 다음 키로 이동하며, "S" 플래그가 설정되어 있지 않으면 종료점 스택에서 해당키를 제거함으로써 각 키가 속한 IP의 범위를 유지할 수 있다.Here, if the "S" flag is set, it is stored in the start point stack and moved to the next key. If the "S" flag is not set, the corresponding key can be removed from the end point stack to maintain the range of IP to which each key belongs.

즉, K3은 "S" 플래그가 설정되어 있으므로 스택에 저장되고 상위 노드로 이동하기 위해서는 각 레벨에 존재하는 레지스터의 정보를 이용하여 K4의 플래그를 조사한다. K4는 "U" 플래그가 설정된 독립된 IP 이므로 스택의 변화 없이 레지스터의 N을 "1"만큼 증가시키고 두 번째 하위 노드로 이동하여 K5의 플래그를 조사한다.That is, since K3 has the "S" flag set, the flag of K4 is examined using the information of the registers present at each level in order to be stored on the stack and move to the upper node. Since K4 is an independent IP with the "U" flag set, increase the register N by "1" without changing the stack, and move to the second lower node to check the flag of K5.

그리고, K5는 "S" 플래그가 설정되어 있지 않으므로 K3을 스택에서 제외하고 K5의 영역 포트를 K2의 업데이트된 포트 번호로 수정하고, 자기의 키 쌍인 K6으로 이동한다. K6은 업데이트가 끝나는 종료점이므로 K6의 포트만을 수정하고 업데이트를 종료한다. 만약, 검색된 키가 가지 노드에 존재한다면 가장 근접한 오른쪽 하위 노드의 첫 번째 키로 이동하여 위의 업데이트 과정을 수행한다. 이 예에서는 K2의포트와 영역 포트, K5의 영역 포트와 K6의 포트가 수정된다.Since K5 does not have the "S" flag set, it removes K3 from the stack, modifies the area port of K5 to the updated port number of K2, and moves to its key pair K6. Since K6 is the end point of the update, only the port of K6 is modified and the update is finished. If the found key exists in the branch node, the above update process is performed by moving to the first key of the nearest lower right node. In this example, the ports of K2 and zones, the ports of K5, and ports of K6 are modified.

한편, 마지막 레벨을 제외한 상위 레벨마다 존재하는 레지스터의 개수는 16비트 어레이의 해당 엔트리 내에 존재하는 키의 개수에 영향을 받는다. 램프슨(Lampson)에 따르면 현재 가장 많은 엔트리 개수를 갖는 미-이스트( mae-east )의 라우팅 테이블을 조사한 결과 16비트 한 엔트리내의 키의 최대 개수가 336개이면 4개의 레벨에 해당하여 레지스터의 개수가 3개면 충분하지만, 최근의 미-이스트( mae-east ) 라우팅 테이블을 조사해본 결과에 따르면 336개의 키 개수를 넘어 최대 5 레벨에 도달하는 경우가 가끔 발생하므로 최대 4개의 레지스터를 두는 것이 바람직하다.On the other hand, the number of registers present in each higher level except the last level is affected by the number of keys present in the corresponding entry of the 16-bit array. According to Lampson, the maximum number of keys in an 16-bit entry is 336 if the maximum number of keys in a 16-bit entry is 336 as a result of examining the mae-east routing table with the largest number of entries. 3 is sufficient, but a recent mae-east routing table has shown that up to 5 levels can sometimes be reached beyond the number of 336 keys, so it is advisable to have up to 4 registers. .

도 10b 는 본 발명에 따른 다중 탐색 트리의 노드 구조에서 트리의 키 값 삽입 및 삭제에 의한 업데이트 과정을 설명하는 도면이다.10B is a diagram illustrating an update process by inserting and deleting key values of a tree in a node structure of a multiple search tree according to the present invention.

즉, 도 10b 는 도 9 에 도시된 트리의 조건에 의한 삽입 및 삭제에 따른 키의 업데이트 과정으로, 우선 해당하는 키 쌍보다 더 큰 범위의 IP 경로를 찾아야 하므로 삽입된 키의 왼쪽으로 이동하면서 키의 "S" 플래그와 영역 포트 값을 조사한다. 각 키의 "S" 플래그의 상태에 따라서 스택을 조절하며 스택의 구조는 도 10a 와는 반대로 동작하여 IP 경로가 쌍을 이루지 않는 첫 번째 "S" 플래그가 설정된 키를 찾는 것이다. 이때의 키가 삭제 또는 새로이 삽입되는 키를 포함하는 더 큰 범위의 키에 해당한다. 만약, 이동 중에 "S" 플래그가 설정되어 있지 않고 영역 포트(Range Port) 값이 널(Null) 또는 루트 포트(Root Port)를 참조하고 있는 키를 만난다면 이동을 종료하는 조건에 해당한다.That is, FIG. 10B is a process of updating a key according to insertion and deletion based on the condition of the tree shown in FIG. 9. First, since a range of IP paths larger than a corresponding key pair needs to be found, the key moves to the left side of the inserted key. Examine the "S" flag and zone port value. The stack is adjusted according to the state of the "S" flag of each key, and the structure of the stack operates in the reverse direction of FIG. 10A to find the key with the first "S" flag set without an IP path pairing. At this time, the key corresponds to a larger range of keys including a key to be deleted or newly inserted. If the "S" flag is not set during the movement, and the Range Port value encounters a key referring to null or the root port, the movement is terminated.

한편, 영역 포트(Range Port) 값이 널(Null)이라면 업데이트를 수행하는 키보다 더 큰 범위의 키가 존재하지 않는 경우에 해당하며, 영역 포트(Range Port) 값이 루트 포트(Root Port)를 참조하고 있는 경우라면 업데이트를 수행하는 키를 포함하는 키가 바로 엔트리(Root Port)이다.On the other hand, if the range port value is null, it means that there is no key in the range larger than the key for updating, and the range port value indicates the root port. If so, the entry that contains the key to update is the entry (Root Port).

즉, K2의 왼쪽에 있는 K1이 IP 쌍을 이루지 않는 첫 번째 키(K2를 포함하는 키)이므로 K1부터 K6까지 업데이트를 수행한다. 새로운 삽입의 경우에는 K6에 도달하면 업데이트가 끝나지만 삭제인 경우에는 위의 과정이 종료된 다음에 해당 K2, K6을 삭제함으로써 업데이트를 종료한다.That is, since K1 on the left side of K2 is the first key (key including K2) that does not form an IP pair, update is performed from K1 to K6. In the case of new insertion, the update is completed when K6 is reached, but in the case of deletion, the update is terminated by deleting the corresponding K2 and K6 after the above process is completed.

위의 경우처럼 키의 삭제나 삽입 시에 현재의 키보다 더 큰 범위의 키를 찾기 위해서 키의 왼쪽으로 이동하는 방법 이외에 키 쌍의 종료(End) 키를 중심으로 오른쪽으로 이동하여 키 쌍을 이루지 않는 첫 번째 S 플래그가 설정되어 있지 않는 키의 포트를 찾아서 업데이트를 수행하는 것도 가능하다.When deleting or inserting a key as above, move to the left of the key to find a key in a range larger than the current key, and move to the right around the end key of the key pair to form a key pair. It is also possible to find a port on a key whose first S flag is not set and perform an update.

도 11 은 본 발명에 따른 다중 탐색 트리의 노드 구조를 이용한 트리 검색 방법에 대한 일실시예 흐름도이다.11 is a flowchart illustrating a tree search method using a node structure of a multiple search tree according to the present invention.

먼저, 입력된 목적지 IP 주소의 상위 16비트 세그멘트를 이용하여 초기의 16비트 어레이를 검색한다(101). 그리고, 검색한 초기의 16 비트의 어레이에서 해당 엔트리의 "I" 플래그가 'TRUE' 인지를 판단한다(102).First, an initial 16-bit array is searched using the upper 16-bit segment of the input destination IP address (101). In operation 102, it is determined whether the "I" flag of the corresponding entry is "TRUE" in the searched initial 16-bit array.

상기 과정(102)에서 판단 결과, 엔트리의 "I" 플래그가 'TRUE'가 아닐 경우 즉, 'FALSE'이면 해당 포트 번호를 반환하고 본 루프를 종료한다(108).As a result of the determination in step 102, if the "I" flag of the entry is not 'TRUE', that is, 'FALSE', the corresponding port number is returned and the loop ends (108).

상기 과정(102)에서 판단 결과, 엔트리의 "I" 플래그가 'TRUE'일 경우에는노드 포인터가 지시하는 루트 노드로 이동하여 입력된 목적지 IP 주소의 하위 16비트 오프셋(Offset)으로 다중 경로 검색을 수행하고(103), 리프 노드가 도달하기 전에 완전 정합이 되는지를 판단한다(104).As a result of the determination in the step 102, if the "I" flag of the entry is 'TRUE', the multi-path search is performed with the lower 16-bit offset of the input destination IP address when the node pointer indicates the root node. In step 103, it is determined whether the leaf node is fully matched before reaching 104.

상기 과정(104)에서 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 되는 경우에는 해당 포트 번호를 반환하고(108), 본 루프를 종료한다. 한편, 상기 과정(104)에서 판단 결과, 리프가 도달하기 전에 완전 정합이 되지 않을 경우에는 검색의 도달이 가지 노드인지 또는 리프 노드인지를 판단한다(105).As a result of the determination in step 104, if a perfect match is reached before the leaf node arrives (108), the corresponding port number is returned (108), and the loop ends. On the other hand, as a result of the determination in step 104, if a complete match is not reached before the leaf arrives, it is determined whether the arrival of the search is a branch node or a leaf node (105).

상기 과정(105)에서 판단 결과, 검색의 도달이 가지 노드일 경우에는 가지 노드를 통과할때마다 통과하는 키의 영역 포트 값을 레지스터에 저장하고 다음 로드로 이동한 후(107), 리프 노드가 도달하기 전에 완전 정합이 되는지를 판단하는 과정(104)으로 복귀하여 루프를 반복 수행한다.As a result of the determination in step 105, if the arrival of the search is a branch node, each time the branch node passes through the branch node, the region port value of the key passing through is stored in a register and moved to the next load (107). The loop returns to step 104 to determine if a perfect match is reached before reaching the loop.

한편, 상기 과정(105)에서 판단 결과, 검색의 도달이 리프 노드일 경우 즉, 리프 노드에 도달하여 가장 근접하게 작은 키 값이 없는 경우에는 해당하는 키 값이 중간 노드에 존재하는 경우이므로 검색이 수행되는 동안에 이미 통과한 키 값이므로 해당하는 영역 포트는 검색하는 동안에 레지스터에 저장하고 있으므로, 이 레지스터에 저장된 영역 포트를 반환하고 본 루프를 종료한다(106).On the other hand, as a result of the determination in step 105, if the arrival of the search is a leaf node, that is, if there is no smallest key value closest to the leaf node, the corresponding key value exists in the intermediate node. Since the corresponding area port is being stored in the register during the retrieval since the key value has already passed during execution, the area port stored in this register is returned and the present loop ends (106).

도 12 는 본 발명에 따른 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 방법에 대한 일실시예 흐름도이다.12 is a flowchart illustrating a tree update method using a node structure of a multiple search tree according to the present invention.

즉, 도 12 는 라우팅 프로토콜에 의해서 IP 프리픽스(Prefix)가 업데이트를 수행하는 흐름도로서, 여기서 업데이트는 크게 세 가지로 수정, 삽입 및 삭제로 분류할 수 있으며, 각 분류에 따라 약간 다른 업데이트가 수행된다.That is, FIG. 12 is a flowchart in which an IP prefix performs an update by a routing protocol, wherein the update can be classified into three types of modification, insertion, and deletion, and slightly different updates are performed according to each classification. .

먼저, 초기 상태(200)에서 업데이트 시에 가장 먼저 수행되는 것은 해당 엔트리의 프리픽스(Prefix)의 길이가 16보다 작은지의 여부를 판단한다(201).First, in the initial state 200, it is first determined whether the first length of the prefix of the corresponding entry is smaller than 16 (201).

상기 과정(201)에서 판단 결과, 프리픽스의 길이가 16비트보다 작은 경우에는 초기의 16비트 어레이에서 "P" 플래그, "U" 플래그 및 "S" 플래그를 이용하여 간단히 업데이트를 수행한다(202). 이 16비트 어레이 테이블을 업데이트하는 방법은 "Gupta"에 의해 제안된 네 번째 방법과 동일하다.As a result of the determination in step 201, if the length of the prefix is smaller than 16 bits, the update is simply performed using the "P" flag, the "U" flag, and the "S" flag in the initial 16-bit array (202). . The method of updating this 16-bit array table is the same as the fourth method proposed by "Gupta".

한편, 상기 과정(201)에서 판단 결과, 해당 엔트리의 프리픽스(Prefix)의 길이가 16비트보다 긴 경우에는 해당 엔트리의 다중 경로 트리에서 업데이트를 수행해야 하므로 해당 엔트리의 "I" 플래그가 설정되어 있는지를 판단한다(203).On the other hand, as a result of the determination in step 201, if the length of the prefix of the entry is longer than 16 bits, it is necessary to update in the multi-path tree of the entry, so is the "I" flag of the entry set? Determine (203).

상기 과정(203)에서 판단 결과, 해당 엔트리의 "I" 플래그가 설정되어 있을 않을 경우 즉, 노드 포인터가 널(Null)인 경우에는 키 삭제 여부를 판단하여(204), 키 삭제가 아니면 새로운 루트 노드를 만들고 새로운 키 값을 삽입하고 업데이트를 종료하고(205), 키 삭제인 경우에는 해당키가 없는 경우이므로 에러를 반환한다(206).As a result of the determination in step 203, if the "I" flag of the entry is not set, that is, if the node pointer is null, it is determined whether to delete the key (204). The node is created, a new key value is inserted and the update is terminated (205). If the key is deleted, an error is returned (206) because the corresponding key does not exist.

한편, 과정(203)에서 판단 결과, 해당 엔트리의 "I" 플래그가 설정되어 있으면(노드 포인터가 루트 노드를 지시하는 경우) 해당 엔트리의 루트 노드로 이동하여 키 검색을 통하여 해당 키 값이 존재하는지 여부를 판단한다(207,208).On the other hand, if it is determined in step 203 that the "I" flag of the corresponding entry is set (when the node pointer indicates the root node), it moves to the root node of the entry and checks whether the corresponding key value exists through key search. It is determined whether or not (207, 208).

상기 과정(208)에서 판단 결과, 키 값이 존재하지 않을 경우에는 키 삭제 여부를 판단하고(209), 키 삭제일 경우에는 키가 존재하지 않는 경우이므로 에러를반환한다(210). 한편, 키 삭제가 아닐 경우에는 새로운 키의 쌍을 삽입하고(211), 입력된 IP 경로보다 더 큰 범위의 IP 프리픽스(Prefix)의 포트 번호를 찾고(212), 해당하는 IP 경로 범위 내에서 트리의 업데이트를 수행하는 과정(214)으로 진행한다.As a result of the determination in step 208, if the key value does not exist, it is determined whether the key is deleted (209). If the key is deleted, the key is not present, and an error is returned (210). On the other hand, if the key is not deleted, a new pair of keys is inserted (211), a port number of an IP prefix of a range larger than the input IP route is found (212), and a tree within the corresponding IP route range is found. Proceeds to the process of performing an update of (214).

한편, 상기 과정(208)에서 판단 결과, 키 값이 존재할 경우에는 업데이트가 수정(Modify)인지 여부를 판단한다(213). 즉, 상기 과정(213)은 키 값이 존재하면 업데이트 방법이 수정이나 삭제인 경우에 해당하므로 이를 순서적으로 판단하는 것으로, 수정인 경우에는 검색한 키 값에서부터 해당하는 키 쌍이 발견될때까지 트리 업데이트를 수행하고(214), 키 삭제인지 여부를 판단한다(215).As a result of the determination in step 208, if there is a key value, it is determined whether the update is Modify (213). That is, the process 213 determines if the update method is a modification or deletion if a key value exists, and determines the order sequentially. In the case of modification, the tree is updated from the searched key value until the corresponding key pair is found. In step 214, it is determined whether the key is deleted (215).

이때, 과정(215)에서 판단한 결과, 키 삭제인 경우에는 키 쌍을 트리에서 삭제한 후에 종료하고(216), 키 삭제가 아닌 경우에는 본 루프를 바로 종료한다.In this case, as a result of the determination in step 215, if the key is deleted, the key pair is deleted from the tree, and then terminated (216). If the key is not deleted, the loop ends immediately.

한편, 상기 과정(213)에서 판단 결과, 업데이트가 수정이 아닐 경우에는 즉, 삭제인 경우에는 더 큰 범위의 IP 프리픽스(Prefix)의 포트를 찾고(212), 해당하는 키 쌍까지 트리 업데이트를 수행하는 과정(214)으로 진행하여 루프를 진행한다.On the other hand, if it is determined in step 213 that the update is not a fix, that is, if it is a delete, the port of a larger range of IP prefixes is found (212), and the tree is updated to the corresponding key pair. The process proceeds to step 214 and loops.

상술한 바와 같은 본 발명의 방법은 프로그램으로 구현되어 컴퓨터로 읽을 수 있는 기록매체(시디롬, 램, 롬, 플로피 디스크, 하드디스크, 광자기디스크 등)에 저장될 수 있다.The method of the present invention as described above may be implemented as a program and stored in a computer-readable recording medium (CD-ROM, RAM, ROM, floppy disk, hard disk, magneto-optical disk, etc.).

이상에서 설명한 본 발명은 진술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하다는 것이 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.The present invention described above is not limited to the stated embodiments and the accompanying drawings, and various substitutions, modifications, and changes are possible in the art without departing from the technical spirit of the present invention. It will be clear to those of ordinary knowledge.

상기와 같은 본 발명은, 초기의 16비트 어레이와 다중 경로 트리를 결합함으로써 IP의 16비트 세그멘트마다 다중 경로 트리가 생성되므로 트리의 레벨을 감소시킬 수 있을 뿐만 아니라, 다중 경로 트리의 한 노드에서 사용하는 포인터의 수를 한 개만 사용하도록 함으로써 키의 개수를 증가시켜 트리의 레벨을 좀 더 감소시켜 검색을 고속화하여 포워딩 엔진의 속도를 높일 수 있는 효과가 있다.In the present invention as described above, since the multi-path tree is generated for each 16-bit segment of the IP by combining the initial 16-bit array and the multi-path tree, the level of the tree can be reduced and used in one node of the multi-path tree. By using only one number of pointers, the number of keys can be increased to further reduce the level of the tree, thereby speeding up the search and speeding up the forwarding engine.

또한, 본 발명은, 노드에서 한 개의 포인터 사용으로 인하여 하위 노드가 연속된 메모리 위치에 저장되므로 다중 경로 트리의 업데이트 시에 동일한 레벨의 노드간의 이동이 용이한 이점을 활용한 업데이트 방식으로, 트리 내에서 업데이트가 가능하여 업데이트의 속도를 향상시킬 수 있는 효과가 있다.In addition, the present invention is an update method utilizing the advantage that it is easy to move between nodes of the same level when updating a multi-path tree because the lower node is stored in a contiguous memory location due to the use of one pointer in the node. Updates can be made at, which will speed up the update.

Claims (13)

다중 탐색 트리의 노드 구조를 이용한 트리 검색 시스템에 적용되는 트리 검색 방법에 있어서,In a tree search method applied to a tree search system using a node structure of a multiple search tree, 목적지 IP 주소의 상위 비트 세그먼트를 이용하여 초기의 비트 어레이를 검색하여 노드 포인터가 지시하는 루트 노드로 이동하여 상기 목적지 IP 주소의 하위 비트 오프셋으로 다중 경로를 검색하여 리프 노드가 도달하기 전에 완전 정합(Exact Matching)이 되는지를 판단하는 제 1 단계;Search the initial bit array using the upper bit segment of the destination IP address, go to the root node indicated by the node pointer, and search for multiple paths with the lower bit offset of the destination IP address, so that a full match (before the leaf node arrives) A first step of determining whether or not Exact Matching is performed; 상기 제 1 단계의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 될 경우에는 해당 포트를 반환하고 룩업을 종료하는 제 2 단계; 및A second step of returning the corresponding port and ending the lookup if the match is complete before the leaf node arrives as a result of the determination of the first step; And 상기 제 1 단계의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 되지 않을 경우에는 검색이 도달한 노드에 따라 키의 영역 포트를 레지스터에 반환 또는 저장하는 제 3 단계A third step of returning or storing the area port of the key in a register according to the node that the search has reached if the result of the determination of the first step is not complete match before the leaf node arrives; 를 포함하는 다중 탐색 트리의 노드 구조를 이용한 트리 검색 방법.Tree search method using the node structure of the multiple search tree comprising a. 제 1 항에 있어서,The method of claim 1, 상기 목적지 IP 주소의 상위 비트 세그먼트를 이용하여 초기의 비트 어레이를 검색하여 노드 포인터가 존재하지 않을 경우에 해당 포트를 레지스터에 반환하고 룩업을 종료하는 제 4 단계A fourth step of retrieving the initial bit array using the upper bit segment of the destination IP address and returning the corresponding port to a register when the node pointer does not exist and ending the lookup 를 더 포함하는 다중 탐색 트리의 노드 구조를 이용한 트리 검색 방법.Tree search method using the node structure of the multiple search tree further comprising. 제 2 항에 있어서,The method of claim 2, 상기 3 단계는,The third step, 검색의 도달이 가지 노드인지 리프 노드인지를 판단하는 제 5 단계;A fifth step of determining whether the arrival of the search is a branch node or a leaf node; 상기 제 5 단계의 판단 결과, 검색의 도달이 리프 노드일 경우에는 해당하는 키의 영역 포트를 반환하고, 키가 존재하지 않으면 레지스터에 저장된 포트 영역을 반환하는 제 6 단계; 및A sixth step of returning an area port of a corresponding key if the search arrives as a leaf node, and a port area stored in a register if the key does not exist; And 상기 제 5 단계의 판단 결과, 검색의 도달이 가지 노드일 경우에는 가지 노드를 통과할때마다 통과하는 키의 영역 포트 값을 레지스터에 저장하고 다음 노드로 이동하여 다중 경로를 검색하는 제 7 단계As a result of the determination of the fifth step, when the search reaches the branch node, the seventh step of storing the region port value of the key passing through the branch node in a register and moving to the next node to search for the multi-path 를 포함하는 다중 탐색 트리의 노드 구조를 이용한 트리 검색 방법.Tree search method using the node structure of the multiple search tree comprising a. 제 1 항 내지 제 3 항 중 어느 한 항에 있어서,The method according to any one of claims 1 to 3, 상기 다중 탐색 트리의 노드 구조는,The node structure of the multiple search tree is 다음 노드의 주소를 알려주기 위한 한 개의 노드 포인터(Po)와, 키의 개수에 대한 정보를 표시하기 위한 넘(num), 루트 노드에서 사용되는 루트 포트(Root Port), 다수 개의 키 및 다수 개의 영역 포트를 포함하는 다중 탐색 트리의 노드구조를 이용한 트리 검색 방법.One node pointer (Po) to tell the address of the next node, a num to display information about the number of keys, a root port used at the root node, a number of keys and a number of Tree search method using node structure of multiple search tree including area ports. 제 4 항에 있어서,The method of claim 4, wherein 상기 노드 포인터는 하위 노드의 주소를 표시하고, 리프 노드일 경우에는 널(Null)을 나타내며,The node pointer indicates the address of the lower node and, in the case of a leaf node, null. 상기 루프 포트는 비트 어레이의 엔트리에 해당하는 포트 번호를 표시하는 것을 특징으로 하는 다중 탐색 트리의 노드 구조를 이용한 트리 검색 방법.And the loop port indicates a port number corresponding to an entry of a bit array. 제 4 항에 있어서,The method of claim 4, wherein 상기 키는,The key is 검색을 요청한 IP 하위 오프셋과 노드내의 키 값과, 상기 키 값과 동일한 값의 완전 정합(Exact Matching)인 경우에 사용되는 포트와, 상기 키 값과 가장 근접하게 큰 키 값의 최대 유효 정합(Longest Prefix Marching)인 경우에 사용되는 영역포트와, 키의 프리픽스 길이에 따라 설정되는 플래그, 및 해당 엔트리의 IP 주소 범위에서 시작점인지 아니면 종료점인지를 나타내는 플래그를 포함하는 것을 특징으로 하는 다중 탐색 트리의 노드 구조를 이용한 트리 검색 방법.The maximum effective match of the IP sub-offset that requested the search, the key value in the node, the port used in case of exact matching of the same value as the key value, and the key value closest to the key value. Prefix Marching), a node of a multiple search tree comprising a region port used in the case of a prefix, a flag set according to a prefix length of a key, and a flag indicating whether the entry point or the end point is included in the IP address range of the corresponding entry. Tree search method using structure. 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 시스템에 적용되는 트리 업데이트 방법에 있어서,In a tree update method applied to a tree update system using a node structure of a multiple search tree, 해당 엔트리의 프리픽스 길이에 따라 초기의 어레이에서 업데이트를 수행하거나, 노드 포인터가 루트 노드를 지시하는지를 판단하는 제 1 단계;A first step of performing an update on an initial array or determining whether a node pointer indicates a root node according to the prefix length of the entry; 상기 제 1 단계의 판단 결과, 노드 포인터가 루트 노드를 지시하지 않는 경우에 삭제가 아님을 확인한 후에 새로운 루트 노드를 생성하여 그 생성된 루트 노드에 새로운 키 값을 삽입하는 제 2 단계;A second step of creating a new root node and inserting a new key value into the generated root node after confirming that the node pointer does not indicate the root node as a result of the determination of the first step; 상기 제 1 단계의 판단 결과, 노드 포인터가 루트 노드를 지시할 경우에는 해당 엔트리의 루트 노드로 이동하여 해당 키 값이 존재하는지를 판단하는 제 3 단계;A third step of determining whether a corresponding key value exists by moving to a root node of a corresponding entry when the node pointer indicates a root node as a result of the determination of the first step; 상기 제 3 단계의 판단 결과, 키 값이 존재하지 않으면 삭제가 아님을 확인한 후에 새로운 키의 쌍을 삽입하고 입력된 IP 경로보다 더 큰 범위의 IP 프리픽스의 포트 번호를 검색하여 해당하는 IP 경로 범위 내에서 트리의 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 4 단계; 및As a result of the determination of the third step, after confirming that the key value does not exist, the new key pair is inserted, and a port number of an IP prefix of a range larger than the input IP path is searched and found within the corresponding IP path range. Deleting a key pair from the tree after performing the update of the tree at; And 상기 제 3 단계의 판단 결과, 키 값이 존재하면 업데이트의 수정 및 삭제에 따라 검색한 키 값에서부터 해당하는 키 쌍이 발견될때까지 트리 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 5 단계A fifth step of deleting the key pair from the tree after performing a tree update from a searched key value to a found key pair according to the modification and deletion of the update if the key value exists as a result of the determination in the third step 를 포함하는 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 방법.Tree update method using the node structure of the multiple navigation tree comprising a. 제 7 항에 있어서,The method of claim 7, wherein 상기 5 단계는,The five steps, 해당 키 값이 존재하여 업데이트가 수정일 경우에는 검색한 키 값에서부터 해당하는 키 쌍이 발견될때까지 트리 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 6 단계; 및A sixth step of deleting a key pair from the tree after performing a tree update from the searched key value until a corresponding key pair is found if the update is modified because the corresponding key value exists; And 해당 키 값이 존재하여 업 데이터가 삭제일 경우에는 입력된 IP 경로보다 더 큰 범위의 IP 프리픽스의 포트 번호를 검색하여 해당하는 키 쌍까지 트리 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 7 단계If the up data is deleted because the corresponding key value exists, search for the port number of the IP prefix with a range larger than the entered IP path, perform a tree update to the corresponding key pair, and then delete the key pair from the tree. step 를 포함하는 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 방법.Tree update method using the node structure of the multiple navigation tree comprising a. 제 7 항 또는 제 8 항에 있어서,The method according to claim 7 or 8, 상기 다중 탐색 트리의 노드 구조는,The node structure of the multiple search tree is 다음 노드의 주소를 알려주기 위한 한 개의 노드 포인터(Po)와, 키의 개수에 대한 정보를 표시하기 위한 넘(num), 루트 노드에서 사용되는 루트 포트(Root Port), 다수 개의 키 및 다수 개의 영역 포트를 포함하는 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 방법.One node pointer (Po) to tell the address of the next node, a num to display information about the number of keys, a root port used at the root node, a number of keys and a number of Tree update method using node structure of multiple search trees including area ports. 제 9 항에 있어서,The method of claim 9, 상기 노드 포인터는 하위 노드의 주소를 표시하고, 리프 노드일 경우에는 널(Null)을 나타내며,The node pointer indicates the address of the lower node and, in the case of a leaf node, null. 상기 루프 포트는 비트 어레이의 엔트리에 해당하는 포트 번호를 표시하는 것을 특징으로 하는 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 방법.And the loop port indicates a port number corresponding to an entry of a bit array. 제 9 항에 있어서,The method of claim 9, 상기 키는,The key is 검색을 요청한 IP 하위 오프셋과 노드내의 키 값과, 상기 키 값과 동일한 값의 완전 정합(Exact Matching)인 경우에 사용되는 포트와, 상기 키 값과 가장 근접하게 큰 키 값의 최대 유효 정합(Longest Prefix Marching)인 경우에 사용되는 영역포트와, 키의 프리픽스 길이에 따라 설정되는 플래그, 및 해당 엔트리의 IP 주소 범위에서 시작점인지 아니면 종료점인지를 나타내는 플래그를 포함하는 것을 특징으로 하는 다중 탐색 트리의 노드 구조를 이용한 트리 업데이트 방법.The maximum effective match of the IP sub-offset that requested the search, the key value in the node, the port used in case of exact matching of the same value as the key value, and the key value closest to the key value. Prefix Marching), a node of a multiple search tree comprising a region port used in the case of a prefix, a flag set according to a prefix length of a key, and a flag indicating whether the entry point or the end point is included in the IP address range of the corresponding entry. Tree update method using structure. 다중 탐색 트리를 검색하기 위하여, 프로세서를 구비한 다중 탐색 트리 검색 시스템에,In order to search multiple search trees, in a multiple search tree search system with a processor, 목적지 IP 주소의 상위 비트 세그먼트를 이용하여 초기의 비트 어레이를 검색하여 노드 포인터가 지시하는 루트 노드로 이동하여 상기 목적지 IP 주소의 하위비트 오프셋으로 다중 경로를 검색하여 리프 노드가 도달하기 전에 완전 정합(Exact Matching)이 되는지를 판단하는 제 1 기능;Search the initial bit array using the upper bit segment of the destination IP address, go to the root node indicated by the node pointer, and search for multiple paths with the lower bit offset of the destination IP address, so that a full match is made before the leaf node arrives. A first function of determining whether or not Exact Matching); 상기 제 1 기능에서의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 될 경우에는 해당 포트를 반환하고 룩업을 종료하는 제 2 기능; 및A second function of returning a corresponding port and ending the lookup if a match is complete before the leaf node arrives as a result of the determination in the first function; And 상기 제 1 기능에서의 판단 결과, 리프 노드가 도달하기 전에 완전 정합이 되지 않을 경우에는 검색이 도달한 노드에 따라 키의 영역 포트를 레지스터에 반환 또는 저장하는 제 3 기능A third function of returning or storing the area port of the key in a register according to the node at which the search arrives, when the result of the determination in the first function is that a complete match is not achieved before the leaf node arrives. 을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for realizing this. 다중 탐색 트리를 업데이트하기 위하여, 프로세서를 구비한 다중 탐색 트리 업데이트 시스템에,In order to update multiple search trees, in a multiple search tree update system having a processor, 해당 엔트리의 프리픽스 길이에 따라 초기의 어레이에서 업데이트를 수행하거나, 노드 포인터가 루트 노드를 지시하는지를 판단하는 제 1 기능;A first function of performing an update on an initial array or determining whether a node pointer points to a root node according to the prefix length of the entry; 상기 제 1 기능에서의 판단 결과, 노드 포인터가 루트 노드를 지시하지 않는 경우에 삭제가 아님을 확인한 후에 새로운 루트 노드를 생성하여 그 생성된 루트 노드에 새로운 키 값을 삽입하는 제 2 기능;A second function of creating a new root node and inserting a new key value into the generated root node after confirming that the node pointer does not indicate the root node as a result of the determination in the first function; 상기 제 1 기능에서의 판단 결과, 노드 포인터가 루트 노드를 지시할 경우에는 해당 엔트리의 루트 노드로 이동하여 해당 키 값이 존재하는지를 판단하는 제 3 기능;A third function of determining whether a corresponding key value exists by moving to a root node of a corresponding entry when a node pointer indicates a root node as a result of the determination in the first function; 상기 제 3 기능에서의 판단 결과, 키 값이 존재하지 않으면 삭제가 아님을 확인한 후에 새로운 키의 쌍을 삽입하고 입력된 IP 경로보다 더 큰 범위의 IP 프리픽스의 포트 번호를 검색하여 해당하는 IP 경로 범위 내에서 트리의 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 4 기능; 및As a result of the determination in the third function, after confirming that the key value does not exist, the new key pair is inserted and the port number of the IP prefix of a range larger than the input IP path is searched to confirm that the key value is not deleted. A fourth function of deleting a key pair from the tree after performing an update of the tree within the tree; And 상기 제 3 기능에서의 판단 결과, 키 값이 존재하면 업데이트의 수정 및 삭제에 따라 검색한 키 값에서부터 해당하는 키 쌍이 발견될때까지 트리 업데이트를 수행한 후에 키 쌍을 트리에서 삭제하는 제 5 기능A fifth function of deleting a key pair from the tree after performing a tree update from a searched key value until a corresponding key pair is found according to the modification and deletion of the update as a result of the determination in the third function; 을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for realizing this.
KR10-2001-0044274A 2001-07-23 2001-07-23 Method for searching and updating using node structure of multiway search tree KR100421414B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2001-0044274A KR100421414B1 (en) 2001-07-23 2001-07-23 Method for searching and updating using node structure of multiway search tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2001-0044274A KR100421414B1 (en) 2001-07-23 2001-07-23 Method for searching and updating using node structure of multiway search tree

Publications (2)

Publication Number Publication Date
KR20030009707A KR20030009707A (en) 2003-02-05
KR100421414B1 true KR100421414B1 (en) 2004-03-09

Family

ID=27716235

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0044274A KR100421414B1 (en) 2001-07-23 2001-07-23 Method for searching and updating using node structure of multiway search tree

Country Status (1)

Country Link
KR (1) KR100421414B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5430869A (en) * 1991-05-29 1995-07-04 Hewlett-Packard Company System and method for restructuring a B-Tree
US6192051B1 (en) * 1999-02-26 2001-02-20 Redstone Communications, Inc. Network router search engine using compressed tree forwarding table
JP2001313639A (en) * 2000-04-27 2001-11-09 Nec Corp System and method for managing network configuration data and recording medium
KR20020006464A (en) * 2000-07-12 2002-01-19 가네꼬 히사시 Route retrieving system, method therefor and a router device to be used in the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5430869A (en) * 1991-05-29 1995-07-04 Hewlett-Packard Company System and method for restructuring a B-Tree
US6192051B1 (en) * 1999-02-26 2001-02-20 Redstone Communications, Inc. Network router search engine using compressed tree forwarding table
JP2001313639A (en) * 2000-04-27 2001-11-09 Nec Corp System and method for managing network configuration data and recording medium
KR20020006464A (en) * 2000-07-12 2002-01-19 가네꼬 히사시 Route retrieving system, method therefor and a router device to be used in the same

Also Published As

Publication number Publication date
KR20030009707A (en) 2003-02-05

Similar Documents

Publication Publication Date Title
US6768739B1 (en) Router with a cache having a high hit probability
US6553002B1 (en) Apparatus and method for routing data packets through a communications network
US5909440A (en) High speed variable length best match look-up in a switching device
US6665297B1 (en) Network routing table
JP3453148B2 (en) Fast Variable Length Best Match Lookup in Switching Devices
US7111071B1 (en) Longest prefix match for IP routers
US7571156B1 (en) Network device, storage medium and methods for incrementally updating a forwarding database
US6993031B2 (en) Cache table management device for router and program recording medium thereof
US7099324B2 (en) System and method for processing packets
KR100488414B1 (en) Node Structuring Method for multiway search tree, and Searching Method by using it
US6618760B1 (en) Forwarding information retrieval technique
US20080192754A1 (en) Routing system and method for managing rule entries of ternary content addressable memory in the same
US20070171911A1 (en) Routing system and method for managing rule entry thereof
US6691171B1 (en) Method and system for address lookup in data communication
US7233579B1 (en) Routing table for forwarding Internet Protocol (IP) packets through a communications network
US7493412B2 (en) Method for processing a data packet
US6925503B2 (en) Method and system for performing a longest prefix match search
US20040105442A1 (en) Internet protocol address lookup system and method using three-layer table architecture
US20170012874A1 (en) Software router and methods for looking up routing table and for updating routing entry of the software router
JP4646823B2 (en) Router device and route determination method in router device
KR100421414B1 (en) Method for searching and updating using node structure of multiway search tree
KR20050066903A (en) Packet forwarding apparatus and method for address lookup algorithm with three routing step tables in high speed router system
US20040264479A1 (en) Method for generating a trie having a reduced number of trie blocks
JP4048861B2 (en) Address search device
Liu et al. Longest prefix matching with pruning

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20091228

Year of fee payment: 8

LAPS Lapse due to unpaid annual fee