[go: up one dir, main page]

RU2849161C1 - Method for fair queue management taking into account distance metrics and a device for implementing it - Google Patents

Method for fair queue management taking into account distance metrics and a device for implementing it

Info

Publication number
RU2849161C1
RU2849161C1 RU2025100753A RU2025100753A RU2849161C1 RU 2849161 C1 RU2849161 C1 RU 2849161C1 RU 2025100753 A RU2025100753 A RU 2025100753A RU 2025100753 A RU2025100753 A RU 2025100753A RU 2849161 C1 RU2849161 C1 RU 2849161C1
Authority
RU
Russia
Prior art keywords
packet
queue
packets
queues
servicing
Prior art date
Application number
RU2025100753A
Other languages
Russian (ru)
Inventor
Роман Борисович Трегубов
Сергей Юрьевич Андреев
Дмитрий Александрович Васинев
Дмитрий Александрович Рубин
Original Assignee
Федеральное государственное казенное военное образовательное учреждение высшего образования "Академия Федеральной службы охраны Российской Федерации"
Filing date
Publication date
Application filed by Федеральное государственное казенное военное образовательное учреждение высшего образования "Академия Федеральной службы охраны Российской Федерации" filed Critical Федеральное государственное казенное военное образовательное учреждение высшего образования "Академия Федеральной службы охраны Российской Федерации"
Application granted granted Critical
Publication of RU2849161C1 publication Critical patent/RU2849161C1/en

Links

Abstract

FIELD: digital information.
SUBSTANCE: inventions relate to means of fair queue service taking into account distance metrics in transport network routers. The technical result is achieved by additionally including from 1 to n modules for fair packet service, taking into account distance metrics, designed with the possibility of "fair distribution" of the output port bandwidth for variable-length packets, taking into account distance metrics, where each fair packet service module with distance metrics includes a virtual queue module, a GPS scheduler, a random number generator, a module for calculating the distance between alternative packet service options, and a packet scheduler with distance metrics.
EFFECT: reduction in the size of the buffer space allocated for the packet scheduler to operate.
3 cl, 8 dwg

Description

Область техникиField of technology

Данное изобретение относится к области телекоммуникаций и, в частности, к обеспечению качества обслуживания в маршрутизаторах (коммутаторах) транспортной сети связи.This invention relates to the field of telecommunications and, in particular, to ensuring quality of service in routers (switches) of a transport communications network.

Уровень техникиState of the art

Для удобства описания способа справедливого обслуживания очередей с учетом метрики расстояния и устройства его реализующего введем ряд определений.For the convenience of describing the method of fair queue servicing taking into account the distance metric and the device implementing it, we introduce a number of definitions.

Под потоком трафика данных будем понимать объем информации (Гбит, Тбит и т.д.), передаваемой через сеть связи (маршрутизаторы/коммутаторы) за определенный период одним источником. По сути поток трафика данных - это последовательность протокольных блоков данных от маршрутизатора к маршрутизатору или от одного персонального компьютера к другому.By data traffic flow we mean the volume of information (Gbit, Tbit, etc.) transmitted through a communications network (routers/switches) over a given period by a single source. Essentially, a data traffic flow is a sequence of protocol data units from router to router or from one personal computer to another.

Протокольный блок данных (ПБД) - блок данных, передаваемый между логическими объектами одного и того же уровня (см. ГОСТ 24402-88).Protocol data unit (PDU) is a block of data transmitted between logical objects of the same level (see GOST 24402-88).

Планировщик (scheduler) - это алгоритм разделения процессорного времени «планирование обслуживания пакетов» (packets scheduling) (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 149 с.).The scheduler is an algorithm for dividing processor time using “packets scheduling” (see Kucheryavy E.A. Traffic management and quality of service on the Internet. - St. Petersburg. Science and Technology, 2004. - 149 p.).

Активная очередь - это очередь, в которой хранится хотя бы один пакет (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 153 с.).An active queue is a queue in which at least one packet is stored (see Kucheryavy E.A. Traffic management and quality of service on the Internet. - St. Petersburg. Science and Technology, 2004. - 153 p.).

Начало очереди - это пакет, который раньше других пакетов, стоящих в очереди, был помещен в очередь.The head of the queue is the packet that was placed into the queue before other packets in the queue.

Конец очереди - это пакет, который позже других пакетов, стоящих в очереди, был помещен в очередь.The tail of the queue is a packet that was placed into the queue later than other packets in the queue.

Текущий шаг обслуживания пакета состояние планировщика в текущий момент времени, когда пакет передается в выходной порт на обслуживание (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 153 с.).The current step of packet servicing is the state of the scheduler at the current moment in time when the packet is transmitted to the output port for servicing (see Kucheryavy E.A. Traffic management and quality of service on the Internet. - St. Petersburg. Science and Technology, 2004. - 153 p.).

Очередной шаг обслуживания пакета состояние планировщика, когда необходимо принять решение о передаче следующего пакета в выходной порт на обслуживание (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 152 с.).The next step of packet servicing is the scheduler state when it is necessary to make a decision about transmitting the next packet to the output port for servicing (see Kucheryavy E.A. Traffic management and quality of service on the Internet. - St. Petersburg. Science and Technology, 2004. - 152 p.).

Окончание обслуживания пакета - это момент времени, когда последний бит от общего размера пакета будет передан в канал связи выходного порта маршрутизатора (коммутатора).The end of packet service is the point in time when the last bit of the total packet size will be transmitted into the communication channel of the router (switch) output port.

В настоящее время с развитием глобальной сети Интернет и предоставления пользователям широкого круга мультимедийных услуг важным вопросом является обеспечение качества обслуживании сетевого трафика (Quality of Service, QoS). При обеспечении качества обслуживания в транспортных сетях связи на базе протокола IP множество потоков трафика данных предъявляют различные требования по качеству обслуживания и соответственно разделяют ресурсы маршрутизатора транспортной сети связи. На сегодняшний день в глобальной сети Интернет чаще всего используется механизм дифференцированного обслуживания, который позволяет «справедливо» распределить ресурсы маршрутизатора транспортной сети связи между отдельными классами трафика и обеспечить приоритетное обслуживание некоторой его части. Дифференцированное обслуживание предполагает разделение всего трафика на несколько классов на основе требований к обслуживанию, предъявляемых каждым из них.With the development of the global Internet and the provision of a wide range of multimedia services to users, ensuring quality of service (QoS) for network traffic is an important issue. When ensuring quality of service in IP-based transport networks, multiple data traffic flows have different quality of service requirements and, accordingly, divide the resources of the transport network router. Today, the Internet most commonly uses differentiated service, which allows for the "fair" distribution of transport network router resources among individual traffic classes and ensures priority service for certain traffic segments. Differentiated service involves dividing all traffic into several classes based on the service requirements of each.

Современная транспортная сеть связи с коммутацией пакетов включает множество узлов (маршрутизаторов, коммутаторов, хостов и т.д.), соединенных каналами связи. Каждый маршрутизатор имеет от 1 до n входных портов, к которым подключены входящие каналы связи, и от 1 до n выходных портов, к которым подключены исходящие каналы связи. При этом маршрутизатор является общим ресурсом транспортной сети связи. Известна проблема, связанная с выделением ограниченного количества совместно используемых ресурсов (буферной памяти и пропускной способности выходного порта) для конкурирующих пользователей, услуг, приложений и классов обслуживания. Дисциплина планирования очереди позволяет управлять доступом к фиксированной величине пропускной способности выходного порта, выбирая следующий пакет, который передается в выходной порт маршрутизатора. Существует много различных дисциплин планирования очередей, каждая из которых пытается найти правильный баланс между сложностью, контролем и справедливостью.A modern packet-switched transport network consists of multiple nodes (routers, switches, hosts, etc.) connected by communication channels. Each router has from 1 to n input ports, to which incoming communication channels are connected, and from 1 to n output ports, to which outgoing communication channels are connected. A router is a shared resource in the transport network. A well-known problem is the allocation of a limited number of shared resources (buffer memory and output port bandwidth) to competing users, services, applications, and classes of service. Queue scheduling controls access to a fixed amount of output port bandwidth by selecting the next packet to be transmitted to the router's output port. Many different queue scheduling disciplines exist, each attempting to find the right balance between complexity, control, and fairness.

Дисциплина планирования очередей, поддерживаемая поставщиками маршрутизаторов (коммутаторов), зависит от конкретной реализации, что означает отсутствие реальных отраслевых стандартов. Тем не менее, поставщик иногда ссылается на свою собственную реализацию в качестве стандарта. Сложность с признанием любой реализации в качестве стандарта заключается в том, что каждый поставщик сочетает в себе функции из ряда известных общих дисциплин планирования очередей для обеспечения общей функциональности, которая необходима их клиентам для управления перегрузкой выходного порта. Затруднения возникают, когда пакеты поступают в выходной порт быстрее, чем они могут быть переданы. Это означает, что выходной порт маршрутизатора считается перегруженным. Задержка, вызываемая перегрузкой, может варьироваться в диапазоне от времени, необходимого для передачи последнего бита ранее прибывшего пакета, до бесконечности, в этом случае пакет сбрасывается из-за отсутствия места в буфере памяти (очереди). Важно минимизировать количество перегруженных каналов связи в сети, так как перегрузки уменьшают пропускную способность сети, увеличивают сквозные задержки пакетов, вызывают джиттер и могут привести к потере пакетов, если в буфере недостаточно буферной памяти для хранения всех пакетов, ожидающих передачи. Модуль маршрутизатора, который реализует процедуру обслуживания очередей, называют планировщиком.The queuing discipline supported by router (switch) vendors is implementation-specific, meaning there are no real industry standards. However, vendors sometimes refer to their own implementation as a standard. The difficulty with recognizing any implementation as a standard is that each vendor combines features from several well-known common queuing disciplines to provide the common functionality their customers need to manage egress port congestion. Difficulties arise when packets arrive at an egress port faster than they can be transmitted. This means the router's egress port is considered congested. The delay caused by congestion can range from the time required to transmit the last bit of a previously arrived packet to infinity, in which case the packet is dropped due to lack of space in the memory buffer (queue). It's important to minimize the number of congested communication channels in the network, as congestion reduces network throughput, increases end-to-end packet delays, causes jitter, and can lead to packet loss if the buffer memory is insufficient to hold all packets awaiting transmission. The router module that implements the queue servicing procedure is called the scheduler.

Первые маршрутизаторы использовали планировщик First-in First-out (FIFO) «первый - пришел, первый - ушел» на каждом выходном порту, при этом пакеты помещаются в одну очередь. Когда поступает новый пакет, то он помещается в конец очереди и пока очередь не пуста, маршрутизатор передает пакеты из очереди, принимая на обслуживание пакет из начала очереди (т.е. принимая «самый старый» пакет). Таким образом, FIFO предоставляет простой сервис наилучших усилий для всех приложений. FIFO имеет ряд серьезных недостатков. Во-первых, «жадный источник», который отправляет пакеты с чрезвычайно высокой битовой скоростью, может вытеснить другие источники и получить большую пропускную способность канала связи, чем другие источники. Во-вторых, если несколько более коротких пакетов находятся позади длинного пакета, то схема FIFO приводит к большей средней задержке (на пакет), чем, если бы более короткие пакеты были переданы до более длинного пакета. В-третьих, в соответствии со схемой FIFO нет никаких механизмов для обеспечения качества обслуживания трафика данных от высокоприоритетных источников, чувствительных к задержкам, например, мультимедийного трафика.Early routers used a First-in, First-out (FIFO) scheduler on each output port, with packets placed in a single queue. When a new packet arrives, it is placed at the end of the queue, and until the queue is empty, the router forwards packets from the queue, accepting the packet at the head of the queue (i.e., accepting the "oldest" packet). FIFO thus provides a simple best-effort service for all applications. FIFO has several serious drawbacks. First, a "greedy source" that sends packets at an extremely high bit rate can crowd out other sources and obtain more link capacity than other sources. Second, if several shorter packets are behind a long packet, the FIFO scheme results in a higher average delay (per packet) than if the shorter packets were transmitted before the longer packet. Third, under the FIFO scheme, there are no mechanisms to ensure quality of service for data traffic from high-priority, delay-sensitive sources, such as multimedia traffic.

Для обеспечения гарантий по задержкам может быть использован планировщик с приоритетами (Priority queuing, PQ). В классическом планировщике PQ пакеты сначала классифицируются системой, а затем помещаются в различные приоритетные очереди. Пакеты забираются на обслуживание из очереди только в том случае, если все очереди с более высоким приоритетом пустые. В каждой приоритетной очереди пакеты обслуживаются в порядке FIFO. Достоинством данного планировщика является простота реализации и возможность обеспечения низкой задержки для высокоприоритетного трафика данных. Недостатком является отсутствие возможности исключения влияния потоков друг на друга. Если высокоприоритетный трафик данных будет постоянно поступать в очередь с высокой интенсивностью, то трафик данных, поступающий в другие очереди, будет заблокирован.A priority queuing (PQ) scheduler can be used to ensure latency guarantees. In a classic PQ scheduler, packets are first classified by the system and then placed into various priority queues. Packets are only picked up for service from a queue if all higher-priority queues are empty. Within each priority queue, packets are serviced in FIFO order. The advantage of this scheduler is its simplicity of implementation and the ability to ensure low latency for high-priority data traffic. A disadvantage is the inability to prevent flows from interfering with each other. If high-priority data traffic continually enters a queue at a high rate, data traffic entering other queues will be blocked.

Для справедливой приоритизации доступа планировщика к очередям бал разработан планировщик GPS (Generalized Processor Sharing, GPS), который обеспечивает в непрерывном времени принцип «справедливого распределения ресурсов» для пакетов переменной длины. Алгоритм GPS является идеальной моделью, обеспечивающей в непрерывном времени принцип «справедливого распределения ресурсов» в соответствии с критерием max-min для классов трафика с различными требованиями по качеству обслуживания. Планировщик GPS обеспечивает каждому потоку гарантированную скорость передачи битов (пропускную способность) и справедливо распределяет избыточную полосу пропускания между потоками в соответствии с их относительными весами полосы пропускания (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 152 с.).To ensure fair prioritization of the scheduler's access to queues, the GPS (Generalized Processor Sharing) scheduler was developed. It ensures continuous-time fair resource allocation for variable-length packets. The GPS algorithm is an ideal model that ensures continuous-time fair resource allocation in accordance with the max-min criterion for traffic classes with different quality-of-service requirements. The GPS scheduler provides each flow with a guaranteed bit rate (throughput) and fairly distributes excess bandwidth among flows according to their relative bandwidth weights (see E.A. Kucheryavy, Traffic Management and Quality of Service on the Internet. St. Petersburg: Science and Technology, 2004, 152 p.).

Стоит отметить, что планировщик GPS в реальном оборудовании реализовать невозможно, так как он предполагает, что планировщик GPS обслуживает один бит за такт (квант процессора). Однако в самом маршрутизаторе можно виртуально моделировать сервер GPS в непрерывном времени и использовать эти результаты для выбора очередного пакета.It's worth noting that the GPS scheduler cannot be implemented in real hardware, as it assumes the GPS scheduler processes one bit per clock cycle (processor quantum). However, within the router itself, it is possible to virtually simulate a GPS server in continuous time and use these results to select the next packet.

Достаточно точно аппроксимировать планировщик GPS можно используя «взвешенное справедливое обслуживание очереди» (Weighted Fair Queuing, WFQ). Планировщик WFQ поддерживает справедливое распределение полосы пропускания для пакетов переменной длины с помощью аппроксимации обобщенной системы совместного использования процессоров GPS (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 152 с).A fairly accurate approximation of the GPS scheduler can be achieved using Weighted Fair Queuing (WFQ). The WFQ scheduler maintains fair bandwidth allocation for variable-length packets by approximating the generalized GPS processor sharing system (see E.A. Kucheryavy, "Traffic Management and Quality of Service on the Internet," St. Petersburg: Nauka i Tekhnika, 2004, 152 p.).

Обслуживание пакетов в отдельной очереди WFQ происходит в порядке поступления. Каждый поступающий пакет ставится в конец соответствующей очереди WFQ при условии, что в этой очереди имеется свободное место для ожидания, иначе пакет удаляется.Serving packets in a separate WFQ queue This occurs in the order in which it arrives. Each arriving packet is placed at the end of the corresponding WFQ queue, provided that there is free space in that queue; otherwise, the packet is discarded.

Планировщик WFQ реализует следующий алгоритм:The WFQ scheduler implements the following algorithm:

- формирует список конкурирующих пакетов, используя список пакетов, обслуженных виртуальной системой массового обслуживания (планировщик GPS) и номера пакетов, стоящих в начале активных очередей WFQ;- generates a list of competing packets using the list of packets served by the virtual queuing system (GPS scheduler) and the numbers of packets at the beginning of the active WFQ queues;

- сортирует список конкурирующих пакетов, используя поле «время окончания обслуживания в GPS» и отношение порядка;- sorts the list of competing packets using the GPS end-of-service time field and the order relation;

- выбирает пакет из очереди WFQ, используя номер пакета, расположенного в начале списка конкурирующих пакетов.- selects a packet from the WFQ queue using the packet number located at the beginning of the list of competing packets.

Выбранный пакет направляется для обслуживания в выходной порт. После того, как выходной порт полностью обслужит пакет, планировщик WFQ выбирает для обслуживания очередной пакет в соответствии с описанным ранее алгоритмом (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 152 с.).The selected packet is sent to the egress port for servicing. After the egress port has fully served the packet, the WFQ scheduler selects the next packet for servicing in accordance with the previously described algorithm (see Kucheryavy E.A. Traffic management and quality of service on the Internet. - St. Petersburg. Science and Technology, 2004. - 152 p.).

Стоит отметить, что зачастую в документации к сетевому оборудованию можно увидеть информацию о том, что в нем реализован алгоритм WFQ, однако это не говорит о том, что это именно рассмотренный выше алгоритм, скорее всего реализован более простой планировщик. Данный факт объясняется тем, что достаточно часто под WFQ понимается целый класс алгоритмов, аппроксимирующих GPS (см. Кучерявый Е.А. Управление трафиком и качество обслуживания в сети Интернет. - СПб. Наука и Техника, 2004. - 152 с.).It's worth noting that network equipment documentation often states that it implements the WFQ algorithm. However, this doesn't necessarily mean it implements the algorithm discussed above; it likely implements a simpler scheduler. This is because WFQ is often used to refer to a whole class of algorithms that approximate GPS (see E.A. Kucheryavy, "Traffic Management and Quality of Service on the Internet," St. Petersburg: Science and Technology, 2004, 152 p.).

Серьезной проблемой для планировщика WFQ является то, что моделирование GPS может предсказать, что несколько пакетов могут в конечном итоге иметь одно и то же виртуальное время окончания. Обновление функции виртуального времени между двумя последовательными поступлениями пакетов может потребовать большого количества вычислений и объем буферного пространства. В частности, если в канале связи одновременно передаются N активных сеансов (потоков трафика данных), то обновление виртуального времени может повлечь за собой вычисление O(N) сеансов или очередей. Количество активных потоков может быть очень большим. Например, могут существовать десятки тысяч или даже сотни тысяч очередей, использующих один канал связи. Это приводит к пропорционально большому количеству вычислений и объему памяти. Эта проблема называется итеративным удалением.A serious challenge for the WFQ scheduler is that GPS modeling can predict that multiple packets may end up with the same virtual end time. Updating the virtual end time function between two successive packet arrivals can require a large amount of computation and buffer space. Specifically, if N active sessions (data traffic flows) are simultaneously transmitted on a link, updating the virtual end time can entail O(N) sessions or queues. The number of active flows can be very large. For example, there may be tens of thousands or even hundreds of thousands of queues sharing a single link. This leads to a proportionally large amount of computation and memory. This problem is called iterative deletion.

Из-за высокой сложности, связанной с моделированием системы GPS, за последнее время были предложены различные решения данной проблемы. Для упрощения расчетов виртуального времени было предложено множество методов. Некоторые из таких методов - самосинхронизированная справедливая очередь (Self-Clocked Fair Queuing, SCFQ), «виртуальные часы» (Virtual Clock, VC), справедливая очередь начального времени (Start-time Fair Queuing, SFQ), фреймовая справедливая очередь (Frame-Based Fair Queuing, FFQ), самосинхронизированная справедливая очередь с минимальной задержкой (Minimum-Delay Self-Clocked Fair Queuing, MD-SCFQ) и планирование дискретной скорости (Discrete-Rate, DR). В общем случае такие упрощающие подходы приводят к снижению справедливости (изоляция потока) либо к увеличению границы задержки или не решают проблему повторяющегося удаления.Due to the high complexity associated with modeling the GPS system, various solutions to this problem have been proposed in recent years. Many methods have been proposed to simplify the virtual time calculations. Some of these methods include self-clocked fair queuing (SCFQ), virtual clock (VC), start-time fair queuing (SFQ), frame-based fair queuing (FFQ), minimum-delay self-clocked fair queuing (MD-SCFQ), and discrete-rate scheduling (DR). In general, such simplifying approaches lead to reduced fairness (flow isolation) or increased delay bounds, or do not solve the repeated deletion problem.

Известно устройство «Планировщик взвешенного справедливого обслуживания» (патент US 7461159 В2 от 02.12.2008 г.), который использует моделирование GPS для определения порядка обслуживания объектов, использует новую динамическую структуру данных со сложным, но простым механизмом обновления указателей. Предпочтительные варианты планировщика выполняют фиксированный объем работы на одно событие планирования. Событие планирования может быть либо вычислением новой виртуальной метки времени завершения при новом поступлении в планировщик, либо определением того, какие объекты должны покинуть систему GPS, поскольку их метка времени завершения истекла. Такой планировщик может использоваться при планировании пакетов в устройстве обработки пакетов, таком как маршрутизатор (коммутатор), планировании доступа программных процессов к компьютерному процессору и т.д. Планировщик может реализовать взвешенную справедливую очередь (WFQ).A "Weighted Fair Service Scheduler" (US Patent 7,461,159 B2, December 2, 2008) is known. It uses GPS modeling to determine the servicing order of objects and employs a new dynamic data structure with a complex yet simple pointer update mechanism. Preferred scheduler variants perform a fixed amount of work per scheduling event. A scheduling event can be either the calculation of a new virtual completion timestamp upon a new entry into the scheduler or the determination of which objects should leave the GPS system because their completion timestamp has expired. Such a scheduler can be used for scheduling packets in a packet processing device such as a router (switch), scheduling access of software processes to a computer processor, etc. The scheduler can implement a weighted fair queue (WFQ).

Известно устройство «Формирователь общей взвешенной справедливой очереди (WFQ)» (патент US 8638664 В2 от 28.01.2014 г.), включающее в себя порт, буфер, модуль управления потоком и модуль дифференциации услуг. Порт сконфигурирован для отправки и приема пакетов, причем порт соединен с сетевым объектом. Буфер сконфигурирован для хранения пакетов. Модуль управления потоком сконфигурирован для управления передачей пакетов внутри сетевого устройства. Модуль дифференциации обслуживания соединен с буфером и модулем управления потоком. Модуль дифференциации услуг сконфигурирован для регулирования хранения пакетов в буфере и для регулирования передачи пакетов от сетевого устройства к сетевому объекту. Модуль дифференциации услуг также сконфигурирован для определения избыточной полосы пропускания, доступной внутри сетевого устройства, и для распределения избыточной полосы пропускания для передачи пакетов сетевому объекту.A device known as a "General Weighted Fair Queue (WFQ) Generator" (US Patent No. 8,638,664 B2, filed January 28, 2014) includes a port, a buffer, a flow control module, and a service differentiation module. The port is configured to send and receive packets, and the port is connected to a network entity. The buffer is configured to store packets. The flow control module is configured to control the transmission of packets within the network device. A service differentiation module is connected to the buffer and the flow control module. The service differentiation module is configured to regulate the storage of packets in the buffer and to regulate the transmission of packets from the network device to the network entity. The service differentiation module is also configured to determine excess bandwidth available within the network device and to allocate the excess bandwidth for the transmission of packets to the network entity.

Известен способ и устройство «Способ вероятностного приоритетного обслуживания очередей и устройство его реализующее» (патент РФ № 2776658 С1 от 22.07.2022 г.), заключающийся в том, что устанавливают вес для каждой промежуточной очереди, принимают потоки приоритетного трафика данных на входные порты маршрутизатора, классифицируют потоки приоритетного трафика данных на классы в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, маршрутизируют потоки приоритетного трафика данных на соответствующие выходные порты маршрутизатора на основании таблицы маршрутизации, помещают в промежуточную очередь пакеты приоритетного трафика данных соответствующего класса в соответствии с исходным полем ToS Precedence заголовка IP-пакета, либо в соответствии с исходным полем DSCP заголовка IP-пакета, измеряют скорость поступления потоков приоритетного трафика данных соответствующего класса и среднюю длину пакетов соответствующего класса, формируют таблицу соответствия идентификатора потока с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, либо с полем DSCP заголовка IP-пакета, формируют матрицу интервалов с учетом скорости поступления потоков приоритетного трафика данных, средней длины пакетов и веса для каждой промежуточной очереди, генерируют случайное число, равномерно распределенное в интервале от 0 до 1, изменяют исходный приоритет пакета в поле DSCP заголовка IP-пакета, либо в поле ToS Precedence заголовка IP-пакета с учетом матрицы интервалов и случайного числа, передают пакет в приоритетную очередь в соответствии с изменённым полем ToS Precedence заголовка IP-пакета, либо в соответствии с изменённым полем DSCP заголовка IP-пакета, помещают в конец соответствующей приоритетной очереди пакеты трафика данных соответствующего класса в соответствии с изменённым полем ToS Precedence заголовка IP-пакета, либо в соответствии с изменённым полем DSCP заголовка IP-пакета, осуществляют обслуживание пакетов в приоритетных очередях планировщиком с приоритетами PQ, восстанавливают исходный приоритет пакета в поле DSCP заголовка IP-пакета, либо в поле ToS Precedence заголовка IP-пакета с учетом матрицы соответствия, передают приоритетный трафика данных в выходной порт маршрутизатора.A method and device “Method for probabilistic priority servicing of queues and a device implementing it” (RU Patent No. 2776658 C1 dated July 22, 2022) are known, which consists in setting a weight for each intermediate queue, receiving priority data traffic flows at the input ports of the router, classifying priority data traffic flows into classes in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, or in accordance with the DSCP field of the IP packet header, routing priority data traffic flows to the corresponding output ports of the router based on the routing table, placing priority data traffic packets of the corresponding class in an intermediate queue in accordance with the original ToS Precedence field of the IP packet header, or in accordance with the original DSCP field of the IP packet header, measuring the arrival rate of priority data traffic flows of the corresponding class and the average length of packets of the corresponding class, form a table of correspondence between the flow identifier and the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, or with the DSCP field of the IP packet header, form a matrix of intervals taking into account the rate of arrival of priority data traffic flows, the average length of packets and the weight for each intermediate queue, generate a random number uniformly distributed in the interval from 0 to 1, change the original priority of the packet in the DSCP field of the IP packet header, or in the ToS Precedence field of the IP packet header, taking into account the matrix of intervals and the random number, transfer the packet to the priority queue in accordance with the modified ToS Precedence field of the IP packet header, or in accordance with the modified DSCP field of the IP packet header, place data traffic packets of the corresponding class at the end of the corresponding priority queue in accordance with the modified ToS Precedence field of the IP packet header, or in accordance with the modified DSCP field of the IP packet header, service packets in priority queues by the scheduler with PQ priorities, restore the original packet priority in the DSCP field of the IP packet header, or in the ToS Precedence field of the IP packet header taking into account the correspondence matrix, and transmit priority data traffic to the output port of the router.

Известен способ и устройство «Способ вероятностного взвешенного справедливого обслуживания очередей» (патент РФ № 2777035 С1 от 01.08.2022 г.), заключающийся в том, что на первом этапе устанавливают абсолютный вес для каждой очереди, скорость поступления потоков приоритетного трафика данных и средний размер пакетов для каждого потока приоритетного трафика данных, формируют все варианты (комбинации) активных очередей, рассчитывают для каждого варианта (комбинации) активных очередей вектор интенсивностей обслуживания (WM), формируют вектор интервалов интенсивностей обслуживания (IntWM) для каждого вектора интенсивностей обслуживания, на втором этапе принимают потоки приоритетного трафика данных на входные порты устройства, классифицируют потоки приоритетного трафика данных на классы в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, маршрутизируют потоки приоритетного трафика данных на соответствующие выходные порты маршрутизатора на основании таблицы маршрутизации, помещают в очередь пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, проверяют текущее состояние выходного порта устройства, проверяют наличие пакетов в очередях, если очереди не пусты, то формируют вектор активных очередей, осуществляют выбор вектора интервалов интенсивностей обслуживания с учетом вектора активных очередей, генерируют случайное число, равномерно распределенное в интервале от 0 до 1, выбирают номер активной очереди с учетом случайного числа и вектора интервалов интенсивностей обслуживания (IntWM), передают пакет в выходной порт устройства, обновляют текущее состояние выходного порта устройства. Устройство вероятностного взвешенного справедливого обслуживания очередей, содержащая от 1 до n входных портов для приема потоков приоритетного трафика данных, классификатор, выполненный с возможностью отнесения потоков трафика данных к классам в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, модуль маршрутизации, выполненный с возможностью продвижения пакета в выходной порт в соответствии с таблицей маршрутизации, от 1 до n модулей очередей для помещения пакетов в очередь соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета; измерения скорости поступления трафика данных и средней длины пакетов соответствующего класса, от 1 до n выходных портов для передачи потоков приоритетного трафика данных в канал связи, отличающийся тем, что дополнительно включены от 1 до n модулей вероятностного взвешенного справедливого обслуживания очередей, причем потоки приоритетного трафика данных поступают на входные порты, затем с входных портов потоки приоритетного трафика данных передаются на вход классификатора, выход классификатора соединен с входом модуля маршрутизации, с выхода модуля маршрутизации потоки приоритетного трафика данных поступают на вход соответствующего модуля очередей, с выхода модуля очередей потоки приоритетного трафика данных передаются в соответствующий модуль вероятностного взвешенного справедливого обслуживания очередей, с выхода модуля вероятностного взвешенного справедливого обслуживания очередей потоки приоритетного трафика данных поступают на выходные порты.A method and device for "Method of Probabilistic Weighted Fair Queue Servicing" (RU Patent No. 2777035 C1 dated 01.08.2022) are known, which consists in the fact that at the first stage, an absolute weight is established for each queue, the rate of receipt of priority data traffic flows and the average packet size for each priority data traffic flow, all variants (combinations) of active queues are formed, a service intensity vector (WM) is calculated for each variant (combination) of active queues, a service intensity interval vector (IntWM) is formed for each service intensity vector, at the second stage, priority data traffic flows are received at the input ports of the device, priority data traffic flows are classified into classes in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, or in accordance with the DSCP field of the IP packet header, and priority data traffic flows are routed to the corresponding output ports of the router based on the table routing, place data traffic packets of the corresponding class in a queue in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, or in accordance with the DSCP field of the IP packet header, check the current state of the output port of the device, check the presence of packets in the queues, if the queues are not empty, then form a vector of active queues, select a vector of service intensity intervals taking into account the vector of active queues, generate a random number uniformly distributed in the interval from 0 to 1, select the number of the active queue taking into account the random number and the vector of service intensity intervals (IntWM), transmit the packet to the output port of the device, update the current state of the output port of the device. A probabilistic weighted fair queuing device comprising from 1 to n input ports for receiving flows of priority data traffic, a classifier configured to classify data traffic flows in accordance with a ToS Precedence field of an IP packet header, or in accordance with a DSCP field of an IP packet header, or in accordance with a DSCP field of an IP packet header, a routing module configured to forward a packet to an output port in accordance with a routing table, from 1 to n queuing modules for placing packets in a queue of the corresponding class in accordance with a ToS Precedence field of an IP packet header, or in accordance with a DSCP field of an IP packet header, or in accordance with a DSCP field of an IP packet header; measuring the rate of arrival of data traffic and the average length of packets of the corresponding class, from 1 to n output ports for transmitting streams of priority data traffic into the communication channel, characterized in that from 1 to n modules of probabilistic weighted fair queuing are additionally included, wherein the streams of priority data traffic are received at the input ports, then from the input ports the streams of priority data traffic are transmitted to the input of the classifier, the output of the classifier is connected to the input of the routing module, from the output of the routing module the streams of priority data traffic are received at the input of the corresponding queuing module, from the output of the queuing module the streams of priority data traffic are transmitted to the corresponding module of probabilistic weighted fair queuing, from the output of the module of probabilistic weighted fair queuing the streams of priority data traffic are received at the output ports.

Наиболее близким по технической сущности к заявляемому способу и выбранным в качестве прототипа является «Способ для выполнения взвешенного планирования очередей с использованием набора коэффициентов справедливости» (патент US 10291540 В2 от 14.05.2019 г.), заключающийся в том, что осуществляют прием пакетных данных из нескольких портов источника; классификацию пакетных данных на основе нескольких портов источника и связанных с ними портов назначения; сортировку пакетных данных по нескольким очередям в буфере; планирование каждой из множества очередей для передачи на основе временного веса каждой из множества очередей, который вычисляется на основе набора факторов справедливости, причем набор факторов справедливости включает в себя: бит валидности соответствующей очереди, вес приоритета соответствующей очереди, идентификацию первой позиции, указывающую на позицию соответствующей очереди, и идентификацию второй позиции, указывающую на позицию последней запланированной очереди с наивысшим приоритетом из предыдущего раунда, планирование далее включает выбор из по меньшей мере двух очередей с одинаковым максимальным весом приоритета, и при этом дополнительная сумма добавляется к временному весу соответствующей очереди, если идентификация первой позиции указывает на более низкую позицию, чем идентификация второй позиции, и при этом дополнительная сумма равна количеству очередей, выбранных из по меньшей мере двух очередей с одинаковым максимальным весом приоритета; и обновление статического состояния соответствующей очереди из нескольких очередей, реагирующих на пакет данных, вводимый в соответствующую очередь или выводимый из соответствующей очереди; отправка выходных пакетных данных, снятых с очереди планировщика, к месту назначения.The closest in technical essence to the claimed method and chosen as a prototype is the "Method for performing weighted queuing scheduling using a set of fairness coefficients" (patent US 10291540 B2 dated 05/14/2019), which consists in receiving packet data from multiple source ports; classifying packet data based on multiple source ports and their associated destination ports; sorting packet data into multiple queues in a buffer; scheduling each of a plurality of queues for transmission based on a temporary weight of each of the plurality of queues that is calculated based on a set of fairness factors, wherein the set of fairness factors includes: a validity bit of the corresponding queue, a priority weight of the corresponding queue, an identification of a first position indicating the position of the corresponding queue, and an identification of a second position indicating the position of the last scheduled queue with the highest priority from the previous round, the scheduling further includes selecting from at least two queues with the same maximum priority weight, and wherein an additional amount is added to the temporary weight of the corresponding queue if the identification of the first position indicates a lower position than the identification of the second position, and wherein the additional amount is equal to the number of queues selected from the at least two queues with the same maximum priority weight; and updating the static state of the corresponding queue from among the plurality of queues responsive to a data packet being input into the corresponding queue or output from the corresponding queue; sending the output packet data removed from the scheduler queue to the destination.

Наиболее близким по технической сущности к заявляемому устройству и выбранным в качестве прототипа является «Устройство для выполнения взвешенного планирования очередей с использованием набора коэффициентов справедливости» (патент US 10291540 В2 от 14.05.2019 г.), содержащее по меньшей мере один процессор и по меньшей мере один материальный нетранзитивный машиночитаемый носитель информации, хранящий инструкции, которые при выполнении по меньшей мере одним процессором заставляют устройство выполнять способ использования планировщика для обработки запросов, включающий: прием пакетных данных из нескольких портов источника; классификацию пакетных данных на основе нескольких портов источника и портов назначения, связанных с ними; сортировку пакетных данных в несколько очередей в буфере; планирование каждой из множества очередей для передачи на основе временного веса каждой из множества очередей, который вычисляется на основе набора факторов справедливости, причем набор факторов справедливости включает в себя: бит валидности соответствующей очереди, вес приоритета соответствующей очереди, идентификацию первой позиции, указывающую на позицию соответствующей очереди, и идентификацию второй позиции, указывающую на позицию последней запланированной очереди с наивысшим приоритетом из предыдущего раунда, планирование далее включает выбор из по меньшей мере двух очередей с одинаковым максимальным весом приоритета, и при этом временный вес соответствующей очереди увеличивается на дополнительную сумму, если идентификация первой позиции указывает на более низкую позицию, чем идентификация второй позиции, и при этом дополнительная сумма равна количеству очередей, выбранных из по меньшей мере двух очередей с одинаковым максимальным весом приоритета; и обновление статического состояния соответствующей очереди из нескольких очередей, реагирующих на пакет данных, вводимый в соответствующую очередь или выводимый из соответствующей очереди; и отправка выходных пакетных данных, снятых с очереди планировщика, к месту назначения.The closest in technical essence to the claimed device and selected as a prototype is the "Device for performing weighted scheduling of queues using a set of fairness coefficients" (patent US 10291540 B2 dated 05/14/2019), containing at least one processor and at least one tangible non-transitive machine-readable storage medium storing instructions that, when executed by at least one processor, cause the device to perform a method of using a scheduler to process requests, including: receiving packet data from multiple source ports; classifying packet data based on multiple source ports and destination ports associated with them; sorting packet data into multiple queues in a buffer; scheduling each of a plurality of queues for transmission based on a temporary weight of each of the plurality of queues that is calculated based on a set of fairness factors, wherein the set of fairness factors includes: a validity bit of the corresponding queue, a priority weight of the corresponding queue, an identification of a first position indicating the position of the corresponding queue, and an identification of a second position indicating the position of the last scheduled queue with the highest priority from the previous round, the scheduling further includes selecting from at least two queues with the same maximum priority weight, and wherein the temporary weight of the corresponding queue is increased by an additional amount if the identification of the first position indicates a lower position than the identification of the second position, and wherein the additional amount is equal to the number of queues selected from the at least two queues with the same maximum priority weight; and updating the static state of the corresponding queue from among multiple queues responsive to a data packet being input into the corresponding queue or output from the corresponding queue; and sending the output packet data removed from the scheduler queue to the destination.

Технической проблемой является большой размер буферного пространства для работы планировщика пакетов. Причиной, по которой это происходит, является то, что для работы планировщика необходимо хранить виртуальное время обслуживания сервера (планировщика) GPS, а также номера пакетов, которые хранятся в очередях. A technical issue is the large buffer space required for the packet scheduler. This is because the scheduler requires storing the virtual service time of the GPS server (scheduler), as well as the packet numbers stored in the queues.

Техническим результатом является уменьшение размера буферного пространства, выделяемого для работы планировщика пакетов, за счет того, что дополнительно включённых от 1 до n модулей справедливого обслуживания пакетов с учетом метрики расстояния, выполненных с возможностью «справедливого распределения» пропускной способности выходного порта для пакетов переменной длины с учетом метрики расстояния, причем каждый модуль справедливого обслуживания пакетов с учетом метрики расстояния включает модуль виртуальных очередей, планировщик GPS, генератор случайного числа, модуль расчета расстояния между альтернативными вариантами обслуживания пакетов, планировщик пакетов с учетом метрики расстояния. The technical result consists in reducing the size of the buffer space allocated for the operation of the packet scheduler, due to the fact that from 1 to n modules of fair packet servicing taking into account the distance metric are additionally included, configured with the possibility of "fair distribution" of the throughput of the output port for packets of variable length taking into account the distance metric, wherein each module of fair packet servicing taking into account the distance metric includes a virtual queue module, a GPS scheduler, a random number generator, a module for calculating the distance between alternative packet servicing options, a packet scheduler taking into account the distance metric.

Создание способа справедливого обслуживания очередей с учетом метрики расстояния и устройства его реализующего направлены на решение данной технической проблемы, что позволяет уменьшить размер буферного пространства, выделяемого для работы планировщика пакетов.The creation of a method for fair queue servicing taking into account the distance metric and the device implementing it are aimed at solving this technical problem, which makes it possible to reduce the size of the buffer space allocated for the operation of the packet scheduler.

Раскрытие изобретенияDisclosure of invention

В заявленном способе эта техническая проблема решается тем, что в способе справедливого обслуживания очередей с учетом метрики расстояния, заключающемся в том, что на первом этапе устанавливают для каждого выходного порта устройства общее количество очередей, максимальное количество пакетов в каждой очереди, пропускную способность, долю пропускной способности, выделенную для работы планировщиков с учетом метрики расстояния, вес для каждой очереди, параметры механизма случайного раннего обнаружения перегрузок RED для каждой очереди, на втором этапе принимают потоки трафика данных на входные порты устройства, классифицируют потоки трафика данных на классы в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, маршрутизируют потоки трафика данных на соответствующие выходные порты устройства на основании таблицы маршрутизации и IP-адреса получателя, либо на основании таблицы продвижения и метки MPLS, помещают в физические очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей очереди при условии, что в этой очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, помещают в виртуальные очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей виртуальной очереди при условии, что в этой виртуальной очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, проверяют текущее состояние выходного порта и виртуального выходного порта устройства, а также состояние планировщика GPS и планировщика пакетов с учетом метрики расстояния на предмет окончания обслуживания пакета выходным портом или виртуальным выходным портом в текущий момент времени, выбирают пакет, который расположен в начале активной виртуальной очереди пакет из которой был обслужен в текущий момент времени, для обслуживания на очередном шаге, передают пакет и вес соответствующей очереди в виртуальный выходной порт устройства, формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, формируют вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания, формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания, рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния, разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния, генерируют случайное число, равномерно распределенное в интервале от 0 до 1, выбирают номер диапазона, в который попало сгенерированное случайное число, выбирают пакет, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния и с учетом выбранного номера диапазона, передают пакет в выходной порт устройства.In the claimed method, this technical problem is solved by the fact that in the method of fair queuing taking into account the distance metric, which consists in the fact that at the first stage they set for each output port devices the total number of queues, the maximum number of packets in each queue, the throughput, the share of throughput allocated to the schedulers taking into account the distance metric, the weight for each queue, the parameters of the random early detection mechanism RED for each queue, at the second stage receive data traffic flows on the input ports of the device, classify the data traffic flows into classes in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with such parameters as the protocol, access lists and the input interface, route the data traffic flows to the corresponding output ports of the device based on the routing table and the destination IP address, or based on the forwarding table and the MPLS label, place data traffic packets of the corresponding class into physical queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with such parameters as protocol, access lists and input interface, while the packet is placed at the end of the corresponding queue, provided that there is free space in this queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in case of congestion detection, otherwise the packet is removed, data traffic packets of the corresponding class are placed in virtual queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with such parameters as protocol, access lists and input interface, while the packet is placed at the end of the corresponding virtual queue, provided that there is free space in this virtual queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in case of congestion detection, otherwise the packet is removed, the current state of the output port and the virtual output port of the device, as well as the state of the GPS scheduler and the packet scheduler taking into account the distance metric are checked for the end of servicing the packet by the output port or the virtual output port at the current moment time, select a packet that is located at the beginning of the active virtual queue, the packet from which was serviced at the current moment in time, for servicing at the next step, transmit the packet and the weight of the corresponding queue to the virtual output port of the device, form a vector of the number of packets standing in virtual queues at the current servicing step, form a vector of the number of packets standing in physical queues at the current servicing step, form a vector of alternative options for the number of packets standing in physical queues at the next servicing step, calculate the distance metric between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step, select an element or elements from the vector of alternative options for the number of packets standing in physical queues at the next servicing step with the smallest distance metric, split the interval from 0 to 1 into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next servicing step with the same distance metric, generate a random a number uniformly distributed in the interval from 0 to 1, select the range number into which the generated random number falls, select the packet that is located at the beginning of the corresponding physical queue for servicing at the next step with the smallest distance metric and taking into account the selected range number, transmit the packet to the output port of the device.

Новая совокупность существенных признаков позволяет достичь указанного технического результата за счет того, что помещают в физические очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей очереди при условии, что в этой очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, помещают в виртуальные очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей виртуальной очереди при условии, что в этой виртуальной очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, проверяют текущее состояние выходного порта и виртуального выходного порта устройства, а также состояние планировщика GPS и планировщика пакетов с учетом метрики расстояния на предмет окончания обслуживания пакета выходным портом или виртуальным выходным портом в текущий момент времени, выбирают пакет, который расположен в начале активной виртуальной очереди пакет из которой был обслужен в текущий момент времени, для обслуживания на очередном шаге, передают пакет и вес соответствующей очереди в виртуальный выходной порт устройства, формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, формируют вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания, формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания, рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния, разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния, генерируют случайное число, равномерно распределенное в интервале от 0 до 1, выбирают номер диапазона, в который попало сгенерированное случайное число, выбирают пакет, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния и с учетом выбранного номера диапазона, передают пакет из начала соответствующей физической очереди в выходной порт устройства.The new set of essential features makes it possible to achieve the specified technical result by placing data traffic packets of the corresponding class into physical queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface, while the packet is placed at the end of the corresponding queue, provided that there is free space in this queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in the event of overload detection, otherwise the packet is deleted, placing data traffic packets of the corresponding class into virtual queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface, while the packet is placed at the end of the corresponding virtual queue, provided that there is free space in this virtual queue ( Drop Tail) and the RED mechanism does not discard a packet if an overload is detected, otherwise the packet is deleted, check the current state of the output port and the virtual output port of the device, as well as the state of the GPS scheduler and the packet scheduler taking into account the distance metric for the end of servicing the packet by the output port or the virtual output port at the current time, select a packet that is located at the beginning of the active virtual queue from which the packet was serviced at the current time for servicing at the next step, transmit the packet and the weight of the corresponding queue to the virtual output port of the device, form a vector of the number of packets standing in virtual queues at the current servicing step, form a vector of the number of packets standing in physical queues at the current servicing step, form a vector of alternative options for the number of packets standing in physical queues at the next servicing step, calculate the distance metric between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step, select an element or elements from the vector of alternative options for the number of packets standing in physical queues, at the next step of service with the smallest distance metric, the interval from 0 to 1 is divided into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues, at the next step of service with the same distance metric, a random number is generated, uniformly distributed in the interval from 0 to 1, the number of the range into which the generated random number falls is selected, a packet located at the beginning of the corresponding physical queue is selected for service at the next step with the smallest distance metric and taking into account the selected range number, the packet is transmitted from the beginning of the corresponding physical queue to the output port of the device.

Для достижения указанной выше цели в соответствии с другим аспектом настоящего изобретения предложено устройство справедливого обслуживания очередей с учетом метрики расстояния.In order to achieve the above object, in accordance with another aspect of the present invention, a distance metric based fair queueing device is provided.

В заявленном устройстве эта задача решается тем, что устройство справедливого обслуживания очередей с учетом метрики расстояния, содержит от 1 до n входных портов для приема потоков трафика данных, классификатор, выполненный с возможностью отнесения потоков трафика данных к классам в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, модуль маршрутизации, выполненный с возможностью продвижения пакета в выходной порт в соответствии с таблицей маршрутизации и IP-адреса получателя, либо на основании таблицы продвижения и метки MPLS, от 1 до n модулей физических очередей для помещения пакетов в очередь соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс; установки веса для каждой очереди; установки параметров механизма случайного раннего обнаружения перегрузок RED для каждой очереди, от 1 до n выходных портов для передачи потоков трафика данных в каналы связи. Дополнительно в устройство справедливого обслуживания очередей с учетом метрики расстояния включены от 1 до n модулей справедливого обслуживания пакетов с учетом метрики расстояния выполненных с возможностью «справедливого распределения» пропускной способности выходного порта для пакетов переменной длины с учетом метрики расстояния, причем потоки трафика данных поступают на входные порты, затем с входных портов потоки трафика данных передаются на вход классификатора, выход классификатора соединен с входом модуля маршрутизации, с выхода модуля маршрутизации потоки трафика данных поступают на вход соответствующего модуля физических очередей, с выхода модуля физических очередей потоки трафика данных передаются в соответствующий модуль справедливого обслуживания пакетов с учетом метрики расстояния, с модуля справедливого обслуживания пакетов с учетом метрики расстояния потоки трафика данных поступают на выходные порты.In the claimed device, this problem is solved in that the device for fair queuing, taking into account the distance metric, contains from 1 to n input ports for receiving data traffic flows, a classifier configured to assign data traffic flows to classes in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface, a routing module configured to forward a packet to an output port in accordance with the routing table and the recipient IP address, or on the basis of the forwarding table and the MPLS label, from 1 to n physical queuing modules for placing packets in a queue of the corresponding class in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface; Setting the weight for each queue; Setting the parameters of the random early congestion detection mechanism RED for each queue, from 1 to n output ports for transmitting data traffic flows to the communication channels. Additionally, the device for fair queuing with respect to the distance metric includes from 1 to n modules of fair packet servicing with respect to the distance metric, configured to "fairly distribute" the output port bandwidth for variable-length packets with respect to the distance metric, wherein the data traffic flows arrive at the input ports, then from the input ports the data traffic flows are transmitted to the input of the classifier, the output of the classifier is connected to the input of the routing module, from the output of the routing module the data traffic flows arrive at the input of the corresponding physical queuing module, from the output of the physical queuing module the data traffic flows are transmitted to the corresponding module of fair packet servicing with respect to the distance metric, from the module of fair packet servicing with respect to the distance metric the data traffic flows arrive at the output ports.

Согласно одному из частных вариантов реализации модуль справедливого обслуживания пакетов с учетом метрики расстояния содержит модуль виртуальных очередей, выполненный с возможностью помещения пакетов в виртуальные очереди, которые соответствуют физическим очередям для соответствующих классов, планировщик GPS, выполненный с возможностью реализации в непрерывном времени принципа «справедливого распределения ресурсов» для пакетов переменной длины, генератор случайного числа, выполненный с возможностью генерации случайного числа, равномерно распределенного в интервале от 0 до 1, модуль расчета расстояния между альтернативными вариантами обслуживания пакетов, выполненный с возможностью формирования вектора числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания; формирования вектора числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания; формирования вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания; вычисления метрики расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания; выбора элемента или элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния; разбиения интервала от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния; выбора номера диапазона, в который попало сгенерированное случайное число, планировщик пакетов с учетом метрики расстояния, выполненный с возможностью; выбора пакета, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния с учетом выбранного номера диапазона; передачи пакета в выходной порт с реализацией принципа «справедливого обслуживания» очередей с учетом метрики расстояния, при этом все модули в устройстве соединены посредством общей внутренней шины AXI4, которая выступает в качестве средства обмена информацией между модулями.According to one particular embodiment, the module for fair packet servicing taking into account the distance metric comprises a virtual queuing module configured to place packets in virtual queues that correspond to physical queues for the corresponding classes, a GPS scheduler configured to implement in continuous time the principle of "fair resource distribution" for variable-length packets, a random number generator configured to generate a random number uniformly distributed in the interval from 0 to 1, a module for calculating the distance between alternative packet servicing options, configured to generate a vector of the number of packets standing in virtual queues at the current servicing step; generating a vector of the number of packets standing in physical queues at the current servicing step; generating a vector of alternative options for the number of packets standing in physical queues at the next servicing step; calculating the distance metric between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step; selecting an element or elements from a vector of alternative options for the number of packets standing in physical queues at the next servicing step with the smallest distance metric; dividing the interval from 0 to 1 into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next servicing step with the same distance metric; selecting the number of the range into which the generated random number falls, a packet scheduler taking into account the distance metric, configured to; select a packet that is located at the beginning of the corresponding physical queue for servicing at the next step with the smallest distance metric, taking into account the selected range number; transmitting the packet to the output port with the implementation of the principle of "fair servicing" of queues taking into account the distance metric, wherein all modules in the device are connected via a common internal AXI4 bus, which acts as a means of exchanging information between the modules.

Все модули могут быть реализованы по известной схеме, например, маршрутизатор Eltex ME 5000 (см. https://eltex-co.ru/catalog/provider_edge_router/marshrutizator_me5000).All modules can be implemented according to a well-known scheme, for example, the Eltex ME 5000 router (see https://eltex-co.ru/catalog/provider_edge_router/marshrutizator_me5000).

Новая совокупность существенных признаков позволяет достичь указанного технического результата за счет дополнительно введенных 1 до n модулей справедливого обслуживания пакетов с учетом метрики расстояния, при этом каждый модуль вероятностного взвешенного справедливого обслуживания очередей содержит планировщик GPS, генератор случайного числа, модуль расчета расстояния между альтернативными вариантами обслуживания пакетов, планировщик пакетов с учетом метрики расстояния.A new set of essential features makes it possible to achieve the specified technical result by additionally introducing 1 to n modules of fair packet servicing taking into account the distance metric, wherein each module of probabilistic weighted fair queue servicing contains a GPS scheduler, a random number generator, a module for calculating the distance between alternative packet servicing options, and a packet scheduler taking into account the distance metric.

Проведенный анализ уровня техники позволил установить, что аналоги, характеризующиеся совокупностью признаков, тождественных всем признакам заявленных способа справедливого обслуживания очередей с учетом метрики расстояния и устройство его реализующее, отсутствуют. Следовательно, каждое из заявленных изобретений соответствует условию патентоспособности «новизна».An analysis of the state of the art revealed that there are no comparable inventions with a set of features identical to all the features of the claimed method for fair queue management using distance metrics and the device implementing it. Consequently, each of the claimed inventions meets the patentability requirement of "novelty."

Результаты поиска известных решений в данной и смежных областях техники с целью выявления признаков, совпадающих с отличительными от прототипа признаками заявленного объекта, показали, что они не следуют явным образом из уровня техники. Из уровня техники также не выявлена известность влияния предусматриваемых существенными признаками заявленного изобретения преобразований на достижение указанного технического результата. Следовательно, каждое из заявленных изобретений соответствует условию патентоспособности «изобретательский уровень».A search of prior art in this and related fields of technology to identify features that match the distinctive features of the claimed invention revealed that these features are not clearly evident from the prior art. The prior art also failed to reveal any prior art knowledge of the impact of the transformations envisaged by the essential features of the claimed invention on achieving the stated technical result. Consequently, each of the claimed inventions meets the patentability requirement of "inventive step."

«Промышленная применимость» обусловлена наличием элементарной базы, на основе которой могут быть выполнены устройство и данный способ с достижением указанного в изобретении результата.“Industrial applicability” is determined by the presence of an elementary base on which the device and the given method can be made to achieve the result specified in the invention.

Для более понятной иллюстрации технических решений согласно вариантам осуществления настоящего изобретения ниже приведено краткое описание сопроводительных чертежей.To more clearly illustrate the technical solutions according to the embodiments of the present invention, a brief description of the accompanying drawings is given below.

На фиг. 1 - схема работы способа справедливого обслуживания очередей с учетом метрики расстояния (начало).Fig. 1 shows the operation diagram of the fair queue service method taking into account the distance metric (start).

На фиг. 2 - схема работы способа справедливого обслуживания очередей с учетом метрики расстояния (продолжение).Fig. 2 shows a diagram of the operation of the method of fair queue servicing taking into account the distance metric (continued).

На фиг. 3 - устройство справедливого обслуживания очередей с учетом метрики расстояния.Fig. 3 shows a device for fair queue service taking into account the distance metric.

На фиг. 4 - схема модуля справедливого обслуживания пакетов с учетом метрики расстояния.Fig. 4 shows a diagram of a fair packet service module taking into account the distance metric.

На фиг. 5 - принцип постановки пакетов в физическую/логическую очередь k класса.Fig. 5 shows the principle of placing packets in a physical/logical queue of class k.

На фиг. 6 - пример реализации двух очередей в модуле физических очередей и модуле виртуальных очередей.Fig. 6 shows an example of the implementation of two queues in the physical queue module and the virtual queue module.

На фиг. 7 - пример поступления пакета 1 класса в модуль физических очередей.Fig. 7 shows an example of a class 1 packet arriving at the physical queue module.

На фиг. 8 - пример поступления пакета 1 класса в модуль виртуальных очередей.Fig. 8 shows an example of a class 1 packet arriving at the virtual queue module.

Ниже будут полностью и четко описаны технические решения для вариантов осуществления настоящего изобретения со ссылками на сопроводительные чертежи. Должно быть, очевидно, что варианты осуществления, описанные ниже, являются только частью настоящего изобретения, а не всеми возможными вариантами осуществления настоящего изобретения. Все другие варианты осуществления, полученные специалистами в данной области техники на основе вариантов осуществления настоящего изобретения и не использующие творческий подход, попадают под объем охраны настоящего изобретения.Below, the technical solutions for embodiments of the present invention will be fully and clearly described with reference to the accompanying drawings. It should be obvious that the embodiments described below are only a part of the present invention, and not all possible embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention and not using a creative approach fall within the scope of protection of the present invention.

Реализация заявленного способа заключается в следующем (фиг. 1-2).The implementation of the claimed method is as follows (Fig. 1-2).

Первый этапThe first stage

101. Устанавливают для каждого выходного порта устройства общее количество очередей, максимальное количество пакетов в каждой очереди, пропускную способность, долю пропускной способности, выделенную для работы планировщиков с учетом метрики расстояния, вес для каждой очереди, параметры механизма случайного раннего обнаружения перегрузок RED для каждой очереди.101. Installed for each output port devices total number of queues, maximum number of packets in each queue, throughput, share of throughput allocated to schedulers taking into account the distance metric, weight for each queue, parameters of the random early congestion detection mechanism RED for each queue.

Второй этапThe second stage

102. Принимают потоки трафика данных на входные порты устройства.102. Receive data traffic streams to the input ports of the device.

103. Классифицируют потоки трафика данных на классы в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол (TCP, UDP и др.), списки доступа (Access List) и входной интерфейс (FastEthernet 10/100 Base-T, GigabitEthernet).103. Classify data traffic flows into classes according to the ToS Precedence field of the IP packet header, or according to the DSCP field of the IP packet header, the source IP address, the destination IP address, or according to parameters such as protocol (TCP, UDP, etc.), access lists (Access List), and input interface (FastEthernet 10/100 Base-T, GigabitEthernet).

104. Маршрутизируют потоки трафика данных на соответствующие выходные порты маршрутизатора на основании таблицы маршрутизации (Routing Table) и IP-адреса получателя, либо на основании таблицы продвижения (Forwarding Table) и метки MPLS.104. Route data traffic flows to the appropriate router output ports based on the Routing Table and the destination IP address, or based on the Forwarding Table and the MPLS label.

105. Помещают в физические очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол (TCP, UDP и др.), списки доступа (Access List) и входной интерфейс (FastEthernet 10/100 Base-T, GigabitEthernet), при этом пакет ставится в конец соответствующей очереди (фиг.5) при условии, что в этой очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется.105. Data traffic packets of the corresponding class are placed in physical queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol (TCP, UDP, etc.), access lists (Access List) and the input interface (FastEthernet 10/100 Base-T, GigabitEthernet), while the packet is placed at the end of the corresponding queue (Fig. 5) provided that there is free space in this queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in the event of overload detection, otherwise the packet is deleted.

106. Помещают в виртуальные очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол (TCP, UDP и др.), списки доступа (Access List) и входной интерфейс (FastEthernet 10/100 Base-T, GigabitEthernet), при этом пакет ставится в конец соответствующей виртуальной очереди (фиг.5) при условии, что в этой виртуальной очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется.106. Data traffic packets of the corresponding class are placed in virtual queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol (TCP, UDP, etc.), access lists (Access List) and the input interface (FastEthernet 10/100 Base-T, GigabitEthernet), and the packet is placed at the end of the corresponding virtual queue (Fig. 5) provided that there is free space in this virtual queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in the event of overload detection, otherwise the packet is deleted.

107. Проверяют текущее состояние выходного порта и виртуального выходного порта устройства, а также состояние планировщика GPS и планировщика пакетов с учетом метрики расстояния на предмет окончания обслуживания пакета выходным портом или виртуальным выходным портом в текущий момент времени.107. Check the current state of the output port and the virtual output port of the device, as well as the state of the GPS scheduler and the packet scheduler taking into account the distance metric for the end of packet servicing by the output port or the virtual output port at the current time.

108. Выбирают который расположен в начале активной виртуальной очереди, для обслуживания на очередном шаге.108. Select the one located at the beginning of the active virtual queue for servicing at the next step.

109. Передают пакет и вес соответствующей очереди в виртуальный выходной порт устройства.109. Transmit the packet and the weight of the corresponding queue to the virtual output port of the device.

110. Формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания.110. Form a vector of the number of packets standing in virtual queues at the current service step.

Например, настроены 3 очереди. В первой виртуальной очереди хранится 2 пакета, во второй виртуальной очереди 1 пакет, в третьей виртуальной очереди хранится 3 пакета. В этом случае вектор числа пакетов, стоящих в виртуальных очередях, равен .For example, three queues are configured. The first virtual queue stores two packets, the second virtual queue stores one packet, and the third virtual queue stores three packets. In this case, the vector of the number of packets in the virtual queues is .

111. Формируют вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания.111. Form a vector of the number of packets standing in physical queues at the current service step.

Например, настроены 3 очереди. В первой физической очереди хранится 2 пакета, во второй физической очереди 1 пакет, в третьей физической очереди хранится 3 пакета. В этом случае вектор числа пакетов, стоящих в физических очередях, равен . Стоит отметить, что вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания может не соответствовать вектору числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания.For example, three queues are configured. The first physical queue stores two packets, the second physical queue stores one packet, and the third physical queue stores three packets. In this case, the vector of the number of packets in the physical queues is It is worth noting that the vector of the number of packets standing in virtual queues at the current service step may not correspond to the vector of the number of packets standing in physical queues at the current service step.

112. Формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания. При этом число альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания равно числу активных очередей.112. A vector of alternative numbers of packets in physical queues at the next servicing step is formed. The number of alternative numbers of packets in physical queues at the next servicing step is equal to the number of active queues.

Например, для вышерассмотренных векторов вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания будет состоять из 3 векторов - , , .For example, for the above-considered vectors, the vector of alternative variants of the number of packets standing in physical queues at the next step of service will consist of 3 vectors - , , .

113. Рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания.113. Calculate the distance metric between each element of the vector of alternative options for the number of packets standing in physical queues at the next service step and the vector of the number of packets standing in virtual queues at the current service step.

В качестве метрики расстояния в заявляемом способе выбрана параметрическая метрика на евклидовом пространстве МинковскогоThe distance metric chosen in the claimed method is a parametric metric on the Minkowski Euclidean space.

, ,

где - вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания; - вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания; - параметр, который определяет тип метрики. Стоит отметить, что при - расстояние по Хэмингу, при - расстояние по Евклиду, а при - расстояние Чебышева.Where - vector of the number of packets standing in physical queues at the current service step; - a vector of alternative variants of the number of packets standing in physical queues at the next step of service; - a parameter that determines the type of metric. It is worth noting that when - Hemingway distance, at - the Euclidean distance, and when - Chebyshev distance.

114. Выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния.114. Select an element or elements from the vector of alternative options for the number of packets standing in physical queues at the next service step with the smallest distance metric.

Например, для каждого альтернативного варианта числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания (шаг 112) рассчитывают метрику расстояния с параметром (метрика Евклида). Получаем следующие значения: для вектора метрика , для вектора метрика , для вектора метрика . Следовательно, будут выбраны два альтернативных варианта и .For example, for each alternative number of packets standing in physical queues, at the next service step (step 112), a distance metric with the parameter is calculated (Euclidean metric). We obtain the following values: for the vector metrics , for vector metrics , for vector metrics Therefore, two alternative options will be chosen. And .

115. Разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния.115. The interval from 0 to 1 is divided into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next service step with the same distance metric.

Так как на шаге 114 для двух альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания метрика расстояния одинаковая, то разбивают интервал от 0 до 1 на два интервала: , .Since at step 114 for two alternative options for the number of packets standing in physical queues, at the next step of servicing the distance metric is the same, then the interval from 0 to 1 is divided into two intervals: , .

116. Генерируют случайное число, равномерно распределенное в интервале от 0 до 1.116. Generate a random number uniformly distributed between 0 and 1.

Пример, сгенерировали число 0.75.Example: generated number 0.75.

117. Выбирают номер диапазона, в который попало сгенерированное случайное число.117. Select the number of the range that contains the generated random number.

Пример. Так как было сгенерировано случайное число 0.75, то выбирают второй диапазон .Example: Since the random number 0.75 was generated, the second range is selected. .

118. Выбирают пакет, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния и с учетом выбранного номера диапазона.118. Select the packet that is located at the beginning of the corresponding physical queue for servicing at the next step with the smallest distance metric and taking into account the selected range number.

Пример, выбирают пакет из третьей очереди, который соответствует альтернативному варианту числу пакетов, стоящих в физических очередях, на очередном шаге обслуживания .For example, a packet is selected from the third queue, which corresponds to an alternative number of packets standing in physical queues at the next service step. .

119. Передают пакет из начала соответствующей физической очереди в выходной порт устройства.119. Transmit the packet from the beginning of the corresponding physical queue to the output port of the device.

Пример. Освобождается место в третьей очереди (свободное буферное пространство) в соответствии с длиной переданного пакета.Example: Space in the third queue (free buffer space) is freed up in accordance with the length of the transmitted packet.

Заявленный способ справедливого обслуживания очередей с учетом метрики расстояния позволяет достичь указанного технического результата - уменьшения размера буферного пространства, выделяемого для работы планировщика пакетов за счет того, что помещают в физические очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей очереди при условии, что в этой очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, помещают в виртуальные очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей виртуальной очереди при условии, что в этой виртуальной очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, проверяют текущее состояние выходного порта и виртуального выходного порта устройства, а также состояние планировщика GPS и планировщика пакетов с учетом метрики расстояния на предмет окончания обслуживания пакета выходным портом или виртуальным выходным портом в текущий момент времени, выбирают пакет, который расположен в начале активной виртуальной очереди, для обслуживания на очередном шаге, передают пакет и вес соответствующей очереди в виртуальный выходной порт устройства, формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, формируют вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания, формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания, рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния, разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния, генерируют случайное число, равномерно распределенное в интервале от 0 до 1, выбирают номер диапазона, в который попало сгенерированное случайное число, выбирают пакет, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния и с учетом выбранного номера диапазона, передают пакет из начала соответствующей физической очереди в выходной порт устройства.The claimed method of fair servicing of queues taking into account the distance metric makes it possible to achieve the specified technical result - a decrease in the size of the buffer space allocated for the operation of the packet scheduler due to the fact that data traffic packets of the corresponding class are placed in physical queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface, while the packet is placed at the end of the corresponding queue, provided that there is free space in this queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in the event of overload detection, otherwise the packet is deleted, data traffic packets of the corresponding class are placed in virtual queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface, while the packet is placed at the end of the corresponding virtual queue, provided that there is free space in this virtual queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in case of overload detection, otherwise the packet is deleted, the current state of the output port and the virtual output port of the device is checked, as well as the state of the GPS scheduler and the packet scheduler taking into account the distance metric for the end of servicing the packet by the output port or the virtual output port at the current moment in time, the packet located at the beginning of the active virtual queue is selected for servicing at the next step, the packet and the weight of the corresponding queue are transmitted to the virtual output port of the device, a vector of the number of packets standing in virtual queues is formed at the current servicing step, a vector of the number of packets standing in physical queues is formed at the current servicing step, a vector of alternative options for the number of packets standing in physical queues is formed at the next servicing step, the distance metric is calculated between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step, an element or elements are selected from a vector of alternative options for the number of packets standing in physical queues at the next service step with the smallest distance metric, the interval from 0 to 1 is divided into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next service step with the same distance metric, a random number is generated uniformly distributed in the interval from 0 to 1, the number of the range into which the generated random number falls is selected, the packet located at the beginning of the corresponding physical queue is selected for servicing at the next step with the smallest distance metric and taking into account the selected range number, the packet is transmitted from the beginning of the corresponding physical queue to the output port of the device.

Устройство справедливого обслуживания очередей с учетом метрики расстояния (фиг. 3) состоит из от 1 до n входных портов, классификатора 21, модуля маршрутизации 22, от 1 до n модулей физических очередей 23, от 1 до n модулей справедливого обслуживания пакетов с учетом метрики расстояния 24, от 1 до n выходных портов, при этом потоки трафика данных поступают на входные порты, затем с входных портов потоки трафика данных передаются на вход классификатора, выход классификатора соединен с входом модуля маршрутизации, с выхода модуля маршрутизации потоки трафика данных поступают на вход соответствующего модуля физических очередей, с выхода модуля физических очередей потоки трафика данных передаются в соответствующий модуль справедливого обслуживания пакетов с учетом метрики расстояния, с модуля справедливого обслуживания пакетов с учетом метрики расстояния потоки трафика данных поступают на выходные порты.The device for fair queuing with regard to the distance metric (Fig. 3) consists of from 1 to n input ports, a classifier 21, a routing module 22, from 1 to n physical queue modules 23, from 1 to n modules for fair servicing of packets with regard to the distance metric 24, from 1 to n output ports, wherein the data traffic flows arrive at the input ports, then from the input ports the data traffic flows are transmitted to the input of the classifier, the output of the classifier is connected to the input of the routing module, from the output of the routing module the data traffic flows arrive at the input of the corresponding physical queue module, from the output of the physical queue module the data traffic flows are transmitted to the corresponding module for fair servicing of packets with regard to the distance metric, from the module for fair servicing of packets with regard to the distance metric the data traffic flows arrive at the output ports.

Входные порты от 1 до n выполнены с возможностью приема потоков трафика данных.Input ports 1 to n are configured to receive data traffic streams.

Классификатор 21 выполнен с возможностью отнесения потоков трафика данных к классам в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс.The classifier 21 is configured to classify data traffic flows according to the ToS Precedence field of the IP packet header, or according to the DSCP field of the IP packet header, the source IP address, the destination IP address, or according to parameters such as protocol, access lists, and input interface.

Модуль маршрутизации 22, выполненный с возможностью продвижения пакета в выходной порт в соответствии с таблицей маршрутизации (Routing Table) и IP-адреса получателя, либо на основании таблицы продвижения (Forwarding Table) и метки MPLS.Routing module 22, configured to forward a packet to an output port in accordance with a routing table (Routing Table) and the recipient IP address, or based on a forwarding table (Forwarding Table) and an MPLS label.

Модули физических очередей 23 (от 1 до n) выполнены с возможностью помещения пакетов в конец очереди соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс; установки веса для каждой очереди; установки параметров механизма случайного раннего обнаружения перегрузок RED для каждой очереди.The physical queue modules 23 (from 1 to n) are configured to place packets at the end of the queue of the corresponding class in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with such parameters as protocol, access lists, and input interface; setting the weight for each queue; setting the parameters of the random early congestion detection mechanism RED for each queue.

Выходные порты от 1 до n выполнены с возможностью передачи потоков трафика данных в каналы связи.Output ports 1 to n are configured to transmit data traffic streams to communication channels.

Модули справедливого обслуживания пакетов с учетом метрики расстояния 24 (от 1 до n) выполненные с возможностью «справедливого распределения» пропускной способности выходного порта для пакетов переменной длины с учетом метрики расстояния.Distance-metric-based fair packet handling modules 24 (from 1 to n) designed to "fairly distribute" the output port bandwidth for variable-length packets based on the distance metric.

Каждый модуль справедливого обслуживания пакетов с учетом метрики расстояния 24 содержит модуль виртуальных очередей 24.1, планировщик GPS 24.2, планировщик пакетов с учетом метрики расстояния 24.3, генератор случайного числа 24.4, модуль расчета расстояния между альтернативными вариантами обслуживания пакетов 24.5 при этом все модули в устройстве соединены посредством общей внутренней шины AXI4, которая выступает в качестве средства обмена информацией между модулями.Each module of fair packet service taking into account the distance metric 24 contains a module of virtual queues 24.1, a GPS scheduler 24.2, a packet scheduler taking into account the distance metric 24.3, a random number generator 24.4, a module for calculating the distance between alternative packet service options 24.5, and all modules in the device are connected via a common internal AXI4 bus, which acts as a means of exchanging information between the modules.

Модуль виртуальных очередей 24.1 выполнен с возможностью помещения пакетов в конец виртуальной очереди, которая соответствует физической очереди соответствующего класса.The virtual queue module 24.1 is configured to place packets at the end of a virtual queue that corresponds to a physical queue of the corresponding class.

Планировщик GPS 24.2 выполнен с возможностью реализации в непрерывном времени принципа «справедливого распределения ресурсов» для пакетов переменной длины.The GPS 24.2 scheduler is designed to implement continuous-time "fair resource sharing" for variable-length packets.

Планировщик пакетов с учетом метрики расстояния 24.3 выполнен с возможностью реализации «справедливого распределения» пропускной способности выходного порта для пакетов переменной длины с учетом метрики расстояния и передачи пакета из начала соответствующей физической очереди в выходной порт устройстваThe 24.3 distance-based packet scheduler is designed to implement "fair distribution" of the output port bandwidth for variable-length packets based on the distance metric and to forward the packet from the beginning of the corresponding physical queue to the output port of the device.

Генератор случайного числа 24.4 выполнен с возможностью генерации случайного числа, равномерно распределенного в интервале от 0 до 1.The random number generator 24.4 is configured to generate a random number uniformly distributed in the range from 0 to 1.

Модуль расчета расстояния между альтернативными вариантами обслуживания пакетов 24.5 выполнен с возможностью формирования вектора числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания; формирования вектора числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания; формирования вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания; вычисления метрики расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания; выбора элемента или элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния; разбиения интервала от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния; выбора номера диапазона, в который попало сгенерированное случайное число.The module for calculating the distance between alternative options for servicing packets 24.5 is configured to form a vector of the number of packets standing in virtual queues at the current servicing step; to form a vector of the number of packets standing in physical queues at the current servicing step; to form a vector of alternative options for the number of packets standing in physical queues at the next servicing step; to calculate the distance metric between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step; to select an element or elements from the vector of alternative options for the number of packets standing in physical queues at the next servicing step with the smallest distance metric; to split the interval from 0 to 1 into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next servicing step with the same distance metric; to select the number of the range into which the generated random number falls.

Все модули могут быть реализованы по известной схеме, например, маршрутизатор Eltex ME 5000 (см. https://eltex-co.ru/catalog/provider_edge_router/marshrutizator_me5000).All modules can be implemented according to a well-known scheme, for example, the Eltex ME 5000 router (see https://eltex-co.ru/catalog/provider_edge_router/marshrutizator_me5000).

Устройство работает следующим образом.The device works as follows.

На первом этапе конфигурируют устройство справедливого обслуживания очередей с учетом метрики расстояния, а именно устанавливают для каждого выходного порта устройства общее количество очередей, максимальное количество пакетов в каждой очереди (модули 23, 24.1), пропускную способность, долю пропускной способности, выделенную для работы планировщиков с учетом метрики расстояния (модули 24.2, 24.3), вес для каждой очереди (модули 23, 24.1), параметры механизма случайного раннего обнаружения перегрузок RED для каждой очереди (модули 23, 24.1).At the first stage, the fair queueing device is configured taking into account the distance metric, namely, it is set for each output port devices total number of queues, maximum number of packets in each queue (modules 23, 24.1), throughput, share of throughput allocated for schedulers taking into account the distance metric (modules 24.2, 24.3), weight for each queue (modules 23, 24.1), parameters of the random early congestion detection mechanism RED for each queue (modules 23, 24.1).

На втором этапе принимают потоки приоритетного трафика данных на входные порты маршрутизатора и затем передают в классификатор. В классификаторе 21 классифицируют потоки трафика данных на классы в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол (TCP, UDP и др.), списки доступа (Access List) и входной интерфейс (FastEthernet 10/100 Base-T, GigabitEthernet). После классификатора 21 потоки трафика данных поступают в модуль маршрутизации, где осуществляется продвижение пакетов на соответствующие выходные порты устройства на основании таблицы маршрутизации (Routing Table) и IP-адреса получателя, либо на основании таблицы продвижения (Forwarding Table) и метки MPLS на соответствующий модуль физических очередей 23 и модуль виртуальных очередь 24.1. В модуле физических очередей 23 помещают в физические очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей очереди при условии, что в этой очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется. В модуле виртуальных очередь 24.1 помещают в виртуальные очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей виртуальной очереди при условии, что в этой виртуальной очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется.At the second stage, priority data traffic flows are received at the router's input ports and then transmitted to the classifier. In classifier 21, data traffic flows are classified into classes according to the ToS Precedence field of the IP packet header, or according to the DSCP field of the IP packet header, the source IP address, the destination IP address, or according to parameters such as protocol (TCP, UDP, etc.), access lists (Access List), and input interface (FastEthernet 10/100 Base-T, GigabitEthernet). After classifier 21, data traffic flows enter the routing module, where packets are forwarded to the corresponding output ports of the device based on the routing table (Routing Table) and the destination IP address, or based on the forwarding table (Forwarding Table) and the MPLS label to the corresponding physical queue module 23 and virtual queue module 24.1. In the physical queue module 23, data traffic packets of the corresponding class are placed into physical queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with parameters such as protocol, access lists, and input interface, and the packet is placed at the end of the corresponding queue, provided that there is free space in this queue (Drop Tail mechanism) and the RED mechanism does not discard the packet if congestion is detected, otherwise the packet is deleted. In the virtual queue module 24.1, data traffic packets of the corresponding class are placed into virtual queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with parameters such as protocol, access lists and input interface, and the packet is placed at the end of the corresponding virtual queue, provided that there is free space in this virtual queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in case of congestion detection, otherwise the packet is deleted.

В модуле справедливого обслуживания пакетов с учетом метрики расстояния 24 проверяют состояние виртуального выходного порта устройства, а также состояние планировщика GPS 24.2 на предмет окончания обслуживания пакета виртуальным выходным портом в текущий момент времени.In the fair packet service module, taking into account the distance metric 24, the state of the device's virtual output port is checked, as well as the state of the GPS scheduler 24.2, for the end of packet servicing by the virtual output port at the current time.

В модуле справедливого обслуживания пакетов с учетом метрики расстояния 24 проверяют состояние выходного порта устройства, а также состояние планировщика пакетов с учетом метрики расстояния 24.3 на предмет окончания обслуживания пакета выходным портом в текущий момент времени. В модуле планировщика GPS 24.2 выбирают пакет, который расположен в начале активной виртуальной очереди, для обслуживания на очередном шаге и передают данный пакет и вес соответствующей очереди в виртуальный выходной порт устройства. В модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания; вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания. После этого в модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания. Далее модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния и разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния. После этого генератор случайного числа 24.4 осуществляет генерацию случайного числа, равномерно распределенного в интервале от 0 до 1, и передает это значение в модуль расчета расстояния между альтернативными вариантами обслуживания 24.5. В модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 выбирают номер диапазона, в который попало сгенерированное случайное число, и передают эту информацию в планировщик пакетов с учетом метрики расстояния 24.3. В планировщике пакетов с учетом метрики расстояния 24.3 выбирают пакет, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния и с учетом выбранного номера диапазона, передают пакет из начала соответствующей физической очереди в выходной порт устройства.In the module for fair packet servicing taking into account the distance metric 24, the state of the device's output port is checked, as well as the state of the packet scheduler taking into account the distance metric 24.3 for the end of packet servicing by the output port at the current time. In the GPS scheduler module 24.2, a packet located at the beginning of the active virtual queue is selected for servicing at the next step and this packet and the weight of the corresponding queue are transmitted to the virtual output port of the device. In the module for calculating the distance between alternative servicing options 24.5, a vector of the number of packets standing in virtual queues at the current servicing step is formed; a vector of the number of packets standing in physical queues at the current servicing step. After this, in the module for calculating the distance between alternative servicing options 24.5, a vector of alternative options for the number of packets standing in physical queues is formed at the next servicing step and the distance metric is calculated between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step. Next, the distance calculation module 24.5 selects an element or elements from the vector of alternative options for the number of packets standing in physical queues at the next service step with the smallest distance metric and divides the interval from 0 to 1 into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next service step with the same distance metric. After this, the random number generator 24.4 generates a random number uniformly distributed in the interval from 0 to 1 and transmits this value to the distance calculation module 24.5. In the distance calculation module 24.5, the range number in which the generated random number falls is selected and this information is transmitted to the packet scheduler, taking into account the distance metric 24.3. In the packet scheduler, taking into account the distance metric 24.3, a packet is selected that is located at the beginning of the corresponding physical queue for servicing at the next step with the smallest distance metric and, taking into account the selected range number, the packet is transmitted from the beginning of the corresponding physical queue to the output port of the device.

Благодаря новой совокупности существенных признаков достигается указанный технический результат за счет дополнительно введенных от 1 до n модулей справедливого обслуживания пакетов с учетом метрики расстояния, выполненных с возможностью «справедливого распределения» пропускной способности выходного порта для пакетов переменной длины с учетом метрики расстояния, при этом каждый справедливого обслуживания пакетов с учетом метрики расстояния 24 содержит модуль виртуальных очередей 24.1, планировщик GPS 24.2, планировщик пакетов с учетом метрики расстояния 24.3, генератор случайного числа 24.4, модуль расчета расстояния между альтернативными вариантами обслуживания пакетов 24.5.Thanks to a new set of essential features, the specified technical result is achieved due to additionally introduced from 1 to n modules of fair packet servicing taking into account the distance metric, configured with the possibility of “fair distribution” of the throughput of the output port for packets of variable length taking into account the distance metric, wherein each fair packet servicing taking into account the distance metric 24 contains a virtual queue module 24.1, a GPS scheduler 24.2, a packet scheduler taking into account the distance metric 24.3, a random number generator 24.4, a module for calculating the distance between alternative packet servicing options 24.5.

Интерактивный процесс функционирования способа справедливого обслуживания очередей с учетом метрики расстояния и устройства его реализующегоInteractive process of operation of the method of fair queuing taking into account the distance metric and the device implementing it

На первом этапеAt the first stage

Для каждого выходного порта устройства в модуле физических очередей 23 и модуле виртуальных очередей 24.1 устанавливают количество очередей, равное 2, максимальное количество пакетов в очереди 1 класса - 4 пакета, максимальное количество пакетов в очереди 2 класса - 2 пакета (фиг. 6), вес очереди 1 класса - 0.7, вес очереди 2 класса - 0.3, параметры механизма RED для всех очередей следующие: - нижний порог длины очереди равен верхнему порогу длины очереди и равны длине очереди, т.е. для очереди 1 класса - 4 пакета, для очереди 2 класса - 2 пакета, - максимальное значение вероятности отбрасывания пакетов для области между и равно 0, т.е. отбрасывание пакетов происходит по причине отсутствия свободного места в очереди.; пропускную способность всех выходных портов FastEthernet 10/100 Base-T - 100 Мбит/с; долю пропускной способности, выделенную для работы планировщика GPS 24.2 и планировщика пакетов с учетом метрики расстояния с учетом метрики расстояния 24.3 - 0,95 (95 % от общей пропускной способности порта).For each output port the devices in the physical queue module 23 and the virtual queue module 24.1 set the number of queues to 2, the maximum number of packets in the class 1 queue is 4 packets, the maximum number of packets in the class 2 queue is 2 packets (Fig. 6), the weight of the class 1 queue is 0.7, the weight of the class 2 queue is 0.3, the parameters of the RED mechanism for all queues are as follows:- the lower threshold of the queue length is equal to the upper threshold of the queue length and is equal to the queue length, i.e. for a class 1 queue - 4 packets, for a class 2 queue - 2 packets,- the maximum value of packet drop probability for the area between And is equal to 0, i.e. packets are dropped due to the lack of free space in the queue; the throughput of all output ports FastEthernet 10/100 Base-T is 100 Mbps; the share of the throughput allocated to the GPS scheduler 24.2 and the packet scheduler taking into account the distance metric 24.3 is 0.95 (95% of the total throughput of the port).

На втором этапеAt the second stage

Принимают потоки трафика данных на входные порты FastEthernet 10/100 Base-T устройства. Далее в классификаторе 21 классифицируют потоки трафика данных на классы в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол (TCP, UDP и др.), списки доступа (Access List) и входной интерфейс (FastEthernet 10/100 Base-T). После этого в модуле маршрутизации 22 потоки трафика данных маршрутизируют на соответствующие выходные порты FastEthernet 10/100 Base-T на основании таблицы маршрутизации (Routing Table) и IP-адреса получателя, либо на основании таблицы продвижения (Forwarding Table) и метки MPLS на соответствующий модуль физических очередей 23 и модуль виртуальных очередь 24.1.Receive data traffic flows to the input ports of the FastEthernet 10/100 Base-T device. Then, in classifier 21, classify the data traffic flows into classes in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with such parameters as the protocol (TCP, UDP, etc.), access lists (Access List), and the input interface (FastEthernet 10/100 Base-T). After this, in routing module 22, the data traffic flows are routed to the corresponding output ports of FastEthernet 10/100 Base-T based on the routing table (Routing Table) and the destination IP address, or based on the forwarding table (Forwarding Table) and the MPLS label to the corresponding physical queue module 23 and virtual queue module 24.1.

Допустим, что на текущий момент в физической очереди 1 класса находится 2 пакета, а в физической очереди 2 класса находится 1 пакет. В модуль физических очередей 23 поступает пакет 1 класса. Так как в физической очереди 1 класса имеется свободное место, то пакет помещают в очередь. В итоге в физической очереди 1 класса стало 3 пакета, а в физической очереди 2 класса - остается 1 пакет (фиг. 7).Assume that there are currently two packets in the Class 1 physical queue, and one packet in the Class 2 physical queue. A Class 1 packet arrives at physical queue module 23. Since there is free space in the Class 1 physical queue, the packet is placed in the queue. As a result, there are three packets in the Class 1 physical queue, and one packet remains in the Class 2 physical queue (Fig. 7).

В модуле виртуальных очередь 24.1 на текущий момент в виртуальной очереди 1 класса находится 2 пакет, в виртуальной очереди 2 класса также находится 2 пакета. Соответственно при поступлении пакета 1 класса его помещают в виртуальную очередь 1 класса, т.к. имеется свободное место. В итоге в виртуальной очереди 1 класса стало 3 пакета, а в виртуальной очереди 2 класса - остается 2 пакета (фиг. 8).In virtual queue module 24.1, there is currently a second packet in the first-class virtual queue, and two packets in the second-class virtual queue. Accordingly, when a first-class packet arrives, it is placed in the first-class virtual queue because there is free space. As a result, there are three packets in the first-class virtual queue, and two packets remain in the second-class virtual queue (Fig. 8).

В модуле справедливого обслуживания пакетов с учетом метрики расстояния проверяют состояние виртуального выходного порта устройства, а также состояние планировщика GPS 24.2 на предмет окончания обслуживания пакета виртуальным выходным портом в текущий момент времени. В модуле справедливого обслуживания пакетов с учетом метрики расстояния 24 проверяют состояние выходного порта устройства, а также состояние планировщика пакетов с учетом метрики расстояния 24.3 на предмет окончания обслуживания пакета выходным портом в текущий момент времени. Допустим, что виртуальный выходной порт в текущий момент времени завершил обслуживание предыдущего пакета (т.е. обслужил последний бит данного пакета) из виртуальной очереди 1 класса.In the distance-based fair packet service module, the state of the device's virtual output port and the state of GPS scheduler 24.2 are checked to determine whether the virtual output port has currently finished servicing the packet. In the distance-based fair packet service module, the state of the device's output port and the state of GPS scheduler 24.3 are checked to determine whether the output port has currently finished servicing the packet. Assume that the virtual output port has currently completed servicing the previous packet (i.e., has serviced the last bit of this packet) from the Class 1 virtual queue.

Соответственно планировщик GPS 24.2 выбирает пакет, который расположен в начале активной виртуальной очереди 1 класса, для обслуживания на очередном шаге, передает обслуженный пакет и вес соответствующей очереди (0.3) в виртуальный выходной порт устройства.Accordingly, the GPS 24.2 scheduler selects a packet that is located at the beginning of the active virtual queue of class 1 for servicing at the next step, transmits the serviced packet and the weight of the corresponding queue (0.3) to the virtual output port of the device.

В модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания: в виртуальной очереди 1 класса находится 2 пакета, в виртуальной очереди 2 класса находится 2 пакета - ; формируют вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания в физической очереди 1 класса находится 3 пакета, а в физической очереди 2 класса находится 1 пакет - .In the module for calculating the distance between alternative service options 24.5, a vector of the number of packets standing in virtual queues is formed at the current service step: there are 2 packets in the virtual queue of class 1, there are 2 packets in the virtual queue of class 2 - ; form a vector of the number of packets standing in physical queues; at the current step of service, there are 3 packets in the physical queue of class 1, and 1 packet in the physical queue of class 2 - .

После этого в модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания: первый альтернативный вариант - , т.е. будет взят на обслуживание пакет из физической очереди 1 класса, второй альтернативный вариант - , т.е. будет взят на обслуживание пакет из физической очереди 2 класса.After this, in the module for calculating the distance between alternative service options 24.5, a vector of alternative options for the number of packets standing in physical queues is formed at the next service step: the first alternative option is , i.e. a packet from the physical queue of class 1 will be taken for servicing, the second alternative option is , i.e. a packet from the physical queue of class 2 will be taken for servicing.

Далее в модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания.Next, in the module for calculating the distance between alternative service options 24.5, the distance metric is calculated between each element of the vector of alternative options for the number of packets standing in physical queues at the next service step and the vector of the number of packets standing in virtual queues at the current service step.

В таблице 1 представлен результат расчета метрики расстояния Евклида для всех возможных комбинаций пакетов, находящихся в очередях 1 и 2 класса. Причем крайний левый столбец описывает количество пакетов в виртуальных очередях, а верхняя строка описывает количество пакетов в физических очередях.Table 1 presents the results of calculating the Euclidean distance metric for all possible combinations of packets in class 1 and 2 queues. The leftmost column describes the number of packets in virtual queues, and the top row describes the number of packets in physical queues.

После расчета метрики расстояния выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния. Для рассмотренного примера метрика расстояния Евклида для альтернативного варианта равна 1, а для альтернативного варианта равна 2,236. Так как 1<2.236, то соответственно выбирают альтернативный вариант числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания - .After calculating the distance metric, an element or elements from the vector of alternative options for the number of packets in physical queues are selected at the next service step with the smallest distance metric. For the example considered, the Euclidean distance metric for the alternative option is equal to 1, and for the alternative option is equal to 2.236. Since 1<2.236, then an alternative option for the number of packets standing in physical queues is chosen accordingly at the next step of service - .

Далее в модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния. В данном случае один интервал от 0 до 1.Next, in the 24.5-step distance calculation module, the interval from 0 to 1 is divided into a number of identical ranges equal to the number of selected elements from the vector of alternative packet counts in physical queues at the next service step with the same distance metric. In this case, one interval from 0 to 1.

Генератор случайного числа генерируют случайное число, равномерно распределенное в интервале от 0 до 1, и передает в модуль расчета расстояния между альтернативными вариантами обслуживания 24.5. Для рассмотренного генератор случайного числа сгенерировал случайное число - 0,536, соответственно, случая выбирают один интервал.The random number generator generates a random number uniformly distributed between 0 and 1 and transmits it to the module calculating the distance between alternative service options 24.5. For the considered example, the random number generator generated a random number of 0.536, so one interval is selected in each case.

Таким образом, с учетом наименьшей метрикой расстояния Евклида, равной 1, и выбранного диапазона - первый, в модуле расчета расстояния между альтернативными вариантами обслуживания 24.5 выбирают пакет, который расположен в начале физической очереди 1 класса, для обслуживания на очередном шаге. Эту информацию модуль расчета расстояния между альтернативными вариантами обслуживания 24.5 передает в планировщик пакетов с учетом метрики расстояния 24.3.Thus, given the smallest Euclidean distance metric of 1 and the selected range of first, the 24.5 alternative service option distance calculation module selects the packet located at the head of the Class 1 physical queue for servicing at the next hop. The 24.5 alternative service option distance calculation module then passes this information to the packet scheduler, taking into account the 24.3 distance metric.

Планировщик пакетов с учетом метрики расстояния 24.3 передает пакет, который расположен в начале физической очереди 1 класса, в выходной порт устройства.The packet scheduler, taking into account the distance metric 24.3, transmits a packet that is located at the beginning of the physical queue of class 1 to the output port of the device.

Приведем пример расчета размера буферного пространства для доказательства теоретических предпосылок. Например, в устройстве настроены 3 очереди и в каждую очередь возможно поместить по 20 пакетов. Соответственно, общее количество пакетов, которые будут храниться в очередях, составляет 60. Для работы планировщиков класса WFQ, аппроксимирующих GPS, необходимо хранить виртуальное время окончания обслуживания для каждого пакета. В сетевых операционных системах IOS и Linux для хранения виртуального времени выделяется 8 байт. Также для работы планировщиков класса WFQ, аппроксимирующих GPS, необходимо хранить номера пакетов, при этом номера являются целыми числами и в языке программирования Python целесообразно использовать тип данных uint8 (беззнаковое целое число в 1 байте: от 0 до 255), который требует 1 байт памяти. В итоге получается, что необходимый размер буферного пространства для данного примера равен 60⋅(8+1)=540 байт.Let's use an example of calculating the buffer space size to demonstrate the theoretical assumptions. For example, a device is configured with three queues, each capable of storing 20 packets. Consequently, the total number of packets to be stored in the queues is 60. WFQ-class schedulers, which approximate GPS, require storing the virtual end-of-service time for each packet. In iOS and Linux network operating systems, 8 bytes are allocated for storing virtual time. WFQ-class schedulers, which approximate GPS, also require storing packet numbers. These numbers are integers, and in the Python programming language, it is advisable to use the uint8 data type (an unsigned integer in 1 byte: from 0 to 255), which requires 1 byte of memory. Therefore, the required buffer space size for this example is 60⋅(8+1)=540 bytes.

Для заявляемого способа справедливого обслуживания очередей с учетом метрики расстояния и устройства его реализующее необходимо хранить количество пакетов в текущий момент времени, которые находятся в физической и в виртуальной очередях. Поскольку в устройстве настроены 3 очереди и в каждую очередь возможно поместить по 20 пакетов, то необходимо 5 бит (25=32) буферного пространства для хранения информации о 20 пакетах. Минимальная ячейка памяти в современном сетевом оборудовании равна 1 байту, следовательно, выделяется 1 байт буферного пространства (28=256) для хранения информации о количестве пакетов в очереди. Ввиду того, что в заявляемом способе и устройстве предлагается хранить пакеты в модуле физических очередей и в модуле виртуальных очередей, то получается 1 байт умножаем на 6 очередей (3 физических очереди и 3 виртуальных очереди) равно 6 байт буферного пространства необходимо.The proposed method for fair queue servicing, taking into account the distance metric, and the device implementing it requires storing the current number of packets in the physical and virtual queues. Since the device is configured with three queues, and each queue can hold 20 packets, 5 bits (2 × 5 = 32) of buffer space are required to store information about 20 packets. The minimum memory cell in modern network equipment is 1 byte, therefore, 1 byte of buffer space (2 × 8 = 256) is allocated to store information about the number of packets in the queue. Since the proposed method and device propose storing packets in both the physical and virtual queue modules, 1 byte multiplied by 6 queues (3 physical queues and 3 virtual queues) equals 6 bytes of buffer space.

Таким образом, на простом примере, когда в устройстве настроены 3 очереди и в каждую очередь возможно поместить по 20 пакетов, получается для прототипа необходимо 540 байт буферного пространства, а для заявляемого способа справедливого обслуживания очередей с учетом метрики расстояния и устройства его реализующее - 6 байт. Стоит отметить, что с увеличением количества очередей и количества пакетов в очередях выигрыш размера буферного пространства будет увеличиваться.Thus, using a simple example where the device is configured with three queues and each queue can accommodate 20 packets, the prototype requires 540 bytes of buffer space, while the proposed method for fair queue servicing, taking into account the distance metric and the device implementing it, requires 6 bytes. It's worth noting that the buffer space savings will increase as the number of queues and the number of packets in the queues increases.

Заявленные способ справедливого обслуживания очередей с учетом метрики расстояния и устройство его реализующее обеспечивают уменьшение размера буферного пространства, выделяемого для работы планировщика пакетов за счет того, что помещают в физические очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей очереди при условии, что в этой очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, помещают в виртуальные очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей виртуальной очереди при условии, что в этой виртуальной очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, проверяют текущее состояние выходного порта и виртуального выходного порта устройства, а также состояние планировщика GPS и планировщика пакетов с учетом метрики расстояния на предмет окончания обслуживания пакета выходным портом или виртуальным выходным портом в текущий момент времени, выбирают пакет, который расположен в начале активной виртуальной очереди, для обслуживания на очередном шаге, передают пакет и вес соответствующей очереди в виртуальный выходной порт устройства, формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, формируют вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания, формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания, рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния, разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния, генерируют случайное число, равномерно распределенное в интервале от 0 до 1, выбирают номер диапазона, в который попало сгенерированное случайное число, выбирают пакет, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния и с учетом выбранного номера диапазона, передают пакет из начала соответствующей физической очереди в выходной порт устройства.The claimed method of fair queuing taking into account the distance metric and the device implementing it ensure a reduction in the size of the buffer space allocated for the operation of the packet scheduler due to the fact that data traffic packets of the corresponding class are placed in physical queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface, while the packet is placed at the end of the corresponding queue, provided that there is free space in this queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in the event of overload detection, otherwise the packet is deleted, data traffic packets of the corresponding class are placed in virtual queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with such parameters as the protocol, access lists and the input interface, while the packet is placed at the end of the corresponding virtual queue, provided that there is free space in this virtual queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in case of overload detection, otherwise the packet is deleted, the current state of the output port and the virtual output port of the device is checked, as well as the state of the GPS scheduler and the packet scheduler taking into account the distance metric for the end of servicing the packet by the output port or the virtual output port at the current moment in time, the packet located at the beginning of the active virtual queue is selected for servicing at the next step, the packet and the weight of the corresponding queue are transmitted to the virtual output port of the device, a vector of the number of packets standing in virtual queues is formed at the current servicing step, a vector of the number of packets standing in physical queues is formed at the current servicing step, a vector of alternative options for the number of packets standing in physical queues is formed at the next servicing step, the distance metric is calculated between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step, an element or elements are selected from a vector of alternative options for the number of packets standing in physical queues at the next service step with the smallest distance metric, the interval from 0 to 1 is divided into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next service step with the same distance metric, a random number is generated uniformly distributed in the interval from 0 to 1, the number of the range into which the generated random number falls is selected, the packet located at the beginning of the corresponding physical queue is selected for servicing at the next step with the smallest distance metric and taking into account the selected range number, the packet is transmitted from the beginning of the corresponding physical queue to the output port of the device.

Claims (3)

1. Способ справедливого обслуживания очередей с учетом метрики расстояния, заключающийся в том, что на первом этапе устанавливают для каждого выходного порта устройства общее количество очередей, максимальное количество пакетов в каждой очереди, пропускную способность, долю пропускной способности, выделенную для работы планировщиков с учетом метрики расстояния, вес для каждой очереди, параметры механизма случайного раннего обнаружения перегрузок RED для каждой очереди, на втором этапе принимают потоки трафика данных на входные порты устройства, классифицируют потоки трафика данных на классы в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии с такими параметрами, как протокол, списки доступа и входной интерфейс, маршрутизируют потоки трафика данных на соответствующие выходные порты маршрутизатора на основании таблицы маршрутизации и IP-адреса получателя либо на основании таблицы продвижения и метки MPLS, помещают в физические очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии с такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей очереди при условии, что в этой очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, помещают в виртуальные очереди пакеты трафика данных соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии с такими параметрами, как протокол, списки доступа и входной интерфейс, при этом пакет ставится в конец соответствующей виртуальной очереди при условии, что в этой виртуальной очереди имеется свободное место (механизм Drop Tail) и механизм RED не отбрасывает пакет в случае обнаружения перегрузки, иначе пакет удаляется, проверяют текущее состояние выходного порта и виртуального выходного порта устройства, а также состояние планировщика GPS и планировщика пакетов с учетом метрики расстояния на предмет окончания обслуживания пакета выходным портом или виртуальным выходным портом в текущий момент времени, выбирают пакет, который расположен в начале активной виртуальной очереди, для обслуживания на очередном шаге, передают пакет и вес соответствующей очереди в виртуальный выходной порт устройства, формируют вектор числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, формируют вектор числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания, формируют вектор альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания, рассчитывают метрику расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания, выбирают элемент или элементы из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния, разбивают интервал от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния, генерируют случайное число, равномерно распределенное в интервале от 0 до 1, выбирают номер диапазона, в который попало сгенерированное случайное число, выбирают пакет, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния и с учетом выбранного номера диапазона, передают пакет из начала соответствующей физической очереди в выходной порт устройства. 1. A method for fair queuing with respect to the distance metric, which consists in the following: at the first stage, the total number of queues, the maximum number of packets in each queue, the bandwidth, the share of the bandwidth allocated for the operation of schedulers with respect to the distance metric, the weight for each queue, the parameters of the random early congestion detection mechanism RED for each queue are set for each output port of the device; at the second stage, data traffic flows are received at the input ports of the device, the data traffic flows are classified into classes in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with parameters such as the protocol, access lists and the input interface are routed to the corresponding output ports of the router based on the routing table and the destination IP address, or based on the forwarding table and the MPLS label, the data traffic packets of the corresponding class are placed into physical queues in accordance with the ToS Precedence field of the header IP packet, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with parameters such as protocol, access lists and input interface, while the packet is placed at the end of the corresponding queue, provided that there is free space in this queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in case of detecting congestion, otherwise the packet is removed, data traffic packets of the corresponding class are placed in virtual queues in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the source IP address, the destination IP address, or in accordance with parameters such as protocol, access lists and input interface, while the packet is placed at the end of the corresponding virtual queue, provided that there is free space in this virtual queue (Drop Tail mechanism) and the RED mechanism does not discard the packet in case of detecting congestion, otherwise the packet is removed, the current state of the output port and the virtual output port of the device is checked, and also the state of the GPS scheduler and the packet scheduler taking into account the distance metric for the end of servicing the packet by the output port or virtual output port at the current time, selecting a packet that is located at the beginning of the active virtual queue for servicing at the next step, transmitting the packet and the weight of the corresponding queue to the virtual output port of the device, forming a vector of the number of packets standing in virtual queues at the current servicing step, forming a vector of the number of packets standing in physical queues at the current servicing step, forming a vector of alternative options for the number of packets standing in physical queues at the next servicing step, calculating the distance metric between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step, selecting an element or elements from the vector of alternative options for the number of packets standing in physical queues at the next servicing step with the smallest distance metric, dividing the interval from 0 to 1 into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets, standing in physical queues, at the next step of service with the same distance metric, generate a random number uniformly distributed in the interval from 0 to 1, select the range number in which the generated random number falls, select a packet that is located at the beginning of the corresponding physical queue, for service at the next step with the smallest distance metric and, taking into account the selected range number, transmit the packet from the beginning of the corresponding physical queue to the output port of the device. 2. Устройство справедливого обслуживания очередей с учетом метрики расстояния, содержащее от 1 до n входных портов для приема потоков трафика данных, классификатор, выполненный с возможностью отнесения потоков трафика данных к классам в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии с такими параметрами, как протокол, списки доступа и входной интерфейс, модуль маршрутизации, выполненный с возможностью продвижения пакета в выходной порт в соответствии с таблицей маршрутизации и IP-адреса получателя, либо на основании таблицы продвижения и метки MPLS, от 1 до n модулей физических очередей для помещения пакетов в очередь соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии с такими параметрами, как протокол, списки доступа и входной интерфейс; установки веса для каждой очереди; установки параметров механизма случайного раннего обнаружения перегрузок RED для каждой очереди, от 1 до n выходных портов для передачи потоков трафика данных в канал связи, отличающееся тем, что дополнительно включены от 1 до n модулей справедливого обслуживания пакетов с учетом метрики расстояния, выполненных с возможностью «справедливого распределения» пропускной способности выходного порта для пакетов переменной длины с учетом метрики расстояния, причем потоки трафика данных поступают на входные порты, затем с входных портов потоки трафика данных передаются на вход классификатора, выход классификатора соединен с входом модуля маршрутизации, с выхода модуля маршрутизации потоки трафика данных поступают на вход модуля физических очередей для помещения пакетов в очередь соответствующего класса в соответствии с полем ToS Precedence заголовка IP-пакета, либо в соответствии с полем DSCP заголовка IP-пакета, IP-адресом отправителя, IP-адресом получателя, либо в соответствии с такими параметрами, как протокол, списки доступа и входной интерфейс, с модуля справедливого обслуживания пакетов с учетом метрики расстояния потоки трафика данных поступают на выходные порты.2. A distance-based fair queuing device comprising 1 to n input ports for receiving data traffic flows, a classifier configured to classify data traffic flows according to a ToS Precedence field of an IP packet header, or according to a DSCP field of an IP packet header, a source IP address, a destination IP address, or according to parameters such as a protocol, access lists, and an input interface, a routing module configured to forward a packet to an output port according to a routing table and a destination IP address, or based on a forwarding table and an MPLS label, 1 to n physical queuing modules for placing packets in a queue of the corresponding class according to a ToS Precedence field of an IP packet header, or according to a DSCP field of an IP packet header, a source IP address, a destination IP address, or according to parameters such as a protocol, access lists, and an input interface; setting a weight for each queue; setting the parameters of the random early congestion detection mechanism RED for each queue, from 1 to n output ports for transmitting data traffic flows into the communication channel, characterized in that from 1 to n distance metric fair packet service modules are additionally included, configured to "fairly distribute" the output port throughput for variable-length packets taking into account the distance metric, wherein the data traffic flows are received at the input ports, then from the input ports the data traffic flows are transmitted to the input of the classifier, the output of the classifier is connected to the input of the routing module, from the output of the routing module the data traffic flows are received at the input of the physical queuing module for placing packets into a queue of the corresponding class in accordance with the ToS Precedence field of the IP packet header, or in accordance with the DSCP field of the IP packet header, the sender IP address, the recipient IP address, or in accordance with parameters such as the protocol, access lists and the input interface, from the distance metric fair packet service module the data traffic flows are received at the output ports. 3. Устройство по п. 2, в котором модуль справедливого обслуживания пакетов с учетом метрики расстояния содержит модуль виртуальных очередей, выполненный с возможностью помещения пакетов в виртуальную очередь, которая соответствует физической очереди соответствующего класса, планировщик GPS, выполненный с возможностью реализации в непрерывном времени принципа «справедливого распределения ресурсов» для пакетов переменной длины, генератор случайного числа, выполненный с возможностью генерации случайного числа, равномерно распределенного в интервале от 0 до 1, модуль расчета расстояния между альтернативными вариантами обслуживания пакетов, выполненный с возможностью формирования вектора числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания; формирования вектора числа пакетов, стоящих в физических очередях, на текущем шаге обслуживания; формирования вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания; вычисления метрики расстояния между каждым элементом вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания и вектором числа пакетов, стоящих в виртуальных очередях, на текущем шаге обслуживания; выбора элемента или элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с наименьшей метрикой расстояния; разбиения интервала от 0 до 1 на количество одинаковых диапазонов, равное числу выбранных элементов из вектора альтернативных вариантов числа пакетов, стоящих в физических очередях, на очередном шаге обслуживания с одинаковой метрикой расстояния; выбора номера диапазона, в который попало сгенерированное случайное число, планировщик пакетов с учетом метрики расстояния, выполненный с возможностью выбора пакета, который расположен в начале соответствующей физической очереди, для обслуживания на очередном шаге с наименьшей метрикой расстояния с учетом выбранного номера диапазона; передачи пакета в выходной порт с реализацией принципа «справедливого обслуживания» очередей с учетом метрики расстояния, при этом все модули в устройстве соединены посредством общей внутренней шины AXI4, которая выступает в качестве средства обмена информацией между модулями.3. The device according to claim 2, in which the module for fair packet servicing taking into account the distance metric comprises a virtual queuing module configured to place packets in a virtual queue that corresponds to a physical queue of the corresponding class, a GPS scheduler configured to implement in continuous time the principle of "fair distribution of resources" for packets of variable length, a random number generator configured to generate a random number uniformly distributed in the interval from 0 to 1, a module for calculating the distance between alternative packet servicing options, configured to generate a vector of the number of packets standing in virtual queues at the current servicing step; generating a vector of the number of packets standing in physical queues at the current servicing step; generating a vector of alternative options for the number of packets standing in physical queues at the next servicing step; calculating the distance metric between each element of the vector of alternative options for the number of packets standing in physical queues at the next servicing step and the vector of the number of packets standing in virtual queues at the current servicing step; selecting an element or elements from a vector of alternative options for the number of packets standing in physical queues at the next servicing step with the smallest distance metric; dividing the interval from 0 to 1 into a number of identical ranges equal to the number of selected elements from the vector of alternative options for the number of packets standing in physical queues at the next servicing step with the same distance metric; selecting the number of the range into which the generated random number falls, a packet scheduler taking into account the distance metric, configured to select a packet that is located at the beginning of the corresponding physical queue for servicing at the next step with the smallest distance metric, taking into account the selected range number; transmitting the packet to the output port with the implementation of the principle of "fair servicing" of queues taking into account the distance metric, wherein all modules in the device are connected via a common internal AXI4 bus, which acts as a means of exchanging information between the modules.
RU2025100753A 2025-01-17 Method for fair queue management taking into account distance metrics and a device for implementing it RU2849161C1 (en)

Publications (1)

Publication Number Publication Date
RU2849161C1 true RU2849161C1 (en) 2025-10-23

Family

ID=

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461159B2 (en) * 1999-12-08 2008-12-02 Beckett Mining Llc Weighted fair queuing scheduler
US8638664B2 (en) * 2002-03-15 2014-01-28 Broadcom Corporation Shared weighted fair queuing (WFQ) shaper
US10291540B2 (en) * 2014-11-14 2019-05-14 Cavium, Llc Method and apparatus for performing a weighted queue scheduling using a set of fairness factors
RU2777035C1 (en) * 2022-01-21 2022-08-01 Федеральное государственное казенное военное образовательное учреждение высшего образования Академия Федеральной службы охраны Российской Федерации Method for probabilistic weighted fair queue maintenance and a device implementing it

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7461159B2 (en) * 1999-12-08 2008-12-02 Beckett Mining Llc Weighted fair queuing scheduler
US8638664B2 (en) * 2002-03-15 2014-01-28 Broadcom Corporation Shared weighted fair queuing (WFQ) shaper
US10291540B2 (en) * 2014-11-14 2019-05-14 Cavium, Llc Method and apparatus for performing a weighted queue scheduling using a set of fairness factors
RU2777035C1 (en) * 2022-01-21 2022-08-01 Федеральное государственное казенное военное образовательное учреждение высшего образования Академия Федеральной службы охраны Российской Федерации Method for probabilistic weighted fair queue maintenance and a device implementing it

Similar Documents

Publication Publication Date Title
US7016366B2 (en) Packet switch that converts variable length packets to fixed length packets and uses fewer QOS categories in the input queues that in the outout queues
KR100323258B1 (en) Rate guarantees through buffer management
US8064344B2 (en) Flow-based queuing of network traffic
JP4605911B2 (en) Packet transmission device
US6188698B1 (en) Multiple-criteria queueing and transmission scheduling system for multimedia networks
US11784925B2 (en) Combined input and output queue for packet forwarding in network devices
US7619969B2 (en) Hardware self-sorting scheduling queue
US9197570B2 (en) Congestion control in packet switches
US10623329B2 (en) Queuing system to predict packet lifetime in a computing device
AU2002339349B2 (en) Distributed transmission of traffic flows in communication networks
HUP0203928A2 (en) Method and system for controlling transmission of packets in computer networks
RU2849161C1 (en) Method for fair queue management taking into account distance metrics and a device for implementing it
Astuti Packet handling
Asaduzzaman et al. The eight class of service model-an improvement over the five classes of service
US20240385876A1 (en) Self-clocked round robin scheduler
Tong et al. Quantum varying deficit round robin scheduling over priority queues
Rahouti et al. QoSP: A priority-based queueing mechanism in software-defined networking environments
RU2777035C1 (en) Method for probabilistic weighted fair queue maintenance and a device implementing it
RU2776658C1 (en) Method for probabilistic priority queue maintenance and a device implementing it
Dwekat et al. A practical fair queuing scheduler: Simplification through quantization
WO2024187376A1 (en) Network device for packet switching in accordance with a bounded end-to-end delay, and method of operating the same
JP2003333087A (en) Band control method and band control device
Fu A study on differentiated service queuing scheme with an overflow buffer allocation within a UMTS core network
Smiljanić et al. Fair packet dropping
Kithinji et al. A Survey of Packets Scheduling Congestion Control Algorithms in Internet Protocol Storage Area Networks