Network traffic control method, VTEP device and storage medium
By configuring and encapsulating the type and priority of service traffic into VXLAN packets on the VTEP device side, the complexity of traffic control configuration and quality of service issues during network congestion are solved, the efficiency of network congestion processing is improved, and the rapid recovery of business traffic is ensured. .
Patent Information
- Application Number
- CN201810982744.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-08-27
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2038-08-27
AI Technical Summary
In the existing technology, the configuration of the traffic control method when the network is congested is cumbersome, not conducive to centralized management, and will destroy the user's original messages and service quality. In addition, a large amount of traffic is continuously sent to the congested device, resulting in slow recovery of business traffic.
Configure the traffic type and priority based on the service type on the VTEP device side, encapsulate it into a VXLAN packet, forward it to another VTEP device, perform flow control based on the traffic type and priority in the packet, and perform traffic control when congestion occurs Send bandwidth control messages to avoid sending large amounts of traffic continuously.
It simplifies the configuration of traffic types and priorities, realizes centralized management of access traffic, protects original messages and service quality, improves congestion processing efficiency, and enables faster recovery of business traffic.
Smart Images

Figure CN110868357B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data communication technology, and in particular to a network traffic control method, an extensible virtual local area network tunnel endpoint (VTEP) device and a storage medium. Background Art
[0002] With the development of network technology, Internet data center networks are constantly expanding, and Ethernet Virtual Private Network (EVNP) technology using Scalable Virtual LAN (VXLAN) technology is increasingly being used. EVPN is a Layer 2 virtual private network technology. The control plane uses the Multi-Protocol Border Gateway Protocol to announce EVPN routing information, and the data plane uses VXLAN encapsulation to forward messages. When the tenant's physical sites are scattered in different locations, EVPN can provide Layer 2 interconnection for the same subnet of the same tenant based on the existing Internet Protocol (IP) network that interconnects the service provider or enterprise network; provide Layer 3 interconnection for different subnets of the same tenant through the EVPN gateway, and provide Layer 3 interconnection with the external network.
[0003] There are many virtual machines in the Internet data center network, and the service traffic is large. The virtual machines can be migrated, which leads to complex network traffic services. At the same time, the EVPN network transmits the user's service traffic. It is necessary to encapsulate the VXLAN message on the basis of the original service traffic for transmission, and a 50-byte header needs to be added, which increases the network load. These factors may cause network traffic to be congested at a certain node. In the prior art, if the network is congested, the service priority of the traffic is generally classified based on the service type (Type Of Service, TOS) field of the user-side traffic IP header, and traffic control and other operations are performed. This traffic control method must define the classification of traffic service priority and other information on the user side in advance, which is troublesome to configure and is not conducive to centralized management of traffic. In addition, since different users define different traffic service priorities and classification rules, it is necessary to modify the service priority of the user's original message on the scalable virtual LAN tunnel endpoint (Virtual Tunnel End Point, VTEP) node, which will destroy the user's original message and original service quality (Quality Of Service, QOS) information. At the same time, when congestion occurs in the network, traffic control and scheduling are performed on the device where the congestion occurs. A large amount of traffic will still be sent to the device where the traffic congestion occurs, which will continue to put pressure on the device where the congestion occurs, resulting in the business traffic being unable to recover quickly. Summary of the invention
[0004] In view of this, the purpose of the embodiments of the present invention is to provide a network traffic control method, a VTEP device and a storage medium to solve the technical problems that the traffic control method in the prior art is troublesome to configure when the network is congested, is not conducive to centralized management of traffic, will damage the user's original message and original service quality information, and when the network is congested, a large amount of traffic will still be sent to the device where the traffic congestion occurs, which will continue to put pressure on the congested device and cause the business traffic to fail to recover quickly.
[0005] The technical solution adopted by the present invention to solve the above technical problems is as follows:
[0006] According to one aspect of an embodiment of the present invention, a network traffic control method is provided, the method comprising:
[0007] The first scalable virtual LAN tunnel endpoint VTEP device configures a traffic type and a service priority for the service traffic according to the service type of the accessed service traffic;
[0008] The first VTEP device encapsulates the service traffic into an extensible virtual local area network VXLAN message, and encapsulates the traffic type and service priority of the service traffic into the VXLAN message;
[0009] The first VTEP device sends the VXLAN message to the second VTEP device, so that the second VTEP device performs flow control on the service flow according to the flow type and service priority of the service flow carried in the VXLAN message when congestion occurs.
[0010] According to another aspect of an embodiment of the present invention, a network traffic control method includes:
[0011] The second VTEP device receives the service traffic sent by the first VTEP device in the form of a VXLAN message, where the VXLAN message is encapsulated with a traffic type and a service priority of the service traffic;
[0012] The second VTEP device decapsulates the VXLAN message to obtain the service traffic and the traffic type and service priority of the service traffic;
[0013] If network congestion occurs in the second VTEP device, the second VTEP device performs flow control on the service flow according to the flow type and service priority of the service flow.
[0014] According to another aspect of an embodiment of the present invention, a VTEP device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the resource allocation method of the network traffic control method provided in the above-mentioned one aspect are implemented; or the steps of the network traffic control method provided in the above-mentioned other aspect are implemented.
[0015] According to another aspect of an embodiment of the present invention, a storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the resource allocation method of the network traffic control method provided by one aspect above are implemented; or the steps of the network traffic control method provided by another aspect above are implemented.
[0016] The network traffic control method, VTEP device and storage medium provided by the embodiments of the present invention configure the traffic type and service priority of the service traffic according to the service type on the first VTEP device side, and encapsulate the traffic type and service priority together with the service traffic into a VXLAN message and forward it to the second VTEP device, so that the second VTEP device performs traffic control according to the traffic type and priority of the service traffic encapsulated in the VXLAN message when congestion occurs, thereby simplifying the configuration steps of the traffic type and service priority on the user side, realizing centralized management of the traffic accessed to the first VTEP device, and will not damage the user's original message and original service quality information; in addition, when network congestion occurs on the second VTEP device, traffic control information carrying its own expected bandwidth is sent to the first VTEP device, thereby preventing the first VTEP device from continuously sending a large amount of traffic to the congested second VTEP device, thereby improving the congestion processing efficiency and allowing the service traffic to recover faster. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A topological diagram of a network traffic control system provided by an embodiment of the present invention;
[0018] Figure 2 It is a schematic diagram of the implementation flow of the network traffic control method provided by an embodiment of the present invention;
[0019] Figure 3a It is a schematic diagram of the structure of the original VXLAN message in the prior art;
[0020] Figure 3b It is a schematic diagram of the structure of a VXLAN message in the network traffic control method provided by an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of an implementation flow of a network traffic control method provided by another embodiment of the present invention;
[0022] Figure 5 It is a topological diagram of a network traffic control system provided by a specific implementation example of the present invention;
[0023] Figure 6 It is a schematic diagram of the implementation flow of a network traffic control method provided by a specific implementation example of the present invention.
[0024] Figure 7 is a schematic diagram of an implementation flow of a network traffic control method provided by another embodiment of the present invention;
[0025] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0026] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the present invention.
[0027] Figure 1 1 is a topological diagram of a network traffic control system provided by an embodiment of the present invention. For the sake of convenience, only the parts related to this embodiment are shown.
[0028] See also Figure 1 As shown, the network traffic control system provided by the embodiment of the present invention includes at least one user terminal at the sending end, a first VTEP device, a second VTEP device and at least one user terminal at the receiving end, which are sequentially connected in communication. During the communication process, the first VTEP device receives the service traffic sent by at least one user at the sending end, and encapsulates the service traffic sent by at least one user terminal at the sending end into a VXLAN message and sends it to the second VTEP device. After the second VTEP device decapsulates the VXLAN message, it forwards the decapsulated service traffic to at least one user terminal at the receiving end.
[0029] Based on the above system structure, the following embodiments of the present invention are proposed.
[0030] Embodiment 1
[0031] Figure 2 is a schematic diagram of the implementation flow of the network traffic control method provided by an embodiment of the present invention, and the execution subject of the method is Figure 1 The first VTEP device in the Figure 2 As shown, the network traffic control method provided in this embodiment includes the following steps:
[0032] Step S201: The first VTEP device configures a traffic type and a service priority for the service traffic according to the service type of the accessed service traffic.
[0033] In this embodiment, the relationship between the service type of the service flow and the traffic type and service priority is pre-configured by the administrator of the EVPN VXLAN network. After receiving the service flow sent by the user side, the VTEP device identifies the service type of the service flow, and then queries the association relationship according to the identified service type to obtain the traffic type and service priority of the service flow.
[0034] In this embodiment, the service types include but are not limited to voice traffic, video traffic, SMS traffic, and file traffic. The traffic types include two types: discardable and non-discardable when network congestion occurs, where discardable is represented by "0" and non-discardable is represented by "1". The grading method of the service priority can be customized by the management personnel, and the service traffic with high service priority is processed first when network congestion occurs.
[0035] Step S202: The first VTEP device encapsulates the service traffic into an extensible virtual local area network (VXLAN) message, and encapsulates the traffic type and service priority of the service traffic into the VXLAN message.
[0036] In this embodiment, the traffic type and service priority of the service traffic are encapsulated into the reserved field of the VXLAN message header. FIG3 shows a schematic diagram of the structure of the original VXLAN message. Figure 4 FIG3 shows a schematic diagram of the structure of a VXLAN message in an embodiment of the present invention. Figure 4 As shown, the 9th bit to the 24th bit of the original VXLAN message header is a reserved field. In this embodiment, the 9th bit is positioned as a traffic type flag bit indicating whether the service traffic can be discarded when network congestion occurs. "0" represents discardable and "1" represents non-discardable. The 10th bit to the 12th bit are positioned as service priority levels 1 to 8. When the service priority is 1, the priority is the lowest. When the service priority is 8, the priority is the highest. When traffic congestion occurs, traffic control is performed according to the traffic type defined in the VXLAN header.
[0037] Step S203: The first VTEP device sends the VXLAN message to the second VTEP device, so that the second VTEP device performs flow control on the service flow according to the flow type and service priority of the service flow carried in the VXLAN message when congestion occurs.
[0038] In this embodiment, the first VTEP device encapsulates the traffic type and service priority in the header of the VXLAN message and sends it to the second VTEP device together with the service traffic to be forwarded in the form of a VXLAN message, so that the second VTEP device can perform traffic control according to the traffic type and service priority in the header of the VXLAN message when network congestion occurs.
[0039] From the above, it can be seen that the network traffic control method provided in this embodiment configures the traffic type and service priority of the service traffic according to the service type on the first VTEP device side, and encapsulates the traffic type and service priority together with the service traffic into the VXLAN message and forwards it to the second VTEP device, so that the second VTEP device performs traffic control according to the traffic type and priority of the service traffic encapsulated in the VXLAN message when congestion occurs, thereby simplifying the configuration steps of the traffic type and service priority on the user side, realizing centralized management of the traffic accessed to the first VTEP device, and will not damage the user's original message and original service quality information.
[0040] Embodiment 2
[0041] Figure 4 is a schematic diagram of the implementation flow of a network traffic control method provided by another embodiment of the present invention, the execution subject of the method is Figure 1 The first VTEP device in the Figure 4 As shown, the network traffic control method provided in this embodiment includes the following steps:
[0042] Step S401: The first VTEP device configures a traffic type and a service priority for the service traffic according to the service type of the accessed service traffic.
[0043] It should be noted that, since the implementation method of step S401 is exactly the same as the implementation method of step S101 in the previous embodiment, it will not be described in detail here.
[0044] Step S402, the first VTEP device determines whether it has received the flow control message sent by the second VTEP device, the flow control message including the congestion flag and expected bandwidth of the second VTEP device. If the first VTEP device receives the flow control message, it proceeds to step S403.
[0045] In this embodiment, the congestion flag is a custom flag used to indicate whether the second VTEP device is congested. When the congestion flag is "1", it indicates congestion, and when the congestion flag is "0", it indicates no congestion. The expected bandwidth refers to the bandwidth that the second VTEP device expects the first VTEP device to send subsequently when congestion occurs.
[0046] Preferably, in this embodiment, the flow control information also includes a message type flag and a Router-ip originating router IP. The message type flag is "0", which is a custom flow control message flag. When the message type flag is "0", it indicates that the message is a flow control message; the originating router IP is used to indicate the source device that sends the message.
[0047] Step S403: The first VTEP device identifies whether the second VTEP device is congested according to the congestion flag in the flow control message. If the second VTEP device is congested, the process proceeds to step S404.
[0048] In this embodiment, the first VTEP device identifies whether the second VTEP device is congested according to the value of the congestion flag bit. When the congestion flag bit is "1", it indicates that the second VTEP device is congested. When the congestion flag bit is "0", it indicates that the second VTEP device is not congested.
[0049] Step S404: The first VTEP device performs flow control on the service flow according to the flow type and service priority of the service flow and the expected bandwidth in the flow control message.
[0050] In this embodiment, the first VTEP device performs flow control according to the flow type and service priority of the service flow and the expected bandwidth in the flow control message, including:
[0051] The first VETP device counts the total bandwidth of all traffic types that are non-discardable service traffic;
[0052] The first VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the expected bandwidth, wherein the remaining bandwidth is the difference between the expected bandwidth and the total bandwidth;
[0053] If there is no remaining bandwidth, the business traffic of the discardable type is discarded, and the bandwidth ratio of each non-discardable business traffic is calculated according to the service priority of all business traffic of the non-discardable type, and traffic control is performed according to the bandwidth ratio of each non-discardable business traffic and the expected bandwidth.
[0054] Preferably, in this embodiment, after the first VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the expected bandwidth, the method further includes:
[0055] If there is remaining bandwidth, the bandwidth ratio of each non-discardable business flow is calculated according to the business priority of all non-discardable business flows, and the flow of each non-discardable business flow is controlled according to the bandwidth ratio of each non-discardable business flow and the expected bandwidth; at the same time,
[0056] The bandwidth ratio of each discardable service flow is calculated according to the service priority of all discardable service flows, and the flow of each discardable service flow is controlled according to the bandwidth ratio of each discardable service flow and the remaining bandwidth.
[0057] Preferably, in this embodiment, when network congestion occurs in the second VTEP device, if the total bandwidth of all service flows to be sent is greater than or equal to the expected bandwidth, there is no remaining bandwidth. At this time, the first VTEP device directly discards the service flows with a flow type of "0", and sets the service flows with a flow type of "1" as non-discardable messages, which are prioritized during scheduling. The specific flow control scheduling method of the first VTEP device is as follows:
[0058] Counting the sum of the service priorities of all non-discardable service flows of the traffic type, and dividing the service priority of a non-discardable service flow by the sum of the service priorities of the non-discardable service flows to obtain the bandwidth ratio of the non-discardable service flow;
[0059] The transmission bandwidth of the certain non-discardable service flow is obtained by multiplying the bandwidth ratio of the certain non-discardable service flow by the maximum bandwidth;
[0060] Traffic control is performed based on the transmission bandwidth of each non-discardable business flow.
[0061] Preferably, in this embodiment, when network congestion occurs in the second VTEP device, if the total bandwidth of all service traffic to be sent is less than the expected bandwidth, there is remaining bandwidth. At this time, the first VTEP device can use the remaining bandwidth to schedule the service traffic with traffic type "0". The scheduling method is the same as the scheduling method of the service traffic with traffic type "1", which will not be repeated here.
[0062] In a specific implementation example, if the service traffic is divided into 8 service types, the service priorities of these 8 types are 8 to 1, and when network congestion occurs in the second VTEP device, assuming that the service traffic of the 8 service types exists and is non-discardable service traffic, then the bandwidth ratios of the service traffic of these 8 service types to the expected bandwidth are 8 / (8+7+6+5+4+3+2+1), 7 / (8+7+6+5+4+3+2+1), 6 / (8+7+6+5+4+3+2+1), 5 / (8+7+6+ 5+4+3+2+1), 4 / (8+7+6+5+4+3+2+1), 3 / (8+7+6+5+4+3+2+1), 2 / (8+7+6+5+4+3+2+1), 1 / (8+7+6+5+4+3+2+1); assuming that only non-discardable business traffic with business priority 4 and business priority 3 exists, then the bandwidth ratios of these two types of business traffic to the expected bandwidth are 4 / (4+3) and 3 / (4+3), respectively, and so on. The higher the business priority of the business traffic, the higher the priority of the transmission is guaranteed. If there is still surplus bandwidth after all the packets of traffic type "1" pass through, the service traffic of traffic type "0" can be scheduled. If congestion occurs and service traffic with service priorities 8 to 1 exists, the bandwidth proportions of these 8 service types to the remaining bandwidth are 8 / (8+7+6+5+4+3+2+1), 7 / (8+7+6+5+4+3+2+1), 6 / (8+7+6+5+4+3+2+1), 5 / (8+7+6+5+4+3+2+1), 4 / (8+7+6+5+4+3+2+1), 3 / (8+7+6+5+4+3+2+1), 2 / (8+7+6+5+4+3+2+1), and 1 / (8+7+6+5+4+3+2+1). It should be noted that in this embodiment, when traffic control is performed simultaneously according to traffic type and service priority, for service traffic with traffic type "1", the total bandwidth scheduled is the expected bandwidth; for service traffic with traffic type "0", the total bandwidth scheduled is the remaining bandwidth.
[0063] In this embodiment, during the process of traffic control, the first VTEP device encapsulates the traffic type and service priority of the service traffic to be forwarded into the header of the VXLAN message, and sends it to the second VTEP device in the form of a VXLAN message together with the service traffic to be forwarded.
[0064] Preferably, in this embodiment, after step S405, it also includes: if the second VTEP device is not congested, communication is performed according to the normal business forwarding process, and the traffic type and business priority of the business traffic to be forwarded are directly encapsulated into the header of the VXLAN message, and sent to the second VTEP device together with the business traffic to be forwarded in the form of a VXLAN message.
[0065] Preferably, in this embodiment, after step S406, the following steps may also be included:
[0066] When the first VTEP device is performing flow control, if it receives a flow control message indicating congestion relief sent by the second VTEP device, the first VTEP device stops performing flow control.
[0067] In this embodiment, when the network congestion is relieved, the second VTEP device will send a flow control message to the first VTEP device again. At this time, the message type in the flow control message is "0", the congestion flag is "0", and the expected bandwidth is "0", so as to notify the first VTEP device that the network congestion is relieved. When the first VTEP device obtains the message that the network congestion is relieved, it will end the flow control and resume normal business traffic forwarding.
[0068] From the above, it can be seen that the network traffic control method provided in this embodiment configures the traffic type and service priority of the service traffic according to the service type on the first VTEP device side, and encapsulates the traffic type and service priority together with the service traffic into the VXLAN message for forwarding, thereby simplifying the configuration steps of the traffic type and service priority on the user side, and can realize centralized management of the traffic accessed to the first VTEP device without damaging the user's original message and original service quality information; when the second VTEP device has network congestion, the traffic control information carrying its own expected bandwidth is sent to the first VTEP device, thereby avoiding the first VTEP device from continuously sending a large amount of traffic to the congested second VTEP device, thereby improving the congestion processing efficiency and allowing the service traffic to recover faster.
[0069] Embodiment 3
[0070] Figure 5 It is a topological diagram of a network traffic control system provided by a specific implementation example of the present invention. Figure 6 is a schematic diagram of the implementation flow of a network traffic control method provided by a specific implementation example of the present invention, and the execution subject of the method is Figure 5 The first VTEP device in the following combination Figure 5 , Figure 6 The implementation of the network traffic control method provided by the embodiment of the present invention is described in detail:
[0071] Step S601: Configure the traffic type and service level of the access-side service on the first VTEP device. Specifically:
[0072] Set the traffic type sent by user 1 to "1", which means it cannot be discarded, and the service priority to 8. When encapsulating the VXLAN header for the traffic from user 1, the corresponding header structure is as follows: Figure 4 As shown, the traffic type and service priority fields in the VXLAN header corresponding to user 1 are 11000.
[0073] Set the traffic type of user 2 to "0", which means it can be discarded, and set the service priority to 3. When encapsulating the VXLAN message header for the traffic sent by user 2, the corresponding header structure is as follows: Figure 4 , the traffic type and service level fields in the VXLAN header corresponding to user 1 are 00011.
[0074] Set the traffic type device sent by user 3 to "1", which cannot be discarded, and the service priority to 4. When encapsulating the traffic sent by user 3 with a VXLAN header, the corresponding header structure is as follows: Figure 4 , the traffic type and service priority fields in the VXLAN header corresponding to user 3 are 10100.
[0075] Step S602: The first VTEP device determines whether a flow control message sent by the second VTEP device is received, where the flow control message includes a congestion flag and an expected bandwidth of the second VTEP device.
[0076] Step S603: If the first VTEP device receives the flow control message, the first VTEP device identifies whether congestion occurs in the second VTEP device according to a congestion flag bit in the flow control message.
[0077] In this embodiment, when user traffic passes through the network and reaches the second VTEP device, the second VTEP device will first determine whether network congestion occurs on itself. When network congestion occurs and the congestion waiting time exceeds the preset congestion time threshold, the second VTEP device will send a flow control message to the first VTEP device. The message type of this flow control message is "0", indicating that the message is a flow control message; the congestion flag is "1", indicating that network congestion occurs on the second VTEP device, and the expected bandwidth (set in kbps) field is filled with 1010111111001000000, indicating that the expected bandwidth is 360kbps, and the originating router IP field is filled with the source IP address of the receiving end used to establish a VXLAN tunnel for BGP EVPN.
[0078] Step S604: If congestion occurs in the second VTEP device, the first VTEP device performs flow control according to the configured flow type and service priority and the expected bandwidth in the flow control message.
[0079] In this embodiment, if the second VTEP device has network congestion, then after receiving the flow control message sent by the second VTEP device, the first VTEP device learns the expected bandwidth when the second VTEP device is congested, and performs flow control at the local end according to the set flow type and service priority, as follows:
[0080] Assume that network congestion occurs on the second VTEP device and flow control based on VXLAN messages is configured. The T1 port can only accept messages with a bandwidth of 360M / S. User 1, User 2, and User 3 all send messages at a rate of 200M / S. According to the traffic type field in the VXLAN message, the messages are user 1 and user 3, with a total of 400M. When congestion occurs, according to the service priority in the VXLAN message, user 1 and user 3 are 8 and 4 respectively. Then the theoretical transmission bandwidth of user 1 is 8 / (8+4)*360=240M / S, and the theoretical transmission bandwidth of user 3 is 4 / (8+4)*360=120M. Since the actual bandwidth of the traffic sent by user 1 is only 200M / S, and the theoretical transmission bandwidth is greater than the actual bandwidth, user 1 passes 200M / S without being discarded, and the remaining 40M / S bandwidth will pass through the traffic of user 3. Therefore, the traffic of user 3 finally passes 160M / S, with no excess bandwidth. The traffic of users with traffic type "0" is not guaranteed, and user 2 has no traffic passing. The traffic of 360M / S is decapsulated and forwarded by the second VTEP device.
[0081] In this embodiment, when the second VTEP device no longer experiences network congestion, the second VTEP device will send a flow control message to the first VTEP device again. At this time, the message type in the flow control message is "0", the congestion flag is "0", and the expected bandwidth field is 0. After VTEP1 receives this message, it determines that the congestion flag is "0", and the traffic sent to the second VTEP device is no longer bandwidth controlled, and all the traffic of user 1, user 2, and user 3 is sent to the second VTEP device for normal business forwarding.
[0082] Step S605: During the process of flow control, the first VTEP device encapsulates the flow type and service priority of the service flow to be forwarded into the header of the VXLAN message, and sends it to the second VTEP device in the form of a VXLAN message together with the service flow to be forwarded.
[0083] In this embodiment, the traffic type and service priority are encapsulated in the header of the VXLAN message and sent to the second VTEP device together with the service traffic to be forwarded in the form of a VXLAN message. In this way, the second VTEP device can perform traffic control according to the traffic type and service priority in the header of the VXLAN message when network congestion occurs.
[0084] It can be seen from the above that in this embodiment, when network congestion occurs in the second VTEP device, the second VTEP device can immediately perform traffic control according to the traffic type and service priority defined in the VXLAN message. If congestion continues, the second VTEP device will send a traffic control message to the first VTEP device, and perform traffic control at the traffic sending end to avoid processing pressure on the second VTEP device when congestion occurs, thereby achieving end-to-end refined traffic control from the sending end to the receiving end.
[0085] Embodiment 4
[0086] Figure 7 is a schematic diagram of the implementation flow of a network traffic control method provided by another embodiment of the present invention. In this embodiment, the execution subject of the process is Figure 1 The second VTEP device is shown. Figure 7 As shown, the network traffic control method provided in this embodiment includes the following steps:
[0087] Step S701: The second VTEP device receives service traffic sent by the first VTEP device in the form of a VXLAN message, where the VXLAN message encapsulates a traffic type and a service priority of the service traffic.
[0088] In this embodiment, the second VTEP device can simultaneously receive VXLAN messages sent by one or more of the first VTEP devices. The traffic type and service priority of the service traffic are encapsulated in the reserved field of the VXLAN message header. The structure of the encapsulated VXLAN message is described in detail in Example 1, which will not be repeated here.
[0089] Step S702: The second VTEP device decapsulates the VXLAN message to obtain the service traffic and the traffic type and service priority of the service traffic.
[0090] Step S703: If network congestion occurs in the second VTEP device, the second VTEP device performs traffic control on the service traffic according to the traffic type and service priority of the service traffic encapsulated in the VXLAN message.
[0091] In this embodiment, the traffic type and service priority of the service traffic are encapsulated in a reserved position in the header of the VXLAN message. If the network throughput of the second VTEP device decreases as the network load increases, when the network throughput drops to a preset throughput threshold, it means that the second VTEP device has network congestion. At this time, the second VTEP device performs traffic control according to the traffic type and service priority of the service traffic carried in the received VXLAN message header.
[0092] Preferably, in this embodiment, the traffic type includes discardable and non-discardable, and the second VTEP device controls the traffic of the service traffic according to the traffic type and service priority of the service traffic encapsulated in the VXLAN message header, including:
[0093] The second VTEP device counts the total bandwidth of all non-discardable service flows according to the type of flow carried by the VXLAN message;
[0094] The second VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the maximum bandwidth that can be processed by the VTEP device, wherein the remaining bandwidth is the difference between the maximum bandwidth and the total bandwidth;
[0095] If there is no remaining bandwidth, the second VTEP device discards the business traffic of the discardable type, calculates the bandwidth ratio of each non-discardable business traffic according to the business priority of all business traffic of the non-discardable type, and performs traffic control according to the bandwidth ratio of each non-discardable business traffic and the expected bandwidth.
[0096] Preferably, after the second VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the maximum bandwidth that can be processed by the VTEP device, the method further includes:
[0097] If there is remaining bandwidth, the second VTEP device calculates the bandwidth ratio of each non-discardable service flow according to the service priority of all non-discardable service flows, and performs flow control on each non-discardable service flow according to the bandwidth ratio of each non-discardable service flow and the expected bandwidth; at the same time,
[0098] The second VTEP device calculates the bandwidth ratio of each discardable service flow according to the service priority of all discardable service flows, and performs flow control on each discardable service flow according to the bandwidth ratio of each discardable service flow and the remaining bandwidth.
[0099] It should be noted that in this embodiment, when network congestion occurs, the maximum bandwidth that the second VTEP device can handle is the same as the expected bandwidth. The flow control method of the second VTEP device when network congestion occurs is exactly the same as the specific implementation method of the flow control method of the first VTEP device in Example 1, so it will not be repeated here.
[0100] Preferably, in this embodiment, the network traffic control method may further include:
[0101] When network congestion occurs, the second VTEP device starts to count the network congestion time. If the network congestion time is greater than a preset threshold, a flow control message is sent to the first VTEP device, so that the first VTEP device performs flow control according to the flow control message, wherein the flow control message includes the congestion flag and expected bandwidth of the VTEP device.
[0102] The value range of the preset threshold is 10s to 30s. Preferably, in this embodiment, the preset threshold is 20s. When the second VTEP device experiences network congestion for more than 20s, the second VTEP device will send a flow control message to the first VTEP device, wherein the flow control message includes at least a congestion flag and an expected bandwidth, and the congestion flag is "1" to notify the VTEP device at the sending end that the second VTEP device has network congestion, so that the first VTEP device performs flow control according to the expected bandwidth in the flow control message and the traffic type and service priority configured by the first VTEP device for the accessed service traffic, so as to relieve the pressure on the second VTEP device.
[0103] Preferably, the flow control message may also include a message type and an originating router IP. The message type flag is "0", which is a custom flow control message flag. When the message type flag is "0", it indicates that the message is a flow control message; the originating router IP is used to indicate the source device that sends the message.
[0104] Preferably, in this embodiment, the network traffic control method further includes, after step S503:
[0105] If the network congestion of the second VTEP device is relieved, the second VTEP device sends congestion relief flow control information to the first VTEP device, so that the first VTEP device stops performing flow control.
[0106] In this embodiment, when the network congestion is relieved, the second VTEP device will send a flow control message to the first VTEP device again. At this time, the message type in the flow control message is "0", the congestion flag is "0", and the expected bandwidth is "0", so as to notify the first VTEP device that the network congestion is relieved. When the first VTEP device obtains the message that the network congestion is relieved, it will end the flow control and resume normal business traffic forwarding.
[0107] From the above, it can be seen that the network traffic control method provided in this embodiment also encapsulates the traffic type and service priority into the VXLAN message, thereby simplifying the configuration steps of the traffic type and service priority on the user side, and realizing centralized management of the traffic accessed to the first VTEP device without damaging the user's original message and original service quality information; when network congestion occurs in the second VTEP device, the traffic control information carrying its own expected bandwidth is sent to the first VTEP device, thereby avoiding the first VTEP device from continuously sending a large amount of traffic to the congested second VTEP device, thereby improving the congestion processing efficiency and allowing the service traffic to recover faster.
[0108] Embodiment 5
[0109] A VTEP device provided by an embodiment of the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the network traffic control method described in Embodiment 1, Embodiment 2, Embodiment 3, or Embodiment 4 are implemented.
[0110] The device of the embodiment of the present invention belongs to the same concept as the network traffic control method described in the above-mentioned embodiment one, embodiment two, embodiment three or embodiment four. The specific implementation process is detailed in the method embodiment, and the technical features in the method embodiment are correspondingly applicable in the embodiment of the device, which will not be repeated here.
[0111] Those skilled in the art can understand that all or some of the steps in the method disclosed in this embodiment can be implemented as software, firmware, hardware, or a suitable combination thereof.
[0112] Embodiment 6
[0113] An embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the network traffic control method described in the above-mentioned embodiment one, embodiment two, embodiment three or embodiment four are implemented.
[0114] The computer-readable storage medium of the embodiment of the present invention belongs to the same concept as the network traffic control method described in the above-mentioned embodiment 1, embodiment 2, embodiment 3 or embodiment 4. The specific implementation process is detailed in the corresponding method embodiment, and the technical features in the method embodiment are correspondingly applicable in the embodiment of the computer-readable storage medium, which will not be repeated here.
[0115] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0116] In hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0117] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the present invention is not limited thereby. Any modification, equivalent substitution and improvement made by those skilled in the art without departing from the scope and essence of the present invention shall be within the scope of the present invention.
Claims
1. A network traffic control method, characterized in that: The network traffic control method comprises: The first scalable virtual LAN tunnel endpoint VTEP device configures a traffic type and a service priority for the service traffic according to the service type of the accessed service traffic; The first VTEP device encapsulates the service traffic into an extensible virtual local area network VXLAN message, and encapsulates the traffic type and service priority of the service traffic into the VXLAN message; The first VTEP device sends the VXLAN message to the second VTEP device, so that the second VTEP device performs flow control on the service flow according to the flow type and service priority of the service flow carried in the VXLAN message when congestion occurs; The network traffic control method also includes: The first VTEP device determines whether a flow control message sent by the second VTEP device is received, where the flow control message includes a congestion flag and an expected bandwidth of the second VTEP device; If the first VTEP device receives the flow control message, identifying whether congestion occurs in the second VTEP device according to the congestion flag bit in the flow control message; If congestion occurs in the second VTEP device, the first VTEP device performs flow control on the service flow according to the flow type and service priority of the service flow and the expected bandwidth in the flow control message.
2. The network traffic control method according to claim 1, characterized in that: The traffic type includes discardable and non-discardable, and the first VTEP device controls the traffic of the service traffic according to the traffic type and service priority of the service traffic and the expected bandwidth in the traffic control message, including: The first VTEP device counts the total bandwidth of all service flows of non-discardable traffic types; The first VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the expected bandwidth, wherein the remaining bandwidth is the difference between the expected bandwidth and the total bandwidth; If there is no remaining bandwidth, the first VTEP device discards the business traffic of the discardable type, calculates the bandwidth ratio of each non-discardable business traffic according to the service priority of all business traffic of the non-discardable type, and performs traffic control according to the bandwidth ratio of each non-discardable business traffic and the expected bandwidth.
3. The network traffic control method according to claim 2, characterized in that: After the first VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the expected bandwidth, the following further includes: If there is remaining bandwidth, the first VTEP device calculates the bandwidth ratio of each non-discardable business flow according to the business priority of all non-discardable business flows, and performs flow control on each non-discardable business flow according to the bandwidth ratio of each non-discardable business flow and the expected bandwidth; at the same time, The first VTEP device calculates the bandwidth ratio of each discardable service flow according to the service priority of all discardable service flows, and performs flow control on each discardable service flow according to the bandwidth ratio of each discardable service flow and the remaining bandwidth.
4. The network traffic control method according to claim 1, characterized in that: The network traffic control method further includes: When the first VTEP device is performing flow control, if it receives a flow control message indicating congestion relief sent by the second VTEP device, the first VTEP device stops performing flow control.
5. A network traffic control method, characterized in that: The network traffic control method comprises: The second VTEP device receives the service traffic sent by the first VTEP device in the form of a VXLAN message, where the VXLAN message is encapsulated with a traffic type and a service priority of the service traffic; The second VTEP device decapsulates the VXLAN message to obtain the service traffic and the traffic type and service priority of the service traffic; If network congestion occurs in the second VTEP device, the second VTEP device performs flow control on the service flow according to the flow type and service priority of the service flow; The network traffic control method also includes: The second VTEP device counts the network congestion time. If the network congestion time is greater than a preset threshold, a flow control message is sent to the first VTEP device, so that the first VTEP device performs flow control according to the flow control message, wherein the flow control message includes the congestion flag and expected bandwidth of the second VTEP device.
6. The network traffic control method according to claim 5, characterized in that: The traffic type includes discardable and non-discardable, and the second VTEP device controls the traffic of the service traffic according to the traffic type and service priority of the service traffic, including: The second VTEP device counts the total bandwidth of all traffic types that are non-discardable service traffic; The second VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the maximum bandwidth that the second VTEP device can currently process, wherein the remaining bandwidth is the difference between the maximum bandwidth and the total bandwidth; If there is no remaining bandwidth, the second VTEP device discards the business traffic of the discardable type, calculates the bandwidth ratio of each non-discardable business traffic according to the business priority of all business traffic of the non-discardable type, and performs traffic control according to the bandwidth ratio of each non-discardable business traffic and the expected bandwidth.
7. The network traffic control method according to claim 6, characterized in that: After the second VTEP device determines whether there is remaining bandwidth according to the total bandwidth and the maximum bandwidth that the second VTEP device can currently process, the following further includes: If there is remaining bandwidth, the second VTEP device calculates the bandwidth ratio of each non-discardable service flow according to the service priority of all non-discardable service flows, and performs flow control on each non-discardable service flow according to the bandwidth ratio of each non-discardable service flow and the expected bandwidth; at the same time, The second VTEP device calculates the bandwidth ratio of each discardable service flow according to the service priority of all discardable service flows, and performs flow control on each discardable service flow according to the bandwidth ratio of each discardable service flow and the remaining bandwidth.
8. The network traffic control method according to claim 5, characterized in that: The network traffic control method also includes: If the network congestion is relieved, the second VTEP device sends congestion relief flow control information to the first VTEP device, so that the second VTEP device stops performing flow control.
9. A VTEP device, characterized in that: It comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the network traffic control method as described in any one of claims 1 to 4; or implements the steps of the network traffic control method as described in any one of claims 5 to 8.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the network traffic control method as described in any one of claims 1 to 4 are implemented; and / or the steps of the network traffic control method as described in any one of claims 5 to 8 are implemented.
