RU2790636C1 - Method for detecting duplicate packets in a network traffic flow - Google Patents

Method for detecting duplicate packets in a network traffic flow Download PDF

Info

Publication number
RU2790636C1
RU2790636C1 RU2022115203A RU2022115203A RU2790636C1 RU 2790636 C1 RU2790636 C1 RU 2790636C1 RU 2022115203 A RU2022115203 A RU 2022115203A RU 2022115203 A RU2022115203 A RU 2022115203A RU 2790636 C1 RU2790636 C1 RU 2790636C1
Authority
RU
Russia
Prior art keywords
packet
descriptor
parameters
block
ram memory
Prior art date
Application number
RU2022115203A
Other languages
Russian (ru)
Inventor
Михаил Викторович Бадин
Алексей Михайлович Михайлов
Сергей Алексеевич Плотко
Original Assignee
Акционерное общество "Научно-производственное предприятие " Цифровые решения"
Filing date
Publication date
Application filed by Акционерное общество "Научно-производственное предприятие " Цифровые решения" filed Critical Акционерное общество "Научно-производственное предприятие " Цифровые решения"
Application granted granted Critical
Publication of RU2790636C1 publication Critical patent/RU2790636C1/en

Links

Images

Abstract

FIELD: data networks.
SUBSTANCE: maximum time during which packets with the same descriptor value are considered duplicates (LIMIT_T) is set. If it is determined in the duplicate search block that the parameters of the analyzed packet from the descriptor do not match the parameters from the RAM memory, then the information about the packet is overwritten in the RAM memory, and the packet is transferred to the output interface. If it is determined in the duplicate search block that the parameters of the analysed packet from the descriptor match the parameters of the packet from RAM memory, and the time differenceΔT is greater than or equal to the set time LIMIT_T, then the packet parameters are overwritten in RAM-memory, and the packet is transmitted to the output interface. If it is determined in the duplicate search block that the parameters of the analysed packet from the descriptor match the parameters of the packet from RAM memory, and the time differenceΔT is less than the set time LIMIT_T, then the packet is removed from the packet buffer.
EFFECT: increasing the performance of systems for deep analysis of network traffic by reducing the load through eliminating duplicate packets.
1 cl, 3 dwg, 3 ex

Description

Изобретение относится к области построения систем мониторинга и анализа сетей передачи данных и может быть использовано в устройствах предварительной обработки пакетов данных для систем глубокого анализа сетевого трафика, поддерживающих стек протоколов TCP/IP.The invention relates to the field of building systems for monitoring and analyzing data transmission networks and can be used in devices for pre-processing data packets for systems for in-depth analysis of network traffic that support the TCP/IP protocol stack.

Наиболее близким аналогом к предложенному способу является способ дедупликации трафика, описанный в патенте US 10091075 В2 (кл. H04L 12.26, 02.10.2018). Известный способ включает приём входного потока пакетов через входной интерфейс, передачу его в блок анализа пакета, в котором выполняется выделение из пакета Ethernet, IP и TCP/UDP-заголовков и формирование на их основе дескриптора, сохранение пакетов в пакетном буфере, а дескрипторов – в буфере дескрипторов.The closest analogue to the proposed method is the traffic deduplication method described in US patent 10091075 B2 (class H04L 12.26, 02.10.2018). The known method includes receiving the input stream of packets through the input interface, passing it to the packet analysis unit, in which the Ethernet, IP and TCP / UDP headers are extracted from the packet and the descriptor is formed on their basis, the packets are stored in the packet buffer, and the descriptors are stored in descriptor buffer.

Недостатком известного способа является невозможность игнорировать отдельные поля Ethernet, IP и TCP/UDP-заголовков, такие как MAC-адреса, VLAN, Traffic class, IP checksum, TTL, которые могут изменяться в процессе прохождения пакета через сеть.The disadvantage of the known method is the inability to ignore individual fields of Ethernet, IP and TCP / UDP headers, such as MAC addresses, VLAN, Traffic class, IP checksum, TTL, which can change during the packet passing through the network.

Техническая проблема, решаемая заявленным изобретением, заключается в повышении производительности систем глубокого анализа сетевого трафика за счет снижения нагрузки путем исключения дублирующихся пакетов.The technical problem solved by the claimed invention is to improve the performance of systems for deep analysis of network traffic by reducing the load by eliminating duplicate packets.

Технический результат заключается в снижении нагрузки на системы глубокого анализа благодаря снижению времени, затрачиваемого для анализа пакета данных, а также повышению точности определения дубликатов пакетов данных, в том числе с изменяющимися полями заголовков в Ethernet, IP, TCP/UDP-пакетах.The technical result consists in reducing the load on deep analysis systems by reducing the time spent on analyzing a data packet, as well as improving the accuracy of detecting duplicate data packets, including those with changing header fields in Ethernet, IP, TCP/UDP packets.

Технический результат достигается тем, что в заявленном способе определения дублирующихся пакетов в потоке сетевого трафика принимают входной поток пакетов через входной интерфейс, передают его в блок анализа пакета, в котором выполняется выделение из пакета Ethernet, IP и TCP/UDP-заголовков и формируют на их основе дескриптор, сохраняют пакеты в пакетном буфере, а дескрипторы – в буфере дескрипторов, по предложению The technical result is achieved by the fact that in the claimed method for determining duplicate packets in the network traffic stream, the input stream of packets is received through the input interface, transferred to the packet analysis unit, in which the Ethernet, IP and TCP / UDP headers are extracted from the packet and formed on them descriptor based, store packets in a packet buffer and descriptors in a descriptor buffer, by suggestion

через несвязанный с сетью конфигурационный интерфейс в блоке поиска дубликатов задается LIMIT_T и остается неизменным до тех пор, пока оно не будет изменено оператором,LIMIT_T is set via a configuration interface not connected to the network in the duplicate search block and remains unchanged until it is changed by the operator,

в блоке анализа пакета регистрируется время получения пакета,in the packet analysis block, the time of receipt of the packet is recorded,

из буфера дескрипторов дескрипторы передаются в блок расчета HASH, descriptors are transferred from the descriptor buffer to the HASH calculation block,

в блоке расчета HASH на основе полей заголовков пакета, включающих IP-адрес получателя, IP-адрес отправителя, IP DSCP, идентификатор пакета IP ID, смещение фрагмента IP OFFSET, код протокола L4, TCP/UDP-порт получателя, TCP/UDP-порт отправителя, порядковый номер пакета в TCP, рассчитывается HASH-сумма по алгоритму счетчика с аутентификацией Галуа;in the HASH calculation block based on the packet header fields, including the destination IP address, source IP address, IP DSCP, IP ID packet identifier, IP OFFSET fragment offset, L4 protocol code, destination TCP/UDP port, TCP/UDP port the sender, the sequence number of the packet in TCP, the HASH sum is calculated using the counter algorithm with Galois authentication;

далее дескриптор с рассчитанной HASH-суммой поступает в блок поиска дубликатов, который загружает дескриптор из RAM-памяти по адресу, равному значению HASH-суммы дескриптора поступившего пакета, после чего сравниваются параметры пакетов из дескрипторов, определяется разность времени (ΔТ) из дескриптора анализируемого пакета и дескриптора, загруженного из RAM-памяти,then the descriptor with the calculated HASH sum enters the duplicate search block, which loads the descriptor from RAM memory at the address equal to the value of the HASH sum of the descriptor of the incoming packet, after which the packet parameters from the descriptors are compared, the time difference (ΔТ) is determined from the descriptor of the analyzed packet and a descriptor loaded from RAM memory,

если в блоке поиска дубликатов определяется, что параметры анализируемого пакета из дескриптора не совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти вне зависимости от значения разности времени ΔТ, то происходит перезапись информации о пакете в RAM-память, блоку удаления пакетов передается команда на передачу пакета из пакетного буфера в выходной интерфейс, а блоку анализа пакета – команда на прием нового пакета из входного интерфейса,if it is determined in the duplicate search block that the parameters of the analyzed packet from the descriptor do not match the parameters of the packet from the descriptor stored in RAM memory, regardless of the value of the time difference ΔТ, then the information about the packet is rewritten to the RAM memory, the command is sent to the packet deletion block to transfer a packet from the packet buffer to the output interface, and the packet analysis unit is given a command to receive a new packet from the input interface,

если в блоке поиска дубликатов определяется, что параметры анализируемого пакета из дескриптора совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти, и разность времени ΔТ больше или равна заданному времени LIMIT_T, то происходит перезапись параметров пакета в RAM-памяти, блоку удаления пакетов передается команда на передачу пакета из пакетного буфера в выходной интерфейс, а блоку анализа пакета – команда на прием нового пакета из входного интерфейса, if it is determined in the duplicate search block that the parameters of the analyzed packet from the descriptor match the parameters of the packet from the descriptor stored in RAM memory, and the time difference ΔT is greater than or equal to the specified time LIMIT_T, then the packet parameters in RAM memory are overwritten by the packet deletion block a command is sent to transfer a packet from the packet buffer to the output interface, and the packet analysis unit receives a command to receive a new packet from the input interface,

если блоке поиска дубликатов определяется, что параметры анализируемого пакета из дескриптора совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти, и разность времени ΔТ меньше заданного времени LIMIT_T, то блоку удаления пакетов передается команда на удаление пакета из пакетного буфера, а блоку анализа пакета – команда на прием нового пакета из входного интерфейса.if the duplicate search block determines that the parameters of the packet being analyzed from the descriptor match the parameters of the packet from the descriptor stored in RAM memory, and the time difference ΔT is less than the specified time LIMIT_T, then the command to delete the packet from the packet buffer is sent to the packet removal block, and the analysis block packet – command to receive a new packet from the input interface.

Максимальное значение времени, в течение которого пакеты с одинаковым значением дескрипторов считаются дубликатами, LIMIT_T находится в диапазоне от 10 мс до 30 с. LIMIT_T задается оператором через несвязанный с сетью конфигурационный интерфейс в блоке поиска дубликатов и остается неизменным до тех пор, пока оно не будет изменено оператором.The maximum time that packets with the same descriptor value are considered duplicates, LIMIT_T, ranges from 10ms to 30s. LIMIT_T is set by the operator via a non-networked configuration interface in the duplicate finder and remains unchanged until it is changed by the operator.

Заявленное изобретение поясняется следующими графическими материалами:The claimed invention is illustrated by the following graphics:

фиг. 1 - схема, иллюстрирующая функциональные блоки, участвующие в определении дублирующихся пакетов в потоке сетевого трафика,fig. 1 is a diagram illustrating the functional blocks involved in determining duplicate packets in a network traffic flow,

фиг. 2 - блок-схема определения дублирующихся пакетов в потоке сетевого трафика,fig. 2 is a flowchart for detecting duplicate packets in a network traffic stream,

фиг. 3 - схема, иллюстрирующая структуру хранения информации о пакете в дескрипторе и RAM-памяти.fig. 3 is a diagram illustrating the storage structure of packet information in a descriptor and a RAM memory.

Система определения дублирующихся пакетов в потоке сетевого трафика (фиг. 1) содержит входной интерфейс (101), блок анализа пакета (102), пакетный буфер (103), буфер дескрипторов (104), блок расчета HASH (105), блок поиска дубликатов (106), блок RAM-памяти (107), блок удаления пакетов (108), выходной интерфейс (109).The system for detecting duplicate packets in a network traffic flow (Fig. 1) contains an input interface (101), a packet analysis unit (102), a packet buffer (103), a descriptor buffer (104), a HASH calculation unit (105), a duplicate search unit ( 106), RAM memory block (107), packet deletion block (108), output interface (109).

Входной интерфейс (101) выполняет прием сетевого пакета, проверку на соответствие требованиям протокола Ethernet (преамбула, начало пакета, контрольная сумма). The input interface (101) receives the network packet, checks for compliance with the requirements of the Ethernet protocol (preamble, start of the packet, checksum).

Блок анализа пакета (102) выполняет выделение сетевых заголовков из принятого пакета: Ethernet, IP и TCP/UDP-заголовков, регистрацию времени приема пакета и формирование на основе указанных данных специального информационного блока – дескриптора.The packet analysis block (102) extracts network headers from the received packet: Ethernet, IP and TCP / UDP headers, registers the time of packet reception and generates a special information block - descriptor based on the specified data.

Пакетный буфер (103) – блок хранения, в котором на время обработки дескриптора пакета в блоке расчета HASH (105) и блоке поиска дубликатов (106) сохраняется весь пакет.The packet buffer (103) is a storage block in which the entire packet is stored during the processing of the packet descriptor in the HASH calculation block (105) and the duplicate search block (106).

Буфер дескрипторов (104) – временное хранилище, где хранятся дескрипторы на время ожидания обработки.Descriptor buffer (104) - temporary storage where descriptors are stored while waiting for processing.

Блок расчета HASH (105) – блок, в котором из дескриптора выделяются поля: IP-адрес получателя, IP-адрес отправителя, код протокола L4, TCP/UDP-порт получателя, TCP/UDP-порт отправителя и на основе этих полей формируется последовательность байт (вектор байт), по которым рассчитывается HASH-сумма по алгоритму счетчика с аутентификацией Галуа (метод расчета HASH-суммы). Это необходимо для того, чтобы дескриптор длиной 13 байт уменьшить до 4 байт и облегчить поиск дескриптора в RAM-памяти (107) по ключу, являющемуся HASH-суммой.HASH calculation block (105) - a block in which the following fields are extracted from the descriptor: recipient IP address, sender IP address, L4 protocol code, recipient TCP / UDP port, sender TCP / UDP port and based on these fields a sequence is formed bytes (vector of bytes) over which the HASH sum is calculated according to the counter algorithm with Galois authentication (HASH sum calculation method). This is necessary in order to reduce the 13-byte descriptor to 4 bytes and facilitate the search for the descriptor in RAM-memory (107) by the key, which is the HASH sum.

Блок поиска дубликатов (106) – блок, в котором производится сравнение информации о пакетах: хранящемся в RAM-памяти (107) и полученным пакетом. Извлечение из RAM-памяти (107) хранящегося там дескриптора производится по значению адреса, который равен значению HASH-суммы, полученной в блоке расчета HASH (105). В блоке поиска дубликатов (106) производится сравнение параметров пакетов и проверка значения разности штампов времени по полю «TIME» дескриптора, хранящегося в RAM-памяти (107) с дескриптором полученного пакета. Duplicate search block (106) - a block in which information about packets is compared: stored in RAM-memory (107) and the received packet. The descriptor stored there is retrieved from the RAM memory (107) by the address value, which is equal to the value of the HASH sum obtained in the HASH calculation block (105). In the duplicate search block (106), the packet parameters are compared and the time stamp difference value is checked in the TIME field of the descriptor stored in RAM memory (107) with the descriptor of the received packet.

Блок RAM-памяти (107) – блок, являющийся оперативной памятью. Адрес памяти равен значению HASH-суммы. В каждой ячейке памяти хранится информация о пакетах, включающих в себя: IP-адрес получателя, IP-адрес отправителя, IP DSCP, идентификатор пакета IP ID, смещение фрагмента IP OFFSET, код протокола L4, TCP/UDP-порт получателя, TCP/UDP-порт отправителя, порядковый номер пакета в TCP (TCP SEQ) и время приема пакета (TIME). Код протокола L4 – код протокола транспортного уровня, определяющий TCP или UDP протокол.RAM-memory block (107) - a block that is random access memory. The memory address is equal to the value of the HASH sum. Each memory cell stores information about packets, including: destination IP address, source IP address, IP DSCP, packet ID IP ID, IP OFFSET fragment offset, protocol code L4, destination TCP/UDP port, TCP/UDP -port of the sender, TCP sequence number of the packet (TCP SEQ) and packet reception time (TIME). Protocol code L4 – transport layer protocol code that defines TCP or UDP protocol.

Блок удаления пакетов (108) – блок, который пропускает или не пропускает (удаляет) пакет.Packet removal block (108) - a block that skips or does not skip (remove) a packet.

Выходной интерфейс (109) – выполняет передачу сетевого пакета в сеть.Output interface (109) - performs the transmission of a network packet to the network.

Вышеуказанные блоки: блок анализа пакета (102), буфер дескрипторов (104), блок расчета HASH (105), блок поиска дубликатов (106) могут быть реализованы или выполнены на базе перепрограммируемой логической интегральной схемы (ПЛИС) или сверхбольшой интегральной схемы (СБИС). Также эти блоки могут быть реализованы конечным автоматом и несколькими регистрами с соответствующей внутренней логикой и реализуется автоматически, например, из представленного сетевого протокола они управляются микрокодом, хранящимся в встроенной памяти. The above blocks: packet analysis block (102), descriptor buffer (104), HASH calculation block (105), duplicate search block (106) can be implemented or implemented on the basis of a field-programmable logic integrated circuit (FPGA) or a very large integrated circuit (VLSI) . Also, these blocks can be implemented by a state machine and several registers with appropriate internal logic and are implemented automatically, for example, from the presented network protocol, they are controlled by microcode stored in the built-in memory.

LIMIT_T – максимальное значение времени, загружаемого оператором, в течение которого пакеты с одинаковым значением дескрипторов считаются дубликатами. LIMIT_T находится в интервале от 10 мс до 30 с.LIMIT_T is the maximum value of time, loaded by the operator, during which packages with the same descriptor value are considered duplicates. LIMIT_T is in the range from 10ms to 30s.

Вышеуказанные блоки, схемы/алгоритмы обработки также могут быть выполнены с помощью элемента памяти, который записывает обрабатываемые данные, и процессора обработки, в качестве которого могут применяться процессор общего назначения, конечный автомат или другое аппаратно-программируемое логическое устройство, дискретный логический элемент или транзисторная логика, дискретный компонент аппаратных средств или любого их сочетания, чтобы выполнять описанные выше функции. ПЛИС или СБИС может быть запрограммирована для выполнения предложенного способа и размещена в любом месте компьютерной сети центра обработки данных или брокерах сетевых пакетов (NPB).The above blocks, processing circuits/algorithms can also be implemented using a memory element that records processed data, and a processing processor, which can be a general purpose processor, state machine or other hardware-programmable logic device, discrete logic element or transistor logic , a discrete hardware component, or any combination thereof, to perform the functions described above. An FPGA or VLSI can be programmed to perform the proposed method and placed anywhere on the data center computer network or network packet brokers (NPBs).

Заявленный способ определения дублирующихся пакетов в потоке сетевого трафика осуществляется следующим образом.The claimed method for determining duplicate packets in a network traffic flow is as follows.

Оператором через несвязанный с сетью конфигурационный интерфейс задаётся максимальное значение времени, в течение которого пакеты с одинаковым значением дескрипторов считаются дубликатами (LIMIT_T). LIMIT_T остается неизменным для всех передаваемых пакетов до тех пор, пока оно не будет изменено оператором.The operator, through a configuration interface not connected to the network, sets the maximum value of time during which packets with the same descriptor value are considered duplicates (LIMIT_T). LIMIT_T remains the same for all transmitted packets until it is changed by the operator.

Входной поток пакетов (фиг. 1, фиг. 2) принимается последовательно через входной интерфейс (101), включающий функции преобразования из электрического сигнала в набор последовательных цифровых значений и выполняющий проверку на соответствие требованием протокола Ethernet. The input packet stream (FIG. 1, FIG. 2) is received sequentially through the input interface (101), which includes the functions of converting from an electrical signal to a set of serial digital values and performing a check for compliance with the requirement of the Ethernet protocol.

Затем пакеты передаются в блок анализа пакета (102), в котором выполняется выделение из каждого пакета Ethernet, IP и TCP/UDP-заголовков и регистрируется время приема пакета. Затем происходит формирование дескриптора. The packets are then passed to the packet parsing unit (102), which extracts the Ethernet, IP, and TCP/UDP headers from each packet and records the time the packet was received. Then the descriptor is formed.

При этом дескриптор сохраняется в буфер дескрипторов (104), а пакет сохраняется в пакетный буфер (103). При этом в пакетном буфере (103) (фиг. 3) начинается загрузка пакета данных в полном объеме и поскольку размер его намного больше, чем размер дескриптора, то время, затрачиваемое на его загрузку в пакетный буфер, как правило больше или равно времени, затрачиваемого на обработку дескриптора.In this case, the descriptor is stored in the descriptor buffer (104), and the packet is stored in the packet buffer (103). At the same time, in the packet buffer (103) (Fig. 3), the data packet is loaded in full, and since its size is much larger than the size of the descriptor, the time spent on loading it into the packet buffer is usually greater than or equal to the time spent to handle the handle.

Дескриптор передаётся в блок расчета HASH (105) (фиг. 1), в котором на основе полей заголовков пакета (IP-адресов, IP идентификаторов, кода протокола L4, TCP/UDP-портов получателя и отправителя) рассчитывается HASH-сумма по алгоритму счетчика с аутентификацией Галуа. Код протокола L4 указывает номер протокола в поле «Протокол» заголовка пакета (данные какого протокола содержит пакет, например, TCP, UDP).The descriptor is passed to the HASH calculation block (105) (Fig. 1), in which, based on the packet header fields (IP addresses, IP identifiers, L4 protocol code, TCP / UDP ports of the recipient and sender), the HASH sum is calculated using the counter algorithm with Galois authentication. The protocol code L4 indicates the protocol number in the "Protocol" field of the packet header (what protocol data does the packet contain, for example, TCP, UDP).

Счётчик с аутентификацией Галуа является разновидностью режима работы симметричных блочных шифров. В алгоритме счетчика с аутентификацией Галуа входные блоки вектора байт нумеруются последовательно, номер блока кодируется блочным алгоритмом. Выход функции шифрования используется в операции XOR (исключающее или) с открытым текстом для получения HASH-суммы. Схема представляет собой потоковый шифр, поэтому использование уникального вектора байт гарантирует получение уникальной HASH-суммы.The counter with Galois authentication is a variation of the mode of operation of symmetric block ciphers. In the counter algorithm with Galois authentication, the input blocks of the byte vector are numbered sequentially, the block number is encoded by the block algorithm. The output of the encryption function is used in XOR operation (exclusive or) with the plaintext to get the HASH sum. The scheme is a stream cipher, so using a unique byte vector guarantees a unique HASH sum.

Далее дескриптор с рассчитанной HASH-суммой поступает в блок поиска дубликатов (106).Next, the descriptor with the calculated HASH sum goes to the duplicate search block (106).

Блок поиска дубликатов (106) загружает дескриптор из RAM-памяти (107) по адресу, равному значению HASH-суммы дескриптора поступившего пакета. После этого в блоке поиска дубликатов (106) сравниваются параметры пакетов из дескрипторов, определяется разность времени (ΔТ) хранящихся в дескрипторах пакетов с одинаковой HASH-суммой, где The duplicate search block (106) loads the descriptor from RAM memory (107) at the address equal to the value of the HASH sum of the incoming packet descriptor. After that, in the duplicate search block (106), the parameters of the packets from the descriptors are compared, the time difference (ΔТ) stored in the descriptors of packets with the same HASH sum is determined, where

ΔТ – разность времени хранящегося в дескрипторе анализируемого пакета и хранящегося в RAM-памяти (107) дескриптора пакета.ΔT is the time difference between the packet descriptor stored in the descriptor of the analyzed packet and the packet descriptor stored in the RAM memory (107).

Если параметры пакетов из дескрипторов одинаковы, то вычисляется разница между значениями времени (ΔТ), хранящегося в дескрипторе анализируемого пакета, и хранящегося в RAM-памяти (107) дескриптора пакета. Полученное значение сравнивается с максимальным значением времени, в течение которого пакеты с одинаковым значением дескрипторов считаются дубликатами (LIMIT_T).If the parameters of the packets from the descriptors are the same, then the difference between the time values (ΔT) stored in the descriptor of the analyzed packet and stored in the RAM memory (107) of the packet descriptor is calculated. The resulting value is compared with the maximum time that packets with the same descriptor value are considered duplicates (LIMIT_T).

Если в блоке поиска дубликатов (106) определяется, что параметры анализируемого пакета из дескриптора не совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти (107) вне зависимости от значения разности времени ΔТ, то происходит перезапись информации о пакете в RAM-память, блоку удаления пакетов (108) передается команда на передачу пакета из пакетного буфера (103) в выходной интерфейс (109), а блоку анализа пакета (102) команда на прием нового пакета из входного интерфейса (101).If it is determined in the duplicate search block (106) that the parameters of the analyzed packet from the descriptor do not match the parameters of the packet from the descriptor stored in the RAM memory (107), regardless of the value of the time difference ΔT, then the information about the packet is overwritten in the RAM memory , the packet removal unit (108) receives a command to transfer a packet from the packet buffer (103) to the output interface (109), and the packet analysis unit (102) receives a command to receive a new packet from the input interface (101).

Если в блоке поиска дубликатов (106) определяется, что параметры анализируемого пакета из дескриптора совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти (107), и разность времени ΔТ больше или равна заданному времени LIMIT_T (ΔТ ≥ LIMIT_T), то происходит перезапись параметров пакета в RAM-памяти (107), блоку удаления пакетов (108) передается команда на передачу пакета из пакетного буфера (103) в выходной интерфейс (109), а блоку анализа пакета (102) команда на прием нового пакета из входного интерфейса (101). If in the duplicate search block (106) it is determined that the parameters of the analyzed packet from the descriptor match the parameters of the packet from the descriptor stored in RAM memory (107), and the time difference ΔT is greater than or equal to the specified time LIMIT_T (ΔT ≥ LIMIT_T), then overwriting the packet parameters in RAM memory (107), the packet deletion unit (108) receives a command to transfer the packet from the packet buffer (103) to the output interface (109), and the packet analysis unit (102) receives a command to receive a new packet from the input interface (101).

Если в блоке поиска дубликатов (106) определяется, что параметры анализируемого пакета из дескриптора совпадают с параметрами пакета из дескриптора, хранящегося, в RAM-памяти (107) и разность времени ΔТ меньше заданного времени LIMIT_T (ΔТ < LIMIT_T), то блоку удаления пакетов (108) передается команда на удаление пакета из пакетного буфера (103), а блоку анализа пакета (102) команда на прием нового пакета из входного интерфейса (101). Таким образом определяется, что пакет является дубликатом и пакет удаляется.If in the duplicate search block (106) it is determined that the parameters of the analyzed packet from the descriptor match the parameters of the packet from the descriptor stored in RAM memory (107) and the time difference ΔT is less than the specified time LIMIT_T (ΔT < LIMIT_T), then the packet removal block (108) a command is sent to remove the packet from the packet buffer (103), and the packet analysis unit (102) is given a command to receive a new packet from the input interface (101). This determines that the package is a duplicate and removes the package.

Входной и выходной сетевые интерфейсы коммутатора могут быть, например, стандарта Ethernet.The input and output network interfaces of the switch can be, for example, the Ethernet standard.

В качестве конфигурационного интерфейса, в зависимости от элементной базы, может быть использован любой цифровой интерфейс, например, JTAG.As a configuration interface, depending on the element base, any digital interface can be used, for example, JTAG.

Для обеспечения максимальной пропускной способности и минимальной задержки при обработке блок фильтрации данных должен быть реализован аппаратно на основе программируемых логических интегральных схем (ПЛИС) или специализированных заказных или полузаказных интегральных микросхем.To ensure maximum throughput and minimum processing delay, the data filtering unit must be implemented in hardware based on programmable logic integrated circuits (FPGAs) or specialized custom or semi-custom integrated circuits.

Предложенный способ существенно снижает время, затрачиваемое на обработку пакета данных, за счет анализа не всего пакета, а только его дескриптора, т.е. конвейерной работы, заключающейся в принятии (загрузке) пакета данных, одновременном выделении из него дескриптора и принятии решений о наличии/отсутствии дубликата только по его HASH-сумме.The proposed method significantly reduces the time spent on processing a data packet by analyzing not the entire packet, but only its descriptor, i.e. pipeline work, which consists in accepting (loading) a data packet, simultaneously extracting a descriptor from it and making decisions about the presence / absence of a duplicate only by its HASH sum.

Пример 1.Example 1 Параметры анализируемого пакета из дескриптора полученного пакета не совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти, вне зависимости от значения разности времени ΔТThe parameters of the analyzed packet from the descriptor of the received packet do not match the parameters of the packet from the descriptor stored in RAM-memory, regardless of the value of the time difference ΔТ

Пакеты передаются в блок анализа пакета (102), в котором выполняется выделение из каждого пакета Ethernet, IP и TCP/UDP-заголовков.The packets are passed to the packet analysis block (102), which extracts the Ethernet, IP and TCP/UDP headers from each packet.

Затем происходит формирование дескриптора, включающего в себя значение полей заголовков пакета (IP-адрес получателя, IP-адрес отправителя, IP DSCP, идентификатор пакета IP ID, смещение фрагмента IP OFFSET, код протокола L4, TCP/UDP-порт получателя, TCP/UDP-порт отправителя, TCP SEQ) и времени приема пакета TIME, при этом дескриптор сохраняется в буфер дескрипторов (104), а пакет сохраняется в пакетный буфер (103).Then a descriptor is formed that includes the value of the packet header fields (recipient IP address, source IP address, IP DSCP, IP ID packet identifier, IP OFFSET fragment offset, L4 protocol code, recipient TCP / UDP port, TCP / UDP -port of the sender, TCP SEQ) and the time of receipt of the packet TIME, while the descriptor is stored in the descriptor buffer (104), and the packet is stored in the packet buffer (103).

Дескриптор передаётся в блок расчета HASH (105), в котором выполняется расчет HASH-суммы по полям пакета. The descriptor is passed to the HASH calculation block (105), in which the calculation of the HASH sum over the packet fields is performed.

В блоке поиска дубликатов (106) определяется, что параметры анализируемого пакета из дескриптора не совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти (107). Происходит перезапись информации о пакете в RAM-память (107), блоку удаления пакетов (108) передается команда на передачу пакета из пакетного буфера (103) в выходной интерфейс (109), а блоку анализа пакета (102) команда на прием нового пакета из входного интерфейса (101).In the duplicate search block (106), it is determined that the parameters of the analyzed packet from the descriptor do not match the parameters of the packet from the descriptor stored in RAM memory (107). The information about the packet is overwritten in the RAM memory (107), the packet deletion unit (108) receives a command to transfer the packet from the packet buffer (103) to the output interface (109), and the packet analysis unit (102) receives a command to receive a new packet from input interface (101).

Пример 2. Параметры анализируемого пакета из дескриптора полученного пакета совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти, заданная LIMIT_T=10мс, разность времени ΔТ=11мс Example 2. The parameters of the analyzed packet from the descriptor of the received packet match the parameters of the packet from the descriptor stored in RAM-memory, set LIMIT_T=10ms, time difference Δ T=11ms

Входной поток пакетов принимается последовательно через входной интерфейс (101). Оператором загружено значение LIMIT_T=10 мс. The input stream of packets is received sequentially through the input interface (101). The operator loaded the value LIMIT_T=10 ms.

Пакеты передаются в блок анализа пакета (102), в котором выполняется выделение из каждого пакета Ethernet, IP и TCP/UDP-заголовков.The packets are passed to the packet analysis block (102), which extracts the Ethernet, IP and TCP/UDP headers from each packet.

Затем происходит формирование дескриптора, включающего в себя значение полей заголовков пакета (IP-адрес получателя, IP-адрес отправителя, IP DSCP, идентификатор пакета IP ID, смещение фрагмента IP OFFSET, код протокола L4, TCP/UDP-порт получателя, TCP/UDP-порт отправителя, TCP SEQ) и времени приема пакета TIME, при этом дескриптор сохраняется в буфер дескрипторов (104), а пакет сохраняется в пакетный буфер (103).Then a descriptor is formed that includes the value of the packet header fields (recipient IP address, source IP address, IP DSCP, IP ID packet identifier, IP OFFSET fragment offset, L4 protocol code, recipient TCP / UDP port, TCP / UDP -port of the sender, TCP SEQ) and the time of receipt of the packet TIME, while the descriptor is stored in the descriptor buffer (104), and the packet is stored in the packet buffer (103).

Дескриптор передаётся в блок расчета HASH (105), в котором выполняется расчет HASH-суммы по полям пакета. Блок поиска дубликатов (106) загружает пакет из дескриптора, хранящегося в RAM-памяти (107), по адресу, равному значению HASH-суммы дескриптора поступившего пакета. После этого в блоке поиска дубликатов (106) сравниваются параметры пакетов из дескрипторов, вычисляется разность времени ΔТ для пакетов из дескрипторов с одинаковой HASH-суммой. The descriptor is passed to the HASH calculation block (105), in which the calculation of the HASH sum over the packet fields is performed. The duplicate search block (106) loads the packet from the descriptor stored in RAM memory (107) at the address equal to the value of the HASH sum of the incoming packet descriptor. After that, in the duplicate search block (106), the parameters of packets from descriptors are compared, the time difference ΔT is calculated for packets from descriptors with the same HASH sum.

В блоке поиска дубликатов (106) определяется, что параметры пакета из дескриптора совпадают с параметрами пакета из дескриптора в RAM-памяти (107) и, так как ΔТ=11мс > LIMIT_T=10 мс, то происходит перезапись параметров пакета в RAM-памяти (107), блоку удаления пакетов (108) передается команда на передачу пакета из пакетного буфера (103) в выходной интерфейс (109), а блоку анализа пакета (102) команда на прием нового пакета из входного интерфейса (101).IN In the duplicate search block (106), it is determined that the packet parameters from the descriptor match the packet parameters from the descriptor in RAM memory (107) and, since ΔT=11ms > LIMIT_T=10 ms, the packet parameters are overwritten in RAM memory (107 ), the packet removal unit (108) receives a command to transfer a packet from the packet buffer (103) to the output interface (109), and the packet analysis unit (102) receives a command to receive a new packet from the input interface (101).

Пример 3. Параметры анализируемого пакета из дескриптора полученного пакета совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти, заданная LIMIT_T=10 мс, разность времени ΔТ=7мс Example 3. The parameters of the analyzed packet from the descriptor of the received packet match the parameters of the packet from the descriptor stored in RAM-memory, set LIMIT_T=10 ms, time difference Δ T=7ms

Входной поток пакетов принимается последовательно через входной интерфейс (101). Оператором загружено значение LIMIT_T=10 мс. The input stream of packets is received sequentially through the input interface (101). The operator loaded the value LIMIT_T=10 ms.

Пакеты передаются в блок анализа пакета (102), в котором выполняется выделение из каждого пакета Ethernet, IP и TCP/UDP-заголовков.The packets are passed to the packet analysis block (102), which extracts the Ethernet, IP and TCP/UDP headers from each packet.

Затем происходит формирование дескриптора, включающего в себя значение полей заголовков пакета (IP-адрес получателя, IP-адрес отправителя, IP DSCP, идентификатор пакета IP ID, смещение фрагмента IP OFFSET, код протокола L4, TCP/UDP-порт получателя, TCP/UDP-порт отправителя, TCP SEQ) и времени приема пакета TIME, при этом дескриптор сохраняется в буфер дескрипторов (104), а пакет сохраняется в пакетный буфер (103).Then a descriptor is formed that includes the value of the packet header fields (recipient IP address, source IP address, IP DSCP, IP ID packet identifier, IP OFFSET fragment offset, L4 protocol code, recipient TCP / UDP port, TCP / UDP -port of the sender, TCP SEQ) and the time of receipt of the packet TIME, while the descriptor is stored in the descriptor buffer (104), and the packet is stored in the packet buffer (103).

Дескриптор передаётся в блок расчета HASH (105), в котором выполняется расчет HASH-суммы по полям пакета. The descriptor is passed to the HASH calculation block (105), in which the calculation of the HASH sum over the packet fields is performed.

В блоке поиска дубликатов (106) определяется, что параметры анализируемого пакета из дескриптора совпадают с параметрами пакета из дескриптора, хранящегося, в RAM-памяти (107) и разность времени ΔТ=7мс < LIMIT_T=10 мс. In the duplicate search block (106), it is determined that the parameters of the analyzed packet from the descriptor match the parameters of the packet from the descriptor stored in RAM memory (107) and the time difference ΔT=7ms < LIMIT_T=10 ms.

Блоку удаления пакетов (108) передается команда на удаление пакета из пакетного буфера (103), а блоку анализа пакета (102) передается команда на прием нового пакета из входного интерфейса (101). Таким образом определяется, что пакет является дубликатом и удаляется.The packet remover (108) is given a command to delete the packet from the packet buffer (103), and the packet analyzer (102) is given a command to receive a new packet from the input interface (101). This determines that the package is a duplicate and removes it.

Claims (9)

Способ определения дублирующихся пакетов в потоке сетевого трафика, включающий приём входного потока пакетов через входной интерфейс, передачу его в блок анализа пакета, в котором выполняется выделение из пакета Ethernet, IP и TCP/UDP-заголовков и формирование на их основе дескриптора, сохранение пакетов в пакетном буфере, а дескрипторов – в буфере дескрипторов, отличающийся тем, чтоA method for detecting duplicate packets in a network traffic stream, including receiving an input packet stream through an input interface, passing it to a packet analysis unit, in which Ethernet, IP and TCP / UDP headers are extracted from the packet and a descriptor is formed on their basis, packets are stored in packet buffer, and descriptors - in the descriptor buffer, characterized in that через несвязанный с сетью конфигурационный интерфейс в блоке поиска дубликатов задается LIMIT_T и остается неизменным до тех пор, пока оно не будет изменено оператором,LIMIT_T is set via a configuration interface not connected to the network in the duplicate search block and remains unchanged until it is changed by the operator, в блоке анализа пакета регистрируется время получения пакета,in the packet analysis block, the time of receipt of the packet is recorded, из буфера дескрипторов дескрипторы передаются в блок расчета HASH, descriptors are transferred from the descriptor buffer to the HASH calculation block, в блоке расчета HASH на основе полей заголовков пакета, включающих IP-адрес получателя, IP-адрес отправителя, IP DSCP, идентификатор пакета IP ID, смещение фрагмента IP OFFSET, код протокола L4, TCP/UDP-порт получателя, TCP/UDP-порт отправителя, порядковый номер пакета в TCP, рассчитывается HASH-сумма по алгоритму счетчика с аутентификацией Галуа;in the HASH calculation block based on the packet header fields, including the destination IP address, source IP address, IP DSCP, IP ID packet identifier, IP OFFSET fragment offset, L4 protocol code, destination TCP/UDP port, TCP/UDP port the sender, the sequence number of the packet in TCP, the HASH sum is calculated using the counter algorithm with Galois authentication; далее дескриптор с рассчитанной HASH-суммой поступает в блок поиска дубликатов, который загружает дескриптор из RAM-памяти по адресу, равному значению HASH-суммы дескриптора поступившего пакета, после чего сравниваются параметры пакетов из дескрипторов, определяется разность времени (ΔТ) из дескриптора анализируемого пакета и дескриптора, загруженного из RAM-памяти,then the descriptor with the calculated HASH sum enters the duplicate search block, which loads the descriptor from RAM memory at the address equal to the value of the HASH sum of the descriptor of the incoming packet, after which the packet parameters from the descriptors are compared, the time difference (ΔТ) is determined from the descriptor of the analyzed packet and a descriptor loaded from RAM memory, если в блоке поиска дубликатов определяется, что параметры анализируемого пакета из дескриптора не совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти вне зависимости от значения разности времени ΔТ, то происходит перезапись информации о пакете в RAM-память, блоку удаления пакетов передается команда на передачу пакета из пакетного буфера в выходной интерфейс, а блоку анализа пакета – команда на прием нового пакета из входного интерфейса,if it is determined in the duplicate search block that the parameters of the analyzed packet from the descriptor do not match the parameters of the packet from the descriptor stored in RAM memory, regardless of the value of the time difference ΔТ, then the information about the packet is rewritten to the RAM memory, the command is sent to the packet deletion block to transfer a packet from the packet buffer to the output interface, and the packet analysis unit is given a command to receive a new packet from the input interface, если в блоке поиска дубликатов определяется, что параметры анализируемого пакета из дескриптора совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти, и разность времени ΔТ больше или равна заданному времени LIMIT_T, то происходит перезапись параметров пакета в RAM-памяти, блоку удаления пакетов передается команда на передачу пакета из пакетного буфера в выходной интерфейс, а блоку анализа пакета – команда на прием нового пакета из входного интерфейса, if it is determined in the duplicate search block that the parameters of the analyzed packet from the descriptor match the parameters of the packet from the descriptor stored in RAM memory, and the time difference ΔT is greater than or equal to the specified time LIMIT_T, then the packet parameters in RAM memory are overwritten by the packet deletion block a command is sent to transfer a packet from the packet buffer to the output interface, and the packet analysis unit receives a command to receive a new packet from the input interface, если блоке поиска дубликатов определяется, что параметры анализируемого пакета из дескриптора совпадают с параметрами пакета из дескриптора, хранящегося в RAM-памяти, и разность времени ΔТ меньше заданного времени LIMIT_T, то блоку удаления пакетов передается команда на удаление пакета из пакетного буфера, а блоку анализа пакета – команда на прием нового пакета из входного интерфейса.if the duplicate search block determines that the parameters of the packet being analyzed from the descriptor match the parameters of the packet from the descriptor stored in RAM memory, and the time difference ΔT is less than the specified time LIMIT_T, then the command to delete the packet from the packet buffer is sent to the packet removal block, and the analysis block packet – command to receive a new packet from the input interface.
RU2022115203A 2022-06-06 Method for detecting duplicate packets in a network traffic flow RU2790636C1 (en)

Publications (1)

Publication Number Publication Date
RU2790636C1 true RU2790636C1 (en) 2023-02-28

Family

ID=

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050018668A1 (en) * 2003-07-24 2005-01-27 Cheriton David R. Method and apparatus for processing duplicate packets
US20060056429A1 (en) * 2004-09-15 2006-03-16 Nec Corporation Gateway apparatus, communication system, and delay measurement method
US20060191003A1 (en) * 2005-02-18 2006-08-24 Sae-Woong Bahk Method of improving security performance in stateful inspection of TCP connections
RU2363108C2 (en) * 2004-06-29 2009-07-27 Квэлкомм Инкорпорейтед Filtration and routing of fragmented datagrams in data transfer network
KR102090138B1 (en) * 2018-12-21 2020-03-17 (주)모니터랩 Session Management Method and Secure Intermediary Apparatus Using Thereof
CN113259256A (en) * 2021-07-15 2021-08-13 全时云商务服务股份有限公司 Repeating data packet filtering method and system and readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050018668A1 (en) * 2003-07-24 2005-01-27 Cheriton David R. Method and apparatus for processing duplicate packets
RU2363108C2 (en) * 2004-06-29 2009-07-27 Квэлкомм Инкорпорейтед Filtration and routing of fragmented datagrams in data transfer network
US20060056429A1 (en) * 2004-09-15 2006-03-16 Nec Corporation Gateway apparatus, communication system, and delay measurement method
US20060191003A1 (en) * 2005-02-18 2006-08-24 Sae-Woong Bahk Method of improving security performance in stateful inspection of TCP connections
KR102090138B1 (en) * 2018-12-21 2020-03-17 (주)모니터랩 Session Management Method and Secure Intermediary Apparatus Using Thereof
CN113259256A (en) * 2021-07-15 2021-08-13 全时云商务服务股份有限公司 Repeating data packet filtering method and system and readable storage medium

Similar Documents

Publication Publication Date Title
US10841243B2 (en) NIC with programmable pipeline
US6654701B2 (en) Method and apparatus for measuring protocol performance in a data communication network
US8462781B2 (en) Systems and methods for in-line removal of duplicate network packets
US7787442B2 (en) Communication statistic information collection apparatus
US8630294B1 (en) Dynamic bypass mechanism to alleviate bloom filter bank contention
US8867395B2 (en) Accelerating data packet parsing
US7643505B1 (en) Method and system for real time compression and decompression
US7664112B2 (en) Packet processing apparatus and method
US10567426B2 (en) Methods and apparatus for detecting and/or dealing with denial of service attacks
US20040039940A1 (en) Hardware-based packet filtering accelerator
US20040039939A1 (en) Embedded data set processing
JP2005522924A (en) Packet processing method and packet processing system
JP2007184799A (en) Packet communication device
CN112673595B (en) Method and system for using a stream cache with data packets including dynamic headers
CN107113282A (en) A kind of method and device for extracting data message
JP4263718B2 (en) Communication processing apparatus and communication processing method
RU2790636C1 (en) Method for detecting duplicate packets in a network traffic flow
US7603549B1 (en) Network security protocol processor and method thereof
KR100864889B1 (en) Device and method for tcp stateful packet filter
CN111031055B (en) IPsec acceleration device and implementation method
WO2006085374A1 (en) Communication device
RU2807656C1 (en) Balancing method while maintaining integrity of data flows
RU2786178C1 (en) Method for tracking sessions in network traffic
RU2790635C1 (en) Method for filtering a part of packets in a network session
RU2779135C1 (en) Method for dynamic filtering of network packets by sessions