KR20040101742A - Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing - Google Patents

Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing Download PDF

Info

Publication number
KR20040101742A
KR20040101742A KR1020030033453A KR20030033453A KR20040101742A KR 20040101742 A KR20040101742 A KR 20040101742A KR 1020030033453 A KR1020030033453 A KR 1020030033453A KR 20030033453 A KR20030033453 A KR 20030033453A KR 20040101742 A KR20040101742 A KR 20040101742A
Authority
KR
South Korea
Prior art keywords
address
prefix
entry
hash
search
Prior art date
Application number
KR1020030033453A
Other languages
Korean (ko)
Other versions
KR100504387B1 (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-2003-0033453A priority Critical patent/KR100504387B1/en
Priority to US10/853,185 priority patent/US7418505B2/en
Publication of KR20040101742A publication Critical patent/KR20040101742A/en
Application granted granted Critical
Publication of KR100504387B1 publication Critical patent/KR100504387B1/en

Links

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B01PHYSICAL OR CHEMICAL PROCESSES OR APPARATUS IN GENERAL
    • B01DSEPARATION
    • B01D35/00Filtering devices having features not specifically covered by groups B01D24/00 - B01D33/00, or for applications not specifically covered by groups B01D24/00 - B01D33/00; Auxiliary devices for filtration; Filter housing constructions
    • B01D35/30Filter housing constructions
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F16ENGINEERING ELEMENTS AND UNITS; GENERAL MEASURES FOR PRODUCING AND MAINTAINING EFFECTIVE FUNCTIONING OF MACHINES OR INSTALLATIONS; THERMAL INSULATION IN GENERAL
    • F16LPIPES; JOINTS OR FITTINGS FOR PIPES; SUPPORTS FOR PIPES, CABLES OR PROTECTIVE TUBING; MEANS FOR THERMAL INSULATION IN GENERAL
    • F16L11/00Hoses, i.e. flexible pipes
    • F16L11/14Hoses, i.e. flexible pipes made of rigid material, e.g. metal or hard plastics
    • F16L11/15Hoses, i.e. flexible pipes made of rigid material, e.g. metal or hard plastics corrugated
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F16ENGINEERING ELEMENTS AND UNITS; GENERAL MEASURES FOR PRODUCING AND MAINTAINING EFFECTIVE FUNCTIONING OF MACHINES OR INSTALLATIONS; THERMAL INSULATION IN GENERAL
    • F16LPIPES; JOINTS OR FITTINGS FOR PIPES; SUPPORTS FOR PIPES, CABLES OR PROTECTIVE TUBING; MEANS FOR THERMAL INSULATION IN GENERAL
    • F16L21/00Joints with sleeve or socket
    • F16L21/02Joints with sleeve or socket with elastic sealing rings between pipe and sleeve or between pipe and socket, e.g. with rolling or other prefabricated profiled rings
    • F16L21/035Joints with sleeve or socket with elastic sealing rings between pipe and sleeve or between pipe and socket, e.g. with rolling or other prefabricated profiled rings placed around the spigot end before connection

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Mechanical Engineering (AREA)
  • Chemical & Material Sciences (AREA)
  • Chemical Kinetics & Catalysis (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

PURPOSE: A method for searching an IP(Internet Protocol) address using a hashing table formed with an SRAM and a hardware structure thereof are provided to search an entry having the longest matched prefix bits from the entries matched in each table, after making several address search tables with the SRAMs and performing address search by applying a hashing technique to each table. CONSTITUTION: A hashing hardware(100) hashes the prefix of the input address. A main processor(110) is equipped with a main table(111), searches the entry of the main table having the prefix matched with the prefix of the address by comparing the prefix of the address with the prefix stored in a position, which is appointed by a hashing result value, of the main table, and transmits matched entry information. A sub-processor(120) is equipped with a sub table(121), searches the entry of the sub table having the prefix matched with the prefix of the address from the position appointed by a pointer of the main table, and transmits the matched address information. A priority encoder(130) searches the entry having the longest matched prefix bits from respective entries by receiving the matched entry information.

Description

SRAM과 해슁을 이용한 IP 어드레스 검색 방법 및 하드웨어 구조{Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing}Method and Hardware Architecture for Searching IP Address by Using SRAM and Hash}

본 발명은 SRAM과 해슁을 이용한 IP 어드레스 검색 방법 및 하드웨어 구조에 관한 것이다. 더욱 상세하게는, IP 어드레스의 프리픽스 길이별로 각각 다른 SRAM을 사용하여 여러 개의 어드레스 검색 테이블을 만들고, 각 테이블에 대하여 해슁 기법을 적용하여 동시에 어드레스 검색을 수행한 후, 각 테이블에서 일치되어 나온 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 방식으로 IP 어드레스를 검색하는 방법 및 이를 위한 하드웨어 구조에 관한 것이다.The present invention relates to an IP address retrieval method and hardware architecture using SRAM and hashing. More specifically, a number of address lookup tables are created using different SRAMs for each prefix length of an IP address, and address lookups are simultaneously performed by applying a hashing method to each table, and among the entries matched in 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 of a prefix, and a hardware structure therefor.

인터넷 서비스를 제공하기 위해서는 링크 속도 및 라우터 데이터 효율(Throughput)과 관련된 패킷 전달율 등의 사항이 중요한 영향을 미친다. 인터넷 라우터에서의 패킷 전달(Packet Forwarding)은 현재 기술로는 링크 속도의 증가만큼 빠르게 수행되고 있지 못하다. 특별히, 패킷 전달을 수행하는 데 있어서 가장 중요한 과정이라 할 수 있는 어드레스 검색(Lookup)은 라우터에 입력된 패킷의 헤더에 있는 목적지 주소를 키로 사용하여 라우터에 저장되어 있는 전달 테이블(Forwarding Table) 내의 키와 부합하는 엔트리를 찾는 과정을 말하는데, 이 과정은 오늘날의 라우터에서 시간 지연을 발생시키는 주요 요인으로 작용하고 있다. 따라서 차세대 인터넷 라우터를 설계하는 데 있어서 중요시되어야 할 문제 중 하나는 어드레스 검색을 얼마나 빠른 속도로 수행할 수 있느냐 하는 것이다.In order to provide Internet services, such factors as link speed and packet transfer rate related to router data throughput are important. Packet forwarding in Internet routers is not currently being performed as fast as link speeds with current technologies. In particular, address lookup, which is the most important process in performing packet forwarding, is a key in a forwarding table stored in a router using a destination address in a header of a packet input to the router as a key. This is the process of finding an entry that matches, which is a major contributor to time delays in today's routers. Therefore, one of the important issues in designing next-generation Internet routers is how fast address search can be performed.

가장 직관적인 어드레스 검색 구조는 IP(Internet Protocol) 어드레스 자체를 메모리의 포인터로 이용하는 것이라 할 것이다. 다시 말하면, IP 목적지 어드레스가 32 비트이므로 232개의 엔트리를 갖는 메모리를 설정하여, 임의의 패킷이 들어왔을 때 패킷의 목적지 IP 어드레스를 키로 사용함으로써 목적지 IP 어드레스가 가리키는 메모리의 엔트리에 그 패킷에 해당하는 전달 정보(Forwarding Information)를 저장하는 것이다. 그러나 이 방식은 한 엔트리의 크기를 3 byte라 가정했을 경우 12 Gbyte 라는 엄청난 양의 메모리를 필요로 하므로 실용적이지 못하다는 문제점이 있다.The most intuitive address retrieval structure would be to use the Internet Protocol (IP) address itself as a pointer to the memory. In other words, since the IP destination address is 32 bits, set a memory with 2 32 entries, and use the destination IP address of the packet as a key when any packet comes in so that it corresponds to the entry in the memory pointed to by the destination IP address. It is to store the forwarding information. However, this method is not practical because it requires a huge amount of memory of 12 Gbytes if one entry is 3 bytes in size.

IP 어드레스 검색에 요구되는 롱기스트 프리픽스 매칭(Longest Prefix Matching)의 수행을 위해 여러 가지 빠른 검색(Routing-Lookup) 알고리즘들이 제안되어 왔다. IP 어드레스 검색은 IP 어드레스의 계층적 구조와 CIDR(Classless Inter-Domain Routing) 구조로부터 오는 특이성으로 인하여 주로 트라이(Trie)를 이용한 구조가 연구되어 왔다.Various routing-lookup algorithms have been proposed for performing Longest Prefix Matching required for IP address lookup. IP address retrieval has been studied mainly using Trie because of the hierarchical structure of IP addresses and the specificity that comes from the Classless Inter-Domain Routing (CIDR) structure.

전달 검색 구조(Forwarding-Lookup Structure)는 150~160 Kbyte 정도의 메모리를 사용하여 4만여 개의 엔트리를 가지는 큰 라우팅 테이블을 구성한 후 소프트웨어적인 접근을 시도하는 방식인데, 이것을 하드웨어로 구현하려면 어드레스 검색을 위해서 최소 2번에서 최대 9번까지의 메모리 접근(Memory Access)이 요구된다는 문제점이 있다.Forwarding-Lookup Structure uses 150 ~ 160 Kbytes of memory to construct a large routing table with 40,000 entries and then attempts a software approach. The problem is that at least two to nine memory accesses are required.

빠른 검색 구조(Fast Routing-Lookup Scheme)는 용량이 큰 DRAM(Dynamic Random Access Memory)을 사용하는데, 어드레스 검색을 위해 최대 2번의 메모리 접근만을 필요로 한다는 장점이 있지만 33 Mbyte 정도의 큰 저장 공간을 필요로 한다는 문제점이 있다. 한편 중간 길이(Intermediate-Length) 테이블을 덧붙이는 방법으로 전달 테이블의 크기를 9 Mbyte까지 줄이는 경우에는, 메모리 접근 회수가 3번으로 증가하게 된다.Fast Routing-Lookup Scheme uses a large amount of Dynamic Random Access Memory (DRAM), which requires up to two memory accesses for address lookup, but requires as much as 33 Mbytes of storage space. There is a problem that. On the other hand, when the size of the transfer table is reduced to 9 Mbytes by adding an intermediate-length table, the number of memory accesses is increased to three times.

이진 검색 메카니즘(Binary Search Mechanism)을 기본으로 한 방법은 어드레스와 라우팅 테이블의 크기가 증가되어도 스케일링(Scaling)이 용이한 장점을 지닌다. 그러나 최악의 경우, log2(Address Bits)의 해쉬 검색이 요구된다는 문제점이 있다. 소프트웨어 기반의 이 방식은 Multi-Way 검색 방식, Multi-Column 검색 방식 및 캐쉬 구조를 이용하여 좀 더 보완될 수 있다고는 하지만, 이 방식은 완전 해슁(Perfect Hashing)을 가정하는 것으로 인해 하드웨어로의 구현이 쉽지 않다는 문제점이 있다.The method based on the binary search mechanism has the advantage of easy scaling even if the size of the address and routing table is increased. However, in the worst case, a hash search of log 2 (address bits) is required. Although this software-based approach can be further complemented using the multi-way search method, the multi-column search method, and the cache structure, this method is implemented in hardware due to the assumption of perfect hashing. There is a problem that this is not easy.

내용 주소화 메모리(CAMs : Contents Addressable Memories)를 사용한 방식은 대표적으로 사용되는 하드웨어 구현 방식으로, 메모리에 저장된 값과 들어오는 키 값이 병렬적으로 직접 비교된다. 그러나 CAM 방식은 기존의 메모리보다 속도가 느리고 비용이 비싸며, 저장 공간이 작은 편이다. 따라서 128 비트 어드레스를 사용하는 IPv6에서 CAM 방식을 적용하기에는 비용 부담이 너무 크다는 문제점이 있다.The use of Contents Addressable Memories (CAMs) is a typical hardware implementation, where the values stored in memory and incoming key values are compared directly in parallel. However, the CAM method is slower, more expensive, and has less storage space than conventional memory. Therefore, there is a problem that the cost is too high to apply the CAM scheme in IPv6 using a 128-bit address.

전술한 종래 방식들을 살펴보면, 라우팅 방식을 정할 때 고려해야 할 점으로 평균 메모리 접근 횟수, 요구되는 저장 공간의 크기, 갱신(Update)의 용이 정도, 전처리(Preprocessing)의 요구 여부 및 하드웨어 구현 가능성 등을 생각할 수 있다. 따라서 평균 메모리 접근 횟수는 줄이고 저장 공간의 크기를 최소화하며, 갱신 작업을 용이하게 수행할 수 있고 전처리를 요하지 않으며, 하드웨어로 쉽게 구현할 수 있도록 하는 IP 어드레스 검색 방식이 요구되고 있다.Considering the above-described conventional methods, considerations for determining the routing method include considering the average number of memory accesses, the amount of storage space required, the ease of updating, the need for preprocessing, and the possibility of hardware implementation. Can be. Therefore, there is a need for an IP address retrieval method that reduces the average number of memory accesses, minimizes the size of the storage space, facilitates the update operation, requires no preprocessing, and can be easily implemented in hardware.

상기한 문제점을 해결하기 위해 본 발명은, SRAM과 해슁을 이용한 IP 어드레스 검색 방법 및 하드웨어 구조에 있어서, IP 어드레스의 프리픽스 길이별로 각각 다른 SRAM을 사용하여 여러 개의 어드레스 검색 테이블을 만들고, 각 테이블에 대하여 해슁 기법을 적용하여 동시에 어드레스 검색을 수행한 후, 각 테이블에서 일치되어 나온 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 방식으로 IP 어드레스를 검색하는 방법 및 이를 위한 하드웨어 구조를 제공하는 것을 목적으로 한다.In order to solve the above problems, the present invention, in the IP address search method and hardware structure using SRAM and hashing, to create a plurality of address lookup table using different SRAM for each prefix length of the IP address, for each table To provide an address and a hardware structure for searching an IP address by applying a hashing method and searching for an address that has the longest number of prefix bits among entries matched in each table. The purpose.

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

도 2는 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색 방법을 나타낸 순서도,2 is a flowchart illustrating a method of searching for an IP address according to a preferred embodiment of the present invention;

도 3은 본 발명의 바람직한 실시예에 따른 SRAM 별 해슁 테이블의 검색 구조를 나타낸 도면,3 is a diagram illustrating a search structure of a hash table for each SRAM according to a preferred embodiment of the present invention;

도 4는 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조에서의 메모리 접근 분포를 나타낸 그래프이다.4 is a graph illustrating a memory access distribution 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>

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

111 : 메인 테이블 120 : 보조 프로세서111: main table 120: coprocessor

121 : 보조 테이블 130 : Priority 인코더121: Auxiliary Table 130: Priority Encoder

302, 312 : 프리픽스 필드 304, 314 : 다음 홉 주소 필드302, 312 prefix field 304, 314 next hop address field

306, 316 : 출력 포트 필드 308 : 충돌 횟수 필드306, 316: output port field 308: collision count field

310 : 포인터 필드310: pointer field

상기한 목적을 달성하기 위해 본 발명은, IP 어드레스의 프리픽스 길이별로 각각 구성된 주 테이블과 보조 테이블에 엔트리가 저장되는 형태로 생성되는 SRAM으로 구성된 해슁 테이블을 이용하여 IP 어드레스를 검색하는 방법에 있어서, (a) 입력된 어드레스의 프리픽스 길이별로 구성된 해슁 하드웨어를 이용하여 상기 어드레스를 상기 어드레스의 프리픽스 길이별로 각각 해슁하는 단계; (b) 상기 해슁의 결과값이 가리키는 상기 주 테이블의 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 주 테이블의 상기 엔트리를 상기 어드레스의 프리픽스 길이별로 각각 검색하여일치된 엔트리의 정보를 전송하는 단계; (c) 상기 (b) 단계의 검색 결과, 상기 일치하는 프리픽스를 검색하지 못 한 경우, 상기 주 테이블의 포인터가 가리키는 상기 보조 테이블의 지점에서 시작하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 보조 테이블의 상기 엔트리를 상기 어드레스의 프리픽스 길이별로 각각 검색하여 일치된 엔트리의 정보를 전송하는 단계; 및 (d) 상기 (b) 단계 및 상기 (c) 단계에서 전송받은 상기 정보를 이용하여 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 단계를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법을 제공하는 것을 특징으로 한다.In order to achieve the above object, the present invention provides a method for retrieving an IP address using a hash table composed of an SRAM generated in a form in which entries are stored in a main table and an auxiliary table configured for each prefix length of an IP address, (a) hashing the addresses for each prefix length of the address using hash hardware configured for each prefix length of the input address; (b) comparing the prefix stored at the point of the main table indicated by the result of the hash with the prefix of the address so that the entry of the main table having a prefix that matches the prefix of the address by the prefix length of the address; Retrieving and transmitting information of matched entries, respectively; (c) if the matching prefix is not found, starting from the point of the auxiliary table pointed to by the pointer of the main table, and having a prefix that matches the prefix of the address; Searching each entry of the auxiliary table for each prefix length of the address and transmitting information of a matched entry; And (d) searching for an entry having the longest number of bits of the prefix among the entries searched for each prefix length of the address by using the information transmitted in the steps (b) and (c). An IP address retrieval method using an SRAM and a hash is provided.

또한, 본 발명의 다른 목적에 의하면, SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조에 있어서, 입력된 어드레스의 프리픽스를 해슁하는 해슁 하드웨어; 상기 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 주 테이블을 구비하며, 상기 해슁의 결과값이 가리키는 상기 주 테이블의 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 주 테이블의 상기 엔트리를 검색하고 일치된 엔트리의 정보를 전송하는 메인 프로세서; 상기 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 보조 테이블을 구비하며, 상기 주 테이블의 포인터가 가리키는 상기 보조 테이블의 지점에서 시작하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 보조 테이블의 상기 엔트리를 검색하고 일치된 엔트리의 정보를 전송하는 보조 프로세서; 및 상기 일치된 엔트리의 정보를 전송받아 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 Priority 인코더(Encoder)를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조를 제공하는 것을 특징으로 한다.According to another object of the present invention, there is provided a hardware structure for IP address retrieval using SRAM and hashing, comprising: hashing hardware for hashing a prefix of an input address; A main table in which entries are stored in the form of a hash table according to the prefix length of the address, and the prefix stored at the point of the main table indicated by the hash value is compared with the prefix of the address; A main processor for retrieving the entry of the main table having a matching prefix and transmitting information of the matched entry; The auxiliary table having an auxiliary table in which entries are stored in the form of a hash table according to the prefix length of the address, starting at the point of the auxiliary table indicated by the pointer of the main table, and having a prefix that matches the prefix of the address; A coprocessor for retrieving said entry of and transmitting information of a 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 entries searched for each prefix length of the address. It provides a hardware structure for IP address retrieval.

이하, 본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 우선 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.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.

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

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

해슁 하드웨어(100)는 입력된 어드레스의 프리픽스를 해슁하는 기능을 한다. 본 발명의 바람직한 실시예에 따른 해슁 하드웨어(100)는 프리픽스의 비트 수를 해슁의 결과로 나오기를 원하는 비트 수만큼씩 묶어서 배타적 논리합(Exclusive OR)을 수행하는 방식을 사용한다.The hash hardware 100 functions to hash the prefix of the input address. The hash hardware 100 according to the preferred embodiment of the present invention uses a method of performing an exclusive OR by combining the number of bits of the prefix by the number of bits desired to be produced as a result of hashing.

메인 프로세서(110)는 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로엔트리가 저장되는 주 테이블(111)을 포함하고 있다. 메인 프로세서(110)는 해슁 하드웨어(100)에서 나온 해슁의 결과값이 가리키는 주 테이블(111)의 지점에 저장된 프리픽스와 입력된 어드레스의 프리픽스를 비교한 후, 입력된 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 주 테이블(111)의 엔트리를 검색한다.The main processor 110 includes a main table 111 in which entries are stored in the form of hash tables according to the prefix length of the address. The main processor 110 compares the prefix stored in the point of the main table 111 indicated by the hash value from the hash hardware 100 and the prefix of the input address, and then selects the prefix that matches the prefix of the input address. Branch retrieves an entry in the main table 111.

보조 프로세서(120)는 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 보조 테이블(121)을 포함하고 있다. 보조 프로세서(120)는 주 테이블(111)의 포인터가 가리키는 보조 테이블(121)의 지점에서 시작하여, 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 보조 테이블(121)의 엔트리를 검색한다.The coprocessor 120 includes an auxiliary table 121 in which entries are stored in the form of hash tables according to the prefix length of the address. The coprocessor 120 searches for an entry in the sub table 121 starting at the point of the sub table 121 indicated by the pointer of the main table 111 and having a prefix that matches the prefix of the address.

Priority 인코더(130)는 임의의 한 어드레스에 대해 모든 테이블에서의 검색이 끝나기를 기다렸다가, 어드레스의 프리픽스 길이별로 각각 검색된 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색한다.Priority encoder 130 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 for each prefix length of the address.

도 1에 도시된 바와 같이, 해슁 하드웨어(100), 주 테이블(111) 및 보조 테이블(121)은 어드레스의 프리픽스 길이별로 각각 생성된다. 입력으로 사용되는 각각의 프리픽스 길이별로 별도의 해슁 하드웨어(100)에서 나온 값은 주 테이블(111) 중 하나의 엔트리를 가리키고, 주 테이블(111)에 저장된 정보 중 일부분이 또 다시 보조 테이블(121)을 가리키게 된다. 주 테이블(111)과 보조 테이블(121)은 하나의 SRAM으로 구성될 수 있다. 즉, 프리픽스 길이별로 어드레스 검색 테이블이 따로 구성되고, 각각의 SRAM에 저장된 테이블에서 어드레스 검색이 병렬적으로 동시에 수행된다. 전술한 어드레스 검색 방법을 수행하는 알고리즘은 다음과 같다.As shown in FIG. 1, the hash hardware 100, the main table 111 and the auxiliary table 121 are generated for each prefix length of the address. The value from the separate hash hardware 100 for each prefix length that is used as an input points to an entry in one of the main tables 111, and part of the information stored in the main table 111 is again sub-table 121. Will be displayed. The main table 111 and the sub table 121 may be composed of one SRAM. That is, the address lookup table is configured separately for each prefix length, and address lookup is performed in parallel in the tables stored in the respective SRAMs. An algorithm for performing the above-described address search method is as follows.

FunctionSearch_Prefix /* 입력된 어드레스 D와 일치되는 prefix search */ Function Search_Prefix / * prefix search that matches address D entered * /

Do parallel ( L = 8 ~ 32 )Do parallel (L = 8 ~ 32)

Extracts the first L bits of D into D′;Extracts the first L bits of D into D ';

Table_pointer = Hash( D′);Table_pointer = Hash (D ');

/* Hash( D′)은 Exclusive-OR 수행하고 그 결과를 table/ * Hash (D ′) performs an Exclusive-OR and returns the table

pointer로 이용 */use as pointer * /

Compare D′and an entry value pointed by Table_pointer;Compare D'and an entry value pointed by Table_pointer;

if ( not same ) begin /* 충돌현상 */if (not same) begin / * crash * /

use pointer to the Sub_table and # of entries to beuse pointer to the Sub_table and # of entries to be

searched and perform Binary search for the entries;searched and perform Binary search for the entries;

endend

Send Search_result and ACK to the Priority Encoder;Send Search_result and ACK to the Priority Encoder;

End Do parallelEnd Do parallel

Select the entry with longest prefixSelect the entry with longest prefix

본 발명의 바람직한 실시예에 따른 알고리즘에서 입력되는 IP 패킷은 프리픽스 길이를 8부터 32까지 갖는 것으로 한다. 다만 이 값은 달라질 수 있는 값이다.The IP packet input in the algorithm according to the preferred embodiment of the present invention has a prefix length of 8 to 32. However, this value may vary.

알고리즘에 대한 설명은 알고리즘에 따른 순서도와 함께 설명한다.The description of the algorithm is described with a flowchart according to the algorithm.

도 2는 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색 방법을 나타낸 순서도이다.2 is a flowchart illustrating an IP address searching method according to a preferred embodiment of the present invention.

우선, 입력된 어드레스의 프리픽스 길이별로 구성된 해슁 하드웨어(100)를 이용하여 어드레스를 프리픽스 길이에 따른 SRAM별로 병렬적으로 해슁한다(S200). 본 발명의 바람직한 실시예에 따른 해슁 하드웨어(100)는 프리픽스의 비트 수를 해슁의 결과로 나오기를 원하는 비트 수만큼씩 묶어서 배타적 논리합(Exclusive-OR)을 수행하는 방식을 사용한다. 만약 프리픽스 길이가 해슁의 결과로 나오기를 원하는 비트의 수로 묶이지 않는 경우, 앞에서부터 결과로 나오기를 원하는 비트 수만큼 묶고, 남은 비트는 결과로 나오기를 원하는 비트 수에 모자란 비트 수만큼 임의의 비트로 채운 후 Exclusive-OR를 수행한다. 남은 비트를 채울 때에는 뒤에서부터 1010…의 방식으로 채워 넣는다. 예를 들어 프리픽스 8의 경우, 해슁의 결과로 2 비트를 사용하므로 해슁값(8)=[7:6]^[5:4]^[3:2]^[1:0]의 방식으로 계산을 하고, 프리픽스 14의 경우 해슁의 결과로 6 비트가 만들어지기를 원하므로 이 때 해슁값(14)=[13:8]^[7:2]^{[1:0],0,1,0,1}과 같은 방식으로 수행한다.First, an address is decoded in parallel for each SRAM according to a prefix length by using hashing hardware 100 configured for each prefix length of an input address (S200). The hash hardware 100 according to the preferred embodiment of the present invention uses a method of performing an exclusive-OR by combining the number of bits of the prefix by the number of bits desired to be produced as a result of hashing. If the prefix length is not bound by the number of bits you want to result in the hash, then wrap it from the beginning by the number of bits you want to result in, and fill the remaining bits with random bits short of the number of bits you want to result. Perform Exclusive-OR. When filling the remaining bits, 1010... Fill it in the way. For example, for prefix 8, we use 2 bits as the result of the hash, so we compute it in the manner of hash value (8) = [7: 6] ^ [5: 4] ^ [3: 2] ^ [1: 0]. In the case of prefix 14, we want 6 bits to be created as a result of hashing, so that hash value (14) = [13: 8] ^ [7: 2] ^ {[1: 0], 0,1, 0,1}.

S202 단계에서 구한 해슁의 결과값이 가리키는 주 테이블(110)의 지점에 저장된 프리픽스와 어드레스의 프리픽스를 비교하여, 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 주 테이블(110)의 엔트리를 검색한다(S202).The prefix stored in the point of the main table 110 indicated by the hash value obtained in step S202 is compared with the prefix of the address, and an entry of the main table 110 having a prefix matching the prefix of the address is searched (S202). .

검색 결과 일치하는 프리픽스를 검색했는지를 판단한 후(S204), 검색하지 못 한 경우, 즉 충돌이 발생한 경우에는 주 테이블(111)의 포인터가 가리키는 보조 테이블(121)의 지점에서 시작하여, 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 보조 테이블(121)의 엔트리를 검색한다(S206). 이 때, 주 테이블(111)의 엔트리에 저장된 정보 중 보조 테이블(121)을 가리키는 포인터와 이 엔트리는 몇 개의 충돌 현상을 갖는지에 대한 정보를 검색에 이용한다. 본 발명의 바람직한 실시예에서는 포인터가 가리키는 보조 테이블(121)로 옮겨서 포인터가 가리키는 지점으로부터 충돌 현상에 해당하는 엔트리들에 대하여 이진 검색(Binary Search) 방법을 적용하여 검색한다. 충돌이 발생하지 않은 경우에는 주 테이블(111)에서 어드레스의 프리픽스와 일치하는 엔트리를 검색한 경우이므로, 보조 테이블(121)을 검색할 필요가 없다.After determining whether or not a matching prefix is found as a result of the search (S204), if the search fails, that is, a collision occurs, starting from the point of the auxiliary table 121 indicated by the pointer of the main table 111, the prefix of the address The entry of the auxiliary table 121 having the prefix matching is searched for (S206). At this time, among the information stored in the entry of the main table 111, a pointer to the sub table 121 and information on how many collisions the entry has is used for the search. According to a preferred embodiment of the present invention, a binary search method is applied to entries corresponding to a collision phenomenon from a point pointed to by the pointer to the auxiliary table 121 pointed to by the pointer. If no collision has occurred, since the entry matching the prefix of the address is searched in the main table 111, it is not necessary to search the auxiliary table 121.

충돌이 발생하지 않아 주 테이블(111)에서 검색된 어드레스의 프리픽스와 일치하는 엔트리의 정보 또는 충돌이 발생하여 보조 테이블(121)에서 검색된 어드레스의 프리픽스와 일치하는 엔트리의 정보를 Priority 인코더에 전송한다(S208). 이 때, 전송하는 정보는 다음 홉 어드레스 정보 및 출력 포트 정보 등이다.Since the collision does not occur, the information of the entry matching the prefix of the address retrieved from the main table 111 or the collision occurs, and the information of the entry matching the prefix of the address retrieved from the auxiliary table 121 is transmitted to the Priority encoder (S208). ). At this time, the information to be transmitted is next hop address information and output port information.

전술한 S202에서 S208까지의 과정은 정해 놓은 프리픽스의 길이에 따른 SRAM별로 병렬적으로 수행된다. 따라서 S208 과정이 끝나면 어드레스의 프리픽스 길이별로 일치된 엔트리가 검색된다. Priority 인코더에서는 임의의 한 IP 어드레스에 대해 모든 테이블에서의 검색이 끝나기를 기다렸다가, 검색된 엔트리 중에서 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색한다(S210). 즉, 프리픽스 길이별로 각각 검색된 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 프리픽스가 BMP(Best Matching Prefix)로 결정되어, 그 엔트리의 다음 홉 어드레스 및 출력 포트 정보가 패킷 전송에 이용된다.The above-described processes from S202 to S208 are performed in parallel for each SRAM according to the predetermined prefix length. Therefore, after the process of S208, a matched entry is searched for each prefix length of the address. The priority encoder waits for the end of the search in all tables for any one IP address, and then searches for the entry with the longest number of prefix bits among the searched entries (S210). That is, the prefix that matches the longest number of bits of the prefix among the entries retrieved for each prefix length is determined as a BMP (Best Matching Prefix), and the next hop address and output port information of the entry are used for packet transmission.

도 3은 본 발명의 바람직한 실시예에 따른 SRAM 별 해슁 테이블의 검색 구조를 나타낸 도면이다.3 is a diagram illustrating a search structure of a hash table for each SRAM according to a preferred embodiment of the present invention.

도 3에서는 한 예로, 입력 프리픽스 길이가 24비트, 그리고 계산된 해슁값이 16비트인 해슁 함수와 그와 연결된 주 테이블(111) 및 보조 테이블(121)의 구조를 보여준다.As an example, FIG. 3 illustrates a hash function having an input prefix length of 24 bits and a calculated hash value of 16 bits, and structures of a main table 111 and an auxiliary table 121 connected thereto.

본 발명의 바람직한 실시예에 따른 주 테이블의 엔트리는 비교에 사용되는 프리픽스 필드(302), 다음 홉 어드레스 필드(304), 출력 포트 필드(306), 이 해슁 엔트리에 해당하는 충돌 횟수 필드(308) 및 보조 테이블(121)을 가리키는 포인터 필드(310) 등을 포함하며, 보조 테이블(121)은 프리픽스 필드(312), 다음 홉 어드레스 필드(314) 및 출력 포트 필드(316)만을 포함한다.An entry in the main table according to a preferred embodiment of the present invention may include a prefix field 302, a next hop address field 304, an output port field 306, and a collision count field 308 corresponding to this hash entry. And a pointer field 310 pointing to the auxiliary table 121, and the auxiliary table 121 includes only the prefix field 312, the next hop address field 314, and the output port field 316.

도 3에 도시된 바와 같이, (1)의 예시는 주 테이블(111)에서 검색이 끝나는 경우이다. 이 경우에는 엔트리에 저장된 다음 홉 어드레스 필드(304)와 출력 포트 필드(306)에 저장되어 있는 정보가 Priority 인코더로 보내진다. 그러나 해슁 값이 가리키는 지점에 저장된 프리픽스가 입력된 IP 어드레스의 프리픽스 값이 아닌 다른 어드레스의 프리픽스라면, 이는 충돌 현상이 발생한 (2)의 경우로서 그 엔트리에 저장된 정보 중 보조 테이블(121)을 가리키는 포인터 필드(308)와 이 해슁 엔트리에 해당하는 충돌 횟수 필드(310)에 저장되어 있는 정보를 검색에 이용해야 한다. 본 발명의 바람직한 실시예에서는 포인터가 가리키는 보조 테이블(121)로 옮겨서 포인터가 가리키는 지점으로부터 충돌 현상에 해당되는 엔트리들에 대하여 이진 검색을 적용하여 검색한다.As shown in FIG. 3, an example of (1) is a case where the search is finished in the main table 111. In this case, the information stored in the next hop address field 304 and the output port field 306 stored in the entry is sent to the Priority encoder. However, if the prefix stored at the point indicated by the hash value is a prefix of an address other than the prefix value of the input IP address, this is a case of (2) where a collision occurs and a pointer to the auxiliary table 121 among the information stored in the entry. The information stored in the field 308 and the collision count field 310 corresponding to this hash entry should be used for the search. According to a preferred embodiment of the present invention, a binary search is applied to entries corresponding to a collision phenomenon from a point pointed to by the pointer to the auxiliary table 121 pointed to by the pointer.

한편, 도 1 및 도 3에 도시되어 있지는 않으나, 다음 홉 어드레스 및 출력 포트 등의 정보를 포함하는 포워딩 램(Forwarding RAM)(미도시)을 별개로 둘 수도 있다. 포워딩 램(미도시)을 별개로 사용하는 경우, 주 테이블(111)의 엔트리와 보조 테이블(121)의 엔트리 중 다음 홉 어드레스 필드(304) 및 출력 포트 필드(306)는 포워딩 램(미도시)을 가리키는 포인터 필드로 대체할 수 있다. 이 경우, 전술한 알고리즘에 약간의 차이가 생긴다. 즉, 단계 S210에서 전송하는 정보는 다음 홉 어드레스 정보 및 출력 포트 정보가 아닌 포워딩 램(미도시)을 가리키는 포인터이다. 따라서, 단계 S216에서 롱기스트 프리픽스를 가지는 엔트리를 검색한 경우, Priority 인코더(130)는 엔트리의 다음 홉 어드레스 정보 및 출력 포트 정보를 가지고 있지 않기 때문에, 해당 엔트리의 다음 홉 어드레스 정보 및 출력 포트 정보는 포워딩 램(미도시)으로부터 가져온다.Although not shown in FIGS. 1 and 3, a forwarding RAM (not shown) including information such as a next hop address and an output port may be separately provided. When forwarding RAM (not shown) is used separately, the next hop address field 304 and the output port field 306 of the entry of the main table 111 and the entry of the auxiliary table 121 are forwarding ram (not shown). Can be replaced with a pointer field that points to. In this case, a slight difference occurs in the algorithm described above. That is, the information transmitted in step S210 is a pointer to a forwarding RAM (not shown) rather than next hop address information and output port information. Therefore, when searching for an entry having a longest prefix in step S216, since the priority encoder 130 does not have the next hop address information and the output port information of the entry, the next hop address information and the output port information of the entry are forwarded. Taken from RAM (not shown).

이 모든 과정은 프리픽스 길이에 따른 SRAM별로 병렬적으로 동시에 수행된다. Priority 인코더에서는 임의의 한 IP 어드레스에 대해 모든 테이블에서의 검색이 끝나기를 기다렸다가, 프리픽스가 일치되는 엔트리 중에서 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 선택하며, 그 엔트리의 다음 홉 어드레스, 출력 포트 정보가 패킷 전송에 이용된다.All of this is done in parallel for each SRAM along the prefix length. The Priority encoder waits for the end of the search in all tables for any one IP address, then selects the entry whose prefix number matches the longest bit among the entries whose prefix matches, and the next hop address and output port information for that entry Used for packet transmission.

이하, 본 발명의 바람직한 실시예에 따른 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.

표 1에서는 요구되는 메모리 크기와 메모리 접근 횟수에 있어서의 성능을 다른 검색 방식들과 비교한다.Table 1 compares the performance of the required memory size and the number of memory accesses with other search schemes.

어드레스 검색 방식Address search method 메모리 접근 횟수(최소/최대)Number of memory accesses (min / max) 해슁 테이블의 크기Size of hatch table Noble IP-Routing LookupNoble IP-Routing Lookup 1/31/3 450 KB ~ 470 KB450 KB to 470 KB 빠른 검색 구조Quick search structure 1/21/2 33 MB33 MB 빠른 검색 구조에서 중간 길이 테이블을 덧붙이는 구조Structure appending medium length table in quick search structure 1/31/3 9 MB9 MB 전달 검색 구조Forward search structure 2/92/9 150 KB ~ 160 KB150 KB to 160 KB 본 발명의 구조Structure of the present invention 1/51/5 189 KB189 KB

본 발명의 바람직한 실시예에 따른 하드웨어 구조는 표 1에서 보는 바와 같이 전달 검색 구조를 제외하고는 가장 작은 크기의 메모리를 요구한다. 본 발명의 바람직한 실시예에 따른 하드웨어 구조는 프리픽스의 길이별로 별도의 SRAM을 사용하므로 이에 따른 오버헤드(Overhead)도 고려되어야 하며, 각 프리픽스 길이별로 별도의 해슁 하드웨어(100)를 사용하여야 한다는 단점이 있으나, 배타적 논리합(Exclusive-OR)을 사용한 해슁은 하드웨어로의 구현 부담이 적다. 또한 패킷당 평균 메모리 접근 수는 1.93번으로서, 메모리를 많이 사용한 다른 하드웨어에 기초한 방식과 비슷한 성능을 가지는 것을 볼 수 있다.The hardware structure according to the preferred embodiment of the present invention requires the smallest memory except for the forward search structure as shown in Table 1. Since the hardware structure according to the preferred embodiment of the present invention uses a separate SRAM for each length of the prefix, an overhead thereof must be considered, and a disadvantage is that a separate hashing hardware 100 must be used for each prefix length. However, the solution using Exclusive-OR is less expensive to implement in hardware. In addition, the average number of memory accesses per packet is 1.93, which shows similar performance to other hardware-based methods.

도 4는 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조에서의 메모리 접근 분포를 나타낸 그래프이다.4 is a graph illustrating a memory access distribution in a hardware structure for IP address retrieval according to a preferred embodiment of the present invention.

도 4의 분포에서 보이듯이 78% 이상의 라우트가 두 번의 메모리 접근으로, 95% 이상의 라우트가 세 번의 메모리 접근으로 검색이 가능한 것을 알 수 있다.As shown in the distribution of FIG. 4, it can be seen that more than 78% of routes can be searched by two memory accesses, and more than 95% of routes can be searched by three memory accesses.

표 1에서 보면 본 발명의 바람직한 실시예에 따른 IP 어드레스 검색을 위한 하드웨어 구조의 경우 최대 메모리 접근 횟수가 5번인 것을 볼 수 있는데, 이는 주 테이블(111)이 상대적으로 작아 충돌 현상이 많이 발생한 경우로서, 주 테이블(111)을 위하여 메모리를 좀 더 할당하는 방식으로 최대 메모리 접근 수를 조절할 수 있다. 또한 하드웨어 파이프라인 기법을 이용하면 어드레스 검색 처리율(Throughput)을 향상시킬 수 있다. 예를 들어 주 테이블(111)과 보조 테이블(121)을 별개의 SRAM을 사용하며 구성한다면, 주 테이블(111)에서의 어드레스 검색과 보조 테이블(121)에서의 어드레스 검색이 순차적으로 들어오는 패킷들에 대해 병렬적으로 수행될 수 있다.In Table 1, the hardware architecture for IP address retrieval according to the preferred embodiment of the present invention can be seen that the maximum number of memory accesses is five times, which is a case where the main table 111 is relatively small and many collisions occur. The maximum number of memory accesses can be adjusted by allocating more memory for the main table 111. Hardware pipeline techniques can also be used to improve address lookup throughput. For example, if the main table 111 and the sub-table 121 are configured using separate SRAMs, the address lookup in the main table 111 and the address lookup in the sub-table 121 are sequentially applied to the packets. Can be performed in parallel.

이상의 설명은 본 발명을 예시적으로 설명한 것에 불과한 것으로, 본 발명이 속하는 기술분야에서 통상의 지식을 가지는 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 변형이 가능할 것이다. 따라서, 본 명세서에 개시된 실시예들은 본 발명을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 사상과 범위가 한정되는 것은 아니다. 본 발명의 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.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.

이상에서 설명한 바와 같이 본 발명에 의하면, 약 189 Kbyte의 저장 공간을사용한 경우, 메모리 접근 횟수는 평균 1.93번, 최소 1번, 최대 5번의 성능을 보인다. 따라서 본 발명에 의하면, 여러 개의 작은 메모리를 사용하여, 전체적으로 작은 저장 공간을 요구하면서도, 적은 횟수의 메모리 접근을 통하여 어드레스를 검색할 수 있는 우수한 하드웨어 구조 및 검색 방법을 제공한다. 또한, IP 어드레스의 각 프리픽스별로 각기 다른 SRAM에 어드레스 검색 테이블을 구성하였기 때문에 하나의 메모리에 어드레스 전달 테이블을 구성하는 방식에 비해 새로운 엔트리를 추가 및 삭제하는 테이블 갱신이 용이하다는 장점이 있다.As described above, according to the present invention, when about 189 Kbytes of storage space is used, the number of memory accesses shows an average of 1.93 times, at least 1 time, and at most 5 times. Accordingly, the present invention provides an excellent hardware structure and a retrieval method for retrieving an address through a small number of memory accesses while requiring a small amount of storage as a whole by using several small memories. In addition, since the address lookup table is configured in different SRAMs for each prefix of the IP address, there is an advantage in that a table update for adding and deleting new entries is easier than the method of configuring an address forwarding table in one memory.

Claims (22)

IP 어드레스의 프리픽스 길이별로 각각 구성된 주 테이블과 보조 테이블에 엔트리가 저장되는 형태로 생성되는 SRAM으로 구성된 해슁 테이블을 이용하여 IP 어드레스를 검색하는 방법에 있어서,A method for retrieving an IP address using a hash table composed of an SRAM generated in a form in which entries are stored in a main table and an auxiliary table configured for each prefix length of an IP address, (a) 입력된 어드레스의 프리픽스 길이별로 구성된 해슁 하드웨어를 이용하여 상기 어드레스를 상기 어드레스의 프리픽스 길이별로 각각 해슁하는 단계;(a) hashing the addresses for each prefix length of the address using hash hardware configured for each prefix length of the input address; (b) 상기 주 테이블의 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 주 테이블의 상기 엔트리를 상기 어드레스의 프리픽스 길이별로 각각 검색하여 일치된 엔트리의 정보를 전송하는 단계;(b) comparing the prefix stored at the point indicated by the result of the hash of the main table with the prefix of the address, and comparing the entry of the main table with the prefix corresponding to the prefix of the address by the prefix length of the address. Searching for each and transmitting information of the matched entry; (c) 상기 (b) 단계의 검색 결과, 상기 일치하는 프리픽스를 검색하지 못한 경우, 상기 보조 테이블에서 상기 주 테이블의 포인터가 가리키는 지점부터 시작하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 보조 테이블의 상기 엔트리를 상기 어드레스의 프리픽스 길이별로 각각 검색하여 일치된 엔트리의 정보를 전송하는 단계; 및(c) if the matching prefix is not found, the auxiliary table having a prefix that matches the prefix of the address, starting from the point indicated by the pointer of the main table in the auxiliary table; Searching each entry of the table for each prefix length of the address and transmitting information of a matched entry; And (d) 상기 (b) 단계 및 상기 (c) 단계에서 전송받은 상기 정보를 이용하여 상기 어드레스의 프리픽스 길이별로 각각 검색된 상기 엔트리 중 프리픽스의 비트 수가 가장 길게 일치하는 엔트리를 검색하는 단계(d) searching for an entry having the longest number of bits of the prefix among the entries searched for each prefix length of the address by using the information transmitted in the steps (b) and (c). 를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.IP address search method using the SRAM and hash, characterized in that it comprises a. 제 1 항에 있어서,The method of claim 1, 상기 해슁 하드웨어, 상기 주 테이블 및 상기 보조 테이블은 상기 어드레스의 프리픽스 길이별로 각각 생성되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.And the hash hardware, the main table, and the auxiliary table are generated for each prefix length of the address. 제 1 항에 있어서,The method of claim 1, 상기 주 테이블 및 상기 보조 테이블은 상기 어드레스의 프리픽스 길이별로 하나의 SRAM에 저장되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.And the primary table and the auxiliary table are stored in one SRAM for each prefix length of the address. 제 1 항에 있어서,The method of claim 1, 상기 어드레스 검색은 상기 어드레스의 프리픽스 길이별로 병렬적으로 동시에 수행되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.And searching the address simultaneously in parallel for each prefix length of the address. 제 1 항에 있어서,The method of claim 1, 상기 해슁 하드웨어는 상기 프리픽스의 비트 수를 상기 해슁의 결과로 나오기를 원하는 비트 수만큼씩 묶어서 배타적 논리합(Exclusive OR)을 수행하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.And the hash hardware performs an exclusive OR by combining the number of bits of the prefix by the number of bits desired to be produced as the result of the hash, and performing an exclusive OR. 제 1 항에 있어서, 상기 단계 (c)에서,The method of claim 1, wherein in step (c), 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 보조 테이블의 상기 엔트리 검색은 이진 검색(Binary Search) 방법을 적용하여 검색하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.And searching the entry of the auxiliary table having a prefix that matches the prefix of the address by applying a binary search method. 제 1 항에 있어서,The method of claim 1, 상기 주 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 다음 홉 어드레스, 출력 포트, 상기 보조 테이블을 가리키는 포인터 및 상기 엔트리에 해당하는 충돌 횟수를 포함하고, 상기 보조 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 다음 홉 어드레스 및 출력 포트를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.The entry of the primary table includes a prefix used for the search, a next hop address, an output port, a pointer to the auxiliary table, and a collision count corresponding to the entry, and the entry of the auxiliary table is a prefix used for the search. And a next hop address and an output port. 제 1 항에 있어서,The method of claim 1, 상기 주 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 포워딩 램(Forwarding RAM)을 가리키는 포인터, 상기 보조 테이블을 가리키는 포인터 및 상기 엔트리에 해당하는 충돌 횟수를 포함하고, 상기 보조 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 상기 포워딩 램을 가리키는 포인터를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.The entry of the primary table includes a prefix used for the search, a pointer to a forwarding RAM, a pointer to the auxiliary table, and the number of collisions corresponding to the entry, the entry of the auxiliary table being used for the search. A prefix used for the IP address retrieval method using a hash and SRAM, characterized in that it comprises a pointer to the forwarding RAM. 제 8 항에 있어서,The method of claim 8, 상기 포워딩 램은 다음 홉 어드레스 및 출력 포트를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.And the forwarding RAM comprises a next hop address and an output port. 제 1 항에 있어서,The method of claim 1, 상기 주 테이블 및 상기 보조 테이블은 상기 어드레스의 프리픽스 길이별로 별개의 SRAM에 저장되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.And the main table and the auxiliary table are stored in separate SRAMs for each prefix length of the address. 제 1 항에 있어서,The method of claim 1, 상기 일치된 엔트리의 정보는 다음 홉 어드레스 정보 및 출력 포트 정보 또는 포워딩 램을 가리키는 포인터를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색 방법.Wherein the information of the matched entry includes a pointer to next hop address information and output port information or forwarding RAM. SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조에 있어서,In the hardware structure for IP address retrieval using SRAM and hashing, 입력된 어드레스의 프리픽스를 해슁하는 해슁 하드웨어;Hash hardware for hashing the prefix of the input address; 상기 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 주 테이블을 구비하며, 상기 주 테이블의 상기 해슁의 결과값이 가리키는 지점에 저장된 프리픽스와 상기 어드레스의 프리픽스를 비교하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 주 테이블의 상기 엔트리를 검색하고일치된 엔트리의 정보를 전송하는 메인 프로세서;A main table in which entries are stored in the form of a hash table according to the prefix length of the address, and the prefix stored at the point indicated by the result of the hash of the main table and the prefix of the address are compared with the prefix of the address. A main processor for retrieving said entry of said main table having a matching prefix and transmitting information of a matched entry; 상기 어드레스의 프리픽스 길이에 따라 해슁 테이블 형태로 엔트리가 저장되는 보조 테이블을 구비하며, 상기 보조 테이블에서 상기 주 테이블의 포인터가 가리키는 지점부터 시작하여, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 보조 테이블의 상기 엔트리를 검색하고 일치된 엔트리의 정보를 전송하는 보조 프로세서; 및An auxiliary table in which entries are stored in the form of hash tables according to the prefix length of the address, starting from the point indicated by the pointer of the main table in the auxiliary table, the auxiliary table having a prefix that matches the prefix of the address; A coprocessor for retrieving said entry of and transmitting information of a 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. 를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.Hardware structure for IP address lookup using SRAM and hashing comprising a. 제 12 항에 있어서,The method of claim 12, 상기 해슁 하드웨어, 상기 주 테이블 및 상기 보조 테이블은 상기 어드레스의 프리픽스 길이별로 각각 생성되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And said hash hardware, said main table and said auxiliary table are generated for each prefix length of said address. 제 12 항에 있어서,The method of claim 12, 상기 주 테이블 및 상기 보조 테이블은 상기 어드레스의 프리픽스 길이별로 하나의 SRAM에 저장되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And the main table and the auxiliary table are stored in one SRAM for each prefix length of the address. 제 12 항에 있어서,The method of claim 12, 상기 어드레스 검색은 상기 어드레스의 프리픽스 길이별로 병렬적으로 동시에 수행되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.Wherein the address search is performed simultaneously in parallel for each prefix length of the address. 제 12 항에 있어서,The method of claim 12, 상기 해슁 하드웨어는 상기 프리픽스의 비트 수를 상기 해슁의 결과로 나오기를 원하는 비트 수만큼씩 묶어서 배타적 논리합(Exclusive OR)을 수행하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And the hash hardware performs an exclusive OR by combining the number of bits of the prefix by the number of bits desired to be the result of the hash, and performing an exclusive OR. 제 12 항에 있어서,The method of claim 12, 상기 어드레스의 프리픽스와 일치하는 프리픽스를 가지는 상기 보조 테이블의 상기 엔트리 검색은 이진 검색(Binary Search) 방법을 적용하여 검색하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And the entry search of the auxiliary table having a prefix that matches the prefix of the address is searched by applying a binary search method. 제 12 항에 있어서,The method of claim 12, 상기 주 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 다음 홉 어드레스, 출력 포트, 상기 보조 테이블을 가리키는 포인터 및 상기 엔트리에 해당하는충돌 횟수를 포함하고, 상기 보조 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 다음 홉 어드레스 및 출력 포트를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.The entry of the primary table includes a prefix used for the search, a next hop address, an output port, a pointer to the auxiliary table, and the number of collisions corresponding to the entry, the entry of the auxiliary table being a prefix used for the search. Hardware architecture for IP address lookup using SRAM and hashing, comprising a next hop address and an output port. 제 12 항에 있어서,The method of claim 12, 상기 주 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 포워딩 램(Forwarding RAM)을 가리키는 포인터, 보조 테이블을 가리키는 포인터 및 상기 엔트리에 해당하는 충돌 횟수를 포함하고, 상기 보조 테이블의 엔트리는 상기 검색에 사용되는 프리픽스, 상기 포워딩 램을 가리키는 포인터를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.The entry of the primary table includes a prefix used for the search, a pointer to a forwarding RAM, a pointer to an auxiliary table, and a collision count corresponding to the entry, the entry of the auxiliary table being used for the search. The hardware structure for IP address retrieval using a hash and SRAM, characterized in that it comprises a prefix indicating the prefix, the forwarding RAM. 제 19 항에 있어서,The method of claim 19, 상기 포워딩 램은 다음 홉 어드레스 및 출력 포트를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And said forwarding RAM comprises a next hop address and an output port. 제 12 항에 있어서,The method of claim 12, 상기 주 테이블 및 상기 보조 테이블은 상기 어드레스의 프리픽스 길이별로 별개의 SRAM에 저장되는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And the main table and the auxiliary table are stored in separate SRAMs for each prefix length of the address. 제 12 항에 있어서,The method of claim 12, 상기 일치된 엔트리의 정보는 다음 홉 어드레스 정보 및 출력 포트 정보 또는 포워딩 램을 가리키는 포인터를 포함하는 것을 특징으로 하는 SRAM과 해슁을 이용한 IP 어드레스 검색을 위한 하드웨어 구조.And the information of the matched entry includes a pointer to next hop address information and output port information or a forwarding RAM.
KR10-2003-0033453A 2003-05-26 2003-05-26 Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing KR100504387B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR10-2003-0033453A KR100504387B1 (en) 2003-05-26 2003-05-26 Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing
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
KR10-2003-0033453A KR100504387B1 (en) 2003-05-26 2003-05-26 Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing

Publications (2)

Publication Number Publication Date
KR20040101742A true KR20040101742A (en) 2004-12-03
KR100504387B1 KR100504387B1 (en) 2005-07-27

Family

ID=37378389

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2003-0033453A KR100504387B1 (en) 2003-05-26 2003-05-26 Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing

Country Status (1)

Country Link
KR (1) KR100504387B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100720190B1 (en) * 2004-01-14 2007-05-22 노키아 인크 Fast rule lookup with arbitrary ip range configurations
KR101394350B1 (en) * 2007-11-21 2014-05-14 삼성전자주식회사 An apparatus for routing in a network and a method thereof
CN112269784A (en) * 2020-10-28 2021-01-26 中科驭数(北京)科技有限公司 Hash table structure based on hardware realization and inserting, inquiring and deleting method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100720190B1 (en) * 2004-01-14 2007-05-22 노키아 인크 Fast rule lookup with arbitrary ip range configurations
KR101394350B1 (en) * 2007-11-21 2014-05-14 삼성전자주식회사 An apparatus for routing in a network and a method thereof
CN112269784A (en) * 2020-10-28 2021-01-26 中科驭数(北京)科技有限公司 Hash table structure based on hardware realization and inserting, inquiring and deleting method

Also Published As

Publication number Publication date
KR100504387B1 (en) 2005-07-27

Similar Documents

Publication Publication Date Title
US7418505B2 (en) IP address lookup using either a hashing table or multiple hash functions
US9871728B2 (en) Exact match hash lookup databases in network switch devices
US7630367B2 (en) Approach for fast IP address lookups
US7966421B2 (en) Method and apparatus for logically expanding the length of a search key
US6615336B1 (en) Method for performing a medium access control address lookup in a network switch of an ethernet network
US9680747B2 (en) Internet protocol and Ethernet lookup via a unified hashed trie
US7885268B2 (en) Method and system for hash table based routing via table and prefix aggregation
US7715385B2 (en) Default route coding
KR100705593B1 (en) Apparatus and method for managing ternary content addressable memory
US20040085953A1 (en) Longest prefix matching (LPM) using a fixed comparison hash table
KR101434065B1 (en) Method and device for improving scalabilty of longest prefix match
US20130034096A1 (en) Routing table establishment method and device and routing table lookup method and device
US8848707B2 (en) Method for IP longest prefix match using prefix length sorting
Lim et al. High speed IP address lookup architecture using hashing
CN106330716B (en) IP route searching method and device
US7493412B2 (en) Method for processing a data packet
KR100504387B1 (en) Method and Hardware Architecture for Searching IP Address by Using SRAM and Hashing
JP2006246488A (en) Network router, address processing method, and computer program
CN107204926B (en) Rapid route searching method for preprocessing cache
US7376657B1 (en) Fast IPv6 address lookup using skip level processing on multi-bit tries
JP2005333220A (en) Network node device
KR100572693B1 (en) How to Look Up Internet Protocol Packets
KR20050043035A (en) Method and hardware architecture for searching ip address by using multiple hashing function
Kim et al. A lookup algorithm based on multiple tables for high-speed routers
Wang et al. High-performance IP routing table lookup

Legal Events

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

Payment date: 20130710

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20140630

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20150810

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20170119

Year of fee payment: 12