VXLAN data transmission method, electronic device and computer program product
By constructing path probing messages to assess the quality of relay equipment and determine target weights, the problems of low data transmission quality and low bandwidth utilization in VXLAN are solved, achieving more efficient data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZTE CORP
- Filing Date
- 2026-01-26
- Publication Date
- 2026-04-24
AI Technical Summary
The low data transmission quality and low bandwidth utilization of VXLAN are mainly due to the significant differences in link quality across different paths, which affects the overall network performance.
By constructing multiple path probe messages, the quality of relay equipment in different transmission paths is evaluated. Based on the evaluation results, the target weight is determined, and a target path group is constructed for data transmission.
It improves the quality of VXLAN data transmission, enhances the overall bandwidth utilization of the network, and ensures consistent link quality during data transmission.
Smart Images

Figure CN121924074A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and more specifically, to a VXLAN data transmission method, electronic device, and computer program product. Background Technology
[0002] With the continuous development of network technology, Virtual eXtensible Local Area Networks (VXLANs) are becoming increasingly widely used in various fields because they can solve the scalability problem of traditional networks through network encapsulation technology.
[0003] In related technologies, VXLAN data transmission typically distributes data traffic evenly across multiple paths to achieve load balancing. However, due to the complexity of networks in real-world scenarios, the link quality varies significantly across different paths, resulting in low data transmission quality for VXLAN and low overall network bandwidth utilization. Summary of the Invention
[0004] This application provides a VXLAN data transmission method, electronic device, and computer program product to at least solve the problems of low VXLAN data transmission quality and low bandwidth utilization in related technologies.
[0005] According to one embodiment of this application, a VXLAN data transmission method is provided, comprising:
[0006] Construct and send multiple path probe messages;
[0007] Receive multiple path probe response messages; the multiple path probe response messages include the transmission quality of relay devices in different transmission paths;
[0008] Based on the transmission quality, determine the target weight corresponding to each of the transmission paths;
[0009] A target path group is constructed based on the target weight, and data is transmitted based on the target path group.
[0010] According to yet another embodiment of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the steps in any of the above-described VXLAN data transmission method embodiments when it is run.
[0011] According to yet another embodiment of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above-described VXLAN data transmission method embodiments.
[0012] According to yet another embodiment of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in any of the above-described VXLAN data transmission method embodiments.
[0013] This application embodiment constructs and sends multiple path probe messages; receives multiple path probe response messages; the multiple path probe response messages include the transmission quality of relay devices within different transmission paths; determines the target weight corresponding to each transmission path based on the transmission quality; constructs a target path group based on the target weight, and performs data transmission based on the target path group. This application constructs and sends path probe messages to determine the transmission quality of relay devices included in different transmission paths, determines the target weight of the transmission path based on the transmission quality, constructs a target path group based on the target weight, and performs data transmission based on the target path group. By evaluating the quality of different transmission paths and then constructing a target path group based on the target weight for data transmission, this application ensures the data transmission quality of VXLAN and improves the overall bandwidth utilization of the network. Attached Figure Description
[0014] Figure 1 This is a hardware structure block diagram of a computer terminal used in an embodiment of the method of this application;
[0015] Figure 2 This is a schematic diagram illustrating an application scenario of VXLAN data transmission according to an embodiment of this application;
[0016] Figure 3 This is a flowchart illustrating the steps of a VXLAN data transmission method according to an embodiment of this application;
[0017] Figure 4 This is a flowchart illustrating the steps of another VXLAN data transmission method according to an embodiment of this application;
[0018] Figure 5 This is a schematic diagram of a VXLAN header that does not have path detection functionality;
[0019] Figure 6 This is a schematic diagram of a path detection packet with path detection function encapsulated with a VXLAN header according to an embodiment of this application;
[0020] Figure 7 This is a quantitative classification mapping table for transmission quality according to an embodiment of this application;
[0021] Figure 8 This is a schematic diagram illustrating data transmission based on a target path group, according to an embodiment of this application.
[0022] Figure 9 This is a schematic diagram of the structure of a VXLAN data transmission system according to an embodiment of this application;
[0023] Figure 10 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0024] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples. It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0025] With the continuous development of computer technology, the types and functions of communication networks are constantly increasing. VirtualeXtensible Local Area Network (VXLAN) is a large Layer 2 virtualization technology based on Internet Protocol (IP) networks. It can solve the scalability problem of traditional networks through network encapsulation technology (MAC in UDP). That is, VXLAN allows the expansion of local area networks within a wide area network by encapsulating Layer 2 (Media Access Control (MAC) layer) frames above the network layer (IP layer) and transmitting them using User Datagram Protocol (UDP).
[0026] In real-world scenarios, VXLAN tunnels used in data centers employ Equal-Cost Multi-Path (ECMP) in the tunnel encapsulation portion of the underlying network or physical network. ECMP is a routing strategy used to distribute network traffic across multiple equivalent paths. When multiple paths to the same destination with the same cost exist, ECMP can evenly distribute traffic across all these paths to achieve load balancing and improve network utilization. This increases the available bandwidth between VXLAN tunnel endpoints (VTEPs or Vteps) and provides multi-path redundancy.
[0027] However, in practical applications, due to the complexity of data center networks, VXLAN tunnels spanning multiple transmission devices have uneven load distribution on multiple paths in the Underlay. This results in significant differences in link latency, congestion levels, and bandwidth utilization between different paths, causing the actual throughput between Vtep to typically not reach 50%, leading to a waste of bandwidth resources.
[0028] In related technologies, the original service packet enters the source VTEP device through the access switch (AC) inlet. The destination VTEP device is then located using the overlay forwarding table. A VXLAN tunnel needs to be encapsulated, where the tunnel source IP is the IP address of the source VTEP device, and the tunnel destination IP is the IP address of the destination VTEP device. Then, based on the tunnel destination IP address, the underlay forwarding table is searched, typically finding an Ecmp index pointing to a multipath for the Ecmp group. Traditionally, routing in these technologies involves using the IP 5-tuple of the original service packet (source IP address (SIP) + destination IP address (DIP) + source port number (SPORT or sport) + destination port number (DPORT or dport) + protocol) to calculate a hash value. This hash value is then modulo the number of members in the Ecmp group (a mathematical operation that returns the remainder after dividing two numbers), and the specific path is selected based on the remainder. At the same time, the hash value calculated from the original service message is compressed to 16 bits and filled into the sport field of the VXLAN tunnel.
[0029] In load balancing routing at intermediate or transit devices, the hash value is calculated and routing is performed using the outer IP 5-tuple (Vtep SIP + Vtep DIP + Tunnel SPORT + Tunnel DPORT + Tunnel Protocol). Within the outer IP 5-tuple, Vtep SIP, Vtep DIP, Tunnel SPORT, and Tunnel Protocol are fixed. The only field that can distinguish different original service packets and is used for tunnel hash calculation is the tunnel sport field. That is, the tunnel sport field represents the discrete value of the original service packet.
[0030] In related technologies, VXLAN-based data transmission typically focuses only on distributing different traffic along different paths to achieve a uniform hash. However, these technologies do not consider the differences in link quality between different paths. Paths with inherently poor link quality are prone to problems such as long data latency, large queue depths, and even significant packet loss, severely impacting transmission quality. Furthermore, this data transmission method in related technologies also has low bandwidth utilization.
[0031] To address the aforementioned issues, this application provides a VXLAN data transmission method, electronic device, and computer program product. This method involves constructing and sending multiple path probe messages; receiving multiple path probe response messages; the multiple path probe response messages including the transmission quality of relay devices within different transmission paths; determining the target weight corresponding to each transmission path based on the transmission quality; constructing a target path group based on the target weight; and performing data transmission based on the target path group. This application, by constructing and sending path probe messages, determines the transmission quality of relay devices included in different transmission paths, determines the target weight of the transmission paths based on the transmission quality, constructs a target path group based on the target weight, and performs data transmission based on the target path group. By evaluating the quality of different transmission paths and then constructing a target path group based on the target weight for data transmission, the method ensures the quality of VXLAN data transmission and improves the overall bandwidth utilization of the network.
[0032] The methods and embodiments provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device (or electronic device, etc.). Taking running on a computer terminal as an example, Figure 1 This is a hardware structure block diagram of a computer terminal used in an embodiment of the method of this application. Figure 1 As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor (MCU) or a field-programmable gate array (FPGA)) and a memory 104 for storing data are also shown. The computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0033] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the VXLAN data transmission method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the aforementioned method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0034] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0035] For example, Figure 2 This is a schematic diagram illustrating an application scenario of VXLAN data transmission according to an embodiment of this application. Figure 2 As shown, in scenarios such as data centers, a VXLAN tunnel is established between the source VTEP and the destination VTEP, with m paths connecting the two VTEPs. Each path passes through several transit devices. Service data packets (data frames) enter the source VTEP device, and through hash routing, a path is selected from the load balancing group (or path group, etc.) to be transmitted to the destination VTEP device, and then sent to the final destination.
[0036] This application provides a VXLAN data transmission method that can be run on the aforementioned computer terminal or application scenario. Figure 3 This is a flowchart illustrating the steps of a VXLAN data transmission method according to an embodiment of this application. Figure 3 As shown, the VXLAN data transmission method includes the following steps:
[0037] Step S301: Construct and send multiple path probe messages.
[0038] The execution subject in this application embodiment can refer to a computer terminal, and the specific type of the execution subject is not limited in this application embodiment. A path detection frame can refer to a detection frame used for link quality assessment. Specifically, multiple path detection frames share the same source and destination VTEP devices, and these multiple path detection frames can cover multiple transmission paths from the source VTEP device to the destination VTEP device, thereby enabling the detection of different transmission paths. After constructing multiple path detection frames, the computer terminal can send each path detection frame through the source VTEP device, thereby achieving link quality detection.
[0039] Step S302: Receive multiple path probe response messages; the multiple path probe response messages include the transmission quality of relay devices in different transmission paths.
[0040] In this embodiment, a path detection ack frame can refer to the response frame corresponding to a path detection frame. After a computer terminal sends a path detection frame through a source VTEP device, multiple path detection frames travel through different transmission paths and eventually reach the destination VTEP device. The destination VTEP device can send a path detection ack frame back to the source VTEP device to return the path detection results.
[0041] Each path probe response message includes the transmission quality of relay devices within the transmission path. This transmission quality can refer to the quantified transmission quality value of the relay device probe indicators, which may specifically include at least one of bandwidth utilization, queue depth, and local latency.
[0042] Bandwidth utilization (Bandwidth / C) refers to the ratio of the bandwidth actually used by a relay device for data transmission within a certain time period to the maximum available bandwidth of that relay device, reflecting the link's usage status. For path quality assessment, a lower bandwidth utilization means the link is less idle, resulting in lower data transmission latency and packet loss rate, and better overall path transmission quality. Queue depth refers to the number of data packets waiting to be sent in the output queue of a relay device, reflecting network congestion. A larger queue depth indicates more data packets waiting to be sent, more severe network congestion, and increased data transmission latency. When assessing path transmission quality, a shallower queue depth indicates lower data transmission latency and higher link transmission quality. Local latency refers to the processing time of a data packet within the relay device from reception to transmission, reflecting the relay device's processing capacity and efficiency. When assessing path transmission quality, a smaller local latency indicates higher path response speed and data transmission efficiency. Of course, transmission quality can also be determined based on other detection indicators, such as packet loss rate, quality of service (QoS), and round-trip time. The specific selection can be made flexibly based on actual needs, and this application embodiment does not limit this.
[0043] Step S303: Determine the target weight corresponding to each transmission path based on the transmission quality.
[0044] Step S304: Construct a target path group based on the target weight, and perform data transmission based on the target path group.
[0045] In this embodiment, after the computer terminal receives path probe response messages corresponding to multiple path probe messages through the source VTEP device, it can determine the target weight corresponding to each transmission path based on the transmission quality in the path probe response message. In one example, the higher the transmission quality of a transmission path, the higher the target weight corresponding to that transmission path. Then, the computer terminal can construct a target path group based on the target weights of each transmission path. This target path group can be a non-equal cost multi-path (UCMP) group, meaning that different transmission paths in this target path group have different target weights; transmission paths with higher transmission quality correspond to higher target weights. This ensures that more data traffic can be transmitted via transmission paths with higher transmission quality during data transmission, thus ensuring data transmission quality and improving the overall bandwidth utilization of the network.
[0046] In this embodiment, the computer terminal constructs and sends path probe messages to determine the transmission quality of relay devices included in different transmission paths, and determines the target weight of the transmission path based on the transmission quality; then, it constructs a target path group based on the target weight, and performs data transmission based on the target path group. In this way, the computer terminal evaluates the quality of different transmission paths based on path probe messages and path probe reply messages, calculates the target weight of each transmission path based on its transmission quality, and then constructs a target path group based on the target weight for data transmission. This ensures the data transmission quality of VXLAN and improves the overall bandwidth utilization of the network.
[0047] This application provides a VXLAN data transmission method that can be run on the aforementioned computer terminal or application scenario. Figure 4 This is a flowchart illustrating the steps of another VXLAN data transmission method according to an embodiment of this application. Figure 4 As shown, the VXLAN data transmission method includes the following steps:
[0048] Step S401: Construct and send multiple path probe messages.
[0049] In this embodiment, the path probe messages can be constructed and sent by the source VTEP device, or they can be constructed by the CPU and sent by the source VTEP device. When the path probe messages are generated by the CPU, the source VTEP device needs to control the sending rhythm of the path probe messages. It should not consume too much CPU resources or send too frequently, nor should the intervals be too long, causing a single round of detection to take too long. In one example, the sending interval of the path probe messages by the source VTEP device can be from 1 millisecond (ms) to 10 ms, and the total time for sending 65,536 probe messages is 1.1 to 11 minutes; of course, other sending intervals can also be used, and this embodiment does not limit this.
[0050] In another example, the source VTEP device can send path probe packets one by one based on its multiple visible next-hop paths. Assuming there are 128 visible next-hop paths, only 128 path probe packets need to be sent, which reduces the path probe packet sending burden on the source VTEP device. However, when there are many layers in the physical network, some paths may be skipped. For example... Figure 2 The network diagram shows that paths 2 and 3 cannot be fully covered by a single path probe packet. The method by which the source Vtep device sends path probe packets one by one based on its multiple visible next-hop paths can be applied to scenarios with low network complexity or limited service traffic, where not all available paths need to participate in service packet forwarding.
[0051] In one exemplary embodiment, the outer VXLAN tunnel encapsulation of each path probe packet in multiple path probe packets is determined based on the source endpoint address, destination endpoint address, tunnel source port, tunnel destination port, and tunnel protocol, wherein the source endpoint address, destination endpoint address, tunnel destination port, and tunnel protocol are fixed values, and the tunnel source port traverses each value in the target value range; the inner packet of each path probe packet is an invalid value.
[0052] In this embodiment, multiple path probe packets are transmitted from the same source Vtep device to the same destination Vtep device. The outer VXLAN tunnel encapsulation of each path probe packet includes a source endpoint address (Vtep SIP), a destination endpoint address (Vtep DIP), a tunnel source port (SPORT), a tunnel destination port (DPORT), and a tunnel protocol (Protocol). The source endpoint address, destination endpoint address, tunnel destination port, and tunnel protocol are fixed values. The tunnel source port can iterate through various values within the target range; for example, the target data range can be 0 to 65535. Thus, the total number of path probe packets constructed by the computer terminal is 65536. In real-world scenarios such as data centers, 65536 path probe packets can cover all possible transmission paths. The inner packets of the path probe packets are filled with invalid values to ensure that the path probe packets comply with the legality requirements of Ethernet packets.
[0053] In one exemplary embodiment, each path probe message includes a path probe function indication field, a probe index field, a path identifier field, and a transmission quality field.
[0054] In one exemplary embodiment, the detection metric field includes at least one of a bandwidth utilization field, a local latency field, and a queue depth field.
[0055] In this embodiment of the application, the path probing message may include multiple path probing-related fields, such as a path probing function indication field, a probing indicator field, a path identifier field, and a transmission quality field. For example, Figure 5 This is a schematic diagram of a VXLAN header that does not have path detection capabilities. Figure 6 This is a schematic diagram of the encapsulated VXLAN header of a path detection packet with path detection function according to an embodiment of this application. Figure 6 As shown, the path detection message includes a Detect Flag (DF) field, which indicates whether path detection is enabled. In one example, different values of the DF field represent different meanings, as follows:
[0056] 000 indicates a standard VXLAN package header, which does not have path detection capabilities.
[0057] 001 indicates that the data packet carries a probe function, requiring the relay device to update the Quality Metric (QM) field.
[0058] 010 indicates that the data packet carries the probe results and does not require the relay device to update the QM field.
[0059] 101 indicates a dedicated path probing message, which requires the relay device to update the QM field. In this embodiment, the path probing message used in the path probing phase can be a dedicated path probing message, i.e., the DF field is set to 101.
[0060] 110 indicates a dedicated path detection response message, which does not require the relay device to update the QM field.
[0061] The probe metrics fields in the path probing message may include bandwidth utilization (B), local latency (D), and queue depth (Q). Specifically, enabling the B field indicates that the bandwidth utilization of the relay device needs to be collected; enabling the D field indicates that the local latency of the relay device needs to be collected; and enabling the Q field indicates that the queue depth of the relay device needs to be collected. The three detection items B, Q, and D in the probe metrics fields can be enabled simultaneously, or any one or any two of them can be enabled; this embodiment of the application does not limit this.
[0062] The PathID field represents a set of local device IDs for several transmission devices along a transmission path. The QM field represents the quantized transmission quality value calculated locally by the relay device; the initial value of the QM field is all 0s.
[0063] In this embodiment, the path probing message may include multiple path probing-related fields, which improves the flexibility of path probing message construction and can meet the actual needs of different scenarios, making it more adaptable to different scenarios. The aforementioned path probing-related fields in the path probing message are non-standard fields and can be identified from the VXLAN header of the message by performing bidirectional port message mirroring on the network side of the Vtep device.
[0064] In one exemplary embodiment, in response to the path detection function indication field in the path detection message being a first value and at least one of the detection indicator fields being in an enabled state, the relay device updates the path identifier field in the path detection message and updates the transmission quality field in the path detection message.
[0065] In this embodiment, the source VTEP device sends a path probing message, which ultimately reaches the destination VTEP device via at least one relay device. Upon receiving the path probing message, the relay device can identify the path probing function indication field and the detection index field within the message. If the path probing function indication field is a first value, such as 101, and at least one field in the detection index field is enabled (e.g., a value of 1), the relay device can update the path identifier field in the message, recording its local device identifier. Simultaneously, it can update the transmission quality field in the message, thereby enabling the relay device to collect transmission quality data.
[0066] In one exemplary embodiment, the relay device performs an XOR operation on the local device identifier and the path identifier field to update the path identifier field in the path probe message.
[0067] In this embodiment, each relay device in the VXLAN is assigned a local device identifier, which uniquely identifies the relay device. For example, the local device identifier may include 24 bits. When a path probe packet passes through a relay device, the relay device performs an XOR operation between its local device identifier and the path identifier field in the path probe packet, and then re-inserts the result into the path identifier field. In this way, the path identifier field in the path probe packet uniquely identifies a transmission path from the source Vtep to the destination Vtep. Of course, relay devices can also use other methods to update their local device identifier to the path identifier field, such as using a hash value chain, which is not limited in this embodiment.
[0068] In one exemplary embodiment, the relay device determines at least one of the local device's bandwidth utilization, local latency, and queue depth, determines the local transmission quality based on at least one of the bandwidth utilization, local latency, and queue depth, and a preset quantization method, and updates the transmission quality field in the path probe packet based on the local transmission quality.
[0069] In this embodiment, the relay device determines that the DF field is valid (i.e., the path detection function is enabled). Based on the enabling status of the detection indicator fields, it can obtain at least one of the following: bandwidth utilization, queue depth, and local latency of the relay device. Then, it quantizes the collected bandwidth utilization, local latency, and queue depth according to a preset quantization method to obtain the local transmission quality of the relay device. After that, it can update the transmission quality field in the path detection message based on the local transmission quality to realize the collection of the transmission quality of the relay device.
[0070] For example, Figure 7This is a quantitative grading mapping table for transmission quality, as described in an embodiment of this application. Figure 7 As shown, bandwidth utilization, queue depth, and local latency are divided into levels 0 to 7, where a higher bandwidth utilization corresponds to a higher quantization value; a higher queue depth corresponds to a higher quantization value; and a higher local latency corresponds to a higher quantization value. It should be noted that the quantization classification mapping table in this embodiment is applicable to all relay devices. Thus, through a unified quantization classification mapping table (or quantization classification standard), a quantization representation of transmission quality can be achieved, ensuring the rationality and accuracy of link quality assessment. Based on Figure 7 The local transmission quality of the relay device can be represented in the quantization and grading mapping table shown below as follows:
[0071] QM=B Bandwidth utilization quantification level +Q Queue Depth Quantization Level +D Local latency quantization level
[0072] In this way, the relay device can obtain a quantization value within the range of 0 to 21, which serves as the local transmission quality of the relay device. A higher local transmission quality value indicates a lower transmission quality for the relay device. Of course, Figure 7 The quantization grading mapping table shown is merely an example. Other quantization grading standards can also be used in real-world scenarios, and this application does not limit this.
[0073] In one exemplary embodiment, in response to the number of relay devices being at least two, the relay devices update the local transmission quality to the transmission quality field in the path probe message in response to the local transmission quality being lower than the transmission quality in the path probe message.
[0074] In this embodiment, the transmission path may include multiple relay devices. When there are at least two relay devices, each relay device can determine its local transmission quality using the calculation method described above. Furthermore, each relay device can compare the transmission quality field in the path probe message with its local transmission quality. If the local transmission quality is lower than the transmission quality in the path probe message—for example, if the quality quantization value corresponding to the local transmission quality is higher than the quality quantization value in the transmission quality field—then the relay device can update the local transmission quality to the transmission quality field. In this way, the path probe message will ultimately retain the worst transmission quality in the transmission path. Based on the barrel principle, by combining the worst quality evaluation values of all relay devices on a transmission path, the overall transmission quality of the transmission path can be accurately reflected.
[0075] Step S402: Receive multiple path probe response messages; the multiple path probe response messages include the transmission quality of relay devices in different transmission paths.
[0076] In one exemplary embodiment, multiple path probe response messages are constructed and sent by the destination endpoint;
[0077] The source endpoint address of the outer VXLAN tunnel encapsulation of the path probe reply message is the destination endpoint address in the path probe message received by the destination endpoint;
[0078] The destination endpoint address of the outer VXLAN tunnel encapsulation of the path probe reply message is the source endpoint address in the path probe message received by the destination endpoint;
[0079] The path identifier field, transmission quality field, tunnel source port, and tunnel destination port in the path probe reply message are the same as those in the path identifier field, transmission quality field, tunnel source port, and tunnel destination port in the path probe message received by the destination endpoint.
[0080] In this embodiment, the path probe message sent by the source VTEP device (i.e., the source endpoint) reaches the destination VTEP device (i.e., the destination endpoint) after passing through at least one relay device. After receiving the path probe message, the destination VTEP device constructs a path probe reply message and sends it back to the source VTEP device.
[0081] Specifically, the path probe function indication field in the path probe reply message can be a second value. For example, the DF field can be set to 110, indicating a dedicated path probe reply message, which does not require the relay device to update the QM field. The transmission quality field, path identifier field, tunnel source port (SPORT), and tunnel destination port (DPORT) in the path probe reply message can be directly copied verbatim from the path probe message received by the destination Vtep device. Furthermore, the source endpoint address in the path probe reply message is the same as the destination endpoint address in the path probe message received by the destination Vtep device; conversely, the destination endpoint address in the path probe reply message is the same as the source endpoint address in the path probe message received by the destination Vtep device. In other words, the source and destination endpoint addresses in the path probe reply message are swapped.
[0082] After constructing a path probe reply message, the destination VTEP device can send it to the source VTEP device. During this process, it is only necessary to ensure that the path probe reply message is completely transmitted back to the source VTEP device; it does not need to be identical to the original path. Furthermore, if a relay device passing through the path probe reply message recognizes the DF field in the message as the second value (e.g., 110), the relay device does not need to update the transmission quality field and directly transmits the path probe reply message, ensuring its rapid return.
[0083] Step S403: Merge the various transmission paths to obtain the target path; each target path corresponds to at least one transmission path; determine the overall transmission quality of the target path based on the transmission quality of at least one transmission path; calculate the target weight corresponding to the target path based on the overall transmission quality.
[0084] In this embodiment, the transmission of path probe messages during the path probing phase can be periodic, with a long interval, such as minutes or hours. Using a long interval for sending path probe messages ensures that the transmission paths in the selected target path group always maintain high transmission quality, and that no new transmission paths with better transmission quality are added. Of course, if the network in the actual scenario is relatively stable, such as in a data center with a stable network, the interval for sending path probe messages can be on the order of hours.
[0085] In this embodiment, after receiving the path probe response message through the source Vtep device, the computer terminal can record the correspondence between the transmission quality (QM value), the tunnel source port, and the path identifier to determine the transmission quality of each transmission path. In one example, the smaller the QM value, the better the transmission quality of the transmission path.
[0086] Since the source Vtep device sequentially sends path probe messages from tunnel source ports 0 to 65535, the corresponding path probe response messages will be returned sequentially. Based on the network scale of a data center in a real-world scenario, the actual number of effective paths will be far less than 65536. The computer terminal can merge transmission paths, specifically merging transmission paths with the same PathID to obtain a target path (or effective path). Each target path can correspond to at least one transmission path. At least one transmission path corresponding to the same target path essentially corresponds to the same transmission path, and their transmission quality (QM) values should be equal. If the transmission quality is different, the computer terminal can determine the overall transmission quality of the target path based on the transmission quality of at least one transmission path according to a preset merging method. This preset merging method may include taking the minimum, maximum, or average value, etc., which is not limited in this embodiment. The tunnel source port of the target path can be the minimum value among the tunnel source ports corresponding to at least one transmission path corresponding to the target path.
[0087] After determining the overall transmission quality of the target path, the computer terminal can determine the target weight corresponding to the target path according to a preset weight mapping relationship. This preset weight mapping relationship can store weight values corresponding to different overall transmission qualities. For example, the QM quantization value can be divided into the following four levels:
[0088] Level 0: QM = 0~4;
[0089] Level 1: QM = 5~9;
[0090] Level 2: QM = 10~14;
[0091] Level 3: QM = 15~21;
[0092] The weight ratio for levels 0 to 3 can be 4:3:2:1, meaning the target weight for a target path with overall transmission quality at level 0 is 0.4, the target weight for a target path with overall transmission quality at level 1 is 0.3, the target weight for a target path with overall transmission quality at level 2 is 0.2, and the target weight for a target path with overall transmission quality at level 3 is 0.1. Of course, this preset weight mapping relationship can also take other forms, and this embodiment does not limit it.
[0093] Step S404: Determine the number of entry points corresponding to different target weights based on the total number of entry points and the target weights; the higher the target weight, the higher the number of entry points; determine the number of target entry points corresponding to each target path based on the number of target paths corresponding to each target weight; construct target path groups based on the target paths and the number of target entry points; and perform data transmission based on the target path groups.
[0094] In this embodiment, after determining the target weight of the target path, the computer terminal can construct a target path group based on the target weight and the target path. Specifically, the computer terminal can group the target paths into a UCMP group for multi-path load balancing forwarding between the source VTEP device and the destination VTEP device. The arrangement principle of this UCMP group is that the target path with higher transmission quality has a higher target weight. The tunnel source port field for traffic transmission can be taken from the tunnel source port record value corresponding to PathID. The UCMP group can be arranged according to the four levels from level 0 to level 3 in the example above, adding the target paths of levels 0 to 3 to the UCMP group with a weight of 4:3:2:1, and then evenly distributing different target paths within the same level.
[0095] Specifically, the computer terminal can determine the number of entries corresponding to different target weights based on the total number of entries in the target path group and the target weights. The higher the target weight, the higher the number of entries. Then, the computer terminal can allocate the number of entries corresponding to each target weight to each target path with the same target weight, thereby obtaining the number of target entries for each target path, and thus obtaining the target path group.
[0096] For example, suppose there are 128 target paths, with 20 in level 0, 40 in level 1, 50 in level 2, and 18 in level 3. A computer terminal can create a UCMP group with a total of 1024 entries. These are distributed to each level with a weighted average of 4:3:2:1. Level 0 has 409 entries, which are spread across 20 target paths, allowing calculation of the target entry count for each path. Level 1 has 307 entries, spread across 40 target paths. Level 2 has 205 entries, spread across 50 target paths. Level 3 has 103 entries, spread across 18 target paths.
[0097] For example, Figure 8 This is a schematic diagram illustrating data transmission based on a target path group, according to an embodiment of this application. Figure 8As shown, in the UCMP routing unit, when the original packet enters the source Vtep device, its hash value is calculated using the original packet's five-tuple. This hash value is then modulo 1024 and looked up in the UCMP table (i.e., the target path group) to find the corresponding entry and obtain the tunnel source port. The outer port of the VXLAN packet encapsulated in this original packet uses this tunnel source port obtained from the table lookup. The original packet is then forwarded along the target path corresponding to the PathID.
[0098] In this embodiment, the construction of the target path group, i.e., the UCMP group, can adopt the data plane implementation method described above. That is, by actively sending path probe messages and returning path probe reply messages, the target path group is constructed and routed by the source VTEP device. In another example, the destination VTEP device can send the path probe reply messages to the controller, which collects all the path probe reply messages, forms a UCMP group, and sends it to the source VTEP device to guide path forwarding. Of course, other construction methods can also be used, and this embodiment does not limit them.
[0099] Step S405: For each target path, construct and send a path verification message; receive a path verification reply message; the path verification reply message includes the transmission verification quality of the relay devices within different target paths; in response to the difference between the transmission verification quality and the transmission quality being greater than a preset threshold, update the target weight and reconstruct the target path group.
[0100] In this embodiment, the computer terminal can periodically verify the target path to ensure its validity. This verification process can also be called the path keep-alive phase or the path verification phase. The computer terminal can construct and send path verification messages. The field settings and main settings of the five-tuple in the path verification message are different from those in the path probe message type. The main difference is that the path verification message only needs to verify the target path. The tunnel source port does not need to traverse all values in the target value range, that is, it does not need to traverse all potential paths with a sport value from 0 to 65535, but only traverses the sport value corresponding to the valid PathID, such as the 128 target paths in the example above. The purpose of the path keep-alive phase is to keep the path alive. This keep-alive period is a short period, and the sending period can be on the order of seconds or minutes. Of course, if it is a data center with a relatively stable network, the sending interval of the path verification message can be on the order of minutes. This embodiment does not limit this.
[0101] Similar to path detection response messages, the computer terminal can receive path verification response messages through the source VTEP device. These response messages include the transmission verification quality of relay devices within different target paths. For the same target path, if the difference between the transmission verification quality obtained from the path verification response message and the transmission quality obtained from the path detection response message exceeds a preset threshold, the target path is significantly degraded. The computer terminal can update the target weight of the target path and update the target path group to ensure data transmission quality. If the difference between the transmission verification quality and the transmission quality is not greater than the preset threshold, the computer terminal does not need to perform an update operation. This preset threshold can be set based on actual needs, and this embodiment does not limit it.
[0102] In this embodiment of the application, the computer terminal constructs and sends a path verification message, receives a path verification reply message including the transmission verification quality of relay devices in different target paths, and determines whether to update the target weight and target path group based on whether the difference between the transmission verification quality and the transmission quality is greater than a preset threshold. This enables dynamic verification of the target path, ensures the validity and rationality of the target path group, and ensures the path transmission quality.
[0103] In one exemplary embodiment, the path verification message is sent separately; or,
[0104] The path verification information in the path verification message is sent via VXLAN data packets. The path verification information includes the path verification function indication field, the verification index field, the target path identifier field, and the transmission verification quality field.
[0105] In this embodiment, the path verification message can be sent separately by the source Vtep device, along with the path probe message type. Alternatively, the path probe message can be carried within the VXLAN data packet sent by the source Vtep device, i.e., the path probe information is sent together with the data packet, collecting transmission verification quality data from relay devices along the way. This improves the flexibility of path verification message transmission and saves communication resources. The path probe information may include a path verification function indication field, a verification index field, a target path identifier field, and a transmission verification quality field. The path verification function indication field indicates whether the path verification function is enabled in the path verification message. The verification index field may include a bandwidth utilization field, a local latency field, and a queue depth field, with at least one of these fields being enabled. The target path identifier field indicates the identifier of the target path to be verified. The transmission verification quality field stores the transmission verification quality data of the relay devices. The path verification information settings in this path verification message can refer to the field settings in the aforementioned path probe message, and this embodiment does not limit this.
[0106] It should be noted that whether the path verification message is sent separately or together with a data packet, the corresponding path verification reply message still needs to be sent separately to ensure the rapid return of the verification results and improve the accuracy of the path verification.
[0107] Based on the above embodiments, Figure 9 This is a schematic diagram of the logical structure of a VXLAN data transmission method according to an embodiment of this application. Figure 9 As shown, this VXLAN data transmission method can be implemented through a detection unit, a CPU processing unit, and a UCMP routing unit. The detection unit periodically sends path probe messages and returns path probe response messages to the CPU processing unit. The CPU processing unit receives the path probe response messages and establishes a full path record table for the tunnel, including the correspondence between transmission quality, tunnel source port, and path identifier. The CPU processing unit can merge and summarize identical path identifiers to obtain the target path (or valid path) and its corresponding overall transmission quality. Then, it can calculate the target weight of the target path based on this overall transmission quality and construct a target path group, i.e., a UCMP group, based on the target path and its target weight. The CPU processing unit can then distribute this UCMP group to the hardware UCMP routing unit.
[0108] The UCMP routing unit can calculate the hash value of the original packet and select an available path from the UCMP group based on the hash result, then send the original packet. In this way, the target path with higher transmission quality has a higher weight in the target path group, so that a larger proportion of data traffic can be transmitted through the target path with higher transmission quality, which can improve data transmission quality and bandwidth utilization.
[0109] The VXLAN data transmission method in this embodiment obtains the transmission quality of each transmission path by traversing and probing multiple paths in the underlying VXLAN tunnel network, avoiding path omissions. Furthermore, the periodic monitoring method dynamically identifies the addition of new paths and the exit of old paths, ensuring path validity and guaranteeing the integrity and effectiveness of the entire path. In addition, the relay devices in the transmission paths in this embodiment use the same quantification and grading standard to calculate a quantified transmission quality based on probing indicators such as bandwidth utilization, queue depth, and local latency. This enables precise quantification of path commands, ensuring the rationality and effectiveness of subsequent target weight calculations and target path group construction, thereby ensuring data transmission quality and improving overall network bandwidth utilization.
[0110] The VXLAN data transmission method in this application embodiment collects the transmission quality quantification values of relay devices in different transmission paths by traversing and probing multiple paths, and then obtains the quality assessment of different paths; based on the transmission quality of different transmission paths, the target weight is calculated and the target path group is used as a load-sharing group to guide the forwarding of service data packets, which can effectively improve bandwidth utilization and ensure data transmission quality.
[0111] It should be understood that in the various embodiments of this application, the sequence number of each process and step does not imply the order of execution. The execution order of each process and step should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0112] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.
[0113] This embodiment also provides a VXLAN data transmission device for implementing the above embodiments and implementation methods; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated. The VXLAN data transmission device includes:
[0114] The sending module is used to construct and send multiple path probe messages.
[0115] The receiving module is used to receive multiple path probe response messages; the multiple path probe response messages include the transmission quality of relay devices in different transmission paths;
[0116] The determination module is used to determine the target weight corresponding to each transmission path based on the transmission quality.
[0117] The building module is used to construct target path groups based on target weights and to perform data transmission based on target path groups.
[0118] In one exemplary embodiment, the outer VXLAN tunnel encapsulation of each path probe packet in multiple path probe packets is determined based on the source endpoint address, destination endpoint address, tunnel source port, tunnel destination port, and tunnel protocol, wherein the source endpoint address, destination endpoint address, tunnel destination port, and tunnel protocol are fixed values, and the tunnel source port traverses each value in the target value range.
[0119] The inner message of each path probe message is an invalid value.
[0120] In one exemplary embodiment, each path probe message includes a path probe function indication field, a probe index field, a path identifier field, and a transmission quality field.
[0121] In one exemplary embodiment, the detection metric field includes at least one of a bandwidth utilization field, a local latency field, and a queue depth field.
[0122] In one exemplary embodiment, in response to the path detection function indication field in the path detection message being a first value and at least one of the detection indicator fields being in an enabled state, the relay device updates the path identifier field in the path detection message and updates the transmission quality field in the path detection message.
[0123] In one exemplary embodiment, the relay device performs an XOR operation on the local device identifier and the path identifier field to update the path identifier field in the path probe message.
[0124] In one exemplary embodiment, the relay device determines at least one of the local device's bandwidth utilization, local latency, and queue depth, determines the local transmission quality based on at least one of the bandwidth utilization, local latency, and queue depth, and a preset quantization method, and updates the transmission quality field in the path probe packet based on the local transmission quality.
[0125] In one exemplary embodiment, in response to the number of relay devices being at least two, the relay devices update the local transmission quality to the transmission quality field in the path probe message in response to the local transmission quality being lower than the transmission quality in the path probe message.
[0126] In one exemplary embodiment, multiple path probe response messages are constructed and sent by the destination endpoint;
[0127] The source endpoint address of the outer VXLAN tunnel encapsulation of the path probe reply message is the destination endpoint address in the path probe message received by the destination endpoint;
[0128] The destination endpoint address of the outer VXLAN tunnel encapsulation of the path probe reply message is the source endpoint address in the path probe message received by the destination endpoint;
[0129] The path identifier field, transmission quality field, tunnel source port, and tunnel destination port in the path probe reply message are the same as those in the path identifier field, transmission quality field, tunnel source port, and tunnel destination port in the path probe message received by the destination endpoint.
[0130] In one exemplary embodiment, the determining module is specifically used for:
[0131] The various transmission paths are merged to obtain the target path; each target path corresponds to at least one transmission path.
[0132] Determine the overall transmission quality of the target path based on the transmission quality of at least one transmission path.
[0133] Calculate the target weight corresponding to the target path based on the overall transmission quality.
[0134] In one exemplary embodiment, the construction module is specifically used for:
[0135] The number of entry points corresponding to different target weights is determined based on the total number of entry points and the target weights; the higher the target weight, the higher the number of entry points.
[0136] The number of target entry points corresponding to each target path is determined based on the number of target paths corresponding to each target weight.
[0137] Construct a target path group based on the target path and the number of target entry points.
[0138] In one exemplary embodiment, the apparatus is further configured to:
[0139] For each target path, construct and send a path verification message;
[0140] Receive path verification reply messages; the path verification reply messages include the transmission verification quality of relay devices within different target paths;
[0141] If the difference between the transmission inspection quality and the transmission quality exceeds a preset threshold, the target weight is updated and the target path group is reconstructed.
[0142] In one exemplary embodiment, the path verification message is sent separately; or,
[0143] The path verification information in the path verification message is sent via VXLAN data packets. The path verification information includes the path verification function indication field, the verification index field, the target path identifier field, and the transmission verification quality field.
[0144] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0145] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described VXLAN data transmission method embodiments when running.
[0146] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), computer hard disk, magnetic disk, or optical disk.
[0147] Figure 10 This is a structural block diagram of an electronic device according to an embodiment of this application, such as... Figure 10 As shown, embodiments of this application also provide an electronic device 100, including a memory 1001 and a processor 1002. The memory 1001 stores a computer program, and the processor 1002 is configured to run the computer program to perform the steps in any of the above-described VXLAN data transmission method embodiments.
[0148] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0149] Embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements the steps in any of the above-described VXLAN data transmission method embodiments.
[0150] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0151] Obviously, those skilled in the art should understand that the modules or steps of this application described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, this application is not limited to any particular combination of hardware and software.
[0152] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for data transmission in a Virtual Scalable Local Area Network (VXLAN), characterized in that, include: Construct and send multiple path probe messages; Receive multiple path probe response messages; The multiple path probe response messages include the transmission quality of relay devices within different transmission paths; Based on the transmission quality, determine the target weight corresponding to each of the transmission paths; A target path group is constructed based on the target weight, and data is transmitted based on the target path group.
2. The method according to claim 1, characterized in that, The outer VXLAN tunnel encapsulation of each path probe packet in the multiple path probe packets is determined based on the source endpoint address, destination endpoint address, tunnel source port, tunnel destination port and tunnel protocol, wherein the source endpoint address, destination endpoint address, tunnel destination port and tunnel protocol are fixed values, and the tunnel source port traverses each value in the target value range; The inner message of each path probe message is an invalid value.
3. The method according to claim 1, characterized in that, Each path probe message includes a path probe function indication field, a probe index field, a path identifier field, and a transmission quality field.
4. The method according to claim 3, characterized in that, The detection indicator fields include at least one of the following: bandwidth utilization, local latency, and queue depth.
5. The method according to claim 3 or 4, characterized in that, In response to the path detection function indication field in the path detection message being a first value and at least one of the detection indicator fields being enabled, the relay device updates the path identifier field in the path detection message and updates the transmission quality field in the path detection message.
6. The method according to claim 3, characterized in that, The relay device performs an XOR operation between the local device identifier and the path identifier field to update the path identifier field in the path probe message.
7. The method according to claim 5, characterized in that, The relay device determines at least one of the local device's bandwidth utilization, local latency, and queue depth. Based on at least one of the bandwidth utilization, local latency, and queue depth, and a preset quantization method, it determines the local transmission quality and updates the transmission quality field in the path probe message based on the local transmission quality.
8. The method according to claim 3, characterized in that, In response to the fact that the number of relay devices is at least two, the relay devices update the local transmission quality to the transmission quality field in the path probe message in response to the fact that the local transmission quality is lower than the transmission quality in the path probe message.
9. The method according to claim 2, characterized in that, The multiple path probe response messages are constructed and sent by the destination endpoint; The source endpoint address of the outer VXLAN tunnel encapsulation of the path probe reply message is the destination endpoint address in the path probe message received by the destination endpoint; The destination endpoint address of the outer VXLAN tunnel encapsulation of the path probe reply message is the source endpoint address in the path probe message received by the destination endpoint; The path identifier field, transmission quality field, tunnel source port, and tunnel destination port in the path probe response message are the same as those in the path identifier field, transmission quality field, tunnel source port, and tunnel destination port in the path probe message received by the destination endpoint.
10. The method according to claim 1, characterized in that, The step of determining the target weight corresponding to each transmission path based on the transmission quality includes: The various transmission paths are merged to obtain the target path; each target path corresponds to at least one transmission path. The overall transmission quality of the target path is determined based on the transmission quality corresponding to at least one transmission path. Calculate the target weight corresponding to the target path based on the overall transmission quality.
11. The method according to claim 10, characterized in that, The construction of the target path group based on the target weight includes: The number of entry points corresponding to different target weights is determined based on the total number of entry points and the target weights; the higher the target weight, the higher the number of entry points. The number of target entry points corresponding to each target path is determined based on the number of target paths corresponding to each target weight. The target path group is constructed based on the target path and the number of target entry points.
12. The method according to claim 10, characterized in that, The method further includes: For each target path, construct and send a path verification message; Receive path verification response messages; the path verification response messages include the transmission verification quality of relay devices within different target paths; In response to the difference between the transmission inspection quality and the transmission quality being greater than a preset threshold, the target weight is updated and the target path group is reconstructed.
13. The method according to claim 12, characterized in that, The path verification message is sent separately; or... The path verification information in the path verification message is sent via VXLAN data packets. The path verification information includes a path verification function indication field, a verification index field, a target path identifier field, and a transmission verification quality field.
14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the VXLAN data transmission method according to any one of claims 1 to 13.
15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the VXLAN data transmission method as described in any one of claims 1 to 13.