RU2538323C1 - Method of organising filter table of internetwork switch and apparatus therefor - Google Patents

Method of organising filter table of internetwork switch and apparatus therefor Download PDF

Info

Publication number
RU2538323C1
RU2538323C1 RU2013129792/08A RU2013129792A RU2538323C1 RU 2538323 C1 RU2538323 C1 RU 2538323C1 RU 2013129792/08 A RU2013129792/08 A RU 2013129792/08A RU 2013129792 A RU2013129792 A RU 2013129792A RU 2538323 C1 RU2538323 C1 RU 2538323C1
Authority
RU
Russia
Prior art keywords
input
hash function
bits
collision
tables
Prior art date
Application number
RU2013129792/08A
Other languages
Russian (ru)
Other versions
RU2013129792A (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 RU2013129792/08A priority Critical patent/RU2538323C1/en
Application granted granted Critical
Publication of RU2013129792A publication Critical patent/RU2013129792A/en
Publication of RU2538323C1 publication Critical patent/RU2538323C1/en

Links

Abstract

FIELD: physics, computer engineering.
SUBSTANCE: invention relates to computer engineering. A method of organising an filter table of an internetwork switch without storing a search key, wherein for source node addresses and frame destination nodes, a hash function value is calculated; the obtained value is an address in a record storage table; if a collision is detected, the law of calculating the hash function is changed and the record storage table is cleared, wherein N-1 values of the hash function are further calculated using non-recurrent laws which are cell addresses in additional N-1 parallel record storage tables in which bits identifying the source node with switch ports are stored; the values of bits identifying the destination node with switch ports read from N parallel tables are combined by a logic AND operation; the resultant identity bits enable to detect collision and change the law of calculating the hash function for one of the N parallel tables are simultaneously the search result of associated information in the filter table.
EFFECT: searching and storing information with single access to a filter table.
2 cl, 1 dwg

Description

Изобретение относится к области вычислительной техники и может быть использовано в вычислительных сетях с кадровой (пакетной) коммутацией данных.The invention relates to the field of computer technology and can be used in computer networks with frame (packet) data switching.

Одной из основных функций межсетевых мостов и коммутаторов является фильтрация кадров. Кадры, непредназначенные узлам сетей, подключенным к портам межсетевого моста или коммутатора, не должны передаваться на эти порты. Фильтрация, или принятие решения о необходимости передачи кадра на определенный порт межсетевого моста или коммутатора, осуществляется на основании заранее известной или накопленной информации об адресах узлов сети, подключенных к соответствующим портам коммутатора, которая хранится в таблице фильтрации. Исходя из логики работы межсетевых мостов и коммутаторов, описанной в стандарте [IEEE Std 802.1D, 1998 Edition, Part 3: Media Access Control (MAC) Bridges], таблица фильтрации заполняется адресами отправителей кадров данных и номерами портов, через которые эти кадры поступили на коммутатор. Для принятия решения о необходимости передачи кадра на другой порт коммутатора в таблице производится поиск адреса, совпадающего с адресом назначения кадра и ассоциированным с этим адресом номером порта, на который нужно передать кадр.One of the main functions of gateways and bridges is frame filtering. Frames that are not intended for network nodes connected to ports on a gateway or switch should not be transmitted to these ports. Filtering, or making a decision about the need to transfer a frame to a specific port on a gateway bridge or switch, is carried out on the basis of previously known or accumulated information about the addresses of network nodes connected to the corresponding switch ports, which is stored in the filter table. Based on the logic of the work of gateway bridges and switches described in the standard [IEEE Std 802.1D, 1998 Edition, Part 3: Media Access Control (MAC) Bridges], the filtering table is filled with the addresses of the senders of data frames and the port numbers through which these frames were sent to switch. To make a decision on the need to transfer a frame to another switch port in the table, a search is made for the address that matches the destination address of the frame and the port number to which the frame should be transmitted associated with this address.

Для организации таблиц фильтрации в настоящее время применяются хешированные таблицы, в которых адрес записи в таблице является хеш-функцией от ключа поиска. Это позволяет производить поиск и сохранение записей в таблице за одно (в некоторых случаях несколько) к ней обращение.To organize filter tables, hashed tables are currently used in which the record address in the table is a hash function of the search key. This allows you to search and save records in the table for one (in some cases several) access to it.

Так как для одного значения хеш-функции возможно существование нескольких ключей поиска, то существует вероятность получения неверного результата поиска в хешированной таблице - коллизии. Существуют различные способы разрешения коллизий. Все они основаны на необходимости хранения ключа поиска в таблице. В случае если произошла коллизия или искомый адрес назначения не найден в таблице фильтрации, кадр передается на все порты коммутатора, что ведет к увеличению сетевой нагрузки и снижению производительности коммутатора.Since for one value of a hash function several search keys may exist, there is a chance of getting an incorrect search result in a hashed table - a collision. There are various ways to resolve collisions. All of them are based on the need to store the search key in the table. In the event of a collision or the desired destination address is not found in the filter table, the frame is transmitted to all ports of the switch, which leads to an increase in network load and lower performance of the switch.

Цель данного изобретения - снижение требуемого объема памяти для хранения таблицы фильтрации, осуществление поиска и сохранения записей за одно обращение к таблице фильтрации и снижение вероятности получения неверного результата поиска в таблице фильтрации.The purpose of this invention is to reduce the required amount of memory for storing the filter table, search and save records for one call to the filter table, and reduce the likelihood of receiving an incorrect search result in the filter table.

Эффективность организации таблиц фильтрации определяется следующими критериями:The effectiveness of organizing filter tables is determined by the following criteria:

- объем памяти, необходимой для хранения одной записи в таблице фильтрации;- the amount of memory required to store one record in the filter table;

- количество обращений к таблице при поиске записей;- the number of calls to the table when searching for records;

- вероятность коллизии.- probability of collision.

Вероятность коллизии можно определить выражением:The probability of collision can be determined by the expression:

P = Q W , ( 1 )

Figure 00000001
P = Q W , ( one )
Figure 00000001

где Q - количество сочетаний узлов в объединяемых межсетевым коммутатором сетях, при которых происходит коллизия, ω - общее количество сочетаний узлов в объединяемых сетях.where Q is the number of combinations of nodes in the networks joined by the gateway switch at which the collision occurs, ω is the total number of combinations of nodes in the networks being joined.

Известен способ организации таблиц фильтрации, применяющий хешированные таблицы, и способ «блоков» для разрешения коллизий [Патент США №6266705B1, G06F 15/173]. В качестве ключа поиска в этом способе используется комбинация MAC-адреса и идентификатора VLAN кадра. По ключу поиска вычисляется значение хеш-функции, которое является адресом для поиска записи в таблице фильтрации. Поиск осуществляется одновременно в 8-ми таблицах-блоках. Полученные 8 значений из таблиц сравниваются с ключом поиска и в случае совпадения запись считается найденной - кадр передается на порт с найденным в таблице номером.A known method of organizing filter tables using hashed tables, and a method of "blocks" for resolving collisions [US Patent No. 6266705B1, G06F 15/173]. In this method, a combination of a MAC address and a VLAN identifier of a frame is used as a search key. Using the search key, the value of the hash function is calculated, which is the address for finding the record in the filter table. Search is carried out simultaneously in 8 block tables. The obtained 8 values from the tables are compared with the search key and in case of a match, the record is considered found - the frame is transmitted to the port with the number found in the table.

Для сохранения записи в таблицу дополнительно производится проверка занятости ячейки с вычисленным с помощью хеш-функции адресом для таблицы-блока. Если ячейка занята, производится проверка ячейки в следующей таблице-блоке и т.д.To save the record in the table, an additional check is made of the cell occupancy with the address calculated for the block table using the hash function. If the cell is busy, the cell is checked in the next table block, etc.

Для описанного способа на хранение одной записи требуется 512 бита (8 таблиц-блоков по 64 бита на каждую запись). Всего на описанную таблицу фильтрации необходимо 16777216 бит (2 Мбайта) памяти. При этом, как показано в [Маков С.В., Шрайфель И.С. Оценка эффективности фильтрации трафика в межсетевых мостах и коммутаторах [Электронный ресурс] // Сервис в России и за рубежом. - Вып.5(24). - 2011 г. URL: http://http://www.mgus.ru/ files/ electronic_journal/ number24/ 5.doc] вероятность коллизии для такой таблицы ненулевая и может быть определена выражением:For the described method, 512 bits are required to store one record (8 block tables of 64 bits for each record). In total, the described filtering table requires 16777216 bits (2 MB) of memory. Moreover, as shown in [Makov S.V., Shraifel I.S. Evaluation of the effectiveness of traffic filtering in gateways and switches [Electronic resource] // Service in Russia and abroad. - Issue 5 (24). - 2011 URL: http: // http: //www.mgus.ru/ files / electronic_journal / number24 / 5.doc] the probability of collision for such a table is non-zero and can be determined by the expression:

P Б = 1 λ r l m k ( r l ) ! ( m r l ) ! m ! , ( 2 )

Figure 00000002
P B = one - λ r l m k ( r l ) ! ( m - r l ) ! m ! , ( 2 )
Figure 00000002

где r - количество возможных значений хеш-функции, rl - общее число возможных сетевых адресов, m - общее количество узлов в объединяемых коммутатором сетях, k - количество таблиц-блоков, λ r l m k

Figure 00000003
определяется рекуррентным выражением:where r is the number of possible values of the hash function, rl is the total number of possible network addresses, m is the total number of nodes in the networks joined by the switch, k is the number of block tables, λ r l m k
Figure 00000003
defined by the recurrence expression:

λ r l m k = s = m a x ( 0 ; m r ( k 1 ) ) [ m k ] C r s ( C l k ) s λ r - s , l m - k s , k - 1 . ( 3 )

Figure 00000004
λ r l m k = s = m a x ( 0 ; m - r ( k - one ) ) [ m k ] C r s ( C l k ) s λ r - s , l m - k s , k - one . ( 3 )
Figure 00000004

Признаки способа-аналога, совпадающие с признаками заявляемого технического решения, следующие: использование значения хеш-функции от ключа поиска в качестве адреса записи в таблице; поиск в таблице фильтрации информации, позволяющей принять решение о необходимости передачи кадра на соответствующий порт межсетевого коммутатора.The features of the analogue method, which coincide with the features of the proposed technical solution, are as follows: using the value of the hash function from the search key as the address of the entry in the table; Search in the filtering table for information that allows you to decide on the need to transfer the frame to the appropriate port on the gateway.

Недостатками известного способа и устройства, его реализующего, являются:The disadvantages of the known method and device that implements it are:

- сохранение записей может требовать до 8-ми обращений к таблице;- saving records may require up to 8 accesses to the table;

- избыточный объем памяти, требуемый для хранения таблицы фильтрации.- excess memory required to store the filter table.

Причины, препятствующие достижению требуемого технического результата, заключаются в следующем:The reasons that impede the achievement of the required technical result are as follows:

- в случае уменьшения количества таблиц-блоков вероятность коллизии резко увеличивается, что ведет к снижению производительности коммутатора.- in the case of a decrease in the number of table blocks, the probability of collision increases sharply, which leads to a decrease in the performance of the switch.

Структурная схема устройства, решающего рассмотренный способ-аналог, содержит вычислитель хеш-функции, таблицу хранения ключей поиска и ассоциируемой информации, состоящую из 8-ми одинаковых блоков, узел сравнения ключа поиска, блок принятия решения о необходимости сохранения записи в следующем блоке.The structural diagram of a device that solves the considered analogue method contains a hash function calculator, a table for storing search keys and associated information, consisting of 8 identical blocks, a node for comparing the search key, and a decision block on whether to save the record in the next block.

Известен способ использования CRC для вычисления хеш-функции и устройство, его реализующее [Патент США №20070071015, H04L 12/28].A known method of using CRC to calculate a hash function and a device that implements it [US Patent No. 20070071015, H04L 12/28].

В рассматриваемом способе для организации таблицы фильтрации, записи, содержащие 72 бита - 45 бит ключа поиска и 27 бит ассоциируемой информации, располагаются в таблице блоками по 4. Всего выделяется 32768 блоков исходя из количества возможных вариантов значений 15-битной хеш-функции. Таким образом, для хранения одной записи используется 72 бита, а всего для хранения таблицы фильтрации необходимо 9437184 бита (1.125 Мбайта).In the considered method for organizing a filtering table, records containing 72 bits - 45 bits of the search key and 27 bits of associated information are located in blocks of 4 in the table. A total of 32768 blocks are allocated based on the number of possible values of the 15-bit hash function. Thus, 72 bits are used to store one record, and in total 9437184 bits (1.125 MB) are needed to store the filter table.

По ключу поиска вычисляется значение хеш-функции, являющееся адресом блока из 4-х записей. Поиск осуществляется последовательным считыванием записей из блока и сравнением с ключом поиска. Сохранение записи осуществляется в незанятую ячейку блока. Таким образом, для сохранения или поиска записи в таблице фильтрации может потребоваться до 4-х обращений к таблице.Using the search key, the value of the hash function is calculated, which is the address of the block of 4 entries. The search is carried out by sequentially reading records from the block and comparing with the search key. Saving a record is carried out in an unoccupied cell block. Thus, up to 4 accesses to the table may be required to save or search for records in the filtering table.

Вероятность коллизии для такой таблицы также можно вычислить из выражения (2). Для 1024 узлов в объединяемых коммутатором сетях при 15-битной хеш-функции и 4-х записях в блоке вероятность коллизии составляет порядка 10-6.The collision probability for such a table can also be calculated from expression (2). For 1024 nodes in networks connected by the switch with a 15-bit hash function and 4 entries in the block, the probability of collision is about 10 -6 .

Признаки способа-аналога, совпадающие с признаками заявляемого технического решения, следующие: использование значения хеш-функции от ключа поиска в качестве адреса записи в таблице; поиск в таблице фильтрации информации, позволяющей принять решение о необходимости передачи кадра на соответствующий порт межсетевого коммутатора.The features of the analogue method, which coincide with the features of the proposed technical solution, are as follows: using the value of the hash function from the search key as the address of the entry in the table; Search in the filtering table for information that allows you to decide on the need to transfer the frame to the appropriate port on the gateway.

Недостатками известного способа и устройства, его реализующего, являются:The disadvantages of the known method and device that implements it are:

- сохранение записей и их поиск может требовать до 4-х обращений к таблице;- saving records and their search may require up to 4 accesses to the table;

- избыточный объем памяти, требуемый для хранения таблицы фильтрации.- excess memory required to store the filter table.

Причины, препятствующие достижению требуемого технического результата, заключаются в следующем:The reasons that impede the achievement of the required technical result are as follows:

- в случае уменьшения количества записей в блоках вероятность коллизии резко увеличивается, что ведет к снижению производительности коммутатора.- in the case of a decrease in the number of records in the blocks, the probability of collision increases sharply, which leads to a decrease in the performance of the switch.

Структурная схема устройства, решающего рассмотренный способ-аналог, содержит вычислитель хеш-функции, таблицу хранения ключей поиска и ассоциируемой информации, состоящую из блоков по 4 записи на каждое значение хеш-функции, узел сравнения ключа поиска, блок принятия решения о необходимости сохранения записи в следующей ячейке блока.The structural diagram of a device that solves the considered analogue method contains a hash function calculator, a table for storing search keys and associated information, consisting of blocks of 4 records for each value of the hash function, a node for comparing the search key, and a decision block about the need to save the record in next cell block.

Наиболее близким к изобретению является способ-прототип организации таблиц фильтрации, применяющий хешированные таблицы с адаптивным вычислением хеш-функции [Патент США №6279097, G06F 12/00], где в качестве ключа поиска используется 48-битный MAC-адрес источника или получателя кадра. По ключу поиска производится вычисление значения 13-битной хеш-функции по изменяющемуся закону, которое используется в качестве адреса записи в таблице фильтрации. В таблице фильтрации хранится 48-битный MAC-адрес и 16 бит ассоциируемой информации для определения порта, на который необходимо передавать кадр. Изменение закона вычисления хеш-функции происходит в случае обнаружения коллизии, т.е. когда для двух различных ключей поиска было получено одинаковое значение хеш-функции.Closest to the invention is a prototype method of organizing filter tables using hashed tables with adaptive calculation of the hash function [US Patent No. 6279097, G06F 12/00], where the 48-bit MAC address of the source or destination of the frame is used as the search key. Using the search key, the value of the 13-bit hash function is calculated according to a changing law, which is used as the record address in the filter table. The filter table contains a 48-bit MAC address and 16 bits of associated information to determine the port to which the frame should be transmitted. A change in the law of calculation of the hash function occurs in case of collision detection, i.e. when the same hash value was obtained for two different search keys.

Применение такого способа организации таблицы фильтрации позволяет с большой вероятностью подобрать такой закон вычисления хеш-функции, при котором коллизии для заданного набора сетевых адресов наблюдаться не будут. Вероятность того, что не будет найден закон вычисления хеш-функции, при котором отсутствуют коллизии, можно найти из выражения:The use of such a method of organizing a filter table makes it possible to select a law for computing a hash function in which no collisions will be observed for a given set of network addresses. The probability that a hash function calculation law will not be found for which there are no collisions can be found from the expression:

P A t = ( P Б ) t , ( 4 )

Figure 00000005
P A t = ( P B ) t , ( four )
Figure 00000005

где PБ - вероятность появления коллизии для разрешения коллизий способом блоков, которую можно найти из выражения (2), t - количество вариантов перебора законов вычисления хеш-функции.where P B is the probability of the occurrence of a collision for resolving collisions by the block method, which can be found from expression (2), t is the number of options for enumerating the laws of computing a hash function.

Таким образом, для рассматриваемого способа также существует ненулевая вероятность появления коллизии, которая быстро уменьшается с ростом количества перебираемых законов ее вычисления.Thus, for the method under consideration, there is also a nonzero probability of a collision, which rapidly decreases with an increase in the number of laws for calculating it.

В соответствии с рассматриваемым способом для хранения одной записи требуется 64 бита. Полный размер таблицы при 13-битной хеш-функции составляет 524288 бит (64 кБайта).In accordance with this method, 64 bits are required to store one record. The full size of the table with a 13-bit hash function is 524288 bits (64 kBytes).

Структурная схема устройства, решающего рассмотренный способ-прототип, содержит вычислитель хеш-функции, таблицу хранения ключей поиска и ассоциируемой информации, узел сравнения ключа поиска и считанной записи, блок обнаружения коллизии.The structural diagram of a device that solves the prototype method described above contains a hash function calculator, a table for storing search keys and associated information, a comparison node for the search key and the read record, and a collision detection unit.

Недостатками известного способа и устройства, его реализующего, являются:The disadvantages of the known method and device that implements it are:

- необходимость подбирать закон вычисления хеш-функции;- the need to select the law of calculation of the hash function;

- во время подбора закона вычисления хеш-функции коммутатор работает с коллизиями таблицы фильтрации;- during the selection of the law for calculating the hash function, the switch works with collisions of the filter table;

- необходимость хранения в таблице фильтрации ключа поиска для точного сравнения и детектирования коллизии.- the need to store a search key in the filter table for accurate comparison and collision detection.

Причины, препятствующие достижению требуемого технического результата, заключаются в следующем:The reasons that impede the achievement of the required technical result are as follows:

- в случае уменьшения количества таблиц-блоков вероятность коллизии резко увеличивается, что ведет к снижению производительности коммутатора;- in the case of a decrease in the number of table blocks, the probability of collision increases sharply, which leads to a decrease in switch performance;

- отказ от хранения ключа поиска не позволит для данного способа обнаружить коллизию.- refusal to store the search key will not allow collision detection for this method.

Целью изобретения является организация таблицы фильтрации межсетевого моста или коммутатора, позволяющая производить поиск записей или их сохранения за одно обращение к таблице фильтрации; требующая меньшее количество памяти для размещения таблицы по сравнению с известными способами; позволяющая обеспечить меньшую вероятность коллизии по сравнению с известными способами.The aim of the invention is the organization of the filter table of the gateway bridge or switch, allowing you to search for records or save them for one call to the filter table; requiring less memory to place the table compared to known methods; allowing to provide a lower probability of collision compared with known methods.

Предлагаемый способ организации таблицы фильтрации без хранения ключа поиска предполагает:The proposed method of organizing a filter table without storing a search key involves:

1) наличие N параллельных таблиц одинакового размера;1) the presence of N parallel tables of the same size;

2) выделение из кадра адреса узла источника и узла назначения, который является ключом поиска;2) selection from the frame of the address of the source node and destination node, which is the search key;

3) вычисление N значений хеш-функции от ключа поиска для каждой из параллельных таблиц по своему закону;3) calculation of N values of the hash function from the search key for each of the parallel tables according to its own law;

4) сохранение в каждой таблице только ассоциируемой с ключом поиска информации в виде бита принадлежности узла порту коммутатора, к которому он подключен;4) saving in each table only the information associated with the search key in the form of a bit belonging to the node to the switch port to which it is connected;

5) определение коллизии;5) definition of collision;

6) изменение закона вычисления хеш-функции для одной из параллельных таблиц.6) a change in the law of computing a hash function for one of the parallel tables.

Для предлагаемого способа организации таблицы фильтрации кадров в межсетевом мосте или коммутаторе без хранения ключа поиска сохранение записей в таблицу фильтрации происходит следующим образом. На вход устройства поступает адрес узла источника. Для полученного адреса узла источника вычисляется N значений хеш-функций по разным законам. Во всех параллельных таблицах по адресу, соответствующему своему значению хеш-функции, сохраняется значение бит принадлежности узла источника порту, через который поступил кадр, и дополнительная информация, например значение поля «времени жизни» записи. Биты принадлежности представляют собой двоичное число, в котором количество бит соответствует количеству портов коммутатора. В 1 устанавливается тот бит, порядковый номер которого равен номеру порта, через который поступил кадр. Таким образом, сохранение записи происходит за одно обращение к таблице. Для хранения одной записи требуется N·(m+a) бит, где N - количество параллельных таблиц, m - количество портов, a - количество бит для дополнительной информации. Так, например, для 8-портового коммутатора при использовании 8-ми параллельных таблиц и 8 бит дополнительной информации необходимо 128 бит на одну запись. При 10-битной хеш-функции для хранения всех параллельных таблиц требуется 128 кБит памяти (16 кБайт).For the proposed method of organizing the frame filtering table in the gateway or switch without storing the search key, the records are saved to the filtering table as follows. The device node receives the address of the source node. For the received address of the source node, N values of hash functions are calculated according to different laws. In all parallel tables, the address corresponding to its hash function value stores the value of the bit belonging to the source node to the port through which the frame arrived, and additional information, for example, the value of the “lifetime” field of the record. Membership bits are a binary number in which the number of bits corresponds to the number of switch ports. 1 sets the bit whose sequence number is equal to the port number through which the frame arrived. Thus, the record is saved in one call to the table. To store one record, N · (m + a ) bits are required, where N is the number of parallel tables, m is the number of ports, a is the number of bits for additional information. So, for example, for an 8-port switch using 8 parallel tables and 8 bits of additional information, 128 bits per entry are needed. With a 10-bit hash function, 128 kB of memory (16 kB) is required to store all parallel tables.

Поиск в таблице, организованной предложенным способом, осуществляется следующим образом. На вход устройства поступает адрес узла назначения. Для полученного адреса узла назначения вычисляется N значений хеш-функций по тем же законам, что и для процедуры сохранения записи. Из всех параллельных таблиц по адресам, соответствующим своим значениям хеш-функций, выбирается значение бит принадлежности узла назначения портам. Результирующие биты принадлежности портам вычисляются по следующему закону:Search in the table organized by the proposed method is as follows. The address of the destination node is received at the input of the device. For the received destination node address, N values of hash functions are calculated according to the same laws as for the record saving procedure. From all parallel tables at addresses corresponding to their hash function values, the bit value of the destination node belongs to the ports. The resulting port ownership bits are calculated as follows:

B i = k = 1 N A i k , ( 5 )

Figure 00000006
B i = k = one N A i k , ( 5 )
Figure 00000006

где Bi - i-й результирующий бит принадлежности портам; i=1, 2, …, m; m - количество портов коммутатора; A i k

Figure 00000007
- i-й бит принадлежности портам, полученный из k-й параллельной таблицы; N - количество параллельных таблиц. Т.е. результирующие биты принадлежности - это результат побитной операции «логическое И» для всех параллельных таблиц.where B i is the i-th resulting bit of belonging to the ports; i = 1, 2, ..., m; m is the number of switch ports; A i k
Figure 00000007
- the i-th port ownership bit obtained from the k-th parallel table; N is the number of parallel tables. Those. the resulting membership bits are the result of the logical AND bitwise operation for all parallel tables.

Коллизия определяется по результирующим битам принадлежности портам следующим образом. В случае если количество установленных в 1 бит в результирующих битах принадлежности больше 1, то обнаружена коллизия.Collision is determined by the resulting bits of port membership as follows. If the number of bits set to 1 in the resulting ownership bits is greater than 1, a collision is detected.

В случае обнаружения коллизии для одной из параллельных таблиц меняется закон вычисления хеш-функции на несовпадающий с ранее использованными. Соответствующая параллельная таблица сбрасывается в исходное состояние.In case of collision detection for one of the parallel tables, the law of computing the hash function changes to a mismatch with the previously used ones. The corresponding parallel table is reset.

Результатом поиска информации в таблице фильтрации является номер установленного результирующего бита соответствия портам. Кадр должен передаваться на соответствующий порт коммутатора. Если все результирующие биты не установлены или обнаружена коллизия, то в качестве результата поиска возвращается 0. В таком случае кадр должен передаваться на все порты коммутатора.The result of the search for information in the filter table is the number of the set resulting bit matching ports. The frame must be transmitted to the appropriate port on the switch. If all resulting bits are not set or a collision is detected, then 0. is returned as the search result. In this case, the frame should be transmitted to all ports of the switch.

Устройство для организации таблицы фильтрации межсетевого коммутатора без хранения ключа поиска (фиг.1) содержит блоки вычисления значений хеш-функций 1.N, входы которых подключены к информационному входу устройства, а выходы подключены к первым входам блоков хранения записей 2.N, вторые входы которых подключены ко второму информационному входу устройства, выходы которых подключены к N входам блока вычисления результата 3 соответственно, выход которого является информационным выходом устройства и подключен к входу блока обнаружения коллизии 4, выход которого подключен ко второму входу блока вычисления значения хеш-функции 1.1 и третьему входу блока хранения записей 2.1.A device for organizing a filter table of a firewall without storing a search key (Fig. 1) contains blocks for calculating the values of hash functions 1.N, the inputs of which are connected to the information input of the device, and the outputs are connected to the first inputs of storage blocks of records 2.N, second inputs which are connected to the second information input of the device, the outputs of which are connected to the N inputs of the result calculation unit 3, respectively, the output of which is the information output of the device and connected to the input of the call detection unit sion 4, whose output is connected to the second input unit calculating a hash value 1.1 and the third input of the storage unit records 2.1.

Устройство для организации таблицы фильтрации межсетевого коммутатора без хранения ключа поиска работает следующим образом. На первый информационный вход устройства поступает адрес узла источника или узла назначения кадра, который поступает на вычислители значений хеш-функций 1.N. Полученные значения хеш-функций с выходов вычислителей хеш-функций 1.N поступают на первые входы блоков хранения записей 2.N, которые являются адресными входами. Таким образом, в блоках хранения записей выбираются ячейки с адресами, соответствующими значениям хеш-функций адресов источника или назначения кадра. На второй информационный вход устройства поступает информация о том, на какой порт устройства поступил кадр. Соответствующие поступившему номеру биты принадлежности портам в выбранных ячейках блоков хранения записей 2.N устанавливаются в логические 1 в случае поступления на первый информационный вход адреса источника. При поступлении на первый информационный вход адреса назначения на выходы блоков хранения записей 2.N поступают значения, считанные из выбранных ячеек блоков хранения записей, и передаются на соответствующие входы блока вычисления результата 3. Биты принадлежности портам с одинаковыми порядковыми номерами в соответствии с законом (5) складываются по логическому «И» в блоке вычисления результата 3. Полученные результирующие значения бит принадлежности поступают на информационный выход устройства и на вход блока обнаружения коллизий 4. В блоке обнаружения коллизий 4 проверяется количество установленных в логические 1 результирующих бит принадлежности к портам, и если их больше 1, то на выходе блока обнаружения коллизии 4 появляется сигнал смены закона вычисления хеш-функции, поступающий на второй вход одного из блоков вычисления хеш-функций 1.1. При этом в этом блоке вычисления хеш-функций меняется закон вычисления на неиспользованный ранее закон. Одновременно сигнал смены закона вычисления хеш-функции поступает на третий вход блока хранения записей 2.1, связанного с блоком вычисления хеш-функции с переменным законом ее вычисления.A device for organizing a filter table of a firewall without storing a search key works as follows. At the first information input of the device, the address of the source or destination node of the frame is received, which goes to the calculators of the values of the hash functions 1.N. The obtained values of the hash functions from the outputs of the calculators of the hash functions 1.N go to the first inputs of the storage blocks of records 2.N, which are address inputs. Thus, cells with addresses corresponding to the hash functions of the source address or destination of the frame are selected in the record storage blocks. The second information input of the device receives information about which port of the device the frame received. The port membership bits corresponding to the incoming number in the selected cells of the recording storage blocks 2.N are set to logical 1 if the source address is received at the first information input. When the destination address arrives at the first information input, the outputs of the record storage blocks 2.N receive the values read from the selected cells of the record storage blocks and are transmitted to the corresponding inputs of the result calculation block 3. Bits of belonging to ports with the same serial numbers in accordance with the law (5 ) are added according to the logical “AND” in the unit for calculating the result 3. The resulting resulting values of the membership bit are sent to the information output of the device and to the input of the collision detection unit 4. V collision detection locator 4, the number of ports assigned to logical 1 is checked, and if there are more than 1, then the output of the collision detection block 4 receives a signal for changing the hash function calculation law, which goes to the second input of one of the hash function calculation blocks 1.1 . In this case, the calculation law changes to the previously unused law in this hash function calculation block. At the same time, the signal for changing the law of calculation of the hash function is fed to the third input of the storage unit 2.1, associated with the calculation unit of the hash function with a variable law of its calculation.

Технический результат - поиск и сохранение информации в таблице фильтрации кадров межсетевого коммутатора.The technical result is the search and storage of information in the filtering table of the frames of the gateway.

Посредством статистических исследований математической модели предлагаемого способа было установлено, что предлагаемый способ обладает следующими преимуществами:Through statistical studies of the mathematical model of the proposed method, it was found that the proposed method has the following advantages:

- позволяет сохранять и находить ассоциируемую информацию в таблице фильтрации кадров за одно обращение к таблице;- allows you to save and find associated information in the frame filtering table for one call to the table;

- позволяет в разы сократить требуемый объем памяти для хранения таблицы фильтрации в виду отказа от хранения ключа поиска;- allows you to significantly reduce the required amount of memory for storing the filter table in view of the refusal to store the search key;

- обеспечивает стремящуюся к нулю вероятность коллизии;- provides a zero-chance collision probability;

- позволяет подбирать закон вычисления хеш-функции, обеспечивающий отсутствие коллизий для заданных условий работы коммутатора без значительного снижения его производительности.- allows you to select the law of calculation of the hash function, ensuring the absence of collisions for the given operating conditions of the switch without significantly reducing its performance.

Claims (2)

1. Способ организации таблицы фильтрации межсетевого коммутатора без хранения ключа поиска, заключающийся в том, что для адресов узлов источников и узлов назначения кадров вычисляется значение хеш-функций, полученное значение является адресом в таблице хранения записей, в случае обнаружения коллизии изменяется закон вычисления хеш-функции и сбрасывается таблица хранения записей, отличающийся тем, что вычисляется дополнительно N-1 значений хеш-функций по неповторяющимся законам, которые являются адресами ячеек в дополнительных N-1 параллельных таблицах хранения записей, в которых хранятся биты принадлежности узла источника к портам коммутатора, считанные из N параллельных таблиц значения битов принадлежности узла назначения к портам коммутатора объединяются посредством операции логического «И», полученные результирующие биты принадлежности позволяют определить наличие коллизии и изменить закон вычисления хеш-функции для одной из N параллельных таблиц и одновременно являются результатом поиска ассоциируемой информации в таблице фильтрации.1. A method of organizing a filter table of a firewall without storing a search key, which consists in calculating the value of the hash functions for the addresses of the source nodes and the destination nodes of the frames, the resulting value is the address in the record storage table, if the collision is detected, the hash calculation law changes functions and the record storage table is reset, characterized in that it additionally computes N-1 values of hash functions according to non-repeating laws, which are the addresses of cells in the additional N-1 parallel the individual record storage tables that store the bits of belonging of the source node to the switch ports, read from N parallel tables the values of the bits of the destination node belonging to the switch ports are combined using the logical AND operation, the resulting resulting membership bits allow you to determine if there is a collision and change the hash calculation law -functions for one of N parallel tables and at the same time are the result of the search for associated information in the filter table. 2. Устройство для организации таблицы фильтрации межсетевого коммутатора без хранения ключа поиска, содержащее блок вычисления хеш-функции с переменным законом вычисления, первый вход которого является первым информационным входом устройства, второй вход подключен к выходу блока обнаружения коллизий, а выход подключен к первому входу блока хранения записей, второй вход которого подключен ко второму информационному входу устройства, а третий вход блока хранения записей подключен к выходу блока обнаружения коллизий, отличающееся тем, что информационный вход устройства подключен к входам дополнительных N-1 блоков вычисления хеш-функций, выходы которых подключены к первым входам дополнительных блоков хранения записей, ко вторым входам которых подключен второй информационный вход устройства, а их выходы подключены к N-1 входам блока вычисления результата, первый вход которого подключен к выходу блока хранения записей, а выход подключен к входу блока обнаружения коллизий и является информационным выходом устройства. 2. A device for organizing a filter table of a firewall without storing a search key, comprising a hash function calculation unit with a variable calculation law, the first input of which is the first information input of the device, the second input is connected to the output of the collision detection unit, and the output is connected to the first input of the block recording records, the second input of which is connected to the second information input of the device, and the third input of the recording storage unit is connected to the output of the collision detection unit, characterized in o the information input of the device is connected to the inputs of the additional N-1 hash function calculation blocks, the outputs of which are connected to the first inputs of the additional recording storage blocks, the second information input of the device is connected to the second inputs of theirs, and their outputs are connected to the N-1 inputs of the result calculation block the first input of which is connected to the output of the recording storage unit, and the output is connected to the input of the collision detection unit and is the information output of the device.
RU2013129792/08A 2013-06-28 2013-06-28 Method of organising filter table of internetwork switch and apparatus therefor RU2538323C1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2013129792/08A RU2538323C1 (en) 2013-06-28 2013-06-28 Method of organising filter table of internetwork switch and apparatus therefor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2013129792/08A RU2538323C1 (en) 2013-06-28 2013-06-28 Method of organising filter table of internetwork switch and apparatus therefor

Publications (2)

Publication Number Publication Date
RU2013129792A RU2013129792A (en) 2015-01-10
RU2538323C1 true RU2538323C1 (en) 2015-01-10

Family

ID=53278866

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2013129792/08A RU2538323C1 (en) 2013-06-28 2013-06-28 Method of organising filter table of internetwork switch and apparatus therefor

Country Status (1)

Country Link
RU (1) RU2538323C1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785396A (en) * 2022-03-09 2022-07-22 西安电子科技大学 Method, system and terminal for configuring, searching mapping and managing flow of logical port

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6266705B1 (en) * 1998-09-29 2001-07-24 Cisco Systems, Inc. Look up mechanism and associated hash table for a network switch
US6279097B1 (en) * 1998-11-20 2001-08-21 Allied Telesyn International Corporation Method and apparatus for adaptive address lookup table generator for networking application
US6549519B1 (en) * 1998-01-23 2003-04-15 Alcatel Internetworking (Pe), Inc. Network switching device with pipelined search engines
US6813266B1 (en) * 1999-05-21 2004-11-02 Advanced Micro Devices, Inc. Pipelined access to address table in a network switch
RU2408064C2 (en) * 2004-03-31 2010-12-27 Майкрософт Корпорейшн Routing in peer-to-peer networks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6549519B1 (en) * 1998-01-23 2003-04-15 Alcatel Internetworking (Pe), Inc. Network switching device with pipelined search engines
US6266705B1 (en) * 1998-09-29 2001-07-24 Cisco Systems, Inc. Look up mechanism and associated hash table for a network switch
US6279097B1 (en) * 1998-11-20 2001-08-21 Allied Telesyn International Corporation Method and apparatus for adaptive address lookup table generator for networking application
US6813266B1 (en) * 1999-05-21 2004-11-02 Advanced Micro Devices, Inc. Pipelined access to address table in a network switch
RU2408064C2 (en) * 2004-03-31 2010-12-27 Майкрософт Корпорейшн Routing in peer-to-peer networks

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
МАКОВ С.В. Разработка и исследование эффективности методов построения таблиц фильтрации кадров в мостах и коммутаторах вычислительной техники. Автореферат диссертации на соискание учёной степени кандидата технических наук, опубл. 15.11.2011 на 16 страницах, найдено в Интернет по адресу URL: http://library.sfedu.ru/referat/D212-208-21/05-13-05/20111223_D212-208-21_05-13-05_MakovSV.pdf. *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114785396A (en) * 2022-03-09 2022-07-22 西安电子科技大学 Method, system and terminal for configuring, searching mapping and managing flow of logical port
CN114785396B (en) * 2022-03-09 2024-04-12 西安电子科技大学 Logic port configuration, lookup mapping and traffic management method, system and terminal

Also Published As

Publication number Publication date
RU2013129792A (en) 2015-01-10

Similar Documents

Publication Publication Date Title
Qiao et al. Fast Bloom filters and their generalization
CN108259328B (en) Message forwarding method and device
US6987683B2 (en) Magnitude comparator based content addressable memory for search and sorting
US6725216B2 (en) Partitioning search key thereby distributing table across multiple non-contiguous memory segments, memory banks or memory modules
EP2643762A1 (en) Method and apparatus for high performance, updatable, and deterministic hash table for network equipment
CN111817978B (en) Flow classification method and device
Guo et al. Set reconciliation via counting bloom filters
CN105429879B (en) Flow entry querying method, equipment and system
EP3562097B1 (en) Establishment for table entry of equal-cost path
US9672239B1 (en) Efficient content addressable memory (CAM) architecture
CN105760411B (en) Mixed wildcard matching table
CN111641585B (en) DDoS attack detection method and device
CN104580008B (en) The method and device of more queue random drop message precision is improved based on hardware
Tong et al. Coloring embedder: A memory efficient data structure for answering multi-set query
US20190296924A1 (en) Forwarding multicast data packet
CN103973571A (en) Network processor and routing searching method
Shubbar et al. Fast 2D filter with low false positive for network packet inspection
Du et al. Efficient hashing technique based on bloom filter for high-speed network
RU2538323C1 (en) Method of organising filter table of internetwork switch and apparatus therefor
CN109039911B (en) Method and system for sharing RAM based on HASH searching mode
US20140282867A1 (en) Device local reputation score cache
KR102023475B1 (en) Double cutting based packet classification method and system for high speed security policy detection
CN104901947B (en) One kind is based on TCAM serial numbers matching process and device
US8842690B2 (en) System, method, and media for network traffic measurement on high-speed routers
Liu et al. A hash-based algorithm for measuring cardinality distribution in network traffic

Legal Events

Date Code Title Description
MM4A The patent is invalid due to non-payment of fees

Effective date: 20150629