KR100907827B1 - Forwarding Table Search Device and Method - Google Patents
Forwarding Table Search Device and Method Download PDFInfo
- Publication number
- KR100907827B1 KR100907827B1 KR1020070097487A KR20070097487A KR100907827B1 KR 100907827 B1 KR100907827 B1 KR 100907827B1 KR 1020070097487 A KR1020070097487 A KR 1020070097487A KR 20070097487 A KR20070097487 A KR 20070097487A KR 100907827 B1 KR100907827 B1 KR 100907827B1
- Authority
- KR
- South Korea
- Prior art keywords
- mac address
- forwarding
- index
- forwarding entry
- search
- Prior art date
- Legal status (The legal status 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 status listed.)
- Expired - Fee Related
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
- H04L45/7453—Address table lookup; Address filtering using hashing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/25—Mapping addresses of the same type
- H04L61/2503—Translation of Internet protocol [IP] addresses
- H04L61/2517—Translation of Internet protocol [IP] addresses using port numbers
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
본 발명은 포워딩 테이블 검색 장치 및 방법에 관한 것으로, 다수의 그룹으로 나뉘며, 각 그룹 내에서 MAC 주소 값 순으로 정렬되어 저장되는 다수의 포워딩 엔트리, 상기 각 그룹 및 포워딩 엔트리에 대응되는 해쉬키를 가지는 다수의 포워딩 데이터베이스로 이루어지는 포워딩 테이블을 저장하는 데이터 저장부; 외부로부터 입력된 MAC 주소를 해쉬키로 변환한 후, 기설정된 개수의 상기 해쉬키의 상위 비트들을 이용하여 하나의 검색 그룹을 선택하고, 상기 상위 비트들을 제외한 상기 해쉬키의 나머지 하위 비트들을 이용하여 상기 검색 그룹내에서 하나의 검색 포워딩 엔트리를 선택하는 해싱부; 및 상기 입력된 MAC 주소가 상기 검색 포워딩 엔트리로부터 추출된 MAC 주소와 동일하면 상기 검색 포워딩 엔트리의 출력 포트 정보를 출력하고, 상이하면 상기 검색 그룹 내에서 검색 영역을 분할해가면서 상기 입력된 MAC 주소를 가지는 포워딩 엔트리를 검색 및 획득한 후 출력 포트 정보를 출력하는 포트 정보 출력부를 포함하여 구성되며, 이에 의하여 포워딩 테이블을 보다 빨리 검색할 수 있도록 한다.
포워딩 테이블, 듀얼 해싱 기법, 분할 정복 기법, 네트워크 스위치
The present invention relates to an apparatus and method for searching a forwarding table. The present invention is divided into a plurality of groups, and has a plurality of forwarding entries stored in each group in order of MAC address values, and a hash key corresponding to each of the groups and the forwarding entries. A data storage unit for storing a forwarding table including a plurality of forwarding databases; After converting a MAC address input from the outside into a hash key, one search group is selected using a predetermined number of upper bits of the hash key, and the rest is performed using the remaining lower bits of the hash key except for the upper bits. A hashing unit for selecting one search forwarding entry in the search group; And outputting output port information of the search forwarding entry if the input MAC address is the same as the MAC address extracted from the search forwarding entry. If the inputted MAC address is different, the input MAC address is divided while dividing a search area within the search group. The branch is configured to include a port information output unit for outputting output port information after searching and acquiring a forwarding entry, thereby enabling a faster searching of the forwarding table.
Forwarding Tables, Dual Hashing Techniques, Split Conquest Techniques, Network Switches
Description
본 발명은 포워딩 테이블 검색 장치 및 방법에 관한 것으로, 특히 네트워크 스위치가 수많은 포트중에서 원하는 포트로 프레임을 전달하기 위한 포워딩 정보를 보다 효율적으로 검색 및 관리할 수 있도록 하는 포워딩 테이블 검색 장치 및 방법에 관한 것이다. The present invention relates to a forwarding table retrieval apparatus and method, and more particularly, to a forwarding table retrieval apparatus and method for enabling a network switch to efficiently search and manage forwarding information for forwarding frames to a desired port among a number of ports. .
본 발명은 정보통신의 IT신성장동력핵심기술개발사업의 일환으로 수행한 연구로부터 도출된 것이다[과제관리번호: 2005-S-102-02, 과제명: 캐리어급 이더넷 기술 개발].The present invention is derived from the research conducted as part of the IT new growth engine core technology development project of IT. [Task management number: 2005-S-102-02, Title: Development of carrier-class Ethernet technology].
통신망에 구비되는 네트워크 스위치는 다른 네트워크 장비로부터 데이터를 받아 원하는 포트로 전달하기 위해서 포워딩(forwarding) 검색 엔진과 어드레스 변환 매커니즘(address translation mechanism)이 필요하다. A network switch provided in a communication network needs a forwarding search engine and an address translation mechanism to receive data from another network device and transmit the data to a desired port.
이러한 네트워크 스위치의 성능은 포워딩 경로 결정 속도에 크게 영향을 받기 때문에 포워딩 검색 엔진과 어드레스 변환 매커니즘의 속도 및 효율성은 네트워크 스위치의 성능을 결정하는 중요한 요인이 된다. Since the performance of these network switches is greatly affected by the speed of forwarding path determination, the speed and efficiency of forwarding search engines and address translation mechanisms are important factors in determining the performance of network switches.
일반적으로 검색 시간을 단축하기 위해 네트워크 스위치에서는 큰 bit수를 작은 bit수의 인덱스 값으로 변환하는 해쉬 수단을 구비하고, 이를 이용하여 보다 작은 정보량으로 포워딩 테이블을 검색하여 필요한 정보를 제공하는 포워딩 엔트리를 획득하도록 한다. In general, in order to shorten a search time, a network switch includes a hash means for converting a large number of bits into an index value of a small number of bits, and uses the forwarding entry to search a forwarding table with a smaller amount of information and provide necessary information. Acquire.
도1은 종래의 일예에 따른 포워딩 테이블 검색 장치의 동작 개념도를 도시한 도면으로, 도1의 포워딩 테이블 검색 장치는 포워딩 테이블(fwd_table)을 이용하여 하나의 포워딩 엔트리(fwd_ent)를 선택하고, 이의 MAC 주소를 입력된 MAC 주소와 비교한다. 그리고 같은 경우에는 현재 선택된 포워딩 엔트리(fwd_ent)의 출력 포트 정보를 읽어오고, 다른 경우에는 다음 포워딩 엔트리(fwd_ent)의 MAC 주소와 순차적으로 비교하면서 출력 포트 정보를 획득한다. FIG. 1 is a diagram illustrating an operation of a forwarding table search apparatus according to an exemplary embodiment. The forwarding table search apparatus of FIG. 1 selects one forwarding entry fwd_ent using a forwarding table fwd_table and its MAC. Compare the address with the entered MAC address. In the same case, output port information of the currently selected forwarding entry fwd_ent is read. In other cases, output port information is obtained by sequentially comparing with the MAC address of the next forwarding entry fwd_ent.
그러나 이때의 포워딩 엔트리는 일정한 원칙에 따라 정렬되지 못하고, 단순히 각 포워딩 엔트리가 저장되는 순서대로 정렬된다. However, the forwarding entries at this time are not sorted according to a certain principle, and are simply arranged in the order in which each forwarding entry is stored.
따라서 이러한 순차적인 검색 방법은 포워딩 테이블(fwd_table)에 있는 모든 포워딩 엔트리(fwd_ent)에 대하여 정보를 읽어오고 비교해야 하기 때문에, 포워딩 경로를 결정하는 데 너무 많은 시간이 소요된다. Therefore, this sequential retrieval method takes too much time to determine the forwarding path because information must be read and compared for all forwarding entries (fwd_ent) in the forwarding table (fwd_table).
이러한 단점을 보완하기 위해 미국 등록 특허 6,266,705에서는 도 2와 같이 듀얼 해싱(dual hashing) 기법으로 수많은 포워딩 엔트리를 몇 개의 페이지(page)로 분류하여 검색하는 방법을 제안하였다. In order to make up for this drawback, US Patent No. 6,266,705 proposed a method of classifying a number of forwarding entries into several pages using a dual hashing technique as shown in FIG. 2.
도2의 방법은, 해쉬키(hash key)의 MSB(Most Significant Bits) 3 bit를 이용하여 검색할 페이지를 먼저 선택하고, 해당 페이지 내에 있는 포워딩 엔트리를 순차적으로 검색하도록 한다. In the method of FIG. 2, a page to be searched is first selected using 3 bits of MSB (Most Significant Bits) of a hash key, and the forwarding entries within the page are sequentially searched.
이에 도2의 방법은 기존의 순차적 검색 방법에 비해 검색 시간이 매우 많이 단축된다. 그러나 이때에도 해당 페이지 내에 존재하는 포워딩 엔트리 수에 비례하여 검색 속도가 저하되는 단점이 있었다. Accordingly, the search method of FIG. 2 is much shorter than the conventional sequential search method. However, even at this time, there is a disadvantage in that the search speed decreases in proportion to the number of forwarding entries existing in the page.
이와 같이 종래의 검색 방법은 상대적으로 검색시간이 많이 소요되고, 그러나 이때에도 해당 페이지 내에 존재하는 포워딩 엔트리 수에 비례하여 검색 속도가 저하되는 단점이 있었다. As described above, the conventional search method takes a relatively long time, but at this time, the search speed decreases in proportion to the number of forwarding entries existing in the corresponding page.
본 발명의 일 측면에 따르면 상기와 같은 문제점을 해결하기 위한 수단으로써, 다수의 그룹으로 나뉘며, 각 그룹 내에서 MAC 주소 값 순으로 정렬되어 저장되는 다수의 포워딩 엔트리, 상기 각 그룹 및 포워딩 엔트리에 대응되는 해쉬키를 가지는 다수의 포워딩 데이터베이스로 이루어지는 포워딩 테이블을 저장하는 데이터 저장부; 외부로부터 입력된 MAC 주소를 해쉬키로 변환한 후, 기설정된 개수의 상기 해쉬키의 상위 비트들을 이용하여 하나의 검색 그룹을 선택하고, 상기 상위 비트들을 제외한 상기 해쉬키의 나머지 하위 비트들을 이용하여 상기 검색 그룹내에서 하나의 검색 포워딩 엔트리를 선택하는 해싱부; 및 상기 입력된 MAC 주소가 상기 검색 포워딩 엔트리로부터 추출된 MAC 주소와 동일하면 상기 검색 포워딩 엔트리의 출력 포트 정보를 출력하고, 상이하면 상기 검색 그룹 내에서 검색 영역을 분할해가면서 상기 입력된 MAC 주소를 가지는 포워딩 엔트리를 검색 및 획득한 후 출력 포트 정보를 출력하는 포트 정보 출력부를 포함하는 포워딩 테이블 검색 장치를 제안한다. According to an aspect of the present invention, as a means for solving the above problems, divided into a plurality of groups, corresponding to a plurality of forwarding entries stored in the order of MAC address values in each group, corresponding to each of the group and the forwarding entry A data storage unit for storing a forwarding table including a plurality of forwarding databases having hash keys; After converting a MAC address input from the outside into a hash key, one search group is selected using a predetermined number of upper bits of the hash key, and the rest is performed using the remaining lower bits of the hash key except for the upper bits. A hashing unit for selecting one search forwarding entry in the search group; And outputting output port information of the search forwarding entry if the input MAC address is the same as the MAC address extracted from the search forwarding entry. If the inputted MAC address is different, the input MAC address is divided while dividing a search area within the search group. The present invention proposes a forwarding table search apparatus including a port information output unit for outputting output port information after searching and obtaining a forwarding entry.
그리고 상기 포트 정보 출력부는 상기 입력된 MAC 주소가 상기 추출된 MAC 주소와 동일하면 상기 검색 포워딩 엔트리의 출력 포트 정보를 출력하는 등식 비교기; 상기 입력된 MAC 주소가 상기 추출된 MAC 주소와 상이하면 상기 검색 그룹 내 검색 영역을 분할하여 새로운 검색 포워딩 엔트리를 획득하는 부등식 비교기; 및 상기 새로운 검색 포워딩 엔트리로 이동하는 검색 위치 이동부를 포함하는 것을 특징으로 한다. And the port information output unit outputs output port information of the search forwarding entry if the input MAC address is the same as the extracted MAC address; An inequality comparator for dividing a search region in the search group to obtain a new search forwarding entry if the input MAC address is different from the extracted MAC address; And a search position moving unit moving to the new search forwarding entry.
그리고 상기 부등식 비교기는 상기 입력된 MAC 주소가 상기 추출된 MAC 주소 보다 크면, 상기 추출된 MAC 주소를 인덱스 초기값(index_init)으로 설정하고, 작으면 상기 추출된 MAC 주소를 인덱스 최종값(index_final)로 설정한 후, "index_init + (index_final - index_init)/2"의 식에 따라 계산되는 인덱스(index_cur)를 가지는 상기 새로운 검색 포워딩 엔트리를 검색하는 것을 특징으로 한다. The inequality comparator sets the extracted MAC address as an index initial value (index_init) when the input MAC address is greater than the extracted MAC address, and sets the extracted MAC address as an index final value (index_final) when the input MAC address is larger than the extracted MAC address. After setting, the new search forwarding entry having an index (index_cur) calculated according to the expression "index_init + (index_final-index_init) / 2" is searched.
그리고 상기 다수의 포워딩 데이터베이스 각각은 포워딩 데이터베이스 아이디; 및 하나의 그룹 및 하나의 포워딩 엔트리에 대응되는 해쉬키로 인덱싱된 해쉬 테이블을 포함하며, 상기 다수의 포워딩 엔트리 각각은 MAC 주소, 정보의 유효 여부를 나타내는 정보, 출력 포트 정보, 가상랜 아이디, 및 다음 포워딩 엔트리의 위치를 알려주는 포인터에 대한 정보를 포함하는 것을 특징으로 한다. And each of the plurality of forwarding databases includes a forwarding database ID; And a hash table indexed by a hash key corresponding to one group and one forwarding entry, each of the plurality of forwarding entries including a MAC address, information indicating whether information is valid, output port information, virtual LAN ID, and next. And information about a pointer indicating a location of a forwarding entry.
본 발명의 다른 측면에 따르면 상기와 같은 문제점을 해결하기 위한 수단으로써, 다수의 그룹으로 나뉘며, 각 그룹 내에서 MAC 주소 값 순으로 정렬되어 저장되는 다수의 포워딩 엔트리와, 상기 각 그룹 및 포워딩 엔트리에 대응되는 해쉬키를 가지는 다수의 포워딩 데이터베이스를 구성하는 구성 단계; 외부로부터 MAC 주소가 입력되면, 상기 입력된 MAC 주소를 해쉬키로 변환한 후, 기설정된 개수의 상기 해쉬키의 상위 비트들을 이용하여 하나의 검색 그룹을 선택하고, 상기 상위 비트들을 제외한 상기 해쉬키의 나머지 하위 비트들을 이용하여 상기 검색 그룹내에서 하나의 검색 포워딩 엔트리를 선택하는 선택 단계; 상기 검색 포워딩 엔트리로부터 MAC 주소를 추출하여, 상기 추출된 MAC 주소가 상기 입력된 MAC 주소와 동일하면, 상기 검색 포워딩 엔트리의 출력 포트 정보를 추출하여 출력하는 제1 출력 단계; 및 상기 추출된 MAC 주소가 상기 입력된 MAC 주소와 상이하면, 상기 검색 그룹 내 검색 영역을 분할해가면서 상기 입력된 MAC 주소를 가지는 포워딩 엔트리를 새로이 검색한 후 출력 포트 정보를 출력하는 제2 출력 단계를 포함하는 포워딩 정보 검색 방법을 제안한다. According to another aspect of the present invention as a means for solving the above problems, divided into a plurality of groups, a plurality of forwarding entries are stored in each group arranged in the order of MAC address values, and in each of the groups and forwarding entries A configuration step of constructing a plurality of forwarding databases having corresponding hash keys; When the MAC address is input from the outside, the input MAC address is converted into a hash key, and then one search group is selected using a predetermined number of upper bits of the hash key, and the hash key except the upper bits is selected. A selection step of selecting one search forwarding entry in the search group using the remaining lower bits; A first output step of extracting a MAC address from the search forwarding entry and extracting and outputting output port information of the search forwarding entry if the extracted MAC address is the same as the input MAC address; And outputting output port information after newly searching for a forwarding entry having the input MAC address while dividing a search area in the search group if the extracted MAC address is different from the input MAC address. We propose a forwarding information retrieval method including a.
그리고 상기 제2 출력 단계는 상기 입력된 MAC 주소가 상기 추출된 MAC 주소 보다 크면, 상기 추출된 MAC 주소를 인덱스 초기값(index_init)으로 설정하고, 작으면 상기 추출된 MAC 주소를 인덱스 최종값(index_final)로 설정하는 설정 단계; "index_init + (index_final - index_init)/2"의 식에 따라 계산되는 인덱스를 가지는 포워딩 엔트리를 새로이 선택하는 재선택 단계; 상기 새로이 선택한 포워딩 엔트리의 MAC 주소가 상기 입력된 MAC 주소와 동일하면 상기 새로이 선택한 포워딩 엔트리의 출력 포트 정보를 출력하고, 상이하면 상기 설정 단계로 재진입하는 비교 단계; 및 상기 새로이 선택한 포워딩 엔트리가 무효하면, 상기 입력된 MAC 주소를 가지는 포워딩 엔트리를 추가하거나 상기 새로이 선택한 포워딩 엔트리를 삭제하는 정렬 단계를 포함하는 것을 특징으로 한다. And if the input MAC address is larger than the extracted MAC address, setting the extracted MAC address as an index initial value (index_init), and when the outputting MAC address is smaller, the extracted MAC address as an index final value (index_final). Setting step); a reselection step of newly selecting a forwarding entry having an index calculated according to the expression "index_init + (index_final-index_init) / 2"; A comparison step of outputting output port information of the newly selected forwarding entry if the MAC address of the newly selected forwarding entry is the same as the input MAC address, and reentering the setting step if different; And if the newly selected forwarding entry is invalid, adding a forwarding entry having the input MAC address or deleting the newly selected forwarding entry.
그리고 상기 정렬 단계는 상기 입력된 MAC 주소를 가지는 포워딩 엔트리를 추가할 것인지, 상기 새로이 선택한 포워딩 엔트리를 삭제할 것인지를 선택하는 단계; 상기 입력된 MAC 주소를 가지는 포워딩 엔트리를 추가하는 경우, 인덱스 최종값을 수정 인덱스로 설정하고 상기 수정 인덱스보다 큰 인덱스 값을 가지는 포워딩 엔트리의 인덱스 값을 한 단위씩 증가시킨 후, 최종 인덱스 위치에 상기 입력된 MAC 주소를 가지는 포워딩 엔트리를 추가하는 단계; 및 상기 새로이 선택한 포워딩 엔트리포워딩 엔트리 인덱스 최종값을 상기 수정 인덱스로 설정한 후 상기 새로이 선택한 포워딩 엔트리를 삭제하고, 상기 수정 인덱스보다 큰 인덱스 값을 가지는 포워딩 엔트리의 인덱스 값을 한 단위씩 감소시키는 단계를 포함하는 것을 특징으로 한다. And the sorting step may include selecting whether to add a forwarding entry having the input MAC address or to delete the newly selected forwarding entry; When adding a forwarding entry having the input MAC address, the index final value is set as a modification index, and an index value of a forwarding entry having an index value larger than the modification index is increased by one unit, and then the index is added to the final index position. Adding a forwarding entry with the entered MAC address; And setting the newly selected forwarding entry forwarding entry index final value as the modification index, deleting the newly selected forwarding entry, and decreasing the index value of the forwarding entry having an index value larger than the modification index by one unit. It is characterized by including.
이와 같이 본 발명의 포워딩 테이블 검색 장치 및 방법은 포워딩 엔트리를 다수개의 그룹으로 분류하고, 그룹 내에서 MAC 주소 순으로 정렬시킨 후, 듀얼 해싱 기법과 분할 정복 기법을 이용하여 필요로 하는 포워딩 엔트리를 보다 빨리 검색할 수 있도록 한다. 이에 이를 이용하는 네트워크 스위치의 성능이 향상되도록 한다. As described above, the apparatus and method for searching a forwarding table according to the present invention classifies the forwarding entries into a plurality of groups, sorts them in the order of MAC addresses in the group, and then uses the dual hashing technique and the partitioning conquer technique to view the required forwarding entries. Make it quick to search. This improves the performance of the network switch using the same.
또한 본 발명에서는 포워딩 엔트리가 추가 또는 삭제되더라도 포워딩 엔트리의 정렬 순서가 계속하여 유지되도록 함으로써, 효과적으로 포워딩 테이블을 관리할 수 있도록 한다. In addition, in the present invention, even if the forwarding entry is added or deleted, the sorting order of the forwarding entries is continuously maintained, thereby effectively managing the forwarding table.
도3은 본 발명의 일실시예에 따른 포워딩 테이블 검색 장치의 구성도를 도시한 도면이다. 3 is a diagram illustrating a configuration of an apparatus for searching a forwarding table according to an embodiment of the present invention.
도3을 참조하면, 본 발명의 포워딩 테이블 검색 장치는 데이터 저장부(410), 해싱부(420), 포트 정보 출력부(430), 및 포워딩 엔트리 정렬부(440)를 포함한다. Referring to FIG. 3, the apparatus for searching a forwarding table of the present invention includes a
데이터 저장부(410)는 포워딩 테이블(fwd_table)이 저장되며, 포워딩 테이블(fwd_table)은 포워딩 데이터베이스(fwd_db)와 포워딩 엔트리(fwd_ent)라는 두개의 데이터 구조를 가진다. 그리고 다수의 포워딩 엔트리(fwd_ent)들은 해쉬키(hash key)의 일부 bit를 기준으로 다수의 그룹으로 나눈 후, 그룹별로 MAC 주소 값 순으로 순차적으로 저장하여 준다. The
이때, 포워딩 테이블(fwd_table)은 포워딩 데이터베이스 아이디(forwarding database ID, 이하 FID)로 인덱싱되어, FID별로 대응되는 포워딩 데이터베이스(fwd_db)의 위치를 알려주는 포인터(pfwd_db)를 저장한다. At this time, the forwarding table (fwd_table) is indexed by a forwarding database ID (FID), and stores a pointer (pfwd_db) indicating the location of the forwarding database (fwd_db) corresponding to each FID.
각 포워딩 데이터베이스(fwd_db)는 도4와 같이 데이터 구조를 가지며, FID, 및 대응되는 그룹과 포워딩 엔트리를 가리키도록 매핑된 하나의 해쉬키(hash key)로 인덱싱이 되어 있는 해쉬 테이블 등의 정보들을 저장하고, 각 포워딩 엔트리(fwd_ent)는 도5와 같은 데이터 구조를 가지며, 대응되는 포워딩 엔트리의 MAC 주소(MCA address), 유효 여부를 나타내는 유효 정보(valid), 출력 포트 정보(pointer to set output L2 port ID), 가상랜 아이디(VLAN ID), 및 다음 포워딩 엔트리의 위치를 알려주는 포인터(pointer to the next entry)등의 정보들을 저장한다. Each forwarding database (fwd_db) has a data structure as shown in FIG. 4, and contains information such as a FID and a hash table indexed with a corresponding hash key mapped to point to a corresponding group and forwarding entry. Each forwarding entry (fwd_ent) has a data structure as shown in FIG. 5, and the MAC address (MCA address) of the corresponding forwarding entry, valid information indicating whether it is valid, and output port information (pointer to set output L2). information such as a port ID, a VLAN ID, and a pointer to the next entry indicating a location of a next forwarding entry.
해싱부(420)는 외부로부터 입력된 프레임내 MAC 주소를 작은 bit수를 가지는 해쉬키(hash key)로 변환한 후, 듀얼 해싱 기법으로 다수의 그룹들 중 하나의 검색 그룹을 선택함과 동시에 선택된 그룹 내에서 하나의 검색 포워딩 엔트리를 선택한다. The
즉, 해싱부(420)는 해쉬키(hash key)의 일부 bit들을 이용하여 검색 그룹으 로 선택하고, 나머지 bit들을 이용하여 검색 포워딩 엔트리를 선택한다. That is, the
예를 들어, 다수의 포워딩 엔트리(fwd_ent)들은 8개의 그룹으로 분류하고, 각 그룹에는 64개의 포워딩 엔트리(fwd_ent)들이 저장되도록 포워딩 테이블(fwd_table)을 구성되었으면, 본 발명의 해싱부(420)는 도6에서와 같이 해쉬키(hash key)의 MSB 3bit를 이용하여 하나의 그룹을 선택하고, 나머지 6 bit를 이용하여 선택된 그룹 내에서 하나의 포워딩 엔트리를 선택하도록 한다. For example, if a plurality of forwarding entries (fwd_ent) are classified into eight groups, and each forwarding table (fwd_ent) is configured to store 64 forwarding entries (fwd_ent) in each group, the
포트 정보 출력부(430)는 해싱부(420)에 의해 선택된 포워딩 엔트리의 MAC 주소가 입력된 MAC 주소와 동일하면, 이의 출력 포트 정보를 출력하되, 그렇지 않으면 분할 정복(divide-and-conquer) 기법을 이용하여 검색 그룹 내 검색 영역을 1/2씩 분할해가면서 입력된 MAC 주소를 가지는 새로운 포워딩 엔트리를 검색 및 획득한 후, 이의 출력 포트 정보를 출력한다. The port
이를 위해 포트 정보 출력부(430)는 입력된 MAC 주소와 검색 포워딩 엔트리의 MAC 주소가 같은 지, 어느 것이 더 큰지를 비교하여 출력 포트를 출력하거나 검색 영역을 1/2만큼 분할하여 새로운 검색 포워딩 엔트리를 검색하는 등식 및 부등식 비교기(431, 432)와, 등식 및 부등식 비교기(431, 432)의 동작 결과에 따라 새로운 검색 포워딩 엔트리로 검색 위치를 이동하는 검색 위치 이동부(433)를 구비한다. To this end, the port
포워딩 엔트리 정렬부(440)는 포워딩 엔트리를 MAC 주소 순으로 추가 또는 삭제하는 동작을 수행한다. 예를 들어, 포워딩 엔트리를 추가하는 경우에는 인덱스 최종값(index_final)을 수정 인덱스(index_modified)로 설정한 후, 수정 인덱 스(index_modified) 보다 큰 인덱스 값을 가지는 포워딩 엔트리의 인덱스 값을 한 단위씩 증가시킨다. 반면 포워딩 엔트리를 삭제하는 경우에는 삭제할 포워딩 엔트리의 인덱스(index)를 수정 인덱스(index_modified)로 설정하고, 해당 포워딩 엔트리를 삭제한 후 수정 인덱스(index_modified) 보다 큰 인덱스 값을 가지는 포워딩 엔트리의 인덱스 값을 한 단위씩 감소시킨다. The
즉, 포워딩 엔트리를 추가하는 경우에는 추가된 포워딩 엔트리보다 큰 인덱스를 가지는 포워딩 엔트리의 저장 위치를 한 자리씩 뒤로 이동시키고, 포워딩 엔트리를 삭제하는 경우에는 삭제된 포워딩 엔트리의 인덱스보다 큰 인덱스를 가지는 포워딩 엔트리의 저장 위치를 한 자리씩 앞으로 이동시킨다.That is, when a forwarding entry is added, the storage position of the forwarding entry having an index larger than the added forwarding entry is moved backward by one position, and when the forwarding entry is deleted, the forwarding has an index larger than the index of the deleted forwarding entry. Moves the storage location of the entry forward one position.
도7은 본 발명의 일 실시예에 따른 포워딩 정보 검색 방법을 설명하기 위한 흐름도이다. 7 is a flowchart illustrating a method of retrieving forwarding information according to an embodiment of the present invention.
외부로부터 입력된 프레임내 MAC 주소를 해쉬키(hash key)로 변환한 후(S101), 해쉬키(hash key)를 듀얼 해싱 기법에 따라 이용하여 검색 그룹과 검색 그룹 내에 위치하는 검색 포워딩 엔트리를 선택한다(S102). After converting the MAC address in the frame input from the outside into a hash key (S101), using the hash key according to the dual hashing technique, the search group and the search forwarding entry located in the search group are selected. (S102).
검색 포워딩 엔트리에 저장되어 있는 MAC 주소를 추출한 후(S103), 입력된 프레임의 MAC 주소가 비교하여 동일한지를 비교한다(S104). After extracting the MAC address stored in the search forwarding entry (S103), the MAC addresses of the input frames are compared and compared (S104).
S104의 비교 결과, 동일한 경우에는 검색 포워딩 엔트리에 저장된 출력 포트 정보를 추출하여 통보한 후, 동작 종료한다(S105,S016). As a result of the comparison in S104, if identical, the output port information stored in the search forwarding entry is extracted and notified, and the operation ends (S105, S016).
반면, 상이한 경우에는 입력된 MAC 주소가 검색 그룹 내의 첫 번째 포워딩 엔트리의 MAC 주소 보다 작은지를 확인한 후(S107), 작은 경우에는 한 단위 작은 그룹 아이디 값을 가지는 이전 그룹으로 이동한 후 S103으로 재진입한다(S108). On the other hand, if it is different, check whether the entered MAC address is smaller than the MAC address of the first forwarding entry in the search group (S107), and if it is small, move to the previous group having the group ID value smaller by one unit and re-enter S103. (S108).
반면 큰 경우에는 입력된 MAC 주소가 검색 그룹 내의 마지막 포워딩 엔트리의 MAC 주소 보다 큰지를 확인한 후(S109), 큰 경우에는 한 단위 큰 그룹 아이디 값을 가지는 다음 그룹으로 이동한 후 S103으로 재진입한다(S110). On the other hand, if it is large, it is checked whether the input MAC address is larger than the MAC address of the last forwarding entry in the search group (S109), and if it is large, it moves to the next group having a group ID value one unit larger and re-enters S103 (S110). ).
만약, 입력된 MAC 주소가 검색 그룹 내의 마지막 포워딩 엔트리의 MAC 주소 보다 작으면, 입력된 MAC 주소와 S103 단계를 통해 추출된 MAC 주소를 다시 비교한다(S111). If the input MAC address is smaller than the MAC address of the last forwarding entry in the search group, the input MAC address is compared with the extracted MAC address through step S103 (S111).
비교 결과, 입력된 MAC 주소가 추출된 MAC 주소 보다 크면, 추출된 MAC 주소를 인덱스 초기값(index_init)으로 설정하고(S112), 작으면 추출된 MAC 주소를 인덱스 최종값(index_final)로 설정한다(S113). As a result of the comparison, when the input MAC address is larger than the extracted MAC address, the extracted MAC address is set as an index initial value (index_init) (S112), and when the MAC address is small, the extracted MAC address is set as an index final value (index_final) ( S113).
이때, 초기화 시에 인덱스 초기값(index_init)은 검색 그룹 내에서 가장 작은 인덱스 값을 가지는 MAC 주소로, 인덱스 최종값(index_final)은 검색 그룹 내에서 가장 큰 인덱스 값을 가지는 MAC 주소로 각각으로 설정되어 있으나, S113을 거치면서 추출된 MAC 주소로 재설정된다. At the time of initialization, the index initial value index_init is set to the MAC address having the smallest index value in the search group, and the index final value index_final is set to the MAC address having the largest index value in the search group. However, it is reset to the extracted MAC address through S113.
그리고 현재 인덱스(index_cur)를 “index_init + (index_final - index_init)/2”의 식에 따라 계산하고, 계산된 현재 인덱스(index_cur)를 가지는 포워딩 엔트리를 선택한다(S114). The current index index_cur is calculated according to the expression "index_init + (index_final-index_init) / 2", and a forwarding entry having the calculated current index index_cur is selected (S114).
즉, 본 발명은 S114를 거치면서 검색 그룹 내 검색 영역을 1/2씩 분할해가면서 새로운 포워딩 엔트리를 선택하게 된다. That is, the present invention selects a new forwarding entry while dividing the search area in the search group by 1/2 while passing through S114.
예를 들어, 도8에 도시된 바와 같이 입력된 MAC 주소를 10번째 포워딩 엔트 리가 가지나 4번째 포워딩 엔트리가 임의로 선택되면, 본 발명은 검색 영역을 분할하여 12번째 포워딩 엔트리와 8번째 포워딩 엔트리를 선택한 후(S1,S2), 그 다음에 10 번째 포워딩 엔트리를 선택하게 된다(S3). 이에 보다 작은 검색 횟수로 원하는 포워딩 엔트리를 선택할 수 있다. For example, if a 10th forwarding entry has a MAC address input as shown in FIG. 8 but a fourth forwarding entry is arbitrarily selected, the present invention divides the search area to select a 12th forwarding entry and an 8th forwarding entry. Then (S1, S2), the 10th forwarding entry is selected next (S3). This allows you to select the desired forwarding entry with a smaller number of searches.
계속하여 S114에 의해 선택된 포워딩 엔트리의 유효 비트(Valid bit)가 "1"인지 확인하고(S115), 유효 비트(Valid bit)가 "1"이면 현재에 선택된 포워딩 엔트리가 유효한 것임을 확인하고 S103으로 재진입한다. Subsequently, check whether the valid bit of the forwarding entry selected by S114 is "1" (S115). If the valid bit is "1", confirm that the currently selected forwarding entry is valid and re-enter S103. do.
반면 유효 비트(Valid bit)가 "0"이면, 현재에 선택된 포워딩 엔트리가 무효한 것임을 확인한다. 그리고 입력된 MAC 주소를 가지는 포워딩 엔트리를 추가하거나, 현재에 선택된 포워딩 엔트리를 삭제하기 위해 포워딩 엔트리 정렬 과정을 수행한 후 동작 종료한다(S116). On the other hand, if the valid bit is "0", it confirms that the currently selected forwarding entry is invalid. The operation is terminated after adding a forwarding entry having the input MAC address or performing a forwarding entry alignment process to delete the currently selected forwarding entry (S116).
도9는 본 발명의 일실시예에 따른 포워딩 엔트리 정렬 방법을 설명하기 위한 흐름도로, 이는 포워딩 테이블(fwd_table)내에 포워딩 엔트리가 MAC 주소 값 순으로 정렬되면서 저장되도록 위한 것이다. 9 is a flowchart illustrating a forwarding entry sorting method according to an embodiment of the present invention, which is provided so that forwarding entries are stored in the forwarding table fwd_table while being sorted in the order of MAC address values.
먼저, 포워딩 엔트리 정렬 동작이 요청되어 활성화되면, 요청된 동작이 포워딩 엔트리 추가 동작인지 삭제 동작인지를 확인한다(S201). First, when a forwarding entry alignment operation is requested and activated, it is checked whether the requested operation is a forwarding entry addition operation or a deletion operation (S201).
포워딩 엔트리 추가인 경우에는 인덱스 최종값(index_final)으로 수정 인덱스(index_modified)를 설정하고(S202), 수정 인덱스(index_modified) 보다 큰 인덱스 값을 가지는 포워딩 엔트리는 한 자리씩 뒤로 이동시킨 후(S203), 인덱스 최종값(index_final) 위치에 새로운 포워딩 엔트리를 추가한다(S204). In the case of adding a forwarding entry, a modified index (index_modified) is set as an index final value (index_final) (S202), and a forwarding entry having an index value larger than the modified index (index_modified) is moved back by one digit (S203), A new forwarding entry is added at the index final value index_final (S204).
반대로 포워딩 테이블(fwd_table)내에 존재하던 포워딩 엔트리를 삭제하는 경우, 삭제할 포워딩 엔트리의 인덱스를 수정 인덱스(index_modified)에 저장한 후(S205), 해당 포워딩 엔트리를 삭제하고(S206), 수정 인덱스(index_modified) 보다 큰 인덱스 값을 가지는 포워딩 엔트리는 한 자리씩 앞으로 이동한다(S207). On the contrary, when the forwarding entry existing in the forwarding table (fwd_table) is deleted, the index of the forwarding entry to be deleted is stored in the modified index (index_modified) (S205), the corresponding forwarding entry is deleted (S206), and the modified index (index_modified) A forwarding entry having a larger index value moves forward by one digit (S207).
이에, 포워딩 테이블(fwd_table)내에 저장되는 포워딩 엔트리가 추가 또는 삭제되더라도 MAC 주소에 따른 포워딩 테이블(fwd_table)내 정렬 순서는 그대로 유지된다. Thus, even if a forwarding entry stored in the forwarding table fwd_table is added or deleted, the sort order in the forwarding table fwd_table according to the MAC address is maintained.
이상에서 설명한 본 발명은 전술한 실시 예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경할 수 있다는 것은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 당업자에게 있어 명백할 것이다.The present invention described above is not limited to the above-described embodiments and the accompanying drawings, and it is common in the art that various substitutions, modifications, and changes can be made without departing from the technical spirit of the present invention. It will be apparent to those skilled in the art.
도1은 종래의 일예에 따른 포워딩 테이블 검색 장치의 동작 개념도를 도시한 도면, 1 is a view illustrating an operation of a forwarding table search apparatus according to a conventional example;
도2는 종래의 다른 예에 따른 포워딩 테이블 검색 장치의 동작 개념도를 도시한 도면, 2 is a diagram illustrating an operation of a forwarding table search apparatus according to another conventional example;
도3은 본 발명의 일실시예에 따른 포워딩 테이블 검색 장치의 구성도를 도시한 도면, 3 is a block diagram of an apparatus for searching a forwarding table according to an embodiment of the present invention;
도4는 도3의 포워딩 데이터베이스의 데이터 구조를 도시한 도면, 4 shows a data structure of the forwarding database of FIG.
도5는 도3의 포워딩 엔트리의 데이터 구조를 도시한 도면, FIG. 5 shows a data structure of the forwarding entry of FIG. 3; FIG.
도6은 도3의 해싱부의 동작 개념도를 도시한 도면, 6 is a conceptual view illustrating an operation of a hashing unit of FIG. 3;
도7은 본 발명의 일 실시예에 따른 포워딩 정보 검색 방법을 설명하기 위한 흐름도, 7 is a flowchart for explaining a method of retrieving forwarding information according to an embodiment of the present invention;
도8은 본 발명의 분할 정복 기법을 이용한 포워딩 엔트리 검색 방법의 일예를 도시한 도면, 그리고 8 is a diagram illustrating an example of a forwarding entry retrieval method using the partitioning conquest method of the present invention; and
도9는 본 발명의 일실시예에 따른 포워딩 엔트리 정렬 방법을 설명하기 위한 흐름도이다. 9 is a flowchart illustrating a forwarding entry alignment method according to an embodiment of the present invention.
Claims (11)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US11/947,353 US7873041B2 (en) | 2006-12-01 | 2007-11-29 | Method and apparatus for searching forwarding table |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20060121046 | 2006-12-01 | ||
KR1020060121046 | 2006-12-01 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20080050296A KR20080050296A (en) | 2008-06-05 |
KR100907827B1 true KR100907827B1 (en) | 2009-07-14 |
Family
ID=39805784
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020070097487A Expired - Fee Related KR100907827B1 (en) | 2006-12-01 | 2007-09-27 | Forwarding Table Search Device and Method |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100907827B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104092612A (en) * | 2014-06-05 | 2014-10-08 | 汉柏科技有限公司 | Method and device for updating matching order of fast forwarding table |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100969381B1 (en) | 2008-05-29 | 2010-07-09 | 현대자동차주식회사 | Variable valve lift device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20000013760A (en) * | 1998-08-13 | 2000-03-06 | 윤종용 | Multiple access computer address hashing method of lan switch using cyclic redundancy check and system therefor |
US6266705B1 (en) | 1998-09-29 | 2001-07-24 | Cisco Systems, Inc. | Look up mechanism and associated hash table for a network switch |
KR20020055287A (en) * | 2000-12-28 | 2002-07-08 | 구자홍 | Method for routing a packet of a router device |
-
2007
- 2007-09-27 KR KR1020070097487A patent/KR100907827B1/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20000013760A (en) * | 1998-08-13 | 2000-03-06 | 윤종용 | Multiple access computer address hashing method of lan switch using cyclic redundancy check and system therefor |
US6266705B1 (en) | 1998-09-29 | 2001-07-24 | Cisco Systems, Inc. | Look up mechanism and associated hash table for a network switch |
US6457058B1 (en) | 1998-09-29 | 2002-09-24 | Cisco Technology, Inc. | Network switch with hash table look up |
KR20020055287A (en) * | 2000-12-28 | 2002-07-08 | 구자홍 | Method for routing a packet of a router device |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104092612A (en) * | 2014-06-05 | 2014-10-08 | 汉柏科技有限公司 | Method and device for updating matching order of fast forwarding table |
Also Published As
Publication number | Publication date |
---|---|
KR20080050296A (en) | 2008-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111226205B (en) | KVS tree database | |
TWI702506B (en) | System, machine readable medium, and machine-implemenated method for merge tree garbage metrics | |
CN110383261B (en) | Stream selection for multi-stream storage | |
TWI702503B (en) | Systems, methods, and computer readable media to implement merge tree modifications for maintenance operations | |
US7873041B2 (en) | Method and apparatus for searching forwarding table | |
WO2018064962A1 (en) | Data storage method, electronic device and computer non-volatile storage medium | |
US8099421B2 (en) | File system, and method for storing and searching for file by the same | |
US7526497B2 (en) | Database retrieval apparatus, retrieval method, storage medium, and program | |
US20070100873A1 (en) | Information retrieving system | |
TW201841122A (en) | Key-value store tree | |
CN110196784A (en) | Database and solid magnetic disc (SSD) controller | |
US20040139274A1 (en) | Virtual content addressable memory with high speed key insertion and deletion and pipelined key search | |
CN108509505B (en) | Character string retrieval method and device based on partition double-array Trie | |
JP2017045291A (en) | Similar image search system | |
KR100999408B1 (en) | 검색 RL search method using hatstry | |
KR100907827B1 (en) | Forwarding Table Search Device and Method | |
KR101089722B1 (en) | Prefix tree-based indexing method and apparatus, recording medium thereof | |
CN112639761B (en) | Method and device for establishing index for data | |
CN110995876B (en) | Method and device for storing and searching IP | |
CN109740249B (en) | MUX tree logic structure optimization method, module and storage medium | |
CN111581206B (en) | B + tree operation device and method | |
JP2003296157A (en) | Data storage device, data processing device, data processing method, data processing program | |
CN108984780A (en) | Based on the method and apparatus for supporting duplicate key value data tree structure management data | |
JP2000090115A (en) | Index generating method and retrieval method | |
CN111581205B (en) | B+ tree manipulation device with node index and method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
PA0109 | Patent application |
St.27 status event code: A-0-1-A10-A12-nap-PA0109 |
|
PA0201 | Request for examination |
St.27 status event code: A-1-2-D10-D11-exm-PA0201 |
|
PG1501 | Laying open of application |
St.27 status event code: A-1-1-Q10-Q12-nap-PG1501 |
|
D13-X000 | Search requested |
St.27 status event code: A-1-2-D10-D13-srh-X000 |
|
D14-X000 | Search report completed |
St.27 status event code: A-1-2-D10-D14-srh-X000 |
|
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
St.27 status event code: A-1-2-D10-D21-exm-PE0902 |
|
P11-X000 | Amendment of application requested |
St.27 status event code: A-2-2-P10-P11-nap-X000 |
|
P13-X000 | Application amended |
St.27 status event code: A-2-2-P10-P13-nap-X000 |
|
R17-X000 | Change to representative recorded |
St.27 status event code: A-3-3-R10-R17-oth-X000 |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
St.27 status event code: A-1-2-D10-D22-exm-PE0701 |
|
GRNT | Written decision to grant | ||
PR0701 | Registration of establishment |
St.27 status event code: A-2-4-F10-F11-exm-PR0701 |
|
PR1002 | Payment of registration fee |
St.27 status event code: A-2-2-U10-U11-oth-PR1002 Fee payment year number: 1 |
|
PG1601 | Publication of registration |
St.27 status event code: A-4-4-Q10-Q13-nap-PG1601 |
|
PN2301 | Change of applicant |
St.27 status event code: A-5-5-R10-R13-asn-PN2301 St.27 status event code: A-5-5-R10-R11-asn-PN2301 |
|
LAPS | Lapse due to unpaid annual fee | ||
PC1903 | Unpaid annual fee |
St.27 status event code: A-4-4-U10-U13-oth-PC1903 Not in force date: 20120709 Payment event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE |
|
PC1903 | Unpaid annual fee |
St.27 status event code: N-4-6-H10-H13-oth-PC1903 Ip right cessation event data comment text: Termination Category : DEFAULT_OF_REGISTRATION_FEE Not in force date: 20120709 |
|
PN2301 | Change of applicant |
St.27 status event code: A-5-5-R10-R13-asn-PN2301 St.27 status event code: A-5-5-R10-R11-asn-PN2301 |
|
P22-X000 | Classification modified |
St.27 status event code: A-4-4-P10-P22-nap-X000 |