Traffic forwarding method and device, electronic device and storage medium

By receiving and processing bandwidth limit configuration information on the cloud computing platform, creating priority queues to allocate traffic priority, it solves the problem of large traffic occupying bandwidth, ensures the smooth transmission of high-priority traffic, and improves the real-time performance of the cloud computing platform. and efficiency.

CN113630339BActive Publication Date: 2024-09-10ANCHAO CLOUD SOFTWARE CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
CN202110892078.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-04
Publication Date
2024-09-10
Estimated Expiration
2041-08-04

AI Technical Summary

Technical Problem

Existing cloud computing service providers cannot effectively support traffic priority, resulting in large traffic downloads occupying bandwidth and making small traffic requests with high real-time requirements inaccessible.

Method used

By receiving the bandwidth limit configuration information issued by the SDN controller, a tap interface and an ifb interface are created, and network traffic is forwarded to the corresponding priority queue based on priority rules to achieve traffic priority allocation and bandwidth limitation.

Benefits of technology

It realizes the allocation of traffic priority according to business importance, ensures that high-priority traffic is forwarded first, avoids small traffic requests from being blocked, and improves the quality and efficiency of the cloud computing platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113630339B
    Figure CN113630339B
Patent Text Reader

Abstract

The present invention discloses a traffic forwarding method and device, an electronic device and a storage medium, the traffic forwarding method comprising: receiving bandwidth restriction configuration information sent by an SDN controller, the bandwidth restriction configuration information comprising an uplink priority rule and a downlink priority rule; creating an ifb interface corresponding to a tap interface, the ifb interface being used to receive the egress traffic forwarded by the tap interface; creating at least two ingress priority queues in the tap interface, and creating at least two egress priority queues in the ifb interface; and forwarding the ingress traffic to the corresponding ingress priority queue based on the downlink priority rule, and forwarding the egress traffic to the corresponding egress priority queue based on the uplink priority rule. The traffic forwarding method can assign corresponding priorities to network traffic according to the importance of the business, and forward network traffic in priority order, thereby improving the quality of the cloud computing platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a flow forwarding method and device, electronic equipment and storage medium. Background Art

[0002] In the actual environment, the user's network traffic usually does not have priority parameters, and the importance of users' business is different. To implement bandwidth limitation that supports traffic priority, it is first necessary to support setting the priority of network traffic for different businesses. At present, the bandwidth limitation function of major cloud computing service providers only provides bandwidth limitation function that does not support traffic priority. As a result, in the mixed scene of large and small traffic, large traffic downloads with low real-time requirements almost occupy all the bandwidth, while small traffic requests with high real-time requirements cannot be accessed.

[0003] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention

[0004] The purpose of the present invention is to provide a traffic forwarding method and device, an electronic device and a storage medium, which can assign corresponding priorities to network traffic according to the importance of the business, and forward the network traffic in order of priority, thereby improving the quality of the cloud computing platform.

[0005] To achieve the above objective, an embodiment of the present invention provides a traffic forwarding method.

[0006] In one or more embodiments of the present invention, the traffic forwarding method includes the following steps: receiving bandwidth limitation configuration information sent by an SDN controller, the bandwidth limitation configuration information including an upstream priority rule and a downstream priority rule; creating an ifb interface corresponding to the tap interface, the ifb interface being used to receive the egress traffic forwarded by the tap interface; creating at least two ingress priority queues in the tap interface, and creating at least two egress priority queues in the ifb interface; forwarding the ingress network traffic to the corresponding ingress priority queue based on the downstream priority rule, and forwarding the egress network traffic to the corresponding egress priority queue based on the upstream priority rule.

[0007] In one or more embodiments of the present invention, forwarding the ingress network traffic to the corresponding ingress priority queue based on the downstream priority rule specifically includes: creating an ingress network traffic filter corresponding to the at least two ingress priority queues in the tap interface, and using the ingress network traffic filter to forward the ingress network traffic to the corresponding ingress priority queue, wherein the filtering rule of the ingress network traffic filter includes the downstream priority rule.

[0008] In one or more embodiments of the present invention, forwarding the egress network traffic to the corresponding egress priority queue based on the uplink priority rule specifically includes: creating an egress network traffic filter corresponding to the at least two egress priority queues in the ifb interface, and using the egress network traffic filter to forward the egress network traffic to the corresponding egress priority queue, wherein the filtering rule of the egress network traffic filter includes the uplink priority rule.

[0009] In one or more embodiments of the present invention, the bandwidth limitation configuration information also includes an uplink bandwidth limitation value and a downlink bandwidth limitation value; the method also includes: creating an ingress speed limit queue and a corresponding ingress speed limit classification on the tap interface, and configuring the ingress speed limit queue based on the downlink bandwidth limitation value; creating an egress speed limit queue and a corresponding egress speed limit classification on the ifb interface, and configuring the egress speed limit queue based on the uplink bandwidth limitation value.

[0010] In one or more embodiments of the present invention, the at least two ingress priority queues are created between the ingress rate limiting queue and the ingress network traffic filter, and the at least two egress priority queues are created between the egress rate limiting queue and the egress network traffic filter.

[0011] In one or more implementations of the present invention, the uplink priority rule and the downlink priority rule include: source IP, destination IP, protocol, source port, destination port and priority level.

[0012] In one or more embodiments of the present invention, the ingress priority queue and the egress priority queue are PRIO queues.

[0013] In one or more implementations of the present invention, the ingress rate limit queue and the egress rate limit queue are HTB queues, and the ingress rate limit category and the egress rate limit category are HTB root categories.

[0014] In another aspect of the present invention, a traffic forwarding device is provided, which includes a receiving module, a creating module and a forwarding module.

[0015] The receiving module is used to receive bandwidth limitation configuration information sent by the SDN controller, where the bandwidth limitation configuration information includes an uplink priority rule and a downlink priority rule.

[0016] The creation module is used to create an ifb interface corresponding to the tap interface, and the ifb interface is used to receive the egress traffic forwarded by the tap interface; create at least two ingress priority queues in the tap interface, and create at least two egress priority queues in the ifb interface.

[0017] The forwarding module is used to forward the ingress traffic to the corresponding ingress priority queue based on the downlink priority rule, and to forward the egress traffic to the at least two egress priority queues based on the uplink priority rule.

[0018] In one or more embodiments of the present invention, the forwarding module is also used to: create an ingress network traffic filter corresponding to the at least two ingress priority queues in the tap interface, and use the ingress network traffic filter to forward the ingress network traffic to the corresponding ingress priority queues, wherein the filtering rules of the ingress network traffic filter include the downstream priority rules.

[0019] In one or more embodiments of the present invention, the forwarding module is also used to: create an egress network traffic filter corresponding to the at least two egress priority queues in the ifb interface, and use the egress network traffic filter to forward the egress network traffic to the corresponding egress priority queues, wherein the filtering rules of the egress network traffic filter include the upstream priority rules.

[0020] In one or more embodiments of the present invention, the bandwidth limitation configuration information also includes an uplink bandwidth limitation value and a downlink bandwidth limitation value; the creation module is also used to: create an ingress speed limit queue and a corresponding ingress speed limit classification on the tap interface, and configure the ingress speed limit queue based on the downlink bandwidth limitation value; create an egress speed limit queue and a corresponding egress speed limit classification on the ifb interface, and configure the egress speed limit queue based on the uplink bandwidth limitation value.

[0021] In one or more embodiments of the present invention, the creation module is also used for: the at least two ingress priority queues are created between the ingress rate limiting queue and the ingress network traffic filter, and the at least two egress priority queues are created between the egress rate limiting queue and the egress network traffic filter.

[0022] In one or more implementations of the present invention, the uplink priority rule and the downlink priority rule include: source IP, destination IP, protocol, source port, destination port and priority level.

[0023] In one or more embodiments of the present invention, the ingress priority queue and the egress priority queue are PRIO queues.

[0024] In one or more implementations of the present invention, the ingress rate limit queue and the egress rate limit queue are HTB queues, and the ingress rate limit category and the egress rate limit category are HTB root categories.

[0025] In another aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory, wherein the memory stores instructions, and when the instructions are executed by the at least one processor, the at least one processor executes the traffic forwarding method as described above.

[0026] In another aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the traffic forwarding method as described above are implemented.

[0027] Compared with the prior art, the traffic forwarding method and device, electronic device and storage medium according to the embodiments of the present invention can assign corresponding priorities to different network traffic according to preset configuration information, and forward them to corresponding priority queues. After the network traffic of the high-priority queue is forwarded, the network traffic of the low-priority queue is forwarded. After the network bandwidth traffic reaches the bandwidth limit value, the high-priority network traffic can be forwarded first, the configuration of traffic priority and bandwidth limitation can be realized, and the bandwidth limitation between virtual machines on the same computing node can be realized, thereby improving efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 is a schematic diagram of a traffic forwarding method according to an embodiment of the present invention;

[0029] Figure 2 is a structural diagram of an SDN system according to an embodiment of the present invention;

[0030] Figure 3 is a structural diagram of a computing node according to an embodiment of the present invention;

[0031] Figure 4 is a structural diagram of a tap interface according to an embodiment of the present invention;

[0032] Figure 5 is a structural diagram of a traffic forwarding device according to an embodiment of the present invention;

[0033] Figure 6 It is a hardware structure diagram of a traffic forwarding computing device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] The specific implementation modes of the present invention are described in detail below in conjunction with the accompanying drawings, but it should be understood that the protection scope of the present invention is not limited by the specific implementation modes.

[0035] Unless explicitly stated otherwise, throughout the specification and claims, the term “comprise” or variations such as “include” or “comprising”, etc., will be understood to include the stated elements or components but not to exclude other elements or components.

[0036] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0037] Example 1

[0038] like Figures 1 to 3 As shown, a traffic forwarding method in an embodiment of the present invention is introduced, and the method includes the following steps.

[0039] In step S101, bandwidth limitation configuration information sent by an SDN controller is received.

[0040] In a LAN environment, bandwidth resources are limited. In order to ensure that the server can respond to the terminal's request in a timely manner, it is necessary to limit the bandwidth occupied by each terminal. In this embodiment, the bandwidth limitation configuration includes one or more uplink priority rules and one or more downlink priority rules. The uplink and downlink priority rules mentioned here can include source IP, destination IP, protocol, source port, destination port, and priority level.

[0041] The SDN controller reads the bandwidth limit configuration information of the virtual machine interface from the database and sends the configuration information to the qos-agent on the computing node where the corresponding virtual machine is located. The qos-agent monitors the bandwidth limit configuration of the virtual machine interface in the computing node to which it belongs, and sends the received bandwidth limit configuration to the corresponding virtual machine interface.

[0042] For example, after the user sets the bandwidth limitation configuration that supports traffic priority for the virtual machine VM221 interface, the control node 10 sends the bandwidth limitation configuration message that supports traffic priority for the virtual machine VM221 interface to the qos-agent 201 of the computing node 20 where the virtual machine VM221 is located through the management network card 201.

[0043] qos-agent is an entity that provides end-to-end service quality control and management for network service users and a collection of policies running on it. It tracks the entire life cycle of the flow of obtained network resources, and interprets the service quality request of new flows based on its own policies and the current use of network resources, and allocates reasonable network resources for the new request, or rejects the request.

[0044] In step S102, an ifb interface corresponding to the tap interface is created.

[0045] Since Linux tc does not support egress traffic control, this embodiment uses the Linux IFB intermediate function module technology to create a corresponding ifb interface for each virtual machine's tap interface to receive egress traffic forwarded by the tap interface.

[0046] In step S103, at least two ingress priority queues are created in the tap interface, and at least two egress priority queues are created in the ifb interface.

[0047] The ingress priority queue and egress priority queue are PRIO queues. PRIO queues can create priority queues with different priorities. The network traffic of the low priority queue will be forwarded only after the network traffic of the high priority queue is forwarded.

[0048] In step S104, the ingress network traffic is forwarded to the corresponding ingress priority queue based on the downlink priority rule, and the egress network traffic is forwarded to the corresponding egress priority queue based on the uplink priority rule.

[0049] An ingress network traffic filter corresponding to the ingress priority queue is created in the tap interface, and the ingress network traffic filter is used to forward the ingress network traffic to the corresponding ingress priority queue, wherein the filtering rule of the ingress network traffic filter includes a downstream priority rule.

[0050] An egress network traffic filter corresponding to the egress priority queue is created in the ifb interface, and the egress network traffic filter is used to forward the egress network traffic to the corresponding egress priority queue, wherein the filtering rule of the egress network traffic filter includes an uplink priority rule.

[0051] The network traffic filter forwards the egress network traffic of the virtual machine's tap interface to the ifb interface and forwards it out through the ifb interface, thereby converting the egress network traffic of the tap interface into the ingress network traffic of the ifb interface. The network traffic filter (i.e., tc filter) can forward packets to the specified queue based on the five-tuple of the packet's source IP, destination IP, protocol, source port, and destination port (i.e., priority rules). tc is a flow control module in the Linux system. It can establish a queue for sending data packets on the network interface and define the way packets in the queue are sent, thereby controlling the flow.

[0052] Taking the interface tap211 of the virtual machine as an example, the ingress network traffic of interface tap211 sets the priorities of different business network traffic according to the downstream priority rule configured by qos-agent, and forwards the ingress network traffic to different ingress priority queues according to the priority of the ingress network traffic. The traffic in different ingress priority queues is forwarded to the virtual machine in descending order of priority level; the egress network traffic of interface tap211 sets the priorities of different business network traffic according to the upstream priority rule configured by qos-agent, and forwards the egress network traffic to different egress priority queues according to the priority of the egress network traffic. The traffic in different egress priority queues is forwarded to the virtual switch in descending order of priority level.

[0053] Example 2

[0054] like Figure 4 As shown, a traffic forwarding method in another embodiment of the present invention is introduced, and the method includes the following steps.

[0055] In step S201, bandwidth limitation configuration information sent by an SDN controller is received.

[0056] The core of cloud computing is network-based applications. The bandwidth of the access network directly determines the quality of an enterprise's use of the cloud computing platform. Since all virtual machines in the cloud computing platform share network resources in the environment, in order to ensure that each virtual machine has a stable bandwidth resource, the bandwidth of the network traffic of the virtual machines in the cloud environment can be limited.

[0057] The bandwidth limitation function usually refers to configuring speed limit rules on devices such as routers, switches, and network cards. When the specified network traffic passes through these devices, the network traffic that meets the speed limit rules will be limited in speed, and the network traffic that exceeds the speed limit value will be discarded.

[0058] Accordingly, different from the previous embodiment, in this embodiment, the bandwidth limitation configuration information includes not only one or more uplink priority rules and one or more downlink priority rules, but also uplink bandwidth limitation value and downlink bandwidth limitation value. The uplink bandwidth limitation value and downlink bandwidth limitation value here are used to limit the forwarding speed of ingress network traffic and egress network traffic, and the priority rules may include source IP, destination IP, protocol, source port, destination port, and priority level.

[0059] In step S202, an ifb interface corresponding to the tap interface is created to receive the egress traffic forwarded by the tap interface.

[0060] In step S203, an ingress rate limit queue and a corresponding ingress rate limit category are created on the tap interface, and the ingress rate limit queue is configured based on the downstream bandwidth limit value; an egress rate limit queue and a corresponding egress rate limit category are created on the ifb interface, and the egress rate limit queue is configured based on the upstream bandwidth limit value.

[0061] The ingress rate limit queue and the egress rate limit queue are HTB queues. HTB queues are categorizable queues. Compared with other complex queue types, HTB has the advantages of powerful functions, simple configuration, and easy to use. The ingress rate limit classification and the egress rate limit classification are HTB root classes. HTB can specify bandwidth limit speeds and limit traffic bandwidth through token bucket technology.

[0062] In step S204, all ingress network traffic on the tap interface is forwarded to the ingress rate-limited queue, and all egress network traffic on the ifb interface is forwarded to the egress rate-limited queue.

[0063] In this embodiment, the tc filter is used to forward the service to the corresponding ingress rate limit queue and egress rate limit queue according to the five-tuple of source IP, destination IP, protocol, source port and destination port of the service.

[0064] In step S205, at least two ingress priority queues are created in the tap interface, and at least two egress priority queues are created in the ifb interface.

[0065] In the existing technology, in a mixed scenario of large and small traffic, large traffic downloads with low real-time requirements almost occupy all the bandwidth, while small traffic requests with high real-time requirements cannot be accessed. In this embodiment, the bandwidth limitation function provides a bandwidth limitation function that supports traffic priority. The corresponding priority queue is selected according to the importance and real-time nature of the business. After the high-priority network traffic is forwarded, the low-priority network traffic is forwarded, which can avoid the problem of small traffic requests with high real-time requirements being unable to access.

[0066] In step S206, the ingress network traffic is forwarded to the corresponding ingress priority queue based on the downlink priority rule, and the egress network traffic is forwarded to the corresponding egress priority queue based on the uplink priority rule.

[0067] For example, after completing the configuration of the cloud computing platform of the above SDN system, the network traffic trends of the ftp service and http service on the virtual machine VM221 are as follows: Figure 4As shown by the solid line, the ftp service is TCP port 20. The upstream network traffic passes through the egress network traffic filter, egress priority 1 queue, and egress speed limit queue in sequence, and is sent to the virtual switch 204 through the tap211 interface on the virtual machine switch 204; the downstream network traffic passes through the tap211 interface on the virtual switch 204, the ingress network traffic filter, the ingress priority 1 queue, and the ingress speed limit queue in sequence, and is forwarded to the virtual machine VM221. The network traffic trend of the http service is as follows Figure 4 As shown by the dotted line, the http service is tcp port 80. The upstream network traffic passes through the egress network traffic filter, the egress priority 2 queue, and the egress speed limit queue in sequence, and is then sent to the virtual switch 204 through the tap211 interface on the virtual machine switch 204; the downstream network traffic passes through the tap211 interface, the ingress network traffic filter, the ingress priority 2 queue, and the ingress speed limit queue on the virtual switch 204 in sequence, and is then forwarded to the virtual machine VM221.

[0068] The upstream network traffic and downstream network traffic of the http service go through the egress priority 2 queue and the ingress priority 2 queue respectively, and the upstream network traffic and downstream network traffic of the ftp service go through the egress priority 1 queue and the ingress priority 1 queue respectively. Since the priority of the priority 2 queue is higher than that of the priority 1 queue, when a large amount of ftp service traffic is continuously sent or received and a small amount of http service traffic is continuously sent and received at the same time, it will ensure that the http service traffic will not be lost.

[0069] like Figure 5 As shown, a specific implementation of the traffic forwarding device of the present invention is introduced.

[0070] In the embodiment of the present invention, the traffic forwarding device includes a receiving module 501 , a creating module 502 and a forwarding module 503 .

[0071] The receiving module 501 is used to receive the bandwidth limitation configuration information sent by the SDN controller, and the bandwidth limitation configuration information includes uplink priority rules and downlink priority rules.

[0072] The creation module 502 is used to create an ifb interface corresponding to the tap interface, the ifb interface is used to receive the egress traffic forwarded by the tap interface; create at least two ingress priority queues in the tap interface, and create at least two egress priority queues in the ifb interface.

[0073] The forwarding module 503 is used to forward the ingress traffic to the corresponding ingress priority queue based on the downlink priority rule, and to forward the egress traffic to at least two egress priority queues based on the uplink priority rule.

[0074] The forwarding module 503 is also used to: create an ingress network traffic filter corresponding to at least two ingress priority queues in the tap interface, and use the ingress network traffic filter to forward the ingress network traffic to the corresponding ingress priority queue, wherein the filtering rules of the ingress network traffic filter include downstream priority rules.

[0075] The forwarding module 503 is also used to: create an egress network traffic filter corresponding to at least two egress priority queues in the ifb interface, and use the egress network traffic filter to forward the egress network traffic to the corresponding egress priority queues, wherein the filtering rules of the egress network traffic filter include an upstream priority rule.

[0076] The creation module 502 is also used to: create an ingress rate limit queue and a corresponding ingress rate limit category on the tap interface, and configure the ingress rate limit queue based on the downstream bandwidth limit value; create an egress rate limit queue and a corresponding egress rate limit category on the ifb interface, and configure the egress rate limit queue based on the upstream bandwidth limit value.

[0077] The creation module 502 is further used to: create at least two ingress priority queues between the ingress rate limit queue and the ingress network traffic filter, and create at least two egress priority queues between the egress rate limit queue and the egress network traffic filter.

[0078] Figure 6 FIG. 6 shows a hardware structure diagram of a computing device 60 for traffic forwarding according to an embodiment of the present specification. Figure 6 As shown, the computing device 60 may include at least one processor 601, a memory 602 (e.g., a non-volatile memory), a memory 603, and a communication interface 604, and the at least one processor 601, the memory 602, the memory 603, and the communication interface 604 are connected together via a bus 605. The at least one processor 601 executes at least one computer-readable instruction stored or encoded in the memory 602.

[0079] It should be understood that the computer executable instructions stored in the memory 602, when executed, cause at least one processor 601 to perform the above combined operations in various embodiments of this specification. Figure 1-6 Describes the various operations and functions.

[0080] In the embodiments of the present specification, the computing device 60 may include, but is not limited to, a personal computer, a server computer, a workstation, a desktop computer, a laptop computer, a notebook computer, a mobile computing device, a smart phone, a tablet computer, a cellular phone, a personal digital assistant (PDA), a handheld device, a messaging device, a wearable computing device, a consumer electronic device, and the like.

[0081] According to one embodiment, a program product such as a machine-readable medium is provided. The machine-readable medium may have instructions (i.e., the above-mentioned elements implemented in the form of software), which, when executed by a machine, causes the machine to perform the above-mentioned combination of various embodiments of this specification. Figure 1-6 Specifically, a system or device equipped with a readable storage medium may be provided, on which a software program code implementing the functions of any of the above-mentioned embodiments is stored, and a computer or processor of the system or device reads and executes the instructions stored in the readable storage medium.

[0082] According to the traffic forwarding method and device, electronic device and storage medium of the embodiments of the present invention, it is possible to assign corresponding priorities to different network traffic according to preset configuration information, and forward them to corresponding priority queues. After the network traffic of the high-priority queue is forwarded, the network traffic of the low-priority queue is forwarded. After the network bandwidth traffic reaches the bandwidth limit value, it can be guaranteed that the high-priority network traffic is forwarded first, and the configuration of traffic priority and bandwidth limitation can be realized. Moreover, the bandwidth limitation between virtual machines on the same computing node can be realized, thereby improving efficiency.

[0083] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0084] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0085] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0086] These computer program instructions may also be loaded onto a computer or other programmable data processing device so that a series of operations S are performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 S of functions specified in one or more boxes.

[0087] The foregoing description of specific exemplary embodiments of the present invention is for the purpose of illustration and demonstration. These descriptions are not intended to limit the present invention to the precise form disclosed, and it is clear that many changes and variations can be made based on the above teachings. The purpose of selecting and describing the exemplary embodiments is to explain the specific principles of the present invention and its practical application, so that those skilled in the art can realize and utilize various different exemplary embodiments of the present invention and various different selections and changes. The scope of the present invention is intended to be limited by the claims and their equivalents.

Claims

1. A traffic forwarding method, characterized in that: The following steps are involved: Receive bandwidth limit configuration information sent by the SDN controller; The bandwidth limitation configuration information includes an uplink priority rule and a downlink priority rule; Create an ifb interface corresponding to the tap interface, wherein the ifb interface is used to receive the egress traffic forwarded by the tap interface; creating at least two ingress priority queues in the tap interface and at least two egress priority queues in the ifb interface; Creating an ingress rate limit queue and a corresponding ingress rate limit category on the tap interface, and configuring the ingress rate limit queue based on a downstream bandwidth limit value; Creating an egress rate limit queue and a corresponding egress rate limit category on the ifb interface, and configuring the egress rate limit queue based on an uplink bandwidth limit value; Forwarding the ingress network traffic to the corresponding ingress priority queue based on the downlink priority rule, and forwarding the egress network traffic to the corresponding egress priority queue based on the uplink priority rule, specifically comprising: Creating an ingress network traffic filter corresponding to the at least two ingress priority queues in the tap interface, and forwarding ingress network traffic to the corresponding ingress priority queues using the ingress network traffic filter, wherein the filtering rule of the ingress network traffic filter includes the downstream priority rule; Creating an egress network traffic filter corresponding to the at least two egress priority queues in the ifb interface, and forwarding the egress network traffic to the corresponding egress priority queues using the egress network traffic filter, wherein the filtering rule of the egress network traffic filter includes the uplink priority rule; The at least two ingress priority queues are created between the ingress rate limiting queue and the ingress network traffic filter, and the at least two egress priority queues are created between the egress rate limiting queue and the egress network traffic filter; Set the priorities of different service network traffic according to the downstream priority rules configured by qos-agent, forward the ingress network traffic to different ingress priority queues according to the priority of the ingress network traffic, and forward the traffic in different ingress priority queues to the virtual machines in descending order of priority. Set the priorities of different service network traffic according to the upstream priority rules configured by qos-agent, forward the egress network traffic to different egress priority queues according to the egress network traffic priorities, and forward the traffic in different egress priority queues to the virtual switch in descending order of priority. The receiving of bandwidth limitation configuration information sent by the SDN controller specifically includes: the SDN controller reads the bandwidth limitation configuration information of the virtual machine interface from the database, and sends the configuration information to the qos-agent on the computing node where the corresponding virtual machine is located, the qos-agent monitors the bandwidth limitation configuration of the virtual machine interface in the computing node to which it belongs, and sends the received bandwidth limitation configuration to the corresponding virtual machine interface.

2. The traffic forwarding method according to claim 1, characterized in that: The ingress rate limit queue and the egress rate limit queue are HTB queues, and the ingress rate limit category and the egress rate limit category are HTB root categories.

3. The traffic forwarding method according to claim 1, characterized in that: The uplink priority rule and the downlink priority rule include: Source IP, destination IP, protocol, source port, destination port and priority level.

4. The traffic forwarding method according to claim 1, characterized in that: The ingress priority queue and the egress priority queue are PRIO queues.

5. A traffic forwarding device, characterized in that: include: The receiving module is used to receive the bandwidth limitation configuration information sent by the SDN controller, specifically including: the SDN controller reads the bandwidth limitation configuration information of the virtual machine interface from the database, and sends the configuration information to the qos-agent on the computing node where the corresponding virtual machine is located, the qos-agent monitors the bandwidth limitation configuration of the virtual machine interface in the computing node to which it belongs, and sends the received bandwidth limitation configuration to the corresponding virtual machine interface; the bandwidth limitation configuration information includes an uplink priority rule and a downlink priority rule; a creation module, used to create an ifb interface corresponding to the tap interface, the ifb interface being used to receive egress traffic forwarded by the tap interface; and creating at least two ingress priority queues in the tap interface and at least two egress priority queues in the ifb interface; Creating an ingress rate limit queue and a corresponding ingress rate limit category on the tap interface, and configuring the ingress rate limit queue based on a downstream bandwidth limit value; Creating an egress rate limit queue and a corresponding egress rate limit category on the ifb interface, and configuring the egress rate limit queue based on an uplink bandwidth limit value; A forwarding module, configured to forward the ingress traffic to the corresponding ingress priority queue based on the downlink priority rule, and to forward the egress traffic to the at least two egress priority queues based on the uplink priority rule, specifically comprising: Creating an ingress network traffic filter corresponding to the at least two ingress priority queues in the tap interface, and forwarding ingress network traffic to the corresponding ingress priority queues using the ingress network traffic filter, wherein the filtering rule of the ingress network traffic filter includes the downstream priority rule; Creating an egress network traffic filter corresponding to the at least two egress priority queues in the ifb interface, and forwarding the egress network traffic to the corresponding egress priority queues using the egress network traffic filter, wherein the filtering rule of the egress network traffic filter includes the uplink priority rule; The at least two ingress priority queues are created between the ingress rate limiting queue and the ingress network traffic filter, and the at least two egress priority queues are created between the egress rate limiting queue and the egress network traffic filter; Set the priorities of different service network traffic according to the downstream priority rules configured by qos-agent, forward the ingress network traffic to different ingress priority queues according to the priority of the ingress network traffic, and forward the traffic in different ingress priority queues to the virtual machines in descending order of priority. Set the priorities of different service network traffic according to the upstream priority rules configured by qos-agent, forward the egress network traffic to different egress priority queues according to the priority of the egress network traffic, and forward the traffic in different egress priority queues to the virtual switch in descending order of priority.

6. An electronic device, characterized in that: include: at least one processor; as well as A memory storing instructions, wherein when the instructions are executed by the at least one processor, the at least one processor executes the traffic forwarding method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the traffic forwarding method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method for limiting speed and scheduling priority based on network port in satellite internet protocol (IP) network

    CN102332950A

  • Method for dispatching absolute priority of data frame based on 802.1 p under Linux system

    CN102404226A

  • Linux software based uplink QoS scheduling method and device

    CN102916901A

  • Virtual machine traffic control method and device

    CN106453126A

  • QoS control method based on OF-DiffServ model and QoS control system thereof

    CN107454015A