KR20050043035A - Method and hardware architecture for searching ip address by using multiple hashing function - Google Patents

Method and hardware architecture for searching ip address by using multiple hashing function Download PDF

Info

Publication number
KR20050043035A
KR20050043035A KR1020030077774A KR20030077774A KR20050043035A KR 20050043035 A KR20050043035 A KR 20050043035A KR 1020030077774 A KR1020030077774 A KR 1020030077774A KR 20030077774 A KR20030077774 A KR 20030077774A KR 20050043035 A KR20050043035 A KR 20050043035A
Authority
KR
South Korea
Prior art keywords
prefix
address
hash
hashing
length
Prior art date
Application number
KR1020030077774A
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 KR1020030077774A priority Critical patent/KR20050043035A/en
Priority to US10/853,185 priority patent/US7418505B2/en
Publication of KR20050043035A publication Critical patent/KR20050043035A/en

Links

Classifications

    • G06F17/30

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

본 발명은 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법 및 하드웨어 구조에 관한 것이다.The present invention relates to an IP address retrieval method and a hardware structure using a plurality of hash functions.

본 발명은 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법에 있어서, (a) 입력된 어드레스를 프리픽스 길이별로 각각 적어도 한 번 이상 해슁하는 단계; (b) 전달 테이블(Forwarding Table)의 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하는 단계; (c) 오버플로우 테이블(Overflow Table)에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하는 단계; (d) 상기 (b) 단계 및 상기 (c) 단계의 비교 결과, 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스가 일치하면, 일치된 엔트리의 정보를 전송하는 단계; 및 (e) 상기 (d) 단계에서 전송받은 상기 정보를 이용하여 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 상기 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 단계를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법 및 하드웨어 구조에 관한 것이다.The present invention relates to an IP address retrieval method using a plurality of hashing functions, comprising: (a) hashing an input address at least once for each prefix length; (b) comparing the prefix stored at the point indicated by the result of the hashing of the forwarding table with the prefix of the address; (c) comparing the prefix stored in an overflow table with the prefix of the address; (d) if the prefix stored in the point indicated by the result of the hashing matches the prefix of the address as a result of the comparison between the steps (b) and (c), transmitting information of the matched entry; And (e) searching for an entry having the longest bit number of the prefix among the entries searched for each prefix length of the address by using the information transmitted in the step (d). The present invention relates to an IP address retrieval method and hardware structure using a hashing function.

본 발명에 의하면, 프리픽스들을 프리픽스 길이에 따라 분류하고 각각 별도의 테이블을 구성하게 함으로써 모든 프리픽스에 대해 길이별로 병렬 검색을 가능하게 하였다. 이를 통하여 IP 어드레스에 해슁을 적용할 수 있도록 하였으며, 검색 시간을 줄일 수 있게 한다는 장점이 있다.According to the present invention, the prefixes are classified according to the prefix lengths, and a separate table is configured to enable parallel retrieval by length for all prefixes. Through this, hashing can be applied to the IP address, and the search time can be reduced.

Description

복수의 해슁 함수를 이용한 IP 어드레스 검색 방법 및 하드웨어 구조{Method and Hardware Architecture for Searching IP Address by Using Multiple Hashing Function}IP address search method and hardware structure using multiple hash functions {Method and Hardware Architecture for Searching IP Address by Using Multiple Hashing Function}

본 발명은 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법 및 하드웨어 구조에 관한 것이다. 더욱 상세하게는, IP 어드레스의 프리픽스들을 길이별로 분류하여 각 길이마다 복수의 테이블을 구성하고 각 테이블에 대해서는 해슁 함수를 이용한 다중 해슁을 병렬적으로 적용하여 어드레스 검색을 수행한 후, 각 테이블에서 일치되어 나온 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 방식으로 IP 어드레스를 검색하는 방법 및 이를 위한 하드웨어 구조에 관한 것이다.The present invention relates to an IP address retrieval method and a hardware structure using a plurality of hash functions. More specifically, the prefixes of IP addresses are classified by length to form a plurality of tables for each length, and for each table, an address search is performed by applying multiple hashes using a hash function in parallel, and then matching each table. The present invention relates to a method for retrieving an IP address by searching for an entry having the longest number of bits among prefixes, and a hardware structure therefor.

세계 전역에서 광범위하게 사용되고 있는 인터넷 라우터에서 실시간으로 수행되어야 하는 주요 기능 중 하나는 수신한 패킷을 그의 최종 목적지를 향하여 전달(Forwarding)하는 것이다. 이를 위하여 모든 라우터는 전달 테이블(Forwarding Table)을 가지며, 이 전달 테이블로부터 목적지 어드레스(Destination Address)로 액세스(Access)하기 위한 출력 포트(Output Port)와 다음 홉 주소(Hop Address)들에 대한 정보들을 얻어낸다. 패킷이 수신되면 라우터는 수신된 패킷의 목적지 어드레스의 네트워크 파트(Network Part)를 키(Key)로 사용하여 전달 테이블을 참조하는 일을 수행하는데, 이를 어드레스 검색이라고 하고 이 때 사용되는 네트워크 파트를 프리픽스(Prefix)라고 한다.One of the main functions that must be performed in real time on Internet routers, which are widely used throughout the world, is to forward received packets to their final destination. To this end, all routers have a forwarding table, and information about output ports and next hop addresses for accessing a destination address from this forwarding table is provided. Get it. When a packet is received, the router uses the network part of the destination address of the received packet as a key to refer to the forwarding table, which is called address lookup, and the network part used at this time is prefixed. It is called (Prefix).

종래의 클래스를 갖는 어드레싱 방식(Classful Addressing Scheme)에서는 IP 어드레스의 프리픽스를 8 Bit, 16 Bit 또는 24 Bit으로 고정시켜서 사용하였다. 클래스를 갖는 어드레스 방식에서는 프리픽스가 고정되어 있으므로 IP 어드레스가 낭비되며, 네트워크의 종류가 증가함에 따라 라우터의 전달 테이블 크기가 기하급수적으로 증가해야 한다는 등의 문제점이 있다. In the conventional addressing scheme (Classful Addressing Scheme), the prefix of the IP address is fixed to 8 Bit, 16 Bit or 24 Bit. In the addressing method having a class, IP addresses are wasted because the prefix is fixed, and the size of the forwarding table of the router must increase exponentially as the type of network increases.

이러한 문제점을 해결하기 위하여 클래스를 갖지 않는 어드레싱 방식(CIDR: Classless Interdomain Routing)이 고안되었는데 CIDR 방식에서는 프리픽스의 길이를 고정시켜 놓지 않으므로, IP 어드레스의 낭비를 막을 수 있는 한편, 어드레스 결합(Aggregation)을 가능하게 하여 라우터에서 전달 테이블의 크기가 빠르게 증가하는 것을 방지할 수 있다는 장점이 있다. 그러나 CIDR 방식의 단점은 라우터에서 롱기스트 프리픽스 매칭(Longest Prefix Matching)을 수행하여야 한다는 것이다. 입력된 패킷은 자신의 최종 네트워크의 프리픽스 길이에 대한 정보를 포함하고 있지 않으므로, 전달 테이블에 나와 있는 프리픽스들 중에서 입력된 패킷의 어드레스와 가장 길게 일치하는 엔트리를 찾아야 한다. 다시 말하면, 그 동안 완전 매칭(Exact Matching)을 위해 사용되어 오던 여러 가지 어드레스 검색 방식들이 롱기스트 프리픽스 매칭 방식에는 더 이상 적용되기 어렵게 되었고, 이는 라우터에서의 병목점으로 작용하고 있다. In order to solve this problem, Classless Interdomain Routing (CIDR) has been devised. In the CIDR method, the prefix length is not fixed. Therefore, waste of IP addresses can be prevented and address aggregation is prevented. This has the advantage that the size of the forwarding table can be prevented from increasing rapidly at the router. However, a disadvantage of the CIDR scheme is that the longest prefix matching must be performed at the router. Since the input packet does not contain information about the prefix length of its final network, it is necessary to find an entry among the prefixes in the forwarding table that matches the address of the input packet the longest. In other words, various address search schemes, which have been used for exact matching, are no longer applicable to the long-gate prefix matching scheme, which is a bottleneck in the router.

주소 검색 구조의 성능을 평가하는 여러 가지 기준 중에서 첫 번째로 고려될 수 있는 것이 메모리 검색 횟수이다. 이는 링크 속도가 증가함에 따라 빠른 주소 검색에의 요구 또한 높아지기 때문에 주소 검색 속도의 가장 큰 오버헤드로 작용하는 메모리 검색 횟수를 줄이는 것이 중요하게 고려되는 것이다. 두 번째로는 메모리의 크기를 들 수 있다. 백본 라우터의 경우, 라우터에 연결된 네트워크의 수가 기하급수적으로 증가함에 따라 전달 테이블에 저장되어야 하는 엔트리의 수 또한 빠르게 증가하게 되었는데, 이들 엔트리를 메모리에 효율적으로 저장할 수 있어야 어드레스 검색이 원활하게 진행되므로 요구되는 메모리의 크기가 어드레스 검색 구조의 중요한 요소로 작용하고 있다. 이 외에도 전달 테이블에 새로운 프리픽스를 추가하거나, 쓰이지 않는 프리픽스를 제거하기 위한 테이블 갱신의 용이성, 128 Bit 주소를 갖는 IPv6 로의 확장성 등이 성능 평가의 기준이 된다. The first number of criteria for evaluating the performance of an address lookup structure is the number of memory lookups. It is important to reduce the number of memory lookups, which is the biggest overhead of the address lookup speed, because the demand for fast address lookup also increases as the link speed increases. Second is the size of the memory. In the case of a backbone router, as the number of networks connected to the router increases exponentially, the number of entries that must be stored in the forwarding table also increases rapidly. The size of the memory is an important element of the address search structure. In addition, performance evaluation is based on the ability to add new prefixes to the forwarding table, ease of table updates to remove unused prefixes, and scalability to IPv6 with 128-bit addresses.

최근 수년간 인터넷 라우터를 위해 다양한 주소 검색 방법들이 연구되어 왔다. 종래의 여러 가지 주소 검색 방법들을 분류하여 보면 다음과 같다.In recent years, various address lookup methods have been studied for Internet routers. Various conventional address search methods are classified as follows.

어드레스 검색을 위한 방식으로, 내용 주소화 메모리(CAM : Content Addressable Memory)를 사용하는 방식이 있다. 이 방식은 현재 실제 교환기나 라우터의 구현에 많이 사용되고 있는 기술로서, 입력된 주소와 내용 주소화 메모리에 저장된 모든 프리픽스들을 동시에 직접 비교하여 매우 빠른 어드레스 검색을 가능하게 하나, 내용 주소화 메모리 관련 기술이 라우터에서 사용하는 프리픽스 수의 증가만큼 빠르게 발전하고 있지 못하다는 문제점이 있다. 다시 말하면, 같은 공간 크기를 차지하는 램(RAM)과 비교할 때, 내용 주소화 메모리에 저장할 수 있는 프리픽스의 개수는 매우 적고 내용 주소화 메모리의 값도 비싸며, 수만 개의 프리픽스를 저장하는 내용 주소화 메모리는 구현이 어려우며, 구현한다 하더라도 이를 어드레스 검색을 수행하기 위해 설계된 칩 내부에 내장하기가 어렵다는 문제점이 있다. 따라서 수 만개가 넘는 엔트리를 가지는 백본 라우터의 전달 테이블이나 128 Bit 길이의 주소를 가지는 IPv6 에 내용 주소화 메모리 관련 기술을 적용하는 것은 무리가 있다는 문제점이 있다.As a method for address retrieval, there is a method using a content addressable memory (CAM). This method is widely used in the implementation of a real exchange or a router, and it enables very fast address retrieval by directly comparing all the prefixes stored in the input address and the content addressing memory at the same time. The problem is that it is not developing as fast as the number of prefixes used in routers. In other words, compared to RAM, which occupies the same amount of space, the number of prefixes that can be stored in the content addressing memory is very small, the content addressing memory is expensive, and the content addressing memory that stores tens of thousands of prefixes It is difficult to implement, and even if implemented, it is difficult to embed it inside a chip designed to perform an address lookup. Therefore, there is a problem that the application of the content addressing memory related technology to the forwarding table of a backbone router having tens of thousands of entries or IPv6 having a 128-bit address is unreasonable.

어드레스 검색을 위한 또다른 방식으로, 트라이(Trie) 구조에 기초한 검색 방식이 있다. 트라이는 트리(Tree)에 기초한 데이터 구조로서, 프리픽스들 간의 관계를 알기 쉽게 표현한 가장 대표적인 데이터 구조라 할 수 있다. 트라이 구조에서, 모든 프리픽스는 트라이에서의 하나의 노드에 위치하고 루트 노드로부터 출발하는 패스(Path)로 정의된다. 라우터가 갖는 수만 개의 프리픽스들은 주로 트라이로 표현되므로 트라이 구조를 효율적으로 메모리에 저장하는 방식 및 이에 따르는 다양한 IP 어드레스 검색 방식들이 연구되어져 왔다. 트라이에 기초한 방식은 프리픽스에 해당되지 않는 내부 노드(Internal Node)들을 저장하는 데서 오는 메모리의 낭비 문제점 및 W 를 트라이의 높이라 할 때 W 번의 메모리 검색을 수행하여야 하는 문제점이 있다. 또한 새로운 프리픽스를 추가하거나, 사용되지 않는 프리픽스를 제거하기 위해 수행되어야 하는 업데이트 등이 용이하지 않은 문제점이 있다. Another approach for address retrieval is a search scheme based on a Trie structure. A tree is a tree-based data structure, which is the most representative data structure in which relationships between prefixes are easily expressed. In a tri structure, all prefixes are defined as paths located at one node in the tri and starting from the root node. Since tens of thousands of prefixes of routers are mainly represented by a tri, a scheme of efficiently storing a tri structure in memory and various IP address retrieval methods have been studied. The tri-based scheme has a problem of wasting memory that comes from storing internal nodes that do not correspond to a prefix, and having to perform W memory searches when W is the height of the tri. In addition, there is a problem in that it is not easy to add a new prefix or update to be performed to remove an unused prefix.

제안되는 트라이 구조 중에서는 프리픽스 확장(Expansion)을 이용하여 메모리 검색 횟수를 줄이는 검색 방식들이 제안되고 있는데, 이는 D 개의 프리픽스 길이의 집합들을 L 개의 프리픽스 길이의 집합(D>L)으로 하여, 일부 프리픽스 길이를 확장함으로써 프리픽스 길이의 집합의 수를 줄이는 방식이다. 또한, 프리픽스의 길이가 24보다 짧은 모든 프리픽스들을 24로 확장하여 224 개의 엔트리를 가지는 메모리에서 첫 번째 검색을 진행하는 방식이 제안되고 있다. 들어온 주소가 24보다 긴 프리픽스를 가지는 경우에는 24보다 긴 나머지 프리픽스를 저장한 내용 주소화 메모리(CAM)로 이동하여 검색을 수행한다. 이 방식은 최대 메모리 검색 횟수가 2번이라는 장점이 있지만 224 개의 엔트리를 저장하기 위해서 33 Mbytes 라는 큰 메모리를 사용해야 한다는 문제점이 있다.Among the proposed tri-structures, a search scheme that reduces the number of memory searches by using an prefix extension has been proposed. Some prefixes have D prefix length sets as L prefix length sets (D> L). Extending the length reduces the number of sets of prefix lengths. In addition, a method of performing a first search in a memory having 2 24 entries by extending all prefixes having a length less than 24 to 24 has been proposed. If the incoming address has a prefix longer than 24, it moves to a content addressing memory (CAM) that stores the remaining prefix longer than 24 and performs a search. This method has the advantage that the maximum number of memory retrieval times is two, but there is a problem that a large memory of 33 Mbytes must be used to store 2 24 entries.

한편, 프리픽스의 길이가 16보다 작은 것을 16으로 확장하여 216 개의 엔트리를 가지는 메모리로 전달 테이블을 구성하고 들어온 주소의 프리픽스가 16보다 긴 경우에는 보조 트리를 따라서 16보다 긴 프리픽스를 찾아 검색을 수행하는 방식도 제안되고 있다. 이러한 검색 방식은 전술한 방식보다 작은 메모리를 사용해도 된다는 장점은 있으나, 사전 연산량이 많아지고 업데이트가 어렵다는 문제점이 있다.On the other hand, if the length of the prefix is less than 16, expands it to 16 and configures a forwarding table with 2 16 entries in memory, and if the prefix of the incoming address is longer than 16, search for prefix longer than 16 along the auxiliary tree. A way of doing this is also proposed. This search method has the advantage of using a smaller memory than the above-described method, but there is a problem that the amount of pre-computation and update is difficult.

어드레스 검색을 위한 또다른 방식으로, 같은 길이를 갖는 프리픽스들끼리의 해슁(Hashing)을 사용하는 방식이 있다. 해슁은 완전 매칭 방식을 사용하는 레이어(Layer) 2 주소 검색을 위해 널리 사용되어 온 방식이다. 그러나 이진 탐색 결합 해슁 방식은 순수한 이진 탐색(Binary Search)이 적용되지 않는 문제점이 있다. 다시 말하면, 해슁에 의해 검색된 엔트리(Entry)가 프리픽스를 포함하고 있지 않더라도, IP 주소의 롱기스트 프리픽스 매칭의 특성 때문에 더 긴 프리픽스가 존재함을 알려주기 위한 마커(Marker)를 저장하여야 하는데, 이러한 수많은 마커를 미리 계산하고 저장하는 데에는 오버헤드(Overhead)가 따른다는 문제점이 있다. 또한 이진 탐색 결합 해슁 방식은 특정 프리픽스 분포(Prefix Distribution)에 대하여 빠른 시간 내에 완전 해슁(Perfect Hashing) 함수를 찾을 수 있음을 가정하고 있기 때문에 실용적이지 못하다는 문제점이 있다. Another way to look up an address is to use hashing between prefixes of the same length. Hashing has been widely used for Layer 2 address retrieval using a perfect match. However, the binary search combined hashing method has a problem that pure binary search is not applied. In other words, even if the entry retrieved by the hash does not contain a prefix, a marker must be stored to indicate that a longer prefix exists because of the nature of long-term prefix matching of the IP address. There is a problem in that overhead is involved in calculating and storing. In addition, the binary search combined hashing method is not practical because it assumes that a perfect hash function can be found in a short time for a specific prefix distribution.

이러한 문제점을 극복하기 위해, 프리픽스 길이 별로 각각 별도의 해슁 함수를 사용하여 모든 프리픽스 길이에 대하여 병렬 검색을 수행한 후, 매치되어 나온 프리픽스 중 가장 길게 매치된 프리픽스를 찾는 해슁을 이용한 병렬 검색 방식이 제안되었다. 해슁을 이용한 병렬 검색 방식에서는 완전 해슁 함수를 가정하지 않고도, 배타적 논리합(Exclusive OR)으로 구현된 해슁 함수를 사용하여 검색이 가능하고, 해슁에서 일어나는 충돌 현상은 보조 테이블(Sub Table)을 두어 해결한 구조로서 매우 실용적인 구조라고 할 수 있다. 그러나 주 테이블에서 충돌 현상이 발생한 경우 보조 테이블에서 이진 검색을 수행하게 되므로 최대 메모리 접근 횟수가 많다는 문제점이 있다. In order to overcome this problem, a parallel search method using hashing that finds the longest matched prefix among matching prefixes is performed after performing parallel search on all prefix lengths using separate hash functions for each prefix length. It became. In the parallel search method using hashing, it is possible to search using hashing function implemented by Exclusive OR without assuming a perfect hashing function, and collisions occurring in hashing can be solved by using a sub table. It is a very practical structure as a structure. However, when a collision occurs in the primary table, the binary search is performed on the secondary table, which causes a problem that the maximum number of memory accesses is large.

이러한 문제점을 극복하기 위해, 프리픽스 길이 별로 분류된 하나의 테이블에 대하여 이진 탐색을 수행하여 길이 레벨을 찾고, 각 길이 레벨에서의 검색에는 해슁을 적용하는 방식이 제안되었다. 이 방식에서는, W 개의 프리픽스 종류에 대하여 주소 검색을 하는 경우, 최대 log2W번의 메모리 검색이 요구된다. 이 방식은 선처리 계산이 많고, 테이블 갱신이 어려우며 완전 해슁 함수를 찾아내는 데에 상당한 시간이 소요되므로 프리픽스 정보가 자주 변화하지 않는 경우에만 유효한 방법으로 이용될 수 있다는 문제점이 있다.In order to overcome this problem, a method of finding length levels by performing binary search on one table classified by prefix length and applying hashing to each length level search has been proposed. In this system, a maximum of log 2 W memory searches are required when an address search is performed for W prefix types. This method has a problem in that it can be used as a valid method only when the prefix information does not change frequently because there are many preprocessing calculations, tables are difficult to update, and a considerable time is required to find the complete hash function.

완전 해슁 함수를 찾아내는 데에 긴 시간이 걸리는 문제점을 보완하기 위하여 완전 해슁 함수 대신 데이터 분포에 따른 다수의 해슁 함수를 찾아내는 방식이 제안되고 있다. 이 방식은 다수의 해슁 함수를 이용하고 각 해슁 함수마다 테이블을 만드는 방식으로 세미 완전 해슁(Semi Perfect Hashing)을 가능하도록 하는 것이다. In order to solve the problem that it takes a long time to find the complete hash function, a method of finding a number of hash functions according to the data distribution has been proposed instead of the perfect hash function. This approach enables Semi Perfect Hashing by using multiple hash functions and creating a table for each hash function.

도 1은 다수의 해슁 함수를 이용하여 어드레스 검색을 수행하기 위한 테이블 구성 방식을 나타낸 도면이다. 1 is a diagram illustrating a table configuration method for performing an address search using a plurality of hash functions.

도 1에서 볼 수 있듯이, 라우팅 테이블을 만들 때 하나의 프리픽스가 여러 개의 다른 해슁 함수를 통과하게 하고, 함수에서 얻은 해슁의 결과값을 각 테이블의 포인터로 하여 테이블 중 로드(Load)가 적은 쪽의 테이블에 프리픽스를 채우는 것이다. 이 방식을 이용하게 되면, 여러 개의 해슁 함수를 사용함으로써 해슁으로 발생하는 충돌 발생 가능성이 줄어들게 되고, 데이터들이 테이블에 균등하게 분포하게 된다는 장점이 있다. As shown in Fig. 1, when creating a routing table, one prefix is passed through several different hash functions, and the result of the hash obtained from the function is used as a pointer to each table. Fill the table with prefixes. Using this method has the advantage of reducing the possibility of collision caused by hashing by using several hashing functions, and the data are distributed evenly in the table.

도 2는 다수의 해슁 함수를 이용하여 어드레스를 검색하는 방식을 나타낸 도면이다.2 is a diagram illustrating a method of searching for an address using a plurality of hash functions.

도 2에서 볼 수 있듯이, 다수의 해슁 함수를 이용하는 방식에서는 프리픽스 길이별로 이진 탐색을 적용하여 각 프리픽스별 테이블을 검색하고 일치하는 엔트리를 찾아내게 된다. 이처럼, 2 개의 해슁 함수를 사용하게 되면 한 개의 해슁 함수를 사용하였을 때보다 성능이 향상된다는 장점이 있다.As shown in FIG. 2, in the method using a plurality of hash functions, a binary search is applied for each prefix length to search a table for each prefix and find a matching entry. As such, using two hash functions has the advantage that performance is improved compared to using one hash function.

그러나 다수의 해슁 함수를 이용하는 주소 검색은 다수의 해슁 하드웨어를 사용하기 때문에 데이터의 분포에 따라 적합한 해슁 함수를 찾아내야 한다는 문제점이 여전히 존재하게 된다. 또한 테이블 갱신을 위한 삽입 과정에서 해슁의 결과값이 가리키는 테이블의 버킷(Bucket)이 꽉 차 있는 경우 현재의 데이터 분포에 맞는 해슁 함수를 찾아내는 과정을 다시 진행하여야만 한다는 문제점이 있다. However, since address search using multiple hash functions uses multiple hash hardware, there is still a problem of finding a suitable hash function according to the distribution of data. In addition, during the insert process for updating a table, if the bucket of the table indicated by the result of the hash is full, there is a problem that the process of finding a hash function suitable for the current data distribution has to be repeated.

상기한 문제점을 해결하기 위해 본 발명은, 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법 및 하드웨어 구조에 있어서, IP 어드레스의 프리픽스들을 길이별로 분류하여 각 길이마다 복수의 테이블을 구성하고 각 테이블에 대해서는 해슁 함수를 이용한 다중 해슁을 병렬적으로 적용하여 어드레스 검색을 수행한 후, 각 테이블에서 일치되어 나온 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 방식으로 IP 어드레스를 검색하는 방법 및 이를 위한 하드웨어 구조를 제공하는 것을 목적으로 한다.In order to solve the above problems, the present invention, in the IP address retrieval method and hardware structure using a plurality of hashing functions, the prefix of the IP address is classified by length to form a plurality of tables for each length and hashed for each table A method for searching an IP address by applying an address in parallel by applying multiple hashes using a function, and then searching for an entry that matches the longest number of bits of a prefix among entries matched in each table, and hardware for the same. The purpose is to provide a structure.

본 발명의 제 1 목적에 의하면, 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법에 있어서, (a) 입력된 어드레스를 프리픽스 길이별로 각각 적어도 한 번 이상 해슁하는 단계; (b) 전달 테이블(Forwarding Table)의 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하는 단계; (c) 오버플로우 테이블(Overflow Table)에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하는 단계; (d) 상기 (b) 단계 및 상기 (c) 단계의 비교 결과, 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스가 일치하면, 일치된 엔트리의 정보를 전송하는 단계; 및 (e) 상기 (d) 단계에서 전송받은 상기 정보를 이용하여 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 상기 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 단계를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법을 제공한다.According to a first object of the present invention, there is provided an IP address retrieval method using a plurality of hashing functions, comprising: (a) hashing an input address at least once for each prefix length; (b) comparing the prefix stored at the point indicated by the result of the hashing of the forwarding table with the prefix of the address; (c) comparing the prefix stored in an overflow table with the prefix of the address; (d) if the prefix stored in the point indicated by the result of the hashing matches the prefix of the address as a result of the comparison between the steps (b) and (c), transmitting information of the matched entry; And (e) searching for an entry having the longest bit number of the prefix among the entries searched for each prefix length of the address by using the information transmitted in the step (d). Provides an IP address retrieval method using the hash function of.

본 발명의 제 2 목적에 의하면, 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조에 있어서, 입력된 어드레스의 프리픽스를 해슁하는 해슁 하드웨어; 상기 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 한 개 이상의 전달 테이블(Forwarding) 및 오버플로우 테이블(Overflow Table)을 구비하며, 상기 전달 테이블의 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스 및 상기 오버플로우 테이블에 저장된 프리픽스를 상기 어드레스의 프리픽스와 비교하여 일치된 엔트리의 정보를 전송하는 메인 프로세서; 및 상기 일치된 엔트리의 정보를 전송받아 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 Priority 인코더(Encoder)를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조를 제공한다.According to a second object of the present invention, there is provided a hardware structure for IP address retrieval using a plurality of hashing functions, comprising: hashing hardware for hashing a prefix of an input address; One or more forwarding tables and an overflow table in which entries are stored in the form of hash tables according to the prefix length of the address, the prefix stored at a point indicated by the result of the hash of the forward table. And a main processor for comparing the prefix stored in the overflow table with the prefix of the address and transmitting information of the matched entry. And a Priority Encoder for receiving the information of the matched entry and searching for an entry having the longest number of bits of the prefix among the searched entries for each prefix length of the address. It provides a hardware structure for IP address lookup using.

본 발명의 제 3 목적에 의하면, IP 어드레스 검색을 위한 전달 테이블(Forwarding Table) 생성 방법에 있어서, (a) 입력된 어드레스를 프리픽스 길이별로 각각 적어도 한 번 이상 해슁하는 단계; (b) 상기 프리픽스를 한 개 이상의 상기 해슁의 결과값이 가리키는 버킷(Bucket) 중 적은 로드(Load)를 가지는 버킷 저장하는 단계; 및 (c) 상기 전달 테이블에 저장 공간이 없는 경우, 상기 프리픽스를 오버플로우 테이블(Overflow Table)의 버킷에 저장하는 단계를 포함하는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법을 제공한다.According to a third object of the present invention, there is provided a method of generating a forwarding table for retrieving an IP address, the method comprising: (a) dissolving an input address at least once for each prefix length; (b) storing the prefix with a bucket having a smaller load among the buckets indicated by the result of one or more hashes; And (c) if there is no storage space in the forwarding table, storing the prefix in a bucket of an overflow table.

이하, 본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 우선 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. First of all, in adding reference numerals to the components of each drawing, it should be noted that the same reference numerals are used as much as possible even if displayed on different drawings. In addition, in describing the present invention, when it is determined that the detailed description of the related well-known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.

본 발명의 바람직한 실시예에서는 데이터 분석을 토대로 한 다수의 해슁 함수를 이용하는 방식에 병렬 탐색(Parallel Search)을 적용하는 방식을 제안한다.A preferred embodiment of the present invention proposes a method of applying parallel search to a method using a plurality of hash functions based on data analysis.

도 3은 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조를 나타낸 도면이다.3 is a diagram illustrating a hardware structure for IP address retrieval according to a preferred embodiment of the present invention.

본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조는 해슁 하드웨어(300), 메인 프로세서(302) 및 Priority 인코더(Encoder)(308)를 포함하는 구조를 갖는다.The hardware structure for IP address retrieval according to the preferred embodiment of the present invention has a structure including hash hardware 300, main processor 302 and Priority Encoder (308).

본 발명의 바람직한 실시예에 따른 해슁 하드웨어(300)는 입력된 어드레스의 프리픽스를 해슁하는 기능을 한다. 본 발명의 바람직한 실시예에 따른 해슁 하드웨어(100)는 고정된 CRC 해슁 함수를 이용하는 CRC 해슁 하드웨어로서, 하드웨어 구현 및 전달 테이블(Forwarding)의 갱신을 용이하도록 하였다. CRC 해슁 하드웨어로부터 해슁의 결과값들을 얻어내는 방법은 뒤에서 자세히 설명한다.The hash hardware 300 according to the preferred embodiment of the present invention functions to hash the prefix of the input address. The hashing hardware 100 according to the preferred embodiment of the present invention is a CRC hashing hardware using a fixed CRC hashing function to facilitate the hardware implementation and updating of the forwarding table. How to get the results of the hash from the CRC hash hardware is described in detail later.

본 발명의 바람직한 실시예에 따른 메인 프로세서(302)는 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 한 개 이상의 전달 테이블(304) 및 오버플로우 테이블(Overflow Table)(306)을 포함하고 있다. 메인 프로세서(302)는 해슁 하드웨어(300)에서 나온 해슁의 결과값이 가리키는 전달 테이블(304)의 지점에 저장된 프리픽스와 입력된 어드레스의 프리픽스를 비교하고, 오버플로우 테이블(306)에 저장된 프리픽스를 입력된 어드레스의 프리픽스와 비교한 후, 일치된 엔트리의 정보를 Priority 인코더(308)로 전송한다.The main processor 302 according to the preferred embodiment of the present invention includes one or more forwarding tables 304 and an overflow table 306 in which entries are stored in the form of hash tables according to the prefix length of the address. have. The main processor 302 compares the prefix stored at the point in the forwarding table 304 indicated by the hash value from the hash hardware 300 and the prefix of the input address, and inputs the prefix stored in the overflow table 306. After comparing the prefix of the matched address, information of the matched entry is transmitted to the Priority encoder 308.

본 발명의 바람직한 실시예에 따른 Priority 인코더(308)는 임의의 한 어드레스에 대해 모든 테이블에서의 검색이 끝나기를 기다렸다가, 어드레스의 프리픽스 길이별로 각각 검색된 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색한다.Priority encoder 308 according to the preferred embodiment of the present invention waits for the end of the search in all tables for any one address, and then searches for the entry with the longest number of bits of the prefix among the entries searched by the prefix length of the address. do.

본 발명의 바람직한 실시예에 따른 IP 어드레스 검색 방식은 프리픽스 길이 별로 2 개의 전달 테이블(304)과 2 개의 해슁 함수를 두고, 모든 프리픽스에 대해 병렬로 어드레스 검색을 수행하는 새로운 검색 방식이다. 롱기스트 프리픽스 매칭 방식이 어려운 이유는 프리픽스의 길이가 고정되어 있지 않기 때문에 전달 테이블에 복수의 매칭 엔트리가 저장되어 있을 수 있으므로 이 중에서 가장 긴 엔트리를 찾아야 하기 때문이다. 본 발명의 바람직한 실시예에 따른 하드웨어 구조에서는 고정되어 있지 않은 프리픽스 길이로 인한 메모리 검색 횟수의 증가라는 문제점을 해결하기 위하여 프리픽스 길이별로 별도의 테이블을 구성, 다른 메모리에 저장함으로써 모든 길이에 대하여 병렬적으로 검색을 가능하게 하였다. 즉 프리픽스마다 전달 테이블(304)을 따로 두어 (길이에 따른 프리픽스 종류 * 2) 개의 테이블을 만들어, 롱기스트 프리픽스 매칭 방식에 따르는 문제를 완전 매칭(Exact Matching) 문제로 전환하여 접근하고 있다. 따라서 검색시 프리픽스 길이별로 구성된 각 메인 프로세서(302)는 해당 길이에 대하여 하나의 일치하는 엔트리만을 찾으면 되고, 이렇게 각 메인 프로세서(302)에서 병렬적으로 찾아진 엔트리 중에서 가장 긴 엔트리가 매칭 엔트리로 결정되는 것이다.The IP address retrieval scheme according to the preferred embodiment of the present invention is a new retrieval scheme in which two forwarding tables 304 and two hash functions are performed for each prefix length, and address searches are performed in parallel for all prefixes. The reason why the long-establish prefix matching method is difficult is because a plurality of matching entries may be stored in the forwarding table because the length of the prefix is not fixed. In the hardware structure according to the preferred embodiment of the present invention, in order to solve the problem of an increase in the number of memory searches due to an unfixed prefix length, a separate table is formed for each prefix length and stored in different memories in parallel to all lengths. Search was enabled. That is, the transfer table 304 is set separately for each prefix (prefix type * 2 according to length), and the problem according to the long-establishment prefix matching method is converted into an exact matching problem. Therefore, each main processor 302 configured for each prefix length needs only to find one matching entry for the corresponding length during the search. Thus, the longest entry among the parallel entries found in each main processor 302 is determined as a matching entry. Will be.

또한 본 발명의 바람직한 실시예에서는 하나의 해슁 하드웨어(300)만을 이용하여 시간 공유 방식으로 모든 프리픽스에 대한 해슁의 결과값을 얻을 수 있도록 하였다. 종전의 방식에서는, 데이터의 분포에 따라 CPU를 통해 적합한 해슁 함수를 찾아내는 소프트웨어에 기반을 둔 방식을 제안하였으나, 본 발명의 바람직한 실시예에서는 고정된 해슁 함수를 사용하는 방식을 제공함으로써 하드웨어 구현 및 갱신을 용이하게 하였으며 주소 검색의 속도를 빠르게 하였다.In addition, in the preferred embodiment of the present invention, only one hashing hardware 300 can be used to obtain hash values for all prefixes in a time sharing manner. In the previous method, a software-based method for finding a suitable hashing function through the CPU according to the distribution of data is proposed. However, in the preferred embodiment of the present invention, hardware implementation and updating is provided by providing a method using a fixed hashing function. This makes it easy to speed up the search of addresses.

도 4는 본 발명의 바람직한 실시예에 따른 해슁의 결과값을 계산하는 CRC 해슁 하드웨어를 개략적으로 나타낸 도면이다.4 is a schematic diagram of CRC hashing hardware for calculating the result of hashing according to a preferred embodiment of the present invention.

해슁은 입력된 값을 해슁 함수를 통과시켜 더 짧은 값에 매핑시키는 방식이다. 해슁은 입력된 값을 더 짧은 값에 매핑시키므로 서로 다른 여러 개의 입력이 같은 출력 값에 매핑되게 된다. 이러한 현상을 충돌이라고 하며, 해슁을 이용한 구조의 경우 충돌을 최소화하는 것이 관건이 된다. 따라서 좋은 해슁 함수는 임의의 입력 집합에 대하여 균일한 출력 값을 가질 수 있게 하는 것이다. IP 어드레스 검색에 있어 해슁을 적용하게 되면 프리픽스들을 전달 메모리에 좀더 효율적으로 저장할 수 있고, 검색시 한 번의 검색으로 일치하는 엔트리를 찾을 수 있으므로 우수한 성능을 보이지만 이 때 반드시 고려해야 하는 점이 해슁으로 인한 충돌을 어떻게 처리할 것인가 하는 문제이다. 본 발명의 바람직한 실시예에서는 충돌을 최소화하기 위하여 해슁 함수 중에서 완전 해슁(Perfect Hashing)에 가까운 성능을 낸다고 평가되는 CRC 를 이용하였다.Hashing is a way of mapping input values to shorter values by passing them through a hashing function. The hash maps the input value to a shorter value, so that different inputs are mapped to the same output value. This phenomenon is called collision, and in the case of structure using hashing, it is important to minimize collision. So a good hashing function is to be able to have a uniform output for any set of inputs. Applying a hash to IP address retrieval results in better performance because the prefixes can be stored more efficiently in the forwarding memory, and a search can find matching entries in a single search, but this must be considered. How to deal with it. In the preferred embodiment of the present invention, in order to minimize the collision, the CRC evaluated to have a performance close to perfect hashing among the hashing functions is used.

또한, 각 전달 테이블(304)을 위한 모든 해슁의 결과값들은 하나의 해슁 하드웨어(300)에서 얻어지도록 하여 각 프리픽스별로 별도의 해슁 하드웨어(300)를 사용하지 않음으로 하여 병렬 처리 구조에 대한 부담을 줄였다. In addition, the result values of all hashes for each forwarding table 304 are obtained from one hashing hardware 300, so that a separate hashing hardware 300 is not used for each prefix, thereby burdening the parallel processing structure. Reduced.

본 발명의 바람직한 실시예에 따른 CRC 해슁 하드웨어(300)로부터 해슁의 결과값들을 얻어내는 방법은 다음과 같다. 우선, 목적지 IP 어드레스를 매 사이클(Cycle)마다 상위 비트부터 한 비트씩 CRC 해슁 하드웨어(300)에 들어가게 한다. 목적지 어드레스가 CRC 해슁 하드웨어(300)에 들어가기 시작한지 D 사이클 뒤에, CRC 레지스터로부터 특정 길이의 해슁의 결과값을 2 개 뽑아서 프리픽스 D 의 해슁의 결과값으로 사용하게 하는 식으로, 각 프리픽스들의 해슁의 결과값은 시간차를 두고 하나의 해슁 하드웨어(300)로부터 얻어지게 된다. 예를 들면, IP 어드레스의 첫 8비트가 CRC 해슁 하드웨어(300)에 들어가면 CRC 레지스터에서 프리픽스 8 에 대한 해슁의 결과값을 2 개 뽑아내고 그 후 한 사이클 뒤에는 한 비트가 더 들어가서 9비트가 들어갔으므로 프리픽스 9 에 대한 해슁의 결과값 2 개를 뽑아내는 식으로, 프리픽스 32 에 대한 해슁의 결과값까지 얻는 데에는 32 사이클이 소요된다. 이 때 해슁의 결과값은 인덱스가 되므로 저장되는 엔트리 수를 고려하여 해당 프리픽스가 저장되는 테이블의 해슁 길이를 결정하면 된다. The method of obtaining the hash values from the CRC hash hardware 300 according to the preferred embodiment of the present invention is as follows. First, the destination IP address is entered into the CRC hashing hardware 300 by one bit from the high order bit in every cycle. After D cycles after the destination address starts entering the CRC hash hardware 300, two hash values of a particular length are extracted from the CRC register and used as the result of the hash of the prefix D. The result is obtained from one hash hardware 300 with time difference. For example, if the first 8 bits of the IP address enter the CRC hash hardware 300, then the result of two hashes for prefix 8 is extracted from the CRC register. It takes 32 cycles to get the result of the hash for prefix 32 by extracting the two hash values for prefix 9. In this case, the hash value is an index, so the hash length of the table where the prefix is stored is determined by considering the number of entries to be stored.

도 5는 본 발명의 바람직한 실시예에 따른 전달 테이블(304)의 엔트리 구조를 나타낸 도면이다.5 shows the entry structure of the transfer table 304 according to the preferred embodiment of the present invention.

본 발명의 바람직한 실시예에서는 각 전달 테이블(304)의 버킷 수와 버킷 당 엔트리 수를 지정하기 위한 데이터 분석 결과, 2 개의 해슁 함수를 사용하고 N 개의 아이템을 N/2 개의 버킷을 가지는 테이블에 저장하고자 할 때 각각의 테이블에서 3번 이상의 충돌이 발생할 확률은 1.5e-50으로 매우 낮았음을 발견했다. 이 분석을 바탕으로 각각의 프리픽스 길이에 대하여 2 개의 해슁 함수와 버킷 당 6 개의 로드를 가지는 경우를 예로 하여 본 발명의 바람직한 실시예에 따른 엔트리 구조를 설명하기로 한다.In a preferred embodiment of the present invention, as a result of data analysis for specifying the number of buckets and entries per bucket of each forwarding table 304, two hash functions are used and N items are stored in a table having N / 2 buckets. We found that the probability of 3 or more collisions in each table was very low, 1.5e -50 . Based on this analysis, an entry structure according to a preferred embodiment of the present invention will be described using an example of having two hash functions and six loads per bucket for each prefix length.

도 5에 도시된 바와 같이, 전달 테이블(304)의 각각의 엔트리는 3 개의 로드를 가지게 되므로, 전달 테이블(304)의 엔트리는 프리픽스를 저장하고 있는 로드의 수를 나타내는 아이템 수 필드, 3 개의 프리픽스 필드, 및 3 개의 포워딩 램 포인터 필드를 포함하고 있다.As shown in FIG. 5, each entry of the delivery table 304 has three loads, so an entry of the delivery table 304 has an item number field indicating three numbers of loads storing prefixes, and three prefixes. Field, and three forwarding RAM pointer fields.

알고리즘 1은 본 발명의 바람직한 실시예에 따른 전달 테이블(304)을 생성하는 알고리즘이다.Algorithm 1 is an algorithm for generating the forwarding table 304 according to the preferred embodiment of the present invention.

(알고리즘 1)Algorithm 1

알고리즘 1에 기초한 본 발명의 바람직한 실시예에 따른 전달 테이블(304)을 생성하는 과정은 도 6과 함께 설명한다.The process of generating the transfer table 304 according to the preferred embodiment of the present invention based on Algorithm 1 will be described with reference to FIG.

도 6은 본 발명의 바람직한 실시예에 따른 전달 테이블(304)을 생성하는 과정을 나타낸 도면이다.6 is a diagram illustrating a process of generating a delivery table 304 according to a preferred embodiment of the present invention.

우선, 목적지 IP 어드레스가 CRC 해슁 하드웨어(300)에 한 비트씩 들어가서 해슁된다. 그 후 L(프리픽스 길이) 싸이클 후에 CRC 레지스터로부터 해슁의 결과값을 뽑아낸다. 전달 테이블에 저장되는 프리픽스는 두 개의 해슁 값이 가리키는 버킷 중 적은 로드를 가지는 버킷에 저장된다. 두 버킷이 같은 로드를 가지는 경우에는 테이블 1(601)에 선저장되는 것으로 하였고, 두 테이블(601, 602)이 꽉 차서 오버플로우가 발생한 경우에는 별도로 구성된 오버플로우 테이블(306)에 저장하였다. 본 발명의 바람직한 실시예에 따른 구조에서는 각 프리픽스당 2 개씩 총 50 개의 주 테이블(601, 602)과 오버플로우 테이블(306)이 필요하게 된다. First, the destination IP address is hashed by entering the CRC hash hardware 300 bit by bit. Then, after the L (prefix length) cycle, the result of the hash is extracted from the CRC register. The prefixes stored in the forwarding table are stored in the bucket with the smaller load among the buckets indicated by the two hash values. If the two buckets have the same load, it is prestored in Table 1 (601). If the overflow occurs because the two tables (601, 602) are full, they are stored in the overflow table (306) configured separately. In the structure according to the preferred embodiment of the present invention, a total of 50 main tables 601 and 602 and an overflow table 306 are required, two for each prefix.

알고리즘 2는 본 발명의 바람직한 실시예에 따라 IP 어드레스를 검색하는 알고리즘이다.Algorithm 2 is an algorithm for retrieving an IP address according to a preferred embodiment of the present invention.

(알고리즘 2)Algorithm 2

알고리즘 2에 기초한 본 발명의 바람직한 실시예에 따라 IP 어드레스를 검색하는 과정은 도 7과 함께 설명한다.A process of retrieving an IP address according to the preferred embodiment of the present invention based on Algorithm 2 will be described with reference to FIG.

도 7은 본 발명의 바람직한 실시예에 따라 IP 어드레스 검색하는 과정을 나타낸 도면이다.7 is a diagram illustrating a process of searching for an IP address according to a preferred embodiment of the present invention.

IP 어드레스의 검색 과정은 CRC 해슁 하드웨어(300)에서 얻어진 해슁의 결과값을 이용하여 병렬로 행해진다. 검색 과정에 필요한 해슁의 결과값은 전달 테이블(304)을 구성할 때와 유사한 방법으로 얻어지는데, 한 가지 다른 점은 하나의 프리픽스에 대한 해슁의 결과값이 아니라 모든 프리픽스에 대한 해슁의 결과값을 뽑아야 한다는 것이다. The IP address retrieval process is performed in parallel using the hash value obtained from the CRC hash hardware 300. The result of the hash required for the retrieval process is obtained in a similar way to constructing the forwarding table 304. The only difference is that the result of the hash for all prefixes is not the result of the hash for one prefix. It must be chosen.

알고리즘 2에 설명된 것처럼, 일단 입력된 어드레스를 프리픽스 길이별로 해슁하고, 해슁의 결과값을 테이블의 인덱스로 하여 각 프리픽스의 전달 테이블(701, 702)에 대해 프리픽스 길이별로 병렬적 검색을 수행하며, 이 때 오버플로우 테이블(306)에 대해서도 동시에 검색을 수행하게 된다. 검색 결과, 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 입력된 어드레스의 프리픽스가 일치하면, 일치된 엔트리의 정보를 Priority 인코더(308)로 전송한다. 이 때, 일치된 엔트리의 정보는 포워딩 램을 가리키는 포인터를 포함한다. Priority 인코더(308)에서는 전송받은 정보를 이용하여 검색된 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 찾아내고, 그것의 포워딩 램 포인터 정보를 이용하여 패킷을 출력 포트로 전달하게 된다.As described in Algorithm 2, the input address is hashed by the prefix length, and the parallel search is performed by the prefix length on the forwarding tables 701 and 702 of each prefix using the result of the hashing as the index of the table. At this time, the overflow table 306 is also searched at the same time. As a result of the search, if the prefix stored at the point indicated by the hash value and the prefix of the input address match, the information of the matched entry is transmitted to the Priority encoder 308. At this time, the information of the matched entry includes a pointer to the forwarding RAM. The priority encoder 308 finds an entry having the longest number of prefix bits among the searched entries using the received information, and forwards the packet to the output port using its forwarding RAM pointer information.

전달 테이블(701, 702) 생성 과정에서 언급한 바와 같이, 전달 테이블(701, 702)이 꽉 차서 새로 추가되는 프리픽스를 저장할 공간이 없는 경우에는 별도로 구성된 오버플로우 테이블(306)에 저장되게 한다. 이러한 오버플로우 테이블(306)은 내용 주소화 메모리(CAM)를 사용하여 구현되며, 일치하는 엔트리를 한 번의 검색으로 바로 찾아낼 수 있게 한다.As mentioned in the process of creating the forwarding tables 701 and 702, when the forwarding tables 701 and 702 are full and there is no space for storing the newly added prefix, the forwarding tables 701 and 702 are stored in the overflow table 306 configured separately. This overflow table 306 is implemented using content addressable memory (CAM) and allows matching entries to be found directly in a single search.

한편, 본 발명의 바람직한 실시예에 따라 생성된 전달 테이블 구조의 업데이트는 매우 간단하다. 업데이트 과정은 전달 테이블 구성 과정과 동일하게 이루어진다. 즉, 저장할 프리픽스를 해슁 키가 가리키는 버킷 중 로드가 적게 걸린 버킷에 저장하고, 테이블에 오버플로우가 생기는 경우에는 오버플로우 테이블에 저장하면 된다. 이와 같은 방식은 선처리 시간이 길게 요구되지 않기 때문에 빠른 업데이트가 가능하다는 장점이 있다. 또한, 단순히 해슁의 결과값의 비트 수와 전달 테이블의 엔트리 수를 증가시킴으로써 IPv6로의 확장이 가능해진다.On the other hand, updating the delivery table structure created according to the preferred embodiment of the present invention is very simple. The update process is performed in the same way as the transfer table configuration process. In other words, you can store the prefix to be stored in the bucket with the least load among the buckets indicated by the hash key, and in the overflow table if the table overflows. This method has the advantage that a fast update is possible because the preprocessing time is not required long. It is also possible to expand to IPv6 by simply increasing the number of bits in the result of hashing and the number of entries in the forwarding table.

이하, 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색 방법 및 이를 위한 하드웨어 구조의 성능을 설명한다.Hereinafter, the performance of the IP address retrieval method and hardware structure for the same according to a preferred embodiment of the present invention.

도 8은 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조에서의 프리픽스 길이에 따른 라우트 분포를 나타낸 그래프이다. 8 is a graph showing a route distribution according to a prefix length in a hardware structure for IP address retrieval according to a preferred embodiment of the present invention.

본 발명의 바람직한 실시예에 따른 하드웨어에 대해 MAE-WEST 라우터를 통과한 실제 데이터를 이용하여 시뮬레이션을 수행하였는데, 도 8은 MAE-WEST 라우터를 통과한 프리픽스들의 분포를 나타내고 있는 것이다. 본 시뮬레이션은 엔트리 효율과 오버플로우 발생 비율을 테스트하기 위하여 라우터의 프리픽스 분포에 바탕을 두고 아이템, 버킷 및 해슁 함수에 대하여 테스트 케이스들을 결정하였다. 여기서 엔트리 효율이란 전체 테이블 엔트리에 대하여 프리픽스를 저장하고 있는 엔트리의 비율을 의미한다.The simulation was performed using the actual data passed through the MAE-WEST router for the hardware according to the preferred embodiment of the present invention. FIG. 8 shows the distribution of the prefixes passed through the MAE-WEST router. In this simulation, test cases were determined for items, buckets, and hash functions based on the router's prefix distribution to test entry efficiency and overflow rate. Here, entry efficiency refers to the ratio of entries storing prefixes to all table entries.

표 1은 아이템 수, 버킷 수 및 해슁 함수의 수를 달리하며 수행한 시뮬레이션의 결과 얻어진 엔트리 효율과 오버플로우 발생 비율을 나타낸 표이다. Table 1 is a table showing the entry efficiency and the overflow occurrence rate obtained as a result of the simulation performed by varying the number of items, the number of buckets and the number of hash functions.

casecase Item의 수Number of items Bucket의 수Number of Bucket Hash 함수의 수Number of hash functions 엔트리수/ bucketEntry number / bucket 메모리 사이즈Memory size 엔트리 효율Entry efficiency Overflow 비율Overflow Rate 1One NN N/2N / 2 1One 44 203KB203 KB 49.85%49.85% 3.4%3.4% 22 NN N/2N / 2 22 44 203KB203 KB 49.85%49.85% 0.52%0.52% 33 NN N/2N / 2 22 66 303KB303 KB 33.41%33.41% 0%0% 44 NN N/4N / 4 33 66 152KB152 KB 66.3%66.3% 0.46%0.46%

케이스 1 은 해슁 함수를 1 개 사용한 경우이다. 즉, 프리픽스가 길이별로 저장된 25 개의 테이블을 사용한 경우이다. 표 1에 도시된 바와 같이, N 개의 아이템을 각 버킷 당 4 개의 로드를 가지는 N/2 개의 버킷에 저장하였을 때, 약 200 Kbyte의 메모리가 소요되었으며 이 경우 3.4%의 오버플로우가 발생하였다. 그러나 여타 조건은 케이스 1의 경우와 같게 하고 해슁 함수의 수만 2로 늘린 케이스 2 의 경우에는 오버플로우 비율이 약 0.5%로 현저히 줄어드는 것을 볼 수 있다. 하나의 해슁 함수를 이용하였을 때에 비하여, 두 개의 해슁 함수를 사용하게 되면 각 프리픽스가 두 테이블에 고루 분포되기 때문에 오버플로우의 값이 줄어들게 되는 것이다. 케이스 3은 오버플로우를 완전히 없애기 위하여 앞의 두 경우보다 약 33%의 메모리를 더 할당한 케이스로, 이로 인하여 오버플로우를 완전히 없앨 수 있었다. 마지막으로, 케이스 4는 N개의 아이템을 버킷 당 6 개의 로드를 가지는 N/4개의 버킷에 저장하고 3 개의 해슁 함수를 사용하여 메모리를 가장 효율적으로 사용한 경우이다. 이 경우, 약 152 Kbytes의 메모리가 소요되었으며 136개의 오버플로우가 발생하였다. Case 1 uses one hash function. In other words, if 25 prefixes are stored for each length. As shown in Table 1, when N items were stored in N / 2 buckets with 4 loads for each bucket, about 200 Kbytes of memory was required, which resulted in a 3.4% overflow. However, the other conditions are the same as in case 1, and in case 2 where the number of hash functions is increased to 2, the overflow rate is significantly reduced to about 0.5%. Compared to using one hash function, using two hash functions reduces the value of overflow because each prefix is evenly distributed in both tables. Case 3 allocated about 33% more memory than the previous two cases to completely eliminate the overflow, which completely eliminated the overflow. Finally, case 4 is the case where N items are stored in N / 4 buckets with 6 loads per bucket and three hash functions are used to make the most efficient use of memory. In this case, it took about 152 Kbytes of memory and 136 overflows.

전술한 4 개 케이스의 비교 결과, 해슁 함수를 하나 사용하여 시뮬레이션한 경우보다 여러 개를 사용한 경우가 충돌로 인한 오버플로우를 급격히 줄일 수 있음을 알 수 있다. 또한, 메모리 효율과 오버플로우의 발생 비율은 상호 트레이드 오프(Trade-Off) 관계에 있다는 것도 알 수 있다. As a result of the comparison of the four cases described above, it can be seen that the overflow caused by the collision can be drastically reduced when using several than the simulation using one hash function. In addition, it can be seen that the memory efficiency and the overflow rate are in a trade-off relationship.

한편, 표 1에서 나타난 결과를 보면 오버플로우가 발생하는 비율은 매우 작음을 알 수 있다. 따라서 오버플로우 테이블(306)은 적은 수의 엔트리를 갖는 내용 주소화 메모리(CAM)를 사용하여 구현이 가능하게 된다.On the other hand, the results shown in Table 1 shows that the rate of occurrence of overflow is very small. Thus, the overflow table 306 can be implemented using a content addressable memory (CAM) with a small number of entries.

표 2는 기존의 다른 검색 구조들과 본 발명의 바람직한 실시예에 따른 검색 구조와의 성능을 비교한 것이다. Table 2 compares the performance of the existing search structure with the search structure according to the preferred embodiment of the present invention.

Address Lookup SchemeAddress Lookup Scheme Number of Memory Accesses(Minimum/Maximum)Number of Memory Accesses (Minimum / Maximum) Forwarding Table SizeForwarding Table Size Huang's scheme Huang's scheme 1/3 1/3 450KB ~ 470KB 450KB to 470KB DIR-24-8 DIR-24-8 1/2 1/2 33MB 33 MB DIR-21-3-8 DIR-21-3-8 1/3 1/3 9MB 9 MB SFT SFT 2/9 2/9 150KB ~ 160KB 150KB to 160KB Parallel hashing Parallel hashing 1/5 1/5 189KB 189 KB Inventive Architecture Inventive Architecture 1 One 203KB203 KB + CAM with 154 entries+ CAM with 154 entries

표 2에서 볼 수 있듯이 본 발명의 바람직한 실시예에 따른 검색 구조는, 언제나 한 번의 메모리 액세스만으로 검색을 가능하게 한다는 점에서 우수하고, 소요되는 메모리 크기도 약 203 Kbytes로 다른 검색 구조들에 비해 매우 우수한 성능을 나타내고 있음을 알 수 있다.As shown in Table 2, the search structure according to the preferred embodiment of the present invention is excellent in that the search can be performed with only one memory access at all times, and the required memory size is about 203 Kbytes, which is very high compared to other search structures. It can be seen that the excellent performance.

이상의 설명은 본 발명을 예시적으로 설명한 것에 불과한 것으로, 본 발명이 속하는 기술분야에서 통상의 지식을 가지는 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 변형이 가능할 것이다. 따라서, 본 명세서에 개시된 실시예들은 본 발명을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 사상과 범위가 한정되는 것은 아니다. 본 발명의 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the present invention, and those skilled in the art to which the present invention pertains may various modifications without departing from the essential characteristics of the present invention. Accordingly, the embodiments disclosed herein are not intended to limit the present invention but to describe the present invention, and the spirit and scope of the present invention are not limited by these embodiments. It is intended that the scope of the invention be interpreted by the following claims, and that all descriptions within the scope equivalent thereto shall be construed as being included in the scope of the present invention.

이상에서 설명한 바와 같이 본 발명에 의하면, 프리픽스들을 프리픽스 길이에 따라 분류하고 각각 별도의 테이블을 구성하게 함으로써 모든 프리픽스에 대해 길이별로 병렬 검색을 가능하게 하였다. 이를 통하여 IP 어드레스에 해슁을 적용할 수 있도록 하였으며, 검색 시간을 줄일 수 있게 한다는 장점이 있다. 또한, 완전 해슁과 비슷한 성능을 보이게 하기 위해 다수의 해슁 함수를 이용한 결과, 한 번의 메모리 검색으로 모든 프리픽스에 대한 검색이 가능하게 되었다는 효과를 가진다. As described above, according to the present invention, the prefixes are classified according to the prefix length and a separate table is configured to enable parallel search by length for all the prefixes. Through this, hashing can be applied to the IP address, and the search time can be reduced. In addition, as a result of using multiple hash functions to show performance similar to a perfect hash, it is possible to search for all prefixes with a single memory search.

또한, 본 발명의 바람직한 실시예에 따르면 총 300 Kbyte의 메모리만을 사용하면 모든 프리픽스를 오버플로우 없이 저장할 수 있다. 다만, 좀 더 메모리를 효율적으로 사용하기 위해 150 Kbytes의 메모리를 사용한 경우에는 99.5%의 프리픽스만을 메모리에 저장할 수 있지만, 오버플로우가 난 0.5%에 대해서는 별도의 오버플로우 테이블을 구성하게 함으로써 오버플로우가 발생한 경우에도 추가의 메모리 검색 없이 전달 테이블의 검색과 동시에 검색을 가능하게 한다는 효과가 있다. In addition, according to a preferred embodiment of the present invention, all prefixes can be stored without overflow by using only 300 Kbytes of memory. However, if 150 Kbytes of memory is used for more efficient use of memory, only 99.5% of the prefix can be stored in memory. Even if it occurs, there is an effect of enabling the search at the same time as the forwarding table search without additional memory search.

게다가 본 발명의 바람직한 실시예에 따른 구조는 프리픽스 업데이트 및 IPv6 로의 전환이 간단하며, 그 기능의 반복성으로 인하여 하드웨어 구현이 쉽게 된다는 장점을 가진다.In addition, the structure according to the preferred embodiment of the present invention has the advantage that the prefix update and the switch to IPv6 is simple, and the hardware implementation is easy due to the repeatability of the function.

도 1은 다수의 해슁 함수를 이용하여 어드레스 검색을 수행하기 위한 테이블 구성 방식을 나타낸 도면,1 is a diagram illustrating a table configuration method for performing an address search using a plurality of hash functions.

도 2는 다수의 해슁 함수를 이용하여 어드레스를 검색하는 방식을 나타낸 도면,2 is a diagram illustrating a method of searching for an address using a plurality of hash functions;

도 3은 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조를 나타낸 도면,3 illustrates a hardware structure for IP address lookup according to a preferred embodiment of the present invention;

도 4는 본 발명의 바람직한 실시예에 따른 해슁의 결과값을 계산하는 CRC 해슁 하드웨어를 개략적으로 나타낸 도면,4 is a schematic representation of CRC hashing hardware for calculating the result of a hashing in accordance with a preferred embodiment of the present invention;

도 5는 본 발명의 바람직한 실시예에 따른 전달 테이블(304)의 엔트리 구조를 나타낸 도면,5 shows an entry structure of the transfer table 304 according to the preferred embodiment of the present invention;

도 6은 본 발명의 바람직한 실시예에 따른 전달 테이블(304)을 생성하는 과정을 나타낸 도면,6 is a view showing a process of creating a delivery table 304 according to a preferred embodiment of the present invention;

도 7은 본 발명의 바람직한 실시예에 따라 IP 어드레스 검색하는 과정을 나타낸 도면,7 illustrates a process of searching for an IP address according to a preferred embodiment of the present invention;

도 8은 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조에서의 프리픽스 길이에 따른 라우트 분포를 나타낸 그래프이다.8 is a graph showing a route distribution according to a prefix length in a hardware structure for IP address retrieval according to a preferred embodiment of the present invention.

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

300 : 해슁 하드웨어 302 : 메인 프로세서300: hash hardware 302: main processor

304 : 전달 테이블 306 : 오버플로우 테이블304: forwarding table 306: overflow table

308 : Priority 인코더308: Priority Encoder

Claims (26)

복수의 해슁 함수를 이용한 IP 어드레스 검색 방법에 있어서,In the IP address retrieval method using a plurality of hash functions, (a) 입력된 어드레스를 프리픽스 길이별로 각각 적어도 한 번 이상 해슁하는 단계;(a) hashing the input address at least once for each prefix length; (b) 전달 테이블(Forwarding Table)의 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하는 단계; (b) comparing the prefix stored at the point indicated by the result of the hashing of the forwarding table with the prefix of the address; (c) 오버플로우 테이블(Overflow Table)에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하는 단계;(c) comparing the prefix stored in an overflow table with the prefix of the address; (d) 상기 (b) 단계 및 상기 (c) 단계의 비교 결과, 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스가 일치하면, 일치된 엔트리의 정보를 전송하는 단계; 및(d) if the prefix stored in the point indicated by the result of the hashing matches the prefix of the address as a result of the comparison between the steps (b) and (c), transmitting information of the matched entry; And (e) 상기 (d) 단계에서 전송받은 상기 정보를 이용하여 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 상기 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 단계(e) searching for an entry having the longest bit number of the prefix among the entries searched for each prefix length of the address by using the information transmitted in step (d). 를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.IP address retrieval method using a plurality of hash function, characterized in that it comprises a. 제 1 항에 있어서,The method of claim 1, 상기 전달 테이블 또는 상기 오버플로우 테이블에서의 어드레스 검색은 상기 어드레스의 프리픽스 길이별로 병렬적으로 동시에 수행되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.The address search in the forwarding table or the overflow table is performed simultaneously in parallel for each prefix length of the address. 제 1 항에 있어서,The method of claim 1, 상기 어드레스의 상기 프리픽스들을 길이별로 분류하여 각 길이마다 한 개 이상의 상기 전달 테이블(Forwarding Table)이 생성되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.And classifying the prefixes of the addresses by length to generate one or more forwarding tables for each length. 제 1 항에 있어서,The method of claim 1, 상기 전달 테이블은 상기 어드레스의 상기 프리픽스 길이별로 하나의 메모리에 저장되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.And the forwarding table is stored in one memory for each prefix length of the address. 제 1 항에 있어서,The method of claim 1, 상기 해슁은 CRC 해슁 함수를 이용하여 수행되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.And said hashing is performed using a CRC hashing function. 제 1 항에 있어서,The method of claim 1, 상기 전달 테이블의 엔트리는 상기 프리픽스를 저장하고 있는 로드(Load)의 수를 나타내는 필드, 상기 검색에 사용되는 프리픽스 필드 및 포워딩 램 포인터 필드를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.The entry of the forwarding table includes a field indicating the number of loads storing the prefix, a prefix field used for the search, and a forwarding RAM pointer field. Way. 제 1 항에 있어서,The method of claim 1, 상기 일치된 엔트리의 정보는 포워딩 램을 가리키는 포인터를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.And the information of the matched entry includes a pointer to a forwarding RAM. 제 1 항에 있어서,The method of claim 1, 하나 이상의 상기 해슁의 결과값은 시간차를 두고 하나의 해슁 하드웨어로부터 제공되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.And a result value of one or more hashes is provided from one hash hardware at a time difference. 제 1 항에 있어서,The method of claim 1, 상기 오버플로우 테이블은 내용 주소화 메모리(CAM : Content Addressable Memory)로 구현되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색 방법.The overflow table is an IP address retrieval method using a plurality of hash functions, characterized in that the content addressable memory (CAM). 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조에 있어서,In the hardware structure for IP address retrieval using a plurality of hash functions, 입력된 어드레스의 프리픽스를 해슁하는 해슁 하드웨어;Hash hardware for hashing the prefix of the input address; 상기 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 한 개 이상의 전달 테이블(Forwarding) 및 오버플로우 테이블(Overflow Table)을 구비하며, 상기 전달 테이블의 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스 및 상기 오버플로우 테이블에 저장된 프리픽스를 상기 어드레스의 프리픽스와 비교하여 일치된 엔트리의 정보를 전송하는 메인 프로세서; 및One or more forwarding tables and an overflow table in which entries are stored in the form of hash tables according to the prefix length of the address, the prefix stored at a point indicated by the result of the hash of the forward table. And a main processor for comparing the prefix stored in the overflow table with the prefix of the address and transmitting information of the matched entry. And 상기 일치된 엔트리의 정보를 전송받아 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 Priority 인코더(Encoder)Priority encoder that receives the information of the matched entry and searches for an entry with the longest number of bits of the prefix among the entries found for each prefix length of the address. 를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.Hardware structure for IP address search using a plurality of hash function, characterized in that it comprises a. 제 10 항에 있어서,The method of claim 10, 상기 전달 테이블 또는 상기 오버플로우 테이블에서의 어드레스 검색은 상기 어드레스의 프리픽스 길이별로 병렬적으로 동시에 수행되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.The address search in the forwarding table or the overflow table is performed simultaneously in parallel for each prefix length of the address. Hardware structure for IP address search using a plurality of hash functions. 제 10 항에 있어서,The method of claim 10, 상기 어드레스의 상기 프리픽스들을 길이별로 분류하여 각 길이마다 한 개 이상의 상기 전달 테이블(Forwarding Table)이 생성되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.At least one forwarding table is generated for each length by dividing the prefixes of the addresses by lengths. 제 10 항에 있어서,The method of claim 10, 상기 전달 테이블은 상기 어드레스의 상기 프리픽스 길이별로 하나의 메모리에 저장되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.The forwarding table is stored in one memory for each prefix length of the address. Hardware structure for IP address search using a plurality of hash functions. 제 10 항에 있어서,The method of claim 10, 상기 해슁 하드웨어는 CRC 해슁 함수를 이용하는 CRC 해슁 하드웨어인 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.The hash hardware is a hardware architecture for IP address search using a plurality of hash functions, characterized in that CRC hash hardware using a CRC hash function. 제 10 항에 있어서,The method of claim 10, 상기 전달 테이블의 엔트리는 상기 프리픽스를 저장하고 있는 로드(Load)의 수를 나타내는 필드, 상기 검색에 사용되는 프리픽스 필드 및 포워딩 램 포인터 필드를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.The entry of the forwarding table includes a field indicating the number of loads storing the prefix, a prefix field used for the search, and a forwarding RAM pointer field. Hardware architecture. 제 10 항에 있어서,The method of claim 10, 상기 일치된 엔트리의 정보는 포워딩 램을 가리키는 포인터를 포함하는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And the information of the matched entry includes a pointer to a forwarding RAM. 제 10 항에 있어서,The method of claim 10, 하나 이상의 상기 해슁의 결과값은 시간차를 두고 하나의 상기 해슁 하드웨어로부터 제공되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And a result value of one or more hashes is provided from one hash hardware at a time difference. 제 10 항에 있어서,The method of claim 10, 상기 오버플로우 테이블은 내용 주소화 메모리(CAM : Content Addressable Memory)로 구현되는 것을 특징으로 하는 복수의 해슁 함수를 이용한 IP 어드레스 검색을 위한 하드웨어 구조.The overflow table is a hardware structure for IP address retrieval using a plurality of hash functions, characterized in that implemented by a content addressable memory (CAM). IP 어드레스 검색을 위한 전달 테이블(Forwarding Table) 생성 방법에 있어서,In the method of generating a forwarding table for IP address retrieval, (a) 입력된 어드레스를 프리픽스 길이별로 각각 적어도 한 번 이상 해슁하는 단계;(a) hashing the input address at least once for each prefix length; (b) 상기 프리픽스를 한 개 이상의 상기 해슁의 결과값이 가리키는 버킷(Bucket) 중 적은 로드(Load)를 가지는 버킷에 저장하는 단계; 및(b) storing the prefix in a bucket having a small load among buckets indicated by one or more result values of the hash; And (c) 상기 전달 테이블에 저장 공간이 없는 경우, 상기 프리픽스를 오버플로우 테이블(Overflow Table)의 버킷에 저장하는 단계(c) if there is no storage space in the forwarding table, storing the prefix in a bucket of an overflow table 를 포함하는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.Method for generating a forwarding table for IP address search, characterized in that it comprises a. 제 19 항에 있어서,The method of claim 19, 상기 입력된 어드레스는 해슁 하드웨어에 한 비트씩 입력되는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.The input address is input to the hash hardware by one bit, characterized in that the forwarding table generation method for IP address search. 제 19 항에 있어서,The method of claim 19, 상기 어드레스의 상기 프리픽스들을 길이별로 분류하여 각 길이마다 한 개 이상의 상기 전달 테이블이 생성되는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.And generating one or more forwarding tables for each length by classifying the prefixes of the addresses by length. 제 19 항에 있어서,The method of claim 19, 상기 전달 테이블은 상기 어드레스의 상기 프리픽스 길이별로 하나의 메모리에 저장되는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.And the forwarding table is stored in one memory for each prefix length of the address. 제 19 항에 있어서,The method of claim 19, 상기 해슁은 CRC 해슁 함수를 이용하여 수행되는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.And said hashing is performed using a CRC hashing function. 제 19 항에 있어서,The method of claim 19, 상기 전달 테이블의 엔트리는 상기 프리픽스를 저장하고 있는 상기 로드의 수를 나타내는 필드, 상기 검색에 사용되는 프리픽스 필드 및 포워딩 램 포인터 필드를 포함하는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.The entry of the forwarding table includes a field indicating the number of loads storing the prefix, a prefix field used for the search, and a forwarding RAM pointer field. 제 19 항에 있어서,The method of claim 19, 하나 이상의 상기 해슁의 결과값은 시간차를 두고 하나의 해슁 하드웨어로부터 제공되는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.And a result value of one or more hashes is provided from one hash hardware at a time difference. 제 19 항에 있어서,The method of claim 19, 상기 오버플로우 테이블은 내용 주소화 메모리(CAM : Content Addressable Memory)로 구현되는 것을 특징으로 하는 IP 어드레스 검색을 위한 전달 테이블 생성 방법.And the overflow table is implemented as a content addressable memory (CAM).
KR1020030077774A 2003-05-26 2003-11-04 Method and hardware architecture for searching ip address by using multiple hashing function KR20050043035A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020030077774A KR20050043035A (en) 2003-11-04 2003-11-04 Method and hardware architecture for searching ip address by using multiple hashing function
US10/853,185 US7418505B2 (en) 2003-05-26 2004-05-26 IP address lookup using either a hashing table or multiple hash functions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030077774A KR20050043035A (en) 2003-11-04 2003-11-04 Method and hardware architecture for searching ip address by using multiple hashing function

Publications (1)

Publication Number Publication Date
KR20050043035A true KR20050043035A (en) 2005-05-11

Family

ID=37243833

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030077774A KR20050043035A (en) 2003-05-26 2003-11-04 Method and hardware architecture for searching ip address by using multiple hashing function

Country Status (1)

Country Link
KR (1) KR20050043035A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699676A (en) * 2020-12-31 2021-04-23 中国农业银行股份有限公司 Address similarity relation generation method and device
CN112860712A (en) * 2021-04-13 2021-05-28 深圳前海移联科技有限公司 Transaction database construction method and system based on block chain and electronic equipment

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112699676A (en) * 2020-12-31 2021-04-23 中国农业银行股份有限公司 Address similarity relation generation method and device
CN112699676B (en) * 2020-12-31 2024-04-12 中国农业银行股份有限公司 Address similarity relation generation method and device
CN112860712A (en) * 2021-04-13 2021-05-28 深圳前海移联科技有限公司 Transaction database construction method and system based on block chain and electronic equipment
CN112860712B (en) * 2021-04-13 2024-02-09 深圳前海移联科技有限公司 Block chain-based transaction database construction method, system and electronic equipment

Similar Documents

Publication Publication Date Title
US7418505B2 (en) IP address lookup using either a hashing table or multiple hash functions
US6985483B2 (en) Methods and systems for fast packet forwarding
US7443841B2 (en) Longest prefix matching (LPM) using a fixed comparison hash table
US6934252B2 (en) Methods and systems for fast binary network address lookups using parent node information stored in routing table entries
US7610271B2 (en) Method and apparatus for performing a binary search on an expanded tree
KR100586461B1 (en) Method, Hardware Architecture and Recording Medium for Searching IP Address by Using Pipeline Binary Tree
US20030174717A1 (en) System and method for longest prefix match for internet protocol lookup
Pao et al. Efficient hardware architecture for fast IP address lookup
Warkhede et al. Multiway range trees: scalable IP lookup with fast updates
Le et al. Scalable tree-based architectures for IPv4/v6 lookup using prefix partitioning
US20040044868A1 (en) Method and apparatus for high-speed longest prefix match of keys in a memory
Yu et al. Forwarding engine for fast routing lookups and updates
US20050114393A1 (en) Dynamic forwarding method using binary search
Veeramani et al. Efficient IP lookup using hybrid trie-based partitioning of TCAM-based open flow switches
Lim et al. Binary searches on multiple small trees for IP address lookup
KR20050043035A (en) Method and hardware architecture for searching ip address by using multiple hashing function
CN107204926B (en) Rapid route searching method for preprocessing cache
Li et al. Address lookup algorithms for IPv6
Lin et al. Improved IP lookup technology for trie-based data structures
Park et al. An efficient IP address lookup algorithm based on a small balanced tree using entry reduction
KR100504387B1 (en) Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing
KR100460188B1 (en) Internet protocol address look-up method
Futamura et al. Scalable, memory efficient, high-speed lookup and update algorithms for IP routing
Chang et al. Efficient IP routing table lookup scheme
Yazdani et al. Performing IP lookup on very high line speed

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application