KR100460188B1 - Internet protocol address look-up method - Google Patents

Internet protocol address look-up method Download PDF

Info

Publication number
KR100460188B1
KR100460188B1 KR10-2002-0037911A KR20020037911A KR100460188B1 KR 100460188 B1 KR100460188 B1 KR 100460188B1 KR 20020037911 A KR20020037911 A KR 20020037911A KR 100460188 B1 KR100460188 B1 KR 100460188B1
Authority
KR
South Korea
Prior art keywords
pointer
routing entries
strings
bit
mask
Prior art date
Application number
KR10-2002-0037911A
Other languages
Korean (ko)
Other versions
KR20040003258A (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-2002-0037911A priority Critical patent/KR100460188B1/en
Priority to US10/462,739 priority patent/US7079542B2/en
Priority to US10/462,778 priority patent/US7424468B2/en
Publication of KR20040003258A publication Critical patent/KR20040003258A/en
Application granted granted Critical
Publication of KR100460188B1 publication Critical patent/KR100460188B1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/45Network directories; Name-to-address mapping
    • H04L61/4552Lookup mechanisms between a plurality of directories; Synchronisation of directories, e.g. metadirectories

Abstract

본 발명은 라우팅 테이블의 프리픽스들을 길이 순서대로 정렬할 필요나 피드백 검색을 할 필요가 없이 IP(Internet Protocol) 주소를 룩-업할 수 있는 IP 주소 룩-업 방법을 제공한다. 이를 위한 본 발명의 IP 주소 룩-업 방법은, 3원 CAM(Content Addressable Memory)에서 적어도 하나 이상의 매치 라인이 셋트되는 경우 셋트된 매치 라인들에 대응되게 출력되는 마스크 스트링들의 프리픽스 길이를 비교하는 과정과, 프리픽스 길이가 가장 긴 마스크 스트링에 해당하는 라우팅 엔트리를 LPM(Longest Prefix Matching) 엔트리로서 결정하는 과정을 구비한다.The present invention provides an IP address look-up method that can look up IP (Internet Protocol) addresses without having to sort the prefixes of the routing table in order of length or do a feedback search. The IP address look-up method of the present invention provides a method for comparing prefix lengths of mask strings corresponding to set match lines when at least one match line is set in a three-way CAM (Content Addressable Memory). And determining a routing entry corresponding to the mask string having the longest prefix length as a longest prefix matching (LPM) entry.

Description

인터넷 프로토콜 주소 룩-업 방법{INTERNET PROTOCOL ADDRESS LOOK-UP METHOD}INTERNET PROTOCOL ADDRESS LOOK-UP METHOD}

본 발명은 인터넷 프로토콜(IP: Internet Protocol) 어드레싱(addressing)에 관한 것으로, 특히 3원(ternary) CAM(Content Addressable Memory)을 사용하여 IP 주소를 룩-업하는 방법에 관한 것이다.The present invention relates to Internet Protocol (IP) addressing, and more particularly to a method of looking up an IP address using a ternary Content Addressable Memory (CAM).

오늘날 인터넷(Internet) 사용자의 폭발적인 증가와 함께 멀티미디어(multimedia)와 같은 광대역을 필요로 하는 기반의 네트웍 트래픽(traffic)의 증가는 인터넷 서비스의 질을 현저히 떨어뜨리고 있으며, 이것을 해결하기 위한 시도가 광범위하게 이루어지고 있다.Today, with the explosive growth of Internet users, the increase in the underlying network traffic, which requires broadband such as multimedia, has significantly degraded the quality of Internet services, and attempts to solve this have been widespread. It is done.

양질의 인터넷 서비스를 위해서 차세대 라우터(router) 설계에서 고려해야 할 3가지 중요한 설계 논점은 링크 속도(link speed), 스위칭 속도(switching speed) 및 패킷 처리율(packet throughput)을 들 수 있다. 이들 중에 링크 속도와 스위칭 속도에 관하여는 현재 광 기술의 발달로 수∼수십 기가바이트 속도의 라우터 입력 및 출력을 전송할 수 있게 되었으므로, 거의 만족할 수 있는 상황이다. 하지만 패킷 처리율에 관해서는 많은 문제점이 있다.Three important design issues to consider in next-generation router designs for quality Internet services are link speed, switching speed, and packet throughput. Among them, the link speed and the switching speed are almost satisfactory since the development of optical technology enables transmission of router inputs and outputs at speeds of several tens of gigabytes. However, there are many problems with regard to packet throughput.

특히 라우터에서 IP 주소를 룩-업하는 경우에 IP 주소의 체계의 특징으로 인해 LPM(Longest Prefix Matching) 문제에 부딪치게 된다. IP 주소 룩-업은 IP 패킷을 포워딩(forwarding) 처리하기 위해 IP 패킷의 헤더(header)에 포함된 목적지 주소를 보고 라우팅 테이블에서 해당되는 주소의 엔트리(entry)를 검색하여 다음 경로(next-hop)를 알아내는 것을 의미한다. IP 주소는 불특정한 길이의프리픽스(prefix)로 표현되며, 룩-업에 의한 라우팅 검색의 결과는 IP 패킷의 최종 목적지를 향하는 출력 링크, 즉 다음 경로값이 된다. 라우팅 검색은 라우팅 테이블에서 가장 긴 길이의 프리픽스가 일치하는 엔트리를 선택하는 LPM 방식을 기준으로 실행된다. 상기한 LPM 문제는 인터넷의 기하급수적 증가로 인해 발생되는 IP 어드레스의 고갈, 전 세계의 인터넷 라우팅 테이블 크기의 급속한 증가라는 문제점을 해결할 수 있는 대책의 하나로서 CIDR(Classless Inter-Domain Routing)라고 불리는 IP 주소 할당 방식이 널리 사용되면서 발생한 문제이다. CIDR은 1993년에 RFC(Request for Comments) 1517, 1518, 1519, 1520으로 공식적으로 문서화되었으며, IP 주소에 있어서 전통적인 클래스 A, 클래스 B, 클래스 C 네트워크의 개념을 제거하였다. 이러한 CIDR은 기존에 IP 주소를 클래스별로 할당함에 따라 초래되었던 클래스 C 주소 공간의 부족과 클래스 A,B의 주소 공간의 낭비를 줄여 IP 주소 할당 방식의 효율적인 운영이 가능하도록 하였다. 그러나 라우터가 유지해야 하는 라우팅 테이블의 엔트리가 크게 늘어나게 되어 결과적으로 IP 주소 룩-업 속도가 느려지게 되었다.Especially when the router looks up the IP address, the characteristics of the IP address scheme face the problem of Longest Prefix Matching (LPM). The IP address look-up looks at the destination address contained in the header of the IP packet for forwarding the IP packet, looks up the entry of the corresponding address in the routing table, and next-hop. It means to figure out. The IP address is represented by a prefix of unspecified length, and the result of the routing search by look-up is the output link, i.e., the next path value, to the final destination of the IP packet. Routing lookup is performed based on the LPM method, which selects the entry with the longest prefix in the routing table. The LPM problem described above is an IP address called Classless Inter-Domain Routing (CIDR). This problem is caused by the widespread use of address allocation. CIDR was officially documented in 1993 as Request for Comments (RFC) 1517, 1518, 1519, and 1520, removing the concept of traditional Class A, Class B, and Class C networks in IP addresses. The CIDR reduces the class C address space and class A and B address space caused by IP address allocation, thus enabling efficient IP address allocation. However, the number of entries in the routing table that the router must maintain has increased significantly, resulting in slower IP address lookups.

현재 초고속 라우터의 개발을 위해 제안되고 있는 IP 룩-업 기술은 크게 CAM(Content Addressable Memory)이나 캐싱(cashing), 라지-메모리(large-memory) 구조를 이용하는 하드웨어를 기반으로 하는 기술과, LC(Level Compressed) 트리(trie), 해싱(hashing), 멀티비트 트리(multibit trie)와 같은 소프트웨어를 기반으로 하는 기술로 나눌 수 있다. 소프트웨어에 의한 IP 주소 룩-업의 구현은 보다 유연하고 프로토콜의 수정으로 쉽게 적용될 수 있는 장점을 가진다. 하지만하드웨어에 의해 IP 룩-업 기능을 구현하는 것은 소프트웨어에 의한 구현으로는 얻지 못하는 고속의 패킷 처리 능력이 필요해서이다. 이에따라 오늘날 주된 라우터 벤더(vendor)들의 거의 모든 고속 라우터들은 하드웨어에 의해 IP 주소 룩-업을 행한다.The IP look-up technology currently proposed for the development of high-speed routers is based on hardware-based technologies using CAM (Content Addressable Memory), caching, and large-memory structures, and LC ( Level Compressed can be divided into software based technologies such as trie, hashing and multibit trie. The implementation of the IP address lookup by software has the advantage of being more flexible and easily adaptable to modification of the protocol. However, implementing IP look-ups by hardware requires high-speed packet processing that cannot be achieved by software. As a result, almost all high-speed routers of today's major router vendors perform IP address look-up by hardware.

하드웨어에 의한 IP 룩-업 기능을 구현하기 위해 사용되는 CAM은 정확한 매치(match) 검색 동작을 하나의 클럭 주기에 실행한다. CAM은 입력되는 검색 키(search key)를 CAM 내의 모든 엔트리들, 즉 CAM 내에서 물리적으로 분할된 세그먼트들에 저장된 모든 요소들과 병렬로 비교하고, 그 결과로서 검색 키와 매칭된 요소가 저장된 물리적 세그먼트의 주소를 출력한다. 이때 매칭된 요소와 관련된 어떤 데이터가 있다면, 이 데이터 또한 출력된다. 이처럼 CAM은 검색 키를 CAM 내의 모든 엔트리들과 병렬로 비교하여 결과를 출력함으로써 신속한 검색이 가능하게 되는데, 통상적으로 10∼20㎱이내의 매우 짧은 잠재(latency) 시간이 소요된다.Used to implement the IP look-up function by hardware, the CAM performs the exact match search operation in one clock cycle. The CAM compares the input search key in parallel with all entries in the CAM, i.e. all elements stored in segments that are physically partitioned within the CAM, and as a result the physical key storing the element matching the search key is stored. Print the address of the segment. If there is any data related to the matched element, this data is also output. As such, the CAM enables fast retrieval by comparing the search key in parallel with all entries in the CAM and outputting the results, typically having a very short latency time of 10-20 ms.

한편 3원(ternary) CAM은 입력되는 검색 키를 여러 가지 길이의 저장 요소들과 비교가 가능한 좀 더 유연한 CAM의 한 종류이다. 이러한 3원 CAM에는 콘텐트 비트 스트링(content bit string)에 따르는 마스크 비트 스트링(mask bit string)이 존재하여 콘텐트 비트 스트링 모두가 검색 키와 비교될 필요는 없다. 또한 3원 CAM은 일반적으로 OC-192 또는 10기가비트 이더넷에 필요한 레이트(rate)의 몇배가 되는 검색 속도를 지원하며, 하나의 칩(chip)에서 129K 라우트까지 다룰 수 있다. 이에따라 3원 CAM은 LPM(Longest Prefix Matching)을 결정하기 위해 사용될 수 있으며, 3원 CAM의 속도는 패킷 포워딩에 적당하다.A ternary CAM, on the other hand, is a more flexible type of CAM that allows you to compare incoming search keys with storage elements of different lengths. In such a ternary CAM, there is a mask bit string that conforms to the content bit string so that not all of the content bit strings need to be compared with the search key. The three-way CAM also supports search speeds that are several times the rate typically required for OC-192 or 10 Gigabit Ethernet, and can handle up to 129K routes on a single chip. Accordingly, three-way CAM can be used to determine Longest Prefix Matching (LPM), and the speed of three-way CAM is suitable for packet forwarding.

상기한 3원 CAM을 사용하는 IP 주소 룩-업 장치의 개략적인 구조도를 도 1로서 보였다. 도 1에서 보는 바와 같이, 3원 CAM(100)에는 각각 프리픽스를 가지는 다수의 라우팅 엔트리(102)가 물리적으로 분할된 세그먼트들에 하나씩 저장된다. 이러한 라우팅 엔트리들(102)은 그들의 프리픽스 길이의 순서대로 물리적으로 낮은 주소부터 저장된다. 이러한 프리픽스들은 포워딩 처리할 IP 패킷의 헤더로부터 추출된 목적지 주소인 검색 키와 병렬로 비교되며, 이러한 비교에 의해 검색 키와 매칭되는 프리픽스를 가지는 라우팅 엔트리가 검색된다. 3원 CAM(100)은 이 검색의 결과로서, 검색 키와 매칭되는 프리픽스를 가지는 라우팅 엔트리의 매치 라인을 "1"로 셋트한다. 여기서 "1"은 논리 "1"을 의미하며, 이하의 설명에서도 동일하다. 이와 마찬가지로 이하의 설명에서 "0"은 논리 "0"을 의미한다. 3원 CAM(100)의 라우팅 엔트리들(102)의 매치 라인들에는 우선순위 인코더(priority encoder)(104)가 연결된다. 우선순위 인코더(104)는 검색 키와 매칭된 라우팅 엔트리들, 즉 셋트된 매치 라인에 해당하는 라우팅 엔트리가 적어도 하나 이상 있는 경우에는 매치된 라우팅 엔트리들 중에서 가장 낮은 주소, 즉 프리픽스 길이가 가장 긴 LPM 엔트리의 물리적인 주소를 찾아 출력하게 된다. 이처럼 우선순위 인코더(104)로부터 출력되는 LPM 엔트리의 물리적인 주소는 다음 경로값들을 저장하고 있는 메모리(도시하지 않았음)에 인가되며, 메모리에서는 이 주소에 저장되어 있는 다음 경로값이 출력됨으로써 한개의 IP 패킷에 대한 IP 주소 룩-업이 완료된다.A schematic structural diagram of the IP address look-up apparatus using the three-way CAM described above is shown in FIG. As shown in FIG. 1, the ternary CAM 100 stores a plurality of routing entries 102 each having a prefix, one in physically divided segments. These routing entries 102 are stored from the physically low address in order of their prefix length. These prefixes are compared in parallel with a search key, which is a destination address extracted from the header of the IP packet to be forwarded, and the comparison finds a routing entry with a prefix that matches the search key. As a result of this search, the ternary CAM 100 sets the match line of the routing entry with the prefix that matches the search key to " 1. " Here, "1" means logic "1" and is the same in the following description. Likewise, in the following description, "0" means logic "0". Priority encoder 104 is connected to the match lines of routing entries 102 of ternary CAM 100. Priority encoder 104, if there is at least one routing entry that matches the search key, i.e. the set match line, then the lowest address of the matched routing entries, i.e., the LPM with the longest prefix length. It will find and print the physical address of the entry. In this way, the physical address of the LPM entry output from the priority encoder 104 is applied to a memory (not shown) that stores the following path values, and one memory is output by outputting the next path value stored at this address. The IP address lookup for the IP packet is completed.

상기한 바와 같은 도 1의 IP 주소 룩-업 방식에서는 프리픽스들이 길이 순서대로 저장되기 때문에, 검색 결과에 의해 셋트되는 매치 라인들 중에 가장 낮은 주소가 자동적으로 LPM이 된다. 그러나 프리픽스 순서로 저장되어야 하는 것이 도 1과 같은 3원 CAM을 사용하는 방식의 가장 큰 단점이다. 만일 라우팅 테이블이 업데이트(update)될 때 새로운 프리픽스가 추가되어야 하는 경우, 3원 캠(100) 내에 길이 순서를 지키기 위해 새로운 프리픽스보다 짧은 길이의 프리픽스들은 모두 높은 주소로 옮겨 다시 저장해야 한다. 이처럼 프리픽스들을 재정렬하여 라우팅 테이블을 업데이트하는 것은 IP 주소 룩-업에 비해 많은 시간을 필요로 하며, 정렬을 하는 동안에는 라우팅 테이블이 오프-라인(off-line)으로 유지되어야 하므로 IP 주소 룩-업이 이루어지지 않는다.In the IP address look-up scheme of FIG. 1 as described above, since the prefixes are stored in length order, the lowest address among the match lines set by the search result is automatically LPM. However, to be stored in the prefix order is the biggest disadvantage of the method using the three-way CAM as shown in FIG. If a new prefix needs to be added when the routing table is updated, all prefixes shorter than the new prefix must be moved to a higher address and stored again in order to maintain the length order in the ternary cam 100. Updating the routing table by reordering the prefixes like this requires more time than the IP address look-up, and the IP address look-up is not necessary because the routing table must be kept off-line during the sorting process. Not done.

이처럼 라우팅 테이블 업데이트에 따른 단점을 해결하는 방식으로서, 길이 i와 i+1의 프리픽스들의 집합간에 사용하지 않은 저장 공간들을 유지하는 것이다. 즉, 라우팅 엔트리는 프리픽스 길이에 의해 나뉘어지고, 빈 저장 공간은 새로운 라우팅 엔트리들의 추가를 용이하게 하기 위해 각 프리픽스 집합에 남아 있게 된다. 하지만 이러한 빈 저장 공간은 3원 CAM의 저장 공간의 낭비를 초래한다. 또한 빈 저장 공간이 다 채워지면, 라우팅 엔트리들은 재배치되어져야 하며, 이 동안에는 라우팅 테이블이 오프-라인으로 유지되어야 하므로 IP 주소 룩-업이 이루어지지 않는다. 최근 모바일(mobile) IP의 도입으로 라우터에서 잦은 라우팅 업데이트는 IP 주소 룩-업 아이들(idle) 시간을 증가시켜 IP 주소 룩-업 성능을 급격히 떨어뜨릴 것으로 예상된다.As a way of solving the disadvantages of updating the routing table, unused storage spaces are maintained between a set of prefixes of length i and i + 1. That is, routing entries are divided by prefix length, and free storage space remains in each prefix set to facilitate the addition of new routing entries. However, this empty storage space causes a waste of storage space of the three-way CAM. Also, when the empty storage space fills up, routing entries must be relocated, during which the routing table must be kept off-line, so no IP address look-up is done. Due to the recent introduction of mobile IP, frequent routing updates in routers are expected to increase IP address look-up idle time and drastically reduce IP address look-up performance.

한편 NEC 사의 고바야시 등에 의해 제안된 VLMP(Vertical logical operation with mask encoded prefix length) 방식은 프리픽스가 그 길이 순서대로 저장되어야 한다는 제약을 제거하였다. VLMP 방식은 Kobayashi, M., Murase, T., and Kuriyama, A.에 의해 "A Longest Prefix Match Search Engine for Multi-Gigabit IP Processing",IEEE International Conference on Communications, vol. 3, June 2000, pp.1360-1364에 게재되었다. 이 문헌에 개시된 VLMP 방식의 IP 주소 룩-업 장치의 개략적인 구조도를 도 2로서 보였고, 보다 상세한 구성을 나타내는 블록구성도를 도 3으로 보였다. 도 2 및 도 3은 상기한 문헌에 도 1(b) 및 도 5로서 각각 도시되어 있으며, 상술한 도 1은 상기한 문헌에 도 1(a)로서 도시되어 있다.On the other hand, the VLMP (Vertical Logical Operation with Mask Encoded Prefix Length) method proposed by NEC Kobayashi et al. Removes the constraint that prefixes should be stored in order of their length. The VLMP scheme is described by Kobayashi, M., Murase, T., and Kuriyama, A. in "A Longest Prefix Match Search Engine for Multi-Gigabit IP Processing", IEEE International Conference on Communications , vol. 3, June 2000, pp.1360-1364. A schematic structural diagram of the VLMP type IP address look-up apparatus disclosed in this document is shown in FIG. 2, and a block diagram showing a more detailed configuration is shown in FIG. 2 and 3 are respectively shown in the above document as FIGS. 1 (b) and 5, and FIG. 1 described above is shown in the above document as FIG. 1 (a).

상기한 문헌을 참조하여 VLMP 방식의 IP 주소 룩-업에 관하여 살펴보면 다음과 같다. 먼저 도 2에서 보는 바와 같이, 3원 CAM(200)에는 각각 프리픽스를 가지는 다수의 라우팅 엔트리(202)가 물리적으로 분할된 세그먼트들에 하나씩 저장되는데, 도 1에서와 달리 라우팅 엔트리들(202)이 프리픽스 길이의 순서와 무관하게 저장된다. 3원 CAM(200)에서는 검색 키와 라우팅 엔트리들(202)의 프리픽스들과 병렬 비교에 의해 매칭되는 프리픽스를 검색하고, 매칭되는 라우팅 엔트리의 프리픽스 길이 정보를 출력한다. 이처럼 매칭되는 라우팅 엔트리가 적어도 하나 이상 있는 경우에는 상술한 바와 마찬가지로 매칭된 라우팅 엔트리들 중에서 LPM을 선택하여야 한다. 이를 위해 후술하는 도 3처럼 3원 CAM(200)의 출력을 정해진 논리 연산한 다음에 3원 CAM(200)으로 피드백(feedback)시켜 2차 검색을 하게 되는 VLMP 회로(204)에서는 3원 CAM(200)에서 검색에 의해 매칭된 라우팅 엔트리들 중에서 LPM을 만족하는 LPM 엔트리를 매칭된 프리픽스들의 길이정보를 이용하여 결정한다. 이와 같이 결정된 LPM 엔트리의 물리적인 주소는 인코더(206)에 의해 출력된다.Looking at the IP address look-up of the VLMP method with reference to the above-mentioned documents are as follows. First, as shown in FIG. 2, in the ternary CAM 200, a plurality of routing entries 202 each having a prefix are stored in physically divided segments, unlike in FIG. 1. Stored regardless of the order of prefix length. The ternary CAM 200 retrieves a matching prefix by parallel comparison with the search key and the prefixes of the routing entries 202 and outputs the prefix length information of the matching routing entry. When there is at least one matching routing entry as described above, the LPM should be selected from the matching routing entries as described above. To this end, in the VLMP circuit 204 which performs secondary search by performing a predetermined logical operation on the output of the ternary CAM 200 as shown in FIG. In operation 200, an LPM entry that satisfies the LPM among routing entries matched by the search is determined using length information of the matched prefixes. The physical address of the LPM entry thus determined is output by the encoder 206.

이제 도 3을 참조하면, 검색 키를 일시 저장하는 키 레지스터(300)의 출력에 다수의 라우팅 엔트리(302)가 연결되고, 라우팅 엔트리들(302)의 출력에는 인코더(206)가 연결되어 있다. 라우팅 엔트리들(302)은 한쌍의 동일한 길이의 비트열, 즉 n비트의 데이터 스트링 DS과 마스크 스트링 MS를 가지고 있다. 데이터 스트링 DS는 각 라우팅 엔트리에 해당하는 IP 주소의 프리픽스를 MSB(Most Significant Bit)부터 포함하며 그 나머지 비트는 "0"으로 채워지는 데이터 비트 스트링을 의미한다. 마스크 스트링 MS는 해당하는 IP 주소의 프리픽스 길이를 나타내는 마스크 비트 스트링으로서, 각각의 마스크 비트는 MSB로부터 프리픽스의 길이와 동일한 연속적인 "1"의 비트열로 채워지며 그 나머지는 "0"으로 채워진다. 예를 들어 프리픽스 "110"을 나타내기 위해서 데이터 스트링은 "11000000"로 되고 마스크 스트링은 "11100000"로 된다.Referring now to FIG. 3, a number of routing entries 302 are connected to the output of the key register 300 that temporarily stores the search key, and an encoder 206 is connected to the output of the routing entries 302. Routing entries 302 have a pair of equal length strings, n bits of data string DS and mask string MS. The data string DS refers to a data bit string including a prefix of an IP address corresponding to each routing entry, starting with a Most Significant Bit (MSB), and the remaining bits are filled with "0". The mask string MS is a mask bit string representing the prefix length of the corresponding IP address, where each mask bit is filled with a contiguous " 1 " bit string equal to the length of the prefix from the MSB, with the remainder filled with " 0 ". For example, to represent the prefix "110", the data string is "11000000" and the mask string is "11100000".

도 3에서 키 레지스터(300)에 저장되는 검색 키에 대한 LPM 검색은 다음과 같이 두 스테이지(stage)에 의해 실행된다.In FIG. 3, the LPM search for the search key stored in the key register 300 is executed by two stages as follows.

첫번째 스테이지First stage

1-1. 키 레지스터(300)에 저장된 검색 키 K는 엔트리들(302)에 연결된다.1-1. The search key K stored in the key register 300 is linked to the entries 302.

1-2. 각 엔트리의 블록(304)에서 마스크 비교, R1:=(K MS) XNOR (DS MS)가 수행된다. 여기서 ""는 비트별(bitwise) 논리곱(AND) 연산을 의미하고, "XNOR"은 비트별 배타적(exclusive) 부논리합(NOR) 연산을 의미한다.1-2. At block 304 of each entry, a mask comparison, R1: = (K MS) XNOR (DS MS) is performed. Herein, "" means a bitwise AND operation, and "XNOR" means an exclusive bitwise exclusive logical operation (NOR).

1-3. 각 엔트리의 블록(304)에서 R1의 모든 비트들이 논리곱(AND) 연산되고, 그 결과가 매치 라인 1로 제공된다.1-3. In block 304 of each entry, all the bits of R1 are ANDed, and the result is provided to match line 1.

1-4. 만일 매치 라인 1이 "1"로 셋트되면, 셀렉터(S2)는 VLMP 라인에 마스크 스트링 MS를 내보낸다. 그렇치 않으면 셀렉터(S2)는 마스크 스트링 MS와 같은 길이의 "00...0"을 VLMP 라인으로 내보낸다.1-4. If match line 1 is set to "1", selector S2 sends mask string MS to the VLMP line. Otherwise, selector S2 sends " 00 ... 0 " of the same length as mask string MS to the VLMP line.

1-5. VLMP 라인의 각 비트 위치에서 수직적(vertical) 비트별 논리적 논리합(OR) 연산, 즉 VLMP가 수행된다. 이 결과는 도 3에서 RV로 나타내어진다.1-5. At each bit position of the VLMP line, a vertical bitwise logical OR operation, ie, VLMP, is performed. This result is represented by RV in FIG. 3.

두번째 스테이지Second stage

2-1. RV는 엔트리들(302)에 연결된다.2-1. RV is connected to entries 302.

2-2. 각 엔트리의 블록(306)에서 두개의 비트 스트링, 즉 RV와 마스크 스트링 MS가 정확히 비교된다. 즉 R2:=RV NOR MS가 수행된다.2-2. In block 306 of each entry, the two bit strings, RV and mask string MS, are compared exactly. That is, R2: = RV NOR MS is performed.

2-3. 각 엔트리의 블록(306)에서 R2의 모든 비트들이 논리곱(AND) 연산되고, 그 결과가 매치 라인 2로 제공된다.2-3. In block 306 of each entry, all the bits of R2 are ANDed, and the result is provided to match line 2.

2-4. 만일 어떤 엔트리의 매치 라인 1과 매치 라인 2가 모두 "1"이면, 셀렉터(S1)는 LPM 라인에 "1"을 내보낸다. 그렇치 않으면 셀렉터(S1)는 LPM 라인에 "0"을 내보낸다.2-4. If match line 1 and match line 2 of any entry are both "1", selector S1 sends a "1" to the LPM line. Otherwise, selector S1 sends " 0 " to the LPM line.

상기한 바와 같은 두 스테이지에 따라 라우팅 엔트리들(302) 중에 LPM 엔트리로 결정된 라우팅 엔트리의 LPM 라인만 "1"로 셋트되게 된다. 이에따라 라우팅 엔트리들(302)의 LPM 라인들에 연결된 인코더(206)는 "1"로 셋트된 LPM 라인에 해당하는 라우팅 엔트리의 물리적인 주소를 찾아 출력하게 된다.According to the two stages as described above, only the LPM line of the routing entry determined as the LPM entry among the routing entries 302 is set to "1". Accordingly, the encoder 206 connected to the LPM lines of the routing entries 302 finds and outputs the physical address of the routing entry corresponding to the LPM line set to "1".

예를 들어 4개의 프리픽스 P1 = "110", P2 = "1001", P3 = "11011", P4 = "1101"이 라우팅 엔트리들(302)중에 첫번째 라우팅 엔트리부터 네번째 라우팅 엔트리에 순서대로 하나씩 저장되어 있는 상태에서 검색 키가 "11011111"로 입력되었다고 가정하면, 우선 프리픽스들과 병렬로 비교되어 첫번째, 세번째, 네번째 라우팅 엔트리의 프리픽스가 매칭될 것이다. 그러면 첫번째, 세번째, 네번째 라우팅 엔트리의 프리픽스에 대응하는 마스크 스트링들에 대한 VLMP가 수행된다. 상기한 예에서 마스크 스트링 P1_mask = "11100000", P3_mask = "11111000", P4_mask = "11110000"이며, VLMP 결과는 "11111000"이다. 이러한 VLMP 결과는 마스크 스트링들의 저장 순서에 상관없이 동일하다. 이에따라 프리픽스들이 길이 순서대로 정렬되어 있지 않아도 된다. 일단 VLMP의 결과가 얻어지면, VLMP의 결과와 완전히 매치되는 마스크 스트링을 포함하는 엔트리에 대해서 LPM이 발생했다는 것을 알 수 있다. 이어 VLMP의 결과 "11111000"에 대하여 2차로 P1_mask, P3_mask, P4_mask와 비교 검색하면, 3번째 엔트리가 매칭되므로 이 엔트리가 LPM 엔트리가 된다는 것을 알 수 있다.For example, four prefixes P1 = "110", P2 = "1001", P3 = "11011", and P4 = "1101" are stored one after the other in the routing entries 302 in order from the first routing entry to the fourth routing entry. Assuming that the search key was entered as "11011111" in the presence of a state, the prefixes of the first, third, and fourth routing entries will be matched first in parallel with the prefixes. The VLMP is then performed on the mask strings corresponding to the prefix of the first, third and fourth routing entries. In the above example, the mask string P1_mask = "11100000", P3_mask = "11111000", P4_mask = "11110000", and the VLMP result is "11111000". These VLMP results are the same regardless of the storage order of the mask strings. As a result, the prefixes do not have to be in length order. Once the result of the VLMP is obtained, it can be seen that the LPM has occurred for the entry containing the mask string that fully matches the result of the VLMP. Subsequently, when the result of VLMP is compared with P1_mask, P3_mask, and P4_mask in the second "11111000", it can be seen that this entry becomes an LPM entry because the third entry is matched.

상기한 바와 같이 VLMP 방식의 IP 주소 룩-업에 따르면, 프리픽스들이 길이 순서대로 정렬되어 있지 않더라도 LPM 엔트리를 찾아 낼 수 있다. 이에따라 라우팅 테이블이 업데이트될 때 새로운 프리픽스가 추가되어야 하는 경우에도 프리픽스들을 재정렬할 필요가 없으므로, 신속히 업데이트가 이루어지게 된다. 그러나 VLMP가 추가되고 VLMP 결과를 검색 키로서 피드백시켜야만 하며, 이에따른 부가적인 회로가 추가되어야 한다. 그러므로 VLMP 방식의 IP 주소 룩-업 장치는 이러한 부가적인 회로를 포함한 전용의 LSI(Large Scale Integration)로 제작된다.As described above, according to the VLMP IP address look-up, the LPM entry can be found even if the prefixes are not arranged in length order. As a result, even if a new prefix is to be added when the routing table is updated, the prefixes do not need to be rearranged, so the update is performed quickly. However, VLMP must be added and the VLMP result fed back as a search key, with additional circuitry added. Therefore, the VLMP IP address look-up device is manufactured with a dedicated Large Scale Integration (LSI) that includes these additional circuits.

상술한 바와 같이 현재까지 제안된 IP 주소 룩-업 방식들은 라우팅 테이블의 프리픽스들을 길이 순서대로 정렬해야 한다는 단점이 있거나, 순서적으로 정렬하지 않더라도 피드백 검색을 위한 회로가 3원 CAM에 추가되어야 한다.As described above, the IP address look-up schemes proposed so far have a disadvantage in that the prefixes of the routing table must be sorted in order of length, or a circuit for feedback searching must be added to the ternary CAM even if they are not ordered.

따라서 본 발명의 목적은 라우팅 테이블의 프리픽스들을 길이 순서대로 정렬할 필요나 피드백 검색을 할 필요가 없이 IP 주소를 룩-업할 수 있는 IP 주소 룩-업 방법을 제공함에 있다.Accordingly, an object of the present invention is to provide an IP address look-up method capable of looking up an IP address without the necessity of sorting the prefixes of the routing table in order of length or performing a feedback search.

본 발명의 다른 목적은 라우팅 테이블을 신속히 갱신할 수 있도록 하면서도 범용의 3원 CAM을 사용하여 IP 주소를 룩-업할 수 있는 IP 주소 룩-업 방법을 제공함에 있다.Another object of the present invention is to provide an IP address look-up method capable of quickly updating a routing table while also looking up an IP address using a universal three-way CAM.

도 1은 3원 CAM을 사용하는 IP 주소 룩-업 장치의 개략적인 구조도,1 is a schematic structural diagram of an IP address look-up apparatus using three-way CAM;

도 2는 VLMP 방식의 IP 주소 룩-업 장치의 개략적인 구조도,2 is a schematic structural diagram of a VLMP type IP address look-up device;

도 3은 VLMP 방식의 IP 주소 룩-업 장치의 블록구성도,3 is a block diagram of a VLMP type IP address look-up device;

도 4는 본 발명의 실시예에 따른 3원 CAM을 사용하는 IP 주소 룩-업 장치의 개략적인 구조도,4 is a schematic structural diagram of an IP address look-up apparatus using ternary CAM according to an embodiment of the present invention;

도 5는 본 발명의 실시예에 따른 3원 CAM을 사용하는 IP 주소 룩-업 장치의 블록구성도,5 is a block diagram of an IP address look-up apparatus using three-way CAM according to an embodiment of the present invention;

도 6은 본 발명의 실시예에 따른 우선순위 인코더의 처리 흐름도,6 is a process flow diagram of a priority encoder according to an embodiment of the present invention;

도 7a 내지 도 7d는 본 발명의 실시예에 따른 우선순위 인코더의 LPM 검색 동작 예시도,7A to 7D illustrate an LPM search operation of a priority encoder according to an embodiment of the present invention.

도 8은 본 발명의 실시예에 따른 3원 CAM을 사용하는 IP 주소 룩-업 장치의 시뮬레이션 결과 예시도.8 is an exemplary view illustrating a simulation result of an IP address look-up apparatus using three-way CAM according to an embodiment of the present invention.

상술한 목적을 달성하기 위한 본 발명의 방법은, 3원 CAM에서 적어도 하나 이상의 매치 라인이 셋트되는 경우 셋트된 매치 라인들에 대응되게 출력되는 마스크 스트링들의 프리픽스 길이를 비교하는 과정과, 프리픽스 길이가 가장 긴 마스크 스트링에 해당하는 라우팅 엔트리를 LPM(Longest Prefix Matching) 엔트리로서 결정하는 과정을 구비함을 특징으로 한다.The method of the present invention for achieving the above object, the process of comparing the prefix length of the mask strings that are output corresponding to the set match line when at least one match line is set in the three-way CAM, and the prefix length is And determining a routing entry corresponding to the longest mask string as a longest prefix matching (LPM) entry.

이하 본 발명의 바람직한 실시예들을 첨부한 도면을 참조하여 상세히 설명한다. 하기 설명에서 본 발명의 요지를 불필요하게 흐릴 수 있는 공지 기능 및 구성에 대하여는 상세한 설명을 생략한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, detailed descriptions of well-known functions and configurations that may unnecessarily obscure the subject matter of the present invention will be omitted.

도 4는 본 발명의 실시예에 따른 3원 CAM을 사용하는 IP 주소 룩-업 장치의 개략적인 구조도를 보인 것이다. 본 발명의 IP 주소 룩-업 장치는 통상적인 3원 CAM(400)과, 3원 CAM(400)의 출력에 연결되는 우선순위 인코더(404)로 구성한다. 3원 CAM(400)에는 각각 프리픽스를 가지는 다수의 라우팅 엔트리(402)가 물리적으로 분할된 세그먼트들에 하나씩 저장되는데, 도 4에서 보는 바와 같이 프리픽스 길이의 순서와 무관하게 저장된다. 3원 CAM(400)에서는 검색 키와 라우팅 엔트리들(402)의 프리픽스들과 병렬 비교에 의해 매칭되는 프리픽스를 검색하고, 매칭되는 라우팅 엔트리의 매치 라인을 셋트시킴과 아울러 매칭되는 라우팅 엔트리의 마스크 스트링을 우선순위 인코더(404)로 출력한다. 그러면 우선순위 인코더(404)는 3원 CAM(400)에서 적어도 하나 이상의 매치 라인이 셋트되는 경우, 즉 라우팅 엔트리들(402)의 매치 라인들 중에 하나 이상 셋트되는 경우에 셋트된 매치 라인들에 대응되게 출력되는 마스크 스트링들의 프리픽스 길이를 비교하여 가장 긴 마스크 스트링에 해당하는 라우팅 엔트리를 LPM 엔트리로서 결정하고, LPM 엔트리의 물리적인 주소를 LPM 엔트리의 매치 라인에 근거하여 출력한다.4 is a schematic structural diagram of an IP address look-up apparatus using ternary CAM according to an embodiment of the present invention. The IP address look-up apparatus of the present invention comprises a conventional three-way CAM 400 and a priority encoder 404 connected to the output of the three-way CAM 400. In the ternary CAM 400, a plurality of routing entries 402, each having a prefix, are stored in physically divided segments, as shown in FIG. 4, regardless of the order of the prefix lengths. The ternary CAM 400 retrieves the matching prefix by parallel comparison with the search key and the prefixes of the routing entries 402, sets the match line of the matching routing entry, and also sets the mask string of the matching routing entry. Is output to the priority encoder 404. The priority encoder 404 then corresponds to the match lines set when at least one or more match lines are set in the ternary CAM 400, ie, when one or more of the match lines of the routing entries 402 are set. The routing length corresponding to the longest mask string is determined as the LPM entry by comparing the prefix lengths of the mask strings, and the physical address of the LPM entry is output based on the match line of the LPM entry.

상기한 바와 같은 본 발명의 실시예에 따른 IP 주소 룩-업 장치를 보인 도 5의 블록구성도를 참조하면, 3원 CAM(400)은 검색 키를 일시 저장하는 키 레지스터(500)의 출력에 다수의 라우팅 엔트리(402)가 연결되며, 이러한 3원 CAM(400)의 라우팅 엔트리들(402)의 출력에는 우선순위 인코더(404)가 연결되어 있다. 라우팅 엔트리들(402)은 전술한 도 3의 라우팅 엔트리들(302)과 마찬가지로 한쌍의 동일한 길이의 비트열, 즉 n비트의 데이터 스트링 DS과 마스크 스트링 MS를 각각 블록(502)과 블록(504)에 가지고 있다. 키 레지스터(500)의 검색 키가 라우팅 엔트리들(402)에 연결되고, 각 라우팅 엔트리의 블록(502)에서는 전술한 도 3의 블록(304)에서와 마찬가지로 R1:=(K MS) XNOR (DS MS)가 수행된다. 그리고 각 엔트리의 블록(502)에서 R1의 모든 비트들이 논리곱(AND) 연산되고, 그 결과가 매치 라인으로 제공된다. 각 엔트리에서 매치 라인의 셋트 여부에 따라 마스크 스트링 MS와 동일한 길이로 연속되는 "00...0" 또는 마스크 스트링 MS를 선택하여 우선순위 인코더(404)로 출력하는 셀렉터(506)는 매치 라인이 "1"로 셋트되면 블록(504)에 있는 마스크 스트링 MS를 내보내고, 그렇치 않으면 "0...0"을 내보낸다.Referring to the block diagram of Fig. 5 showing the IP address look-up apparatus according to the embodiment of the present invention as described above, the ternary CAM 400 is output to the output of the key register 500 to temporarily store the search key. A number of routing entries 402 are connected, and a priority encoder 404 is connected to the output of routing entries 402 of this ternary CAM 400. The routing entries 402 are similar to the routing entries 302 of FIG. 3 described above, and block 502 and block 504 of a pair of bit strings of equal length, that is, n-bit data string DS and mask string MS, respectively. To have. The search key of the key register 500 is connected to the routing entries 402, and in block 502 of each routing entry, R1: = (K MS) XNOR (DS) as in block 304 of FIG. MS) is performed. And at block 502 of each entry, all the bits of R1 are ANDed, and the result is provided to the match line. In each entry, the selector 506 that selects " 00 ... 0 " or mask string MS consecutively the same length as the mask string MS and outputs to the priority encoder 404 according to whether the match line is set or not, If set to "1" then mask string MS in block 504 is exported, otherwise "0 ... 0".

상기한 바와 같이 3원 CAM(400)에서 적어도 하나 이상의 매치 라인이 셋트되면, 우선순위 인코더(404)는 셋트된 매치 라인에 대응되게 3원 CAM(400)으로부터 출력되는 마스크 스트링들의 프리픽스 길이를 비교하여 가장 긴 마스크 스트링에 해당하는 라우팅 엔트리를 LPM 엔트리로서 결정한다. 그리고 우선순위 인코더(404)는 이와 같이 결정된 LPM 엔트리의 물리적인 주소를 전술한 도 1에서와 마찬가지로 LPM 엔트리의 매치 라인에 근거하여 출력한다. 이때 우선순위 인코더(404)에서는 마스크 스트링들의 길이를 MSB(Most Significant Bit)부터 비교 검색하여 LPM 엔트리를 결정한다. 이처럼 MSB부터 비교하는 것은 전술한 바와 같이 마스크 스트링이 MSB로부터 프리픽스의 길이와 동일한 연속적인 "1"의 비트열로 채워지며 그 나머지는 모두 "0"으로 채워지기 때문이다.As described above, when at least one match line is set in the ternary CAM 400, the priority encoder 404 compares the prefix lengths of the mask strings output from the ternary CAM 400 corresponding to the set match line. To determine the routing entry corresponding to the longest mask string as the LPM entry. The priority encoder 404 then outputs the determined physical address of the LPM entry based on the match line of the LPM entry as in FIG. 1. At this time, the priority encoder 404 compares the lengths of the mask strings starting from the Most Significant Bit (MSB) to determine the LPM entry. This comparison from the MSB is because, as described above, the mask string is filled with consecutive "1" bit strings equal to the length of the prefix from the MSB, and the rest are all filled with "0".

상기한 바와 같이 우선순위 인코더(404)가 마스크 스트링들의 길이를 비교하여 LPM 엔트리를 결정하고 그의 물리적인 주소를 출력하는 처리 흐름도를 도 6의 (600)∼(610)단계로 보였으며, 그의 LPM 검색 동작 예시도를 비교할 마스크 스트링이 3개인 경우의 예를 들어 도 7a 내지 도 7d로서 보였다. 도 7a 내지 도 7d에서 (a)∼(c)는 길이가 비교될 32비트의 마스크 스트링의 예를 보인 것으로, 길이가 32비트인 예를 보인다. 또한 음영 표시를 한 비트는 비트값이 프리픽스임을 나타내는 비트, 즉 "1"인 비트를 나타내고, 음영 표시를 하지 않은 비트는 비트값이 프리픽스가 아닌 비트, 즉 "0"인 비트를 나타낸다. 만일 3원 CAM(400)에서 적어도 하나 이상의 매치 라인이 셋트되면, 우선순위 인코더(404)는 (600)단계에서 셋트된 매치 라인들에 대응되게 출력되는 마스크 스트링들에 대하여 도 7a처럼 MSB(Most Significant Bit)와 LSB(Least Significant Bit)에 각각 상위 포인터와 하위 포인터를 지정한다. 그리고 (602)단계에서 도 7b처럼 상위 포인터와 하위 포인터 사이의 중간 위치에 체크 포인터를 지정한다. 다음에 (604)단계에서 마스크 스트링들 중에 체크 포인터가 가리키는 비트값이 프리픽스임을 나타내는 비트, 즉 "1"인 비트의 개수가 한개인지 여부를 확인한다. 만일 "1"인 비트가 둘 이상이면 (606)단계에서 도 7c처럼 하위 포인터를 체크 포인터의 위치로 옮겨 지정한 후, 상기 (602)단계부터 다시 처리한다. 상기 (602)∼(604)단계를 다시 처리한 결과, 여전히 "1"인 비트가 둘 이상이면 (606)단계에서 다시 도 7d처럼 하위 포인터를 체크 포인터의 위치로 옮겨 지정한 후, 상기 (602)단계부터 다시 처리한다. 이렇게 하여 도 7d처럼 "1"인 비트의 개수가 하나가 되면, (608)단계에서 그때의 체크 포인터가 가리키는 비트값이 "1"인 마스크 스트링에 해당하는 라우팅 엔트리를 LPM 엔트리로서 결정한다. 이후 (610)단계에서 이와 같이 결정된 LPM 엔트리의 물리적인 주소를 전술한 도 1에서와 마찬가지로 LPM 엔트리의 매치 라인에 근거하여 출력한다.As described above, a process flow diagram in which the priority encoder 404 compares the lengths of the mask strings to determine the LPM entry and outputs its physical address is shown in steps 600 to 610 of FIG. 7A to 7D are shown, for example, when there are three mask strings to compare the search operation example. 7A to 7D show examples of 32-bit mask strings to be compared with each other, and examples of 32-bit lengths are shown. In addition, the shaded bits represent bits indicating that the bit value is a prefix, that is, a bit of "1", and the bits not shaded represent bits that are not prefixes, that is, bits "0". If at least one or more match lines are set in the ternary CAM 400, the priority encoder 404 outputs MSB (Most) as shown in FIG. 7A for the mask strings that are output corresponding to the match lines set in step (600). Upper and lower pointers are assigned to the Significant Bit (LSB) and the Least Significant Bit (LSB), respectively. In operation 602, a check pointer is designated at an intermediate position between the upper pointer and the lower pointer as shown in FIG. 7B. Next, in step 604, it is checked whether the number of bits indicating that the bit value indicated by the check pointer is a prefix, that is, the number of bits having a value of "1" is one. If there are two or more bits of "1", the lower pointer is moved to the position of the check pointer as shown in FIG. 7C in step 606, and the process is repeated again from step 602. As a result of reprocessing steps 602 to 604, if there are two or more bits that are still " 1 ", in step 606, the lower pointer is moved to the position of the check pointer as shown in FIG. Process again from the step. In this way, when the number of bits of "1" becomes one as shown in FIG. 7D, in step 608, the routing entry corresponding to the mask string of which the bit value indicated by the check pointer at that time is "1" is determined as the LPM entry. Thereafter, the physical address of the LPM entry thus determined in step 610 is output based on the match line of the LPM entry as in FIG. 1.

따라서 본 발명은 VLMP 방식과 마찬가지로 프리픽스들이 길이 순서에 관계없이 3원 CAM에 저장되면서도 VLMP 방식과 달리 피드백 검색이 필요없게 된다. 이에따라 라우팅 테이블을 신속히 갱신할 수 있도록 하면서도, 우선순위 인코더만 변경하면 되므로 VLMP 방식과 달리 전용의 LSI가 아닌 범용의 3원 CAM을 사용하여 IP 주소를 룩-업할 수 있게 된다.Therefore, in the present invention, like the VLMP method, even if the prefixes are stored in the three-way CAM regardless of the length order, unlike the VLMP method, no feedback search is required. As a result, the routing table can be updated quickly, but only the priority encoder needs to be changed. Thus, unlike the VLMP method, the IP address can be looked up using a general purpose three-way CAM instead of a dedicated LSI.

참고적으로 상기한 바와 같은 우선순위 인코더(404)를 VHDL(Very high speed Hardware Description Language) 코드로 작성하여 시뮬레이션을 수행한 결과, 도 8에 보인 바와 같이 하나의 IP 패킷을 룩-업 처리하는데 40㎱ 정도의 시간이 걸림을 확인하였다. 도 8은 프리픽스 길이가 27비트인 경우 5개의 마스크 스트링들 MS0∼MS4중에 두번째 마스크 스트링 MS1이 LPM 엔트리에 대응하는 것으로 결정되어 두번째 라우팅 엔트리의 물리적 주소 ADDRESS가 "00010"로 출력되는 것을 보인다. 상기한 40㎱에 더하여 3원 CAM에서 병렬 검색을 하여 결과가 나오는 시간 10㎱까지 고려한다면 총 50㎱가 걸리게 된다. 이는 초당 2천 5백만회 정도의 검색을 가능하게 한다. 그러므로 10Gbps급의 입,출력을 가지고 초당 1000번 정도의 라우터 테이블 업데이트가 필요한 IP 백본 라우터에 적용될 수 있음은 물론이고, 현재 최고 속도로 개발중인 테라비트(Terabit) 라우터에서 사용 가능한 포트당 OC-192의 9.6Gbps의 포워딩 속도를 지원할 수 있다.For reference, as a result of performing the simulation by writing the priority encoder 404 as described above in VHDL (Very high speed Hardware Description Language) code, as shown in FIG. It took about 시간 time. FIG. 8 shows that when the prefix length is 27 bits, the second mask string MS1 of the five mask strings MS0 to MS4 is determined to correspond to the LPM entry, so that the physical address ADDRESS of the second routing entry is output as “00010”. In addition to the above 40 ms, if the parallel search is performed in the three-way CAM and the result is 10 ms, the total time is 50 ms. This enables about 25 million searches per second. Therefore, it can be applied to IP backbone routers with 10Gbps input / output and requiring 1000 router table updates per second, as well as OC-192 per port that can be used in the currently developed terabit router. It can support forwarding speed of 9.6Gbps.

한편 상술한 본 발명의 설명에서는 구체적인 실시예에 관해 설명하였으나, 여러가지 변형이 본 발명의 범위에서 벗어나지 않고 실시할 수 있다. 특히 본 발명의 실시예에서는 하위 포인터를 체크 포인터의 위치로 옮겨가면서 마스크 스트링들의 길이를 비교하여 LPM 엔트리를 찾는 예를 들었으나, 이와 다른 방식으로도 마스크 스트링들의 길이를 비교 검색할 수도 있다. 따라서 발명의 범위는 설명된 실시예에 의하여 정할 것이 아니고 특허청구범위와 특허청구범위의 균등한 것에 의해정하여져야 한다.Meanwhile, in the above description of the present invention, specific embodiments have been described, but various modifications can be made without departing from the scope of the present invention. Particularly, in the embodiment of the present invention, the LPM entry is found by comparing the lengths of the mask strings while moving the lower pointer to the position of the check pointer. However, the lengths of the mask strings may also be compared and searched. Therefore, the scope of the invention should not be defined by the described embodiments, but should be defined by the equivalent of claims and claims.

상술한 바와 같이 본 발명은 VLMP 방식과 마찬가지로 프리픽스들이 길이 순서에 관계없이 3원 CAM에 저장되면서도 VLMP 방식과 달리 피드백 검색이 필요없게 됨으로써 라우팅 테이블을 신속히 갱신할 수 있도록 하면서도 범용의 3원 CAM을 사용하여 IP 주소를 룩-업할 수 있는 이점이 있다.As described above, the present invention uses a universal three-way CAM while allowing prefixes to be updated quickly, because the prefixes are stored in the three-way CAM regardless of the length order, and unlike the VLMP method, the feedback search is not required. This has the advantage of looking up IP addresses.

Claims (18)

IP(Internet Protocol) 주소를 룩-업하는 방법에 있어서,In the method for looking up an Internet Protocol (IP) address, 3원 CAM(Content Addressable Memory)에 포함되고 각각 관련된 프리픽스의 데이터를 포함하는 데이터 스트링을 가지며 각각 상기 관련된 프리픽스의 길이를 포함하는 마스크 스트링을 가지는 라우팅 엔트리들에, 검색 키를 입력하는 과정과,Inputting a search key to routing entries that are included in a ternary Content Addressable Memory (CAM) and each have a data string containing data of an associated prefix and each having a mask string including a length of the associated prefix; 상기 검색 키가 상기 라우팅 엔트리들의 프리픽스들 중의 프리픽스들과 매칭되면 매칭되는 프리픽스들을 검출하는 과정과,Detecting matching prefixes if the search key matches ones of the prefixes of the routing entries; 상기 매칭되는 프리픽스들을 가지는 라우팅 엔트리들에 대응하는 마스크 스트링들을 출력하는 과정과,Outputting mask strings corresponding to routing entries having the matching prefix; 상기 출력된 마스크 스트링들에 대응하는 상기 매칭되는 프리픽스들의 길이를 비교하여 가장 긴 출력된 마스크 스트링을 가지는 라우팅 엔트리에 해당하는 라우팅 엔트리를 LPM(Longest Prefix Matching) 엔트리로 결정하는 과정을 구비함을 특징으로 하는 IP 주소 룩-업 방법.Comparing the lengths of the matching prefixes corresponding to the output mask strings to determine a routing entry corresponding to a routing entry having the longest output mask string as a longest prefix matching (LPM) entry; IP address look-up method. IP(Internet Protocol) 패킷을 포워딩 처리하기 위하여 상기 IP 패킷의 IP 주소를 룩-업하는 방법에 있어서,A method of looking up an IP address of an IP packet to forward an Internet Protocol (IP) packet, 3원 CAM(Content Addressable Memory)에 포함되고 각각 관련된 프리픽스의 데이터를 포함하는 데이터 스트링을 가지며 각각 상기 관련된 프리픽스의 길이를 포함하는 마스크 스트링을 가지는 라우팅 엔트리들에, 포워딩 처리할 IP 패킷의 목적지 주소에 해당하는 검색 키를 입력하는 과정과,To routing entries, each having a data string contained in a ternary Content Addressable Memory (CAM) and each containing data of an associated prefix, each having a mask string containing the length of the associated prefix, to a destination address of an IP packet to be forwarded. Typing the corresponding search key, 상기 검색 키가 상기 라우팅 엔트리들의 프리픽스들 중의 프리픽스들과 매칭되면 매칭되는 프리픽스들을 검출하는 과정과,Detecting matching prefixes if the search key matches ones of the prefixes of the routing entries; 상기 매칭되는 프리픽스들을 가지는 라우팅 엔트리들에 대응하는 마스크 스트링들을 출력하는 과정과,Outputting mask strings corresponding to routing entries having the matching prefix; 상기 출력되는 마스크 스트링들의 MSB(Most Significant Bit)에 상위 포인터를 지정하는 과정과,Assigning an upper pointer to the most significant bit (MSB) of the output mask strings; 상기 출력되는 마스크 스트링들의 LSB(Least Significant Bit)에 하위 포인터를 지정하는 과정과,Assigning a lower pointer to LSBs (Least Significant Bits) of the output mask strings; 상기 출력되는 마스크 스트링들의 상기 상위 포인터와 상기 하위 포인터 사이의 중간 위치의 비트에 체크 포인터를 지정하는 과정과,Assigning a check pointer to a bit at an intermediate position between the upper pointer and the lower pointer of the output mask strings; 둘 이상의 비트가 프리픽스 비트에 해당하는 비트로 상기 체크 포인터에 의해 가리켜지면 상기 하위 포인터를 상기 체크 포인터의 위치로 옮겨 새로운 하위 포인터로 지정한 후, 상기 출력되는 마스크 스트링들의 상기 상위 포인터와 상기 새로운 하위 포인터 사이의 중간 위치의 비트에 체크 포인터를 재지정하는 과정과,If more than one bit is indicated by the check pointer as a bit corresponding to a prefix bit, the lower pointer is moved to the position of the check pointer and designated as a new lower pointer, and then between the upper pointer and the new lower pointer of the output mask strings. Reassigning the check pointer to the bit in the middle of 하나의 비트만 상기 프리픽스 비트에 해당하는 비트로 상기 체크 포인터에 의해 가리켜지면 상기 체크 포인터에 의해 가리켜진 상기 하나의 비트를 가지는 상기 출력되는 마스크 스트링에 해당하는 라우팅 엔트리를 가장 긴 상기 출력된 마스크 스트링을 가지는 LPM(Longest Prefix Matching) 엔트리로 결정하는 과정을 구비함을 특징으로 하는 IP 주소 룩-업 방법.If only one bit is indicated by the check pointer as a bit corresponding to the prefix bit, the output mask string having the longest routing entry corresponding to the output mask string having the one bit indicated by the check pointer is determined as the longest. The method of claim 1, further comprising determining that the branch has a Longest Prefix Matching (LPM) entry. 제1항에 있어서, 상기 검출 과정이, 상기 라우팅 엔트리들 모두에 대하여 병렬로 수행됨을 특징으로 하는 IP 주소 룩-업 방법.2. The method of claim 1 wherein the detection process is performed in parallel for all of the routing entries. 제1항에 있어서, 상기 입력 과정 이후에, 상기 매칭되는 프리픽스들을 가지는 라우팅 엔트리들에 대응하는 매치 라인들을 셋트하는 과정을 더 구비하고,The method of claim 1, further comprising, after the input process, setting match lines corresponding to routing entries having the matching prefixes. 상기 비교가, 상기 셋트된 매치 라인들에 대응하는 상기 라우팅 엔트리들의 상기 매칭되는 프리픽스들의 길이를 비교하는 것임을 특징으로 하는 IP 주소 룩-업 방법.And wherein the comparing compares the lengths of the matching prefixes of the routing entries corresponding to the set match lines. 제1항에 있어서, 상기 라우팅 엔트리들 각각의 데이터 스트링과 마스크 스트링이, n비트임을 특징으로 하는 IP 주소 룩-업 방법.The IP address look-up method of claim 1, wherein a data string and a mask string of each of the routing entries are n bits. 제1항에 있어서, 상기 출력하는 과정이, 상기 마스크 스트링들을 상기 3원 CAM으로부터 우선순위 인코더로 출력하는 과정에 해당함을 특징으로 하는 IP 주소 룩-업 방법.The IP address look-up method of claim 1, wherein the outputting corresponds to outputting the mask strings from the ternary CAM to a priority encoder. 제1항에 있어서, 상기 검색 키가, 포워딩 처리할 IP 패킷의 목적지 주소에 해당함을 특징으로 하는 IP 주소 룩-업 방법.The IP address look-up method of claim 1, wherein the search key corresponds to a destination address of an IP packet to be forwarded. 제7항에 있어서, 상기 검출 과정이, 상기 라우팅 엔트리들 모두에 대하여 병렬로 수행됨을 특징으로 하는 IP 주소 룩-업 방법.8. The method of claim 7, wherein said detecting process is performed in parallel for all of said routing entries. 제8항에 있어서,The method of claim 8, 상기 입력 과정 이후에, 상기 매칭되는 프리픽스들을 가지는 라우팅 엔트리들에 대응하는 매치 라인들을 셋트하는 과정을 더 구비하고,After the input process, setting the match lines corresponding to the routing entries having the matching prefix, and 상기 비교가, 상기 셋트된 매치 라인들에 대응하는 상기 라우팅 엔트리들의 상기 매칭되는 프리픽스들의 길이를 비교하는 것임을 특징으로 하는 IP 주소 룩-업 방법.And wherein the comparing compares the lengths of the matching prefixes of the routing entries corresponding to the set match lines. 제9항에 있어서, 상기 라우팅 엔트리들 각각의 데이터 스트링과 마스크 스트링이, n비트임을 특징으로 하는 IP 주소 룩-업 방법.10. The method of claim 9, wherein the data string and mask string of each of the routing entries are n bits. 제10항에 있어서, 상기 출력하는 과정이, 상기 마스크 스트링들을 상기 3원 CAM으로부터 우선순위 인코더로 출력하는 과정에 해당함을 특징으로 하는 IP 주소 룩-업 방법.The IP address look-up method of claim 10, wherein the outputting corresponds to outputting the mask strings from the ternary CAM to a priority encoder. 제2항에 있어서,The method of claim 2, 상기 입력 과정 이후에, 상기 매칭되는 프리픽스들을 가지는 라우팅 엔트리들의 매치 라인들을 셋트하는 과정을 더 구비하고,After the input process, further comprising setting match lines of routing entries having the matching prefixes, 상기 출력되는 마스크 스트링들의 MSB에 상위 포인터를 지정하는 과정이, 상기 셋트된 매치 라인들을 가지는 라우팅 엔트리들에 대응하는 상기 출력되는 마스크 스트링들의 MSB에 상기 상위 포인터를 지정하는 과정이며,Designating an upper pointer to the MSB of the output mask strings, assigning the upper pointer to the MSB of the output mask strings corresponding to the routing entries having the set match lines; 상기 출력되는 마스크 스트링들의 LSB에 하위 포인터를 지정하는 과정이, 상기 셋트된 매치 라인들을 가지는 라우팅 엔트리들에 대응하는 상기 출력되는 마스크 스트링들의 LSB에 상기 상위 포인터를 지정하는 과정이며,Assigning a lower pointer to the LSBs of the output mask strings, Assigning the upper pointers to the LSBs of the output mask strings corresponding to the routing entries having the set match lines, 상기 출력되는 마스크 스트링들의 중간 위치의 비트에 체크 포인터를 지정하는 과정이, 상기 셋트된 매치 라인들을 가지는 라우팅 엔트리들에 대응하는 상기 출력되는 마스크 스트링들의 중간 위치의 비트에 상기 체크 포인터를 지정하는 과정임을 특징으로 하는 IP 주소 룩-업 방법.Assigning a check pointer to a bit at an intermediate position of the output mask strings, assigning the check pointer to a bit at an intermediate position of the output mask strings corresponding to routing entries having the set match lines IP address look-up method, characterized in that. 제2항에 있어서, 상기 데이터 스트링들과 마스크 스트링들이, 각각 n비트임을 특징으로 하는 IP 주소 룩-업 방법.3. The method of claim 2, wherein the data strings and mask strings are each n bits. 제2항에 있어서, 상기 출력하는 과정이, 상기 마스크 스트링들을 상기 3원 CAM으로부터 우선순위 인코더로 출력하는 과정에 해당함을 특징으로 하는 IP 주소 룩-업 방법.3. The IP address look-up method of claim 2, wherein the outputting corresponds to outputting the mask strings from the ternary CAM to a priority encoder. 제2항에 있어서, 상기 검출 과정이, 상기 라우팅 엔트리들 모두에 대하여 병렬로 수행됨을 특징으로 하는 IP 주소 룩-업 방법.3. The method of claim 2 wherein the detection process is performed in parallel for all of the routing entries. 제15항에 있어서,The method of claim 15, 상기 입력 과정 이후에, 상기 매칭되는 프리픽스들을 가지는 라우팅 엔트리들의 매치 라인들을 셋트하는 과정을 더 구비하고,After the input process, further comprising setting match lines of routing entries having the matching prefixes, 상기 출력되는 마스크 스트링들의 MSB에 상위 포인터를 지정하는 과정이, 상기 셋트된 매치 라인들을 가지는 라우팅 엔트리들에 대응하는 상기 출력되는 마스크 스트링들의 MSB에 상기 상위 포인터를 지정하는 과정이며,Designating an upper pointer to the MSB of the output mask strings, assigning the upper pointer to the MSB of the output mask strings corresponding to the routing entries having the set match lines; 상기 출력되는 마스크 스트링들의 LSB에 하위 포인터를 지정하는 과정이, 상기 셋트된 매치 라인들을 가지는 라우팅 엔트리들에 대응하는 상기 출력되는 마스크 스트링들의 LSB에 상기 상위 포인터를 지정하는 과정이며,Assigning a lower pointer to the LSBs of the output mask strings, Assigning the upper pointers to the LSBs of the output mask strings corresponding to the routing entries having the set match lines, 상기 출력되는 마스크 스트링들의 중간 위치의 비트에 체크 포인터를 지정하는 과정이, 상기 셋트된 매치 라인들을 가지는 라우팅 엔트리들에 대응하는 상기 출력되는 마스크 스트링들의 중간 위치의 비트에 상기 체크 포인터를 지정하는 과정임을 특징으로 하는 IP 주소 룩-업 방법.Assigning a check pointer to a bit at an intermediate position of the output mask strings, assigning the check pointer to a bit at an intermediate position of the output mask strings corresponding to routing entries having the set match lines IP address look-up method, characterized in that. 제16항에 있어서, 상기 데이터 스트링들과 마스크 스트링들이, 각각 n비트임을 특징으로 하는 IP 주소 룩-업 방법.17. The method of claim 16 wherein the data strings and mask strings are each n bits. 제17항에 있어서, 상기 출력하는 과정이, 상기 마스크 스트링들을 상기 3원 CAM으로부터 우선순위 인코더로 출력하는 과정에 해당하고,18. The method of claim 17, wherein the outputting corresponds to outputting the mask strings from the ternary CAM to a priority encoder. 상기 상위, 하위, 체크 포인터의 지정이, 상기 우선순위 인코더에 의해 수행됨을 특징으로 하는 IP 주소 룩-업 방법.Designation of the upper, lower, and check pointers is performed by the priority encoder.
KR10-2002-0037911A 2002-07-02 2002-07-02 Internet protocol address look-up method KR100460188B1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
KR10-2002-0037911A KR100460188B1 (en) 2002-07-02 2002-07-02 Internet protocol address look-up method
US10/462,739 US7079542B2 (en) 2002-07-02 2003-06-17 Internet protocol address look-up method
US10/462,778 US7424468B2 (en) 2002-07-02 2003-06-17 Internet protocol address look-up device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2002-0037911A KR100460188B1 (en) 2002-07-02 2002-07-02 Internet protocol address look-up method

Publications (2)

Publication Number Publication Date
KR20040003258A KR20040003258A (en) 2004-01-13
KR100460188B1 true KR100460188B1 (en) 2004-12-08

Family

ID=37314281

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2002-0037911A KR100460188B1 (en) 2002-07-02 2002-07-02 Internet protocol address look-up method

Country Status (1)

Country Link
KR (1) KR100460188B1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100459542B1 (en) * 2002-07-02 2004-12-03 삼성전자주식회사 Internet protocol address look-up device
KR100745693B1 (en) 2006-09-29 2007-08-03 한국전자통신연구원 Method for ternary contents address memory table management
KR100814077B1 (en) * 2006-10-09 2008-03-14 이화여자대학교 산학협력단 An ip address lookup method using priority-trie and apparatus for relaying packets therefor

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6237061B1 (en) * 1999-01-05 2001-05-22 Netlogic Microsystems, Inc. Method for longest prefix matching in a content addressable memory
US6460112B1 (en) * 1999-02-23 2002-10-01 Netlogic Microsystems, Llc Method and apparatus for determining a longest prefix match in a content addressable memory device
KR20020077686A (en) * 2001-04-02 2002-10-14 한국전자통신연구원 Routing Table Lookup Using Indirected RAM Indexing
KR20030044506A (en) * 2001-11-30 2003-06-09 한국전자통신연구원 LPM-based CAM look-up-table managing method, the apparatus thereof and the recording medium thereof
KR20040003259A (en) * 2002-07-02 2004-01-13 삼성전자주식회사 Internet protocol address look-up device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6237061B1 (en) * 1999-01-05 2001-05-22 Netlogic Microsystems, Inc. Method for longest prefix matching in a content addressable memory
US6460112B1 (en) * 1999-02-23 2002-10-01 Netlogic Microsystems, Llc Method and apparatus for determining a longest prefix match in a content addressable memory device
KR20020077686A (en) * 2001-04-02 2002-10-14 한국전자통신연구원 Routing Table Lookup Using Indirected RAM Indexing
KR20030044506A (en) * 2001-11-30 2003-06-09 한국전자통신연구원 LPM-based CAM look-up-table managing method, the apparatus thereof and the recording medium thereof
KR20040003259A (en) * 2002-07-02 2004-01-13 삼성전자주식회사 Internet protocol address look-up device

Also Published As

Publication number Publication date
KR20040003258A (en) 2004-01-13

Similar Documents

Publication Publication Date Title
US7079542B2 (en) Internet protocol address look-up method
US5920886A (en) Accelerated hierarchical address filtering and translation using binary and ternary CAMs
US7031320B2 (en) Apparatus and method for performing high-speed IP route lookup and managing routing/forwarding tables
US7418505B2 (en) IP address lookup using either a hashing table or multiple hash functions
US6985483B2 (en) Methods and systems for fast packet forwarding
US7315547B2 (en) Packet forwarding device
US7433871B2 (en) Efficient ipv4/ipv6 best matching prefix method and apparatus
EP1358739B1 (en) Method and apparatus for routing table management
US6665297B1 (en) Network routing table
US7555594B2 (en) Range representation in a content addressable memory (CAM) using an improved encoding scheme
US8295286B2 (en) Apparatus and method using hashing for efficiently implementing an IP lookup solution in hardware
US7443841B2 (en) Longest prefix matching (LPM) using a fixed comparison hash table
US20040254909A1 (en) Programming routes and access control lists in comparison tree data structures and their use such as in performing lookup operations
US20090077076A1 (en) Database and database processing methods
US6691171B1 (en) Method and system for address lookup in data communication
KR100512949B1 (en) Apparatus and method for packet classification using Field Level Trie
US6574701B2 (en) Technique for updating a content addressable memory
US7739445B1 (en) Circuit, apparatus, and method for extracting multiple matching entries from a content addressable memory (CAM) device
US20040044868A1 (en) Method and apparatus for high-speed longest prefix match of keys in a memory
KR100460188B1 (en) Internet protocol address look-up method
KR100459542B1 (en) Internet protocol address look-up device
KR100428247B1 (en) Method of Constructing the Pipe-Lined Content Addressable Memory for High Speed Lookup of Longest Prefix Matching Algorithm in Internet Protocol Address Lookup
US20090210382A1 (en) Method for priority search using a tcam
Wang et al. Routing interval: a new concept for IP lookups
KR20050043035A (en) Method and hardware architecture for searching ip address by using multiple hashing function

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: 20121030

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20131030

Year of fee payment: 10

FPAY Annual fee payment

Payment date: 20141030

Year of fee payment: 11

LAPS Lapse due to unpaid annual fee