CN111371690A - Flow regulation and control method and device, network equipment and computer readable storage medium - Google Patents

Flow regulation and control method and device, network equipment and computer readable storage medium Download PDF

Info

Publication number
CN111371690A
CN111371690A CN202010112745.2A CN202010112745A CN111371690A CN 111371690 A CN111371690 A CN 111371690A CN 202010112745 A CN202010112745 A CN 202010112745A CN 111371690 A CN111371690 A CN 111371690A
Authority
CN
China
Prior art keywords
flow
traffic
queues
sub
queue
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010112745.2A
Other languages
Chinese (zh)
Inventor
杨鸿铭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN202010112745.2A priority Critical patent/CN111371690A/en
Publication of CN111371690A publication Critical patent/CN111371690A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/12Avoiding congestion; Recovering from congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2425Traffic characterised by specific attributes, e.g. priority or QoS for supporting services specification, e.g. SLA
    • H04L47/2433Allocation of priorities to traffic types
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2441Traffic characterised by specific attributes, e.g. priority or QoS relying on flow classification, e.g. using integrated services [IntServ]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames

Abstract

The invention relates to a flow regulation method, a flow regulation device, network equipment and a computer readable storage medium, and belongs to the field of network communication. The method comprises the following steps: when the tested device obtains the flow regulation instruction, analyzing the received flow, obtaining VNIs and flow classification marks corresponding to the flow, and then carrying out two-stage regulation and control on the flow according to the VNIs, the flow classification marks, the corresponding relation between the VNIs and the queues and the corresponding relation between the flow classification marks and the sub-queues, so that the flow in the VN domain with high priority is distributed to the queues with high priority, and the service flow with high priority is distributed to the sub-queues with high priority included in the corresponding queues. Because the tested device usually discards the messages in the low-priority queue and the low-priority sub-queue under the condition of congestion or abnormal flow, the service flow with high priority can be preferentially forwarded as far as possible.

Description

Flow regulation and control method and device, network equipment and computer readable storage medium
Technical Field
The application belongs to the field of network communication, and particularly relates to a flow regulation and control method, a flow regulation and control device, network equipment and a computer readable storage medium.
Background
In a large two-layer data forwarding environment, a scene application deployment is mainly constructed by VXLAN (virtual extensible local area network). Based on the forwarding characteristic of VXLAN, if a large amount of burst data traffic occurs or forwarding data is subjected to flooding forwarding, switch equipment is prone to packet loss or packet loss of important service traffic is caused, so that service quality is affected. Therefore, in a data center scenario, deploying a VN (Virtual Network) domain-based traffic control policy is an important way to solve data congestion and ensure communication quality.
The traditional traffic regulation and control strategy limits the traffic mainly according to the queues supported by the chip and the priority of VXLAN where the traffic is located, and may not be completely matched with the priority of the original service of the client, which causes the loss of the traffic packet corresponding to the high priority and affects the communication quality.
Disclosure of Invention
In view of the above, an object of the present application is to provide a traffic control method, an apparatus, a network device, and a computer-readable storage medium, which ensure that a high-priority service traffic is preferentially forwarded as much as possible under the condition that there is abnormal traffic or congestion, and meanwhile, can perform bandwidth speed limitation on the abnormal traffic, so as to reduce consumption of bandwidth.
The embodiment of the application is realized as follows:
in a first aspect, an embodiment of the present application provides a flow regulation and control method, which is applied to a device under test, where the device under test establishes a communication connection with a server, and the method includes: when a flow regulation and control instruction issued by the server is acquired, analyzing the received flow to obtain a virtual extensible local area network identifier (VNI) and a flow classification mark corresponding to the flow; distributing the received traffic to corresponding sub-queues according to the VNIs, the traffic classification labels, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification labels and the sub-queues, wherein each queue comprises a plurality of sub-queues mapped by the preset traffic classification labels; and determining the flow needing to be discarded in the received flows according to the priority among the queues and the priority among the corresponding sub-queues. The above process performs two-stage regulation and control on the traffic, so that the traffic in the VN domain with high priority is allocated to the queue with high priority, and the traffic with high priority is allocated to the sub-queue with high priority included in the corresponding queue. Because the tested device usually discards the messages in the low-priority queue and the low-priority sub-queue under the condition of abnormal flow or congestion, the service flow with high priority can be preferentially forwarded as much as possible, and meanwhile, the bandwidth speed limit can be performed on the abnormal flow, so that the consumption of the bandwidth is reduced.
With reference to the embodiment of the first aspect, in a possible implementation manner, the allocating the received traffic to a corresponding sub-queue according to the VNI, the traffic classification flag, a preset correspondence between the VNI and a queue, and a preset correspondence between the traffic classification flag and a sub-queue includes: distributing the received traffic to a corresponding queue according to the VNI and the corresponding relation between the VNI and the queue; and further distributing the flow distributed to each corresponding queue to the corresponding sub-queues included in the corresponding queue according to the flow classification marks and the corresponding relation between the flow classification marks and the sub-queues.
With reference to the embodiment of the first aspect, in a possible implementation manner, the determining, according to the priority between the queues and the priority between the corresponding sub-queues, traffic that needs to be dropped in the received traffic includes: and reserving the traffic in the sub-queue with the highest priority in the corresponding sub-queue, and discarding the traffic in the sub-queues with other priorities in the corresponding sub-queue.
With reference to the embodiment of the first aspect, in one possible implementation manner, the method further includes: and stopping the flow regulation and control of the newly received flow when the flow regulation and control stopping instruction issued by the server is obtained.
In a second aspect, an embodiment of the present application provides a flow regulation and control method, which is applied to a server, where the server establishes a communication connection with a device under test, and the method includes: monitoring the port of the tested equipment to obtain a flow monitoring value; when the abnormal flow or the congestion of the tested device is determined according to the flow monitoring value, a flow regulation and control instruction is issued to the tested device so that the tested device can execute the following steps: distributing the received traffic to corresponding sub-queues according to virtual extensible local area network identifiers (VNIs), traffic classification marks, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification marks and the sub-queues, wherein the VNIs, the traffic classification marks, the preset corresponding relations between the VNIs and the queues are included in the received traffic; wherein the queue comprises a plurality of sub-queues mapped by preset traffic classification labels.
With reference to the second aspect, in one possible implementation manner, the method further includes: and issuing a flow regulation stopping instruction to the tested equipment when the tested equipment is determined to have no abnormal flow or congestion according to the flow monitoring value.
With reference to the second aspect, in one possible implementation manner, the method determines that there is a traffic anomaly or congestion in the device under test by: and when the flow monitoring value indicates that the difference of the flows of the inlet port and the outlet port of the tested device is greater than a threshold value, determining that the tested device has abnormal flow or congestion.
In a third aspect, an embodiment of the present application provides a flow regulation and control apparatus, which is applied to a device under test, where the device under test establishes a communication connection with a server, and the apparatus includes: the system comprises an analysis module, an allocation model and a discarding module. The analysis module is used for analyzing the received flow to obtain a virtual extensible local area network identifier (VNI) and a flow classification mark corresponding to the flow when the flow regulation and control instruction sent by the server is obtained; an allocating module, configured to allocate the received traffic to corresponding sub-queues according to the VNI, the traffic classification flag, a preset correspondence between the VNI and a queue, and a preset correspondence between the traffic classification flag and a sub-queue, where each queue includes multiple sub-queues mapped by preset traffic classification flags; and the discarding module is used for determining the flow needing to be discarded in the received flows according to the priority among the queues and the priority among the corresponding sub-queues.
With reference to the third aspect, in a possible implementation manner, the allocating module is configured to allocate the received traffic to a corresponding queue according to the VNI and a correspondence between the VNI and the queue; and further distributing the flow distributed to each corresponding queue to the corresponding sub-queues included in the corresponding queue according to the flow classification marks and the corresponding relation between the flow classification marks and the sub-queues.
With reference to the third aspect embodiment, in a possible implementation manner, the discarding module is configured to reserve traffic in a sub-queue with a highest priority in the corresponding sub-queue, and discard traffic in sub-queues with other priorities in the corresponding sub-queue.
With reference to the third aspect, in a possible implementation manner, the apparatus further includes a stopping module, configured to stop performing traffic control on the newly received traffic when a traffic control stop instruction issued by the server is obtained.
In a fourth aspect, an embodiment of the present application provides a flow regulation and control device, which is applied to a server, where the server establishes a communication connection with a device under test, and the device includes: the monitoring module and the issuing module. The monitoring module is used for monitoring the port of the tested equipment to obtain a flow monitoring value; the issuing module is used for issuing a flow regulation and control instruction to the tested device when the flow monitoring value determines that the tested device has abnormal flow or congestion, so that the tested device executes: distributing the received traffic to corresponding sub-queues according to virtual extensible local area network identifiers (VNIs), traffic classification marks, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification marks and the sub-queues, wherein the VNIs, the traffic classification marks, the preset corresponding relations between the VNIs and the queues are included in the received traffic; wherein the queue comprises a plurality of sub-queues mapped by preset traffic classification labels.
With reference to the fourth aspect embodiment, in a possible implementation manner, the issuing module is further configured to issue a flow regulation stopping instruction to the device to be tested when it is determined that the device to be tested has no flow abnormality or congestion according to the flow monitoring value.
With reference to the fourth aspect of the embodiments, in a possible implementation manner, the apparatus further includes a determining module, configured to determine that there is a traffic anomaly or congestion in the device under test when the traffic monitoring value indicates that a difference between traffic of an ingress port and an egress port of the device under test is greater than a threshold.
In a fifth aspect, an embodiment of the present application further provides a network device, including: a memory and a processor, the memory and the processor connected; the memory is used for storing programs; the processor calls a program stored in the memory to perform the above-mentioned first aspect embodiment and/or the method provided in connection with any possible implementation manner of the first aspect embodiment, or to perform the above-mentioned second aspect embodiment and/or the method provided in connection with any possible implementation manner of the second aspect embodiment.
In a sixth aspect, the present application further provides a non-transitory computer-readable storage medium (hereinafter, referred to as a computer-readable storage medium), on which a computer program is stored, where the computer program is executed by a computer to perform the method in the foregoing first aspect and/or any possible implementation manner of the first aspect, or to perform the method in the foregoing second aspect and/or any possible implementation manner of the second aspect.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the embodiments of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and drawings.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts. The foregoing and other objects, features and advantages of the application will be apparent from the accompanying drawings. Like reference numerals refer to like parts throughout the drawings. The drawings are not intended to be to scale as practical, emphasis instead being placed upon illustrating the subject matter of the present application.
Fig. 1 shows a schematic view of an operating environment for flow regulation provided in an embodiment of the present application.
Fig. 2 shows a schematic structural diagram of a network device according to an embodiment of the present application.
Fig. 3 shows one of the flowcharts of the flow rate control method provided in the embodiment of the present application.
Fig. 4 shows a second flowchart of a flow rate control method provided in the embodiment of the present application.
Fig. 5 shows one of the structural block diagrams of the flow rate regulation device provided in the embodiment of the present application.
Fig. 6 shows a second block diagram of the flow rate control device according to the embodiment of the present application.
Reference numbers: 10-a device under test; 20-a switch; 30-a virtual machine; 40-a server; 100-a network device; 110-a processor; 120-a memory; 130-a transceiver; 400-a flow regulating device; 410-a resolution module; 420-a distribution module; 430-discard module; 500-a flow regulating device; 510-a monitoring module; 520-down module.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Further, the term "and/or" in the present application is only one kind of association relationship describing the associated object, and means that three kinds of relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In addition, the defect that the traffic regulation and control method for VXLAN in the prior art may cause the service traffic packet loss corresponding to the high priority is a result obtained after the applicant has practiced and studied carefully, and therefore, the discovery process of the above defect and the solution proposed in the following embodiments of the present application for the above defect should be contributions of the applicant to the present application in the process of the present application.
In order to solve the above problem, embodiments of the present application provide a traffic control method, an apparatus, a network device, and a computer-readable storage medium, so that it is ensured that a high-priority service traffic is preferentially forwarded as much as possible under the condition that there is traffic abnormality or congestion.
The technology can be realized by adopting corresponding software, hardware and a combination of software and hardware. The following describes embodiments of the present application in detail.
First, a topology diagram of VXLAN data center application for implementing the traffic regulation method and apparatus according to the embodiment of the present application is described with reference to fig. 1.
In the VXLAN data center application, a device under test 10, a switch 20, a virtual machine 30, and a server 40 (which may be an integrated server capable of implementing a configuration automatic delivery, traffic monitoring, and preset QOS (quality of service) service model) are deployed. In the embodiment of the present application, at least two devices under test 10 are described, which are referred to as a first device under test DUT1 and a second device under test DUT2 for convenience of distinction, and a VXLAN tunnel exists between the DUT1 and the DUT 2.
In addition, each device under test 10 forms a one-to-one correspondence with one virtual machine 30, and therefore, if two devices under test 10 exist, two virtual machines 30 also exist correspondingly. For ease of distinction, virtual machine 30 corresponding to DUT1 is referred to as first virtual machine VM1, and virtual machine 30 corresponding to DUT2 is referred to as second virtual machine VM 2.
The server 40 is connected to the switch 20 through the included ports, and the switch 20 is connected to the management port of the DUT1 and the management port of the DUT2, respectively, so as to implement traffic monitoring on the device under test 10, for example, collecting traffic data information by sending SNMP TRAP (simple network management protocol) messages to the device under test 10, or collecting traffic data information by additionally configuring SFLOW (network traffic analysis protocol) or IPFIX (IP data flow information output). In addition, the server 40 may also issue an instruction to the device under test 10 to manage the device under test 10, for example, to control the device under test 10 to perform flow regulation on the newly received flow or to control the device under test 10 to stop performing flow regulation on the newly received flow.
Furthermore, a certain device under test 10 may act as a sender of traffic and may also act as a receiver of traffic. For example, in fig. 1, when traffic is directed from VM2 to VM1 through a tunnel between DUT2 and DUT1, DUT2 acts as the sender of the traffic and DUT1 acts as the receiver of the traffic; when traffic is directed from VM1 to VM2 through a tunnel between DUT1 and DUT2, DUT1 acts as the sender of the traffic and DUT2 acts as the receiver of the traffic. In the embodiment of the present application, the receiver of the traffic is taken as the object of traffic control, and it should be noted that the traffic control methods mentioned below are all described on the premise that the traffic is sent from VM2 to VM 1.
In addition, please refer to fig. 2, the present application provides a network device 100, which may be the server 40 in fig. 1 or the device under test 10 in fig. 1.
Among them, the network device 100 may include: a processor 110, a memory 120, and a transceiver 130.
It should be noted that the components and configuration of network device 100 shown in fig. 2 are exemplary only, and not limiting, and that network device 100 may have other components and configurations as desired.
Processor 110, memory 120, transceiver 130, and other components that may be present in network device 100 are electrically connected to each other, directly or indirectly, to enable the transfer or interaction of data. For example, the processor 110, the memory 120, the transceiver 130, and other components that may be present may be electrically connected to each other via one or more communication buses or signal lines.
The memory 120 is used to store a program, for example, a program corresponding to a flow rate control method that will be described later or a flow rate control device that will be described later. Optionally, when the memory 120 stores the flow regulation device, the flow regulation device includes at least one software function module which can be stored in the memory 120 in the form of software or firmware (firmware).
Optionally, the software function module included in the flow control apparatus may also be solidified in an Operating System (OS) of the network device 100.
The processor 110 is configured to execute executable modules stored in the memory 120, such as software functional modules or computer programs included in the flow regulating device. The computer program may be executed by the processor 110 upon receiving execution instructions. Of course, the method disclosed in any corresponding embodiment of the present application may be applied to the processor 110, or may be implemented by the processor 110.
The following will describe the flow rate control method provided by the present application.
Referring to fig. 3, an embodiment of the present application provides a method for regulating and controlling a flow rate of the device under test (DUT 1). The steps involved will be described below in conjunction with fig. 3.
Step S110: when a traffic regulation and control instruction issued by the server is acquired, analyzing the received traffic to obtain a virtual extensible local area network identifier (VNI) and a traffic classification label corresponding to the traffic.
The server monitors the port traffic of DUT1 by sending SNMP TRAP message to DUT1 or additionally configuring SFLOW, IPFIX, etc., obtaining traffic monitoring values of the ingress port (e.g., PortB in fig. 1) of DUT1 and traffic monitoring values of the egress port (e.g., PortA in fig. 1) of DUT1, to determine whether there is congestion at DUT1 based on the two traffic monitoring values. Of course, the traffic model may be configured on the server in advance so that the server can determine whether there is traffic abnormality in the DUT1 based on the two traffic monitoring values.
Optionally, the server may obtain the configuration information in advance, and generate a threshold value for characterizing a difference allowable value between traffic of the traffic ingress port of the DUT1 and traffic egress port of the DUT 1. Subsequently, when the server monitors that the difference between the traffic of portB and the traffic of PortA is greater than a threshold, it is determined that there is a burst traffic at DUT 1. Because the bandwidth consumed by bursty traffic may be larger than expected in a short time, it may cause traffic anomaly or congestion at DUT1, requiring traffic regulation at DUT1, and the server issues traffic regulation instructions to DUT 1.
After the DUT1 acquires the traffic control instruction, it analyzes the traffic it receives.
In the traffic received by the DUT1, because the traffic data between the DUT1 and the DUT2 is transmitted through the tunnel, the original traffic needs to be subjected to VXLAN encapsulation according to the protocol requirements before being sent, that is, the original traffic is added with the source IP of the corresponding tunnel, the destination IP of the corresponding tunnel, and the VNI (VXLAN network identifier) of the corresponding tunnel, so that it can be concluded that, if different original traffic is transmitted through the same tunnel, the VXLAN encapsulation of the outer layer is the same.
In addition, as for users, the priorities of different original flows are high and low, so when abnormal or congested flows occur, in order to ensure that the high-priority traffic is preferentially forwarded or bandwidth speed limitation is performed on the abnormal flows as much as possible, in the embodiment of the present application, a flow classification standard may be configured for each device under test according to customer requirements, in the classification standard, different original flows are divided into multiple priorities according to the customer requirements on the traffic types, and a corresponding flow classification flag is set for each priority. Subsequently, when the device to be tested as a traffic sender is sending traffic, a traffic classification flag may be added to the traffic according to the traffic classification criterion.
After adding the VXLAN encapsulation and the traffic class label to the traffic via DUT2, DUT1 may analyze the received traffic to obtain a VNI and a traffic class label corresponding to the received traffic.
Step S120: and distributing the received traffic to corresponding sub-queues according to the VNIs, the traffic classification marks, the preset corresponding relation between the VNIs and the queues and the preset corresponding relation between the traffic classification marks and the sub-queues.
For each device under test, its own physical chip may form multiple prioritized queues, i.e., QOS queues in the traditional sense, where each queue may be used to receive and forward traffic. It is worth noting that the number of queues formed by each device under test is determined by the processing power of its physical chip itself. In the embodiment of the present application, in order to ensure that high-priority traffic is preferentially forwarded as much as possible and to perform bandwidth speed limitation on abnormal traffic, a corresponding relationship between each VNI and a queue and a corresponding relationship between each traffic classification flag and a sub-queue are also preconfigured in each device under test, and therefore, in the embodiment of the present application, each queue is further split into a plurality of sub-queues having priorities, and the priorities between the sub-queues are mapped by the preset traffic classification flags.
As an optional implementation manner, VNI fields of different flows may be bound to a queue through an ACL (access control list), so that a correspondence relationship between VNIs and the queue may be formed without consuming a CPU of the device under test additionally. However, in order to ensure that traffic in a certain VXLAN is preferentially forwarded, the VNI of the VXLAN may be associated with a queue having a high priority.
It is worth pointing out that, because the physical chip resources of the device under test are limited, the number of queues included in the device under test is also limited, and therefore, in an alternative embodiment, different VNI ranges may be associated with the same queue.
Similarly, the flow classification mark of the flow can be bound with the sub-queue through the ACL, so that the corresponding relationship between the flow classification mark and the sub-queue can be formed on the premise of not consuming the CPU of the device to be tested additionally. In order to ensure that a certain service traffic is preferentially forwarded, the traffic classification flag of the service traffic may form a corresponding relationship with the sub-queue with a high priority.
After the correspondence between VNIs and queues and the correspondence between traffic class labels and sub-queues are stored in the DUT1, the DUT1 may allocate the received traffic to the corresponding sub-queues according to the VNI of the received traffic, the traffic class label, the correspondence between VNI and queues and the correspondence between traffic class labels and sub-queues.
Because VXLAN data traffic is forwarded in a Virtual Network (VN) domain corresponding to the VXLAN data traffic, for known traffic, forwarding is equivalent to forwarding of conventional data in a VLAN (Virtual Local Area Network), and for unknown traffic, the VXLAN data traffic is not only flooded and forwarded in the VN domain carried after traffic is encapsulated, but also forwarded in a VN domain allowed by a device in a VXLAN forwarding model, so that corresponding data traffic may be flooded in multiple VN domains and bandwidth resources may be occupied. To solve this problem, for the DUT1, the received traffic may be allocated to the corresponding queue according to the VNI of the received traffic and the corresponding relationship between the VNI and the queue. When the VNIs is associated with the queue, the traffic type to be preferentially forwarded is associated with the sub-queue having the higher priority, and therefore, the traffic having the higher priority is first allocated to the queue having the corresponding priority according to the VNI.
In addition, after the DUT1 allocates traffic for the first time, the DUT1 may further allocate the traffic allocated to each corresponding queue to the corresponding sub-queue included in the corresponding queue based on the traffic classification flag of the traffic in each queue and the correspondence between the traffic classification flag and the sub-queue. When the correspondence between the traffic classification flag and the sub-queue is formed, the traffic classification flag of the traffic to be preferentially forwarded is associated with the sub-queue having the higher priority, and therefore, the traffic having the higher priority is further allocated to the sub-queue having the corresponding priority in the queue based on the traffic classification flag assigned to the corresponding queue.
Assuming that there are 8 queues, the conventional primary regulation and control range has only 8 queues. If two-stage regulation and control of the flow are completed through the process, based on the mapping relationship between the VNI and the queues, the mapping relationship between the flow classification marks and the sub-queues (assuming that each queue has 8 sub-queues), the original 8 queues are logically expanded into 64 sub-queues, so that the regulation and control range and the regulation and control fineness are increased, and the flow regulation and control are more accurate.
Step S130: and determining the flow needing to be discarded in the received flows according to the priority among the queues and the priority among the corresponding sub-queues.
After the DUT1 completes the assignment of traffic, some of the received traffic may be dropped based on the priority between the queues and the priority between the sub-queues, so that the retained traffic is preferentially forwarded.
It is noted that the DUT1 may be configured to discard some of the received traffic according to the priorities between the queues and the priorities between the sub-queues according to the actual needs of the user.
As an optional implementation, when the DUT1 receives traffic from multiple VXLANs, it may be configured in Strict Priority (SP) mode, so that the DUT1 keeps the traffic in the queue N before the Priority and discards the traffic in the remaining queues according to the order of Priority from high to low among the queues. In addition, for the queue N before the priority, the traffic in the sub-queue N before the priority, which is not empty and is included in each queue N before the priority, may be reserved, and the traffic in the remaining sub-queues may be discarded. The value of N is determined according to actual conditions, and for example, in one embodiment, N may be 1. Suppose there are 8 queues, namely queue 0 and queue 1 … …, queue 7 (the higher the number corresponding to the name of the queue, the higher the priority, i.e. queue 7 has the highest priority and queue 0 has the lowest priority), each queue includes 8 sub-queues, namely sub-queue 0 and sub-queue 1 … …, sub-queue 7 (sub-queue 7 has the highest priority and sub-queue 0 has the lowest priority). If N is 1 and the traffic in the queue 7 is not empty, the above embodiment may retain the traffic in the queue 7 and discard the traffic in the remaining queues; if queue 7 is empty, the traffic in queue 6 may be retained and the traffic in the remaining queues may be discarded. When the traffic in the queue 7 is reserved and the sub-queue 7 included in the queue 7 is allocated to the traffic, the traffic in the sub-queue 7 is correspondingly reserved for the queue 7, and the traffic included in the remaining sub-queues of the queue 7 is discarded.
As another alternative, when the DUT1 receives traffic from multiple VXLANs, it may further configure a Weighted Round Robin scheduling mode (WRR), and schedule multiple (where the number is determined by the weight of the corresponding queue, and the weight of each queue may be configured according to actual situations, for example, according to the priority, the queue with high priority has higher weight) traffics for each queue that is not empty, then discard the remaining traffics in the queue, and then transfer the queues to the next queue, so that the next queue repeats the above scheduling manner according to its own weight. In addition, for the scheduled traffic in each queue, a plurality of (the number here is determined by the weight of the corresponding sub-queue, and the weight of each sub-queue may be configured according to actual situations, for example, according to the priority, the sub-queue with the higher priority has the higher weight), the traffic is scheduled from each sub-queue of the queue, and then the remaining traffic in the sub-queue is discarded and transferred to the next sub-queue included in the queue, so that the next sub-queue repeats the scheduling method according to its own weight.
In addition, as an optional implementation manner, when the server monitors that there is no traffic abnormality or congestion at the DUT1, a stop traffic regulation instruction may be issued to the DUT 1. Since the DUT1 no longer has traffic abnormalities or congestion and there is no need to drop traffic, the DUT1 stops traffic control of newly received traffic when it acquires the stop traffic control instruction.
According to the flow regulation and control method provided by the embodiment of the application, when the tested device obtains a flow regulation and control instruction, the received flow is analyzed, the VNI and the flow classification mark corresponding to the flow are obtained, then two-stage regulation and control are carried out on the flow according to the VNI, the flow classification mark, the corresponding relation between the VNI and the queue and the corresponding relation between the flow classification mark and the sub-queue of each flow, so that the flow in the VN domain with high priority is distributed to the queue with high priority, and the service flow with high priority is distributed to the sub-queue with high priority included in the corresponding queue. Because the tested device usually discards the messages in the low-priority queue and the low-priority sub-queue under the condition of abnormal flow or congestion, the service flow with high priority can be preferentially forwarded as much as possible, and meanwhile, the bandwidth speed limit can be performed on the abnormal flow, so that the consumption of the bandwidth is reduced.
In addition, please refer to fig. 4, an embodiment of the present application provides a traffic control method applied to the server. The steps involved will be described below in conjunction with fig. 4.
Step S210: and monitoring the port of the tested equipment to obtain a flow monitoring value.
Step S220: and issuing a flow regulation and control instruction to the tested equipment when the flow monitoring value determines that the tested equipment has abnormal flow or congestion so as to enable the tested equipment to execute a flow regulation and control method.
The method determines that the tested device has abnormal flow or congestion in the following modes: and when the flow monitoring value indicates that the difference of the flows of the inlet port and the outlet port of the tested device is greater than a threshold value, determining that the tested device has abnormal flow or congestion.
The flow regulation and control method comprises the following steps: the method comprises the steps that a tested device distributes received traffic to corresponding sub-queues according to virtual extensible local area network identifications (VNIs), traffic classification marks, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification marks and the sub-queues, wherein the VNIs, the traffic classification marks and the preset corresponding relations are included in the received traffic; wherein the queue comprises a plurality of sub-queues mapped by preset traffic classification labels.
Of course, as an optional implementation manner, when it is determined that the device under test has no abnormal flow or congestion according to the flow monitoring value, the server issues a flow regulation stopping instruction to the device under test.
In addition, corresponding to fig. 3, as shown in fig. 5, an embodiment of the present application further provides a flow rate regulation device 400, where the flow rate regulation device 400 may include: a parsing module 410, an assignment module 420, and a discarding module 430.
The analyzing module 410 is configured to, when a traffic control instruction issued by the server is obtained, analyze the received traffic to obtain a virtual extensible local area network identifier VNI and a traffic classification label corresponding to the traffic;
an allocating module 420, configured to allocate the received traffic to corresponding sub-queues according to the VNI, the traffic classification flag, a preset correspondence between the VNI and a queue, and a preset correspondence between the traffic classification flag and a sub-queue, where each queue includes multiple sub-queues mapped by preset traffic classification flags;
a discarding module 430, configured to determine, according to the priority between the queues and the priority between the corresponding sub-queues, a traffic that needs to be discarded in the received traffic.
In a possible implementation manner, the allocating module 420 is configured to allocate the received traffic to a corresponding queue according to the VNI and a correspondence between the VNI and the queue; and further distributing the flow distributed to each corresponding queue to the corresponding sub-queues included in the corresponding queue according to the flow classification marks and the corresponding relation between the flow classification marks and the sub-queues.
In a possible implementation manner, the discarding module 430 is configured to reserve traffic in a sub-queue with the highest priority in the corresponding sub-queue, and discard traffic in sub-queues with other priorities in the corresponding sub-queue.
In a possible implementation manner, the apparatus further includes a stopping module, configured to stop performing traffic control on the newly received traffic when a traffic control stopping instruction issued by the server is obtained.
The flow rate control device 400 provided in the embodiment of the present application has the same implementation principle and the same technical effects as those of the foregoing method embodiments, and for the sake of brief description, no mention is made in the device embodiment, and reference may be made to the corresponding contents in the foregoing method embodiments.
In addition, corresponding to fig. 4, as shown in fig. 6, an embodiment of the present application further provides a flow rate regulation device 500, where the flow rate regulation device 500 may include: a monitor module 510 and a delivery module 520.
A monitoring module 510, configured to monitor a port of the device under test to obtain a flow monitoring value;
an issuing module 520, configured to issue a flow regulation and control instruction to the device to be tested when it is determined that the device to be tested has abnormal flow or congestion according to the flow monitoring value, so that the device to be tested performs: distributing the received traffic to corresponding sub-queues according to virtual extensible local area network identifiers (VNIs), traffic classification marks, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification marks and the sub-queues, wherein the VNIs, the traffic classification marks, the preset corresponding relations between the VNIs and the queues are included in the received traffic; wherein the queue comprises a plurality of sub-queues mapped by preset traffic classification labels.
In a possible implementation manner, the issuing module 520 is further configured to issue a flow regulation stopping instruction to the device to be tested when it is determined that the device to be tested has no abnormal flow or congestion according to the flow monitoring value.
In a possible implementation manner, the apparatus further includes a determining module, configured to determine that there is a traffic anomaly or congestion in the device under test when the traffic monitoring value indicates that a difference between traffic of the ingress port and the egress port of the device under test is greater than a threshold value.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a computer, the method for regulating and controlling a flow rate is performed, where the method is included in any of the above embodiments.
In summary, according to the traffic control method, the traffic control apparatus, the network device, and the computer-readable storage medium provided in the embodiments of the present invention, when a device to be tested acquires a traffic control instruction, the device analyzes received traffic to acquire a VNI and a traffic classification flag corresponding to the traffic, and then performs two-stage control on the traffic according to the VNI, the traffic classification flag, the correspondence between the VNI and the queue, and the correspondence between the traffic classification flag and the sub-queue of each traffic, so that the traffic in the VN domain with high priority is allocated to the queue with high priority, and the traffic with high priority is allocated to the sub-queue with high priority included in the corresponding queue. Because the tested device usually discards the messages in the low-priority queue and the low-priority sub-queue under the condition of abnormal flow or congestion, the service flow with high priority can be preferentially forwarded as much as possible, and meanwhile, the bandwidth speed limit can be performed on the abnormal flow, so that the consumption of the bandwidth is reduced.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a notebook computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (11)

1. A flow regulation and control method is applied to a device to be tested, the device to be tested is in communication connection with a server, and the method comprises the following steps:
when a flow regulation and control instruction issued by the server is acquired, analyzing the received flow to obtain a virtual extensible local area network identifier (VNI) and a flow classification mark corresponding to the flow;
distributing the received traffic to corresponding sub-queues according to the VNIs, the traffic classification labels, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification labels and the sub-queues, wherein each queue comprises a plurality of sub-queues mapped by the preset traffic classification labels;
and determining the flow needing to be discarded in the received flows according to the priority among the queues and the priority among the corresponding sub-queues.
2. The method of claim 1, wherein the allocating the received traffic to a corresponding sub-queue according to the VNI, the traffic classification flag, a preset correspondence between the VNI and a queue, and a preset correspondence between the traffic classification flag and a sub-queue comprises:
distributing the received traffic to a corresponding queue according to the VNI and the corresponding relation between the VNI and the queue;
and further distributing the flow distributed to each corresponding queue to the corresponding sub-queues included in the corresponding queue according to the flow classification marks and the corresponding relation between the flow classification marks and the sub-queues.
3. The method according to claim 1, wherein the determining the traffic to be dropped in the received traffic according to the priority between the queues and the priority between the corresponding sub-queues comprises:
and reserving the traffic in the sub-queue with the highest priority in the corresponding sub-queue, and discarding the traffic in the sub-queues with other priorities in the corresponding sub-queue.
4. The method of claim 1, further comprising:
and stopping the flow regulation and control of the newly received flow when the flow regulation and control stopping instruction issued by the server is obtained.
5. A flow regulation and control method is applied to a server, the server establishes communication connection with a device to be tested, and the method comprises the following steps:
monitoring the port of the tested equipment to obtain a flow monitoring value;
when the abnormal flow or the congestion of the tested device is determined according to the flow monitoring value, a flow regulation and control instruction is issued to the tested device so that the tested device can execute the following steps:
distributing the received traffic to corresponding sub-queues according to virtual extensible local area network identifiers (VNIs), traffic classification marks, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification marks and the sub-queues, wherein the VNIs, the traffic classification marks, the preset corresponding relations between the VNIs and the queues are included in the received traffic;
wherein the queue comprises a plurality of sub-queues mapped by preset traffic classification labels.
6. The method of claim 5, further comprising:
and issuing a flow regulation stopping instruction to the tested equipment when the tested equipment is determined to have no abnormal flow or congestion according to the flow monitoring value.
7. The method of claim 5, wherein the method determines that the device under test has traffic anomalies or congestion by:
and when the flow monitoring value indicates that the difference of the flows of the inlet port and the outlet port of the tested device is greater than a threshold value, determining that the tested device has abnormal flow or congestion.
8. A flow regulation and control device is applied to a device to be tested, wherein the device to be tested is in communication connection with a server, and the device comprises:
the analysis module is used for analyzing the received flow to obtain a virtual extensible local area network identifier (VNI) and a flow classification mark corresponding to the flow when the flow regulation and control instruction sent by the server is obtained;
an allocating module, configured to allocate the received traffic to corresponding sub-queues according to the VNI, the traffic classification flag, a preset correspondence between the VNI and a queue, and a preset correspondence between the traffic classification flag and a sub-queue, where each queue includes multiple sub-queues mapped by preset traffic classification flags;
and the discarding module is used for determining the flow needing to be discarded in the received flows according to the priority among the queues and the priority among the corresponding sub-queues.
9. A flow regulation and control device is applied to a server, the server establishes communication connection with a device to be tested, and the device comprises:
the monitoring module is used for monitoring the port of the tested equipment to obtain a flow monitoring value;
the issuing module is used for issuing a flow regulation and control instruction to the tested device when the flow monitoring value determines that the tested device has abnormal flow or congestion, so that the tested device executes: distributing the received traffic to corresponding sub-queues according to virtual extensible local area network identifiers (VNIs), traffic classification marks, preset corresponding relations between the VNIs and the queues and preset corresponding relations between the traffic classification marks and the sub-queues, wherein the VNIs, the traffic classification marks, the preset corresponding relations between the VNIs and the queues are included in the received traffic; wherein the queue comprises a plurality of the sub-queues.
10. A network device, comprising: a memory and a processor, the memory and the processor connected;
the memory is used for storing programs;
the processor calls a program stored in the memory to perform the method of any of claims 1-7.
11. A computer-readable storage medium, on which a computer program is stored which, when executed by a computer, performs the method of any one of claims 1-7.
CN202010112745.2A 2020-02-24 2020-02-24 Flow regulation and control method and device, network equipment and computer readable storage medium Pending CN111371690A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010112745.2A CN111371690A (en) 2020-02-24 2020-02-24 Flow regulation and control method and device, network equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010112745.2A CN111371690A (en) 2020-02-24 2020-02-24 Flow regulation and control method and device, network equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN111371690A true CN111371690A (en) 2020-07-03

Family

ID=71212052

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010112745.2A Pending CN111371690A (en) 2020-02-24 2020-02-24 Flow regulation and control method and device, network equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111371690A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113630809A (en) * 2021-08-12 2021-11-09 迈普通信技术股份有限公司 Service forwarding method, device and computer readable storage medium
CN113630339A (en) * 2021-08-04 2021-11-09 安超云软件有限公司 Flow forwarding method and device, electronic equipment and storage medium
CN114039925A (en) * 2021-10-28 2022-02-11 北京思特奇信息技术股份有限公司 Priority-based dynamic flow control method in short message gateway system
CN115987889A (en) * 2022-12-26 2023-04-18 迈普通信技术股份有限公司 Virtual network communication method, device, computer equipment and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102275A (en) * 2007-06-25 2008-01-09 中兴通讯股份有限公司 Method for multi-level dispatching on Ethernet switching chip
CN103581056A (en) * 2013-10-25 2014-02-12 盛科网络(苏州)有限公司 Method for achieving congestion management in network communication through layered queue scheduling
CN104468394A (en) * 2014-12-04 2015-03-25 杭州华三通信技术有限公司 Method and device for forwarding messages in VXLAN network
CN105591971A (en) * 2015-10-28 2016-05-18 杭州华三通信技术有限公司 QoS implementation method and device
CN109246023A (en) * 2018-11-16 2019-01-18 锐捷网络股份有限公司 Flow control methods, the network equipment and storage medium
CN109802894A (en) * 2019-01-03 2019-05-24 中国联合网络通信集团有限公司 Flow control methods and device
CN109981472A (en) * 2017-12-27 2019-07-05 中移(杭州)信息技术有限公司 A kind of message encapsulating method, retransmission method, relevant apparatus, equipment and medium
CN110061923A (en) * 2018-01-19 2019-07-26 北京金山云网络技术有限公司 Flow control methods, device, interchanger, transmitting terminal server and medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102275A (en) * 2007-06-25 2008-01-09 中兴通讯股份有限公司 Method for multi-level dispatching on Ethernet switching chip
CN103581056A (en) * 2013-10-25 2014-02-12 盛科网络(苏州)有限公司 Method for achieving congestion management in network communication through layered queue scheduling
CN104468394A (en) * 2014-12-04 2015-03-25 杭州华三通信技术有限公司 Method and device for forwarding messages in VXLAN network
CN105591971A (en) * 2015-10-28 2016-05-18 杭州华三通信技术有限公司 QoS implementation method and device
CN109981472A (en) * 2017-12-27 2019-07-05 中移(杭州)信息技术有限公司 A kind of message encapsulating method, retransmission method, relevant apparatus, equipment and medium
CN110061923A (en) * 2018-01-19 2019-07-26 北京金山云网络技术有限公司 Flow control methods, device, interchanger, transmitting terminal server and medium
CN109246023A (en) * 2018-11-16 2019-01-18 锐捷网络股份有限公司 Flow control methods, the network equipment and storage medium
CN109802894A (en) * 2019-01-03 2019-05-24 中国联合网络通信集团有限公司 Flow control methods and device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113630339A (en) * 2021-08-04 2021-11-09 安超云软件有限公司 Flow forwarding method and device, electronic equipment and storage medium
CN113630809A (en) * 2021-08-12 2021-11-09 迈普通信技术股份有限公司 Service forwarding method, device and computer readable storage medium
CN114039925A (en) * 2021-10-28 2022-02-11 北京思特奇信息技术股份有限公司 Priority-based dynamic flow control method in short message gateway system
CN114039925B (en) * 2021-10-28 2023-11-28 北京思特奇信息技术股份有限公司 Dynamic flow control method based on priority in short message gateway system
CN115987889A (en) * 2022-12-26 2023-04-18 迈普通信技术股份有限公司 Virtual network communication method, device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111371690A (en) Flow regulation and control method and device, network equipment and computer readable storage medium
US9270527B2 (en) Methods, systems, and computer readable media for enabling real-time guarantees in publish-subscribe middleware using dynamically reconfigurable networks
US11706088B2 (en) Analyzing and configuring workload distribution in slice-based networks to optimize network performance
US8630171B2 (en) Policing virtual connections
CN110267228B (en) V2X vehicle-mounted terminal message adaptive scheduling management system and method
US9882832B2 (en) Fine-grained quality of service in datacenters through end-host control of traffic flow
US20020031142A1 (en) Switched ethernet networks
JP7288980B2 (en) Quality of Service in Virtual Service Networks
US20100260185A1 (en) Method, system and apparatus for forwarding packets
EP3955550A1 (en) Flow-based management of shared buffer resources
CN109005126B (en) Data stream processing method, device and computer readable storage medium
KR101748750B1 (en) System and Method for Controlling SDN based Traffic aware Bandwidth in Virtualized WLANs
US7369495B1 (en) Method and apparatus for shared shaping
KR20170033179A (en) Method and apparatus for managing bandwidth of virtual networks on SDN
CN114079638A (en) Data transmission method, device and storage medium of multi-protocol hybrid network
CN109922003B (en) Data sending method, system and related components
CN111343097A (en) Link load balancing method and device, electronic equipment and storage medium
KR100916835B1 (en) METHOD OF PROCESSING PACKETS PER-FLOW USING NETWORK PROCESSOR IN DiffServ-over-MPLS
US11012378B2 (en) Methods and apparatus for shared buffer allocation in a transport node
CN115580568A (en) Method and system for realizing network service quality guarantee based on IPv6 flow label
WO2021052603A1 (en) Method and apparatus for abstracting network resources in a mobile communications network
Yang et al. Enterprise traffic with a differentiated service mechanism
CN111953598B (en) Distributed traffic forwarding method, device and system
WO2024011907A1 (en) Data scheduling method, and electronic device and storage medium
EP3065502A1 (en) Access node device for managing upstream network traffic

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200703

RJ01 Rejection of invention patent application after publication