Message transmission method and device, related equipment, storage medium and computer program product

By pre-loading the gateway VTEP IP address within the second VXLAN segment into the first device, the problem of low efficiency of DCI gateways is solved, and efficient cross-regional network transmission is achieved.

CN122137780APending Publication Date: 2026-06-02CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
Filing Date
2026-02-05
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In public domain cross-domain transmission solutions, DCI gateways need to carry millions of routing table entries across the entire network, resulting in slow query response, low forwarding efficiency, and long and costly hardware expansion cycles.

Method used

The first device carries the VTEP IP address of the second gateway within the second VXLAN segment in the message sent to the first gateway, omitting the second query process of the first gateway. By pre-carrying and encapsulating the routing query results in the first device, the number of routing table entries queried by the first gateway is reduced.

Benefits of technology

It improves the forwarding efficiency of VXLAN packets, reduces hardware resource consumption, shortens the hardware expansion cycle and cost, and enhances the efficiency of cross-regional network transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137780A_ABST
    Figure CN122137780A_ABST
Patent Text Reader

Abstract

This application provides a message transmission method, apparatus, related devices, storage medium, and computer program product. The method includes: sending a first message to a first gateway within a first VXLAN segment; wherein the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VTEP IP address of the second gateway within the second VXLAN segment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a message transmission method, apparatus, related equipment, storage medium and computer program product. Background Technology

[0002] In public domain cross-domain transmission schemes, Data Center Interconnection (DCI) gateways are used to enable communication between different Virtual eXtensible Local Area Network (VXLAN) segments. As a result, DCI gateways need to carry all tenants' network-wide routing table entries, which can reach millions of entries. This makes querying routes slow and leads to low forwarding efficiency. Summary of the Invention

[0003] To address the related technical issues, embodiments of this application provide a message transmission method, apparatus, related equipment, storage medium, and computer program product.

[0004] The technical solution of this application embodiment is implemented as follows: This application provides a message transmission method applied to a first device within a first VXLAN segment, the method comprising: Send the first message to the first gateway within the first VXLAN segment; The first message represents a VXLAN message sent from a first virtual machine in the first VXLAN segment to a second virtual machine in the second VXLAN segment; the first message carries the Internet Protocol Address (IP) of the VXLAN Tunnel Endpoints (VTEP) of the second gateway in the second VXLAN segment.

[0005] The method in the above scheme further includes: The first device receives a network flow table from the control device. The network flow table is used to instruct the first device to obtain the VTEP IP address of the second gateway in the second VXLAN segment by addressing when it is recognized that the data payload carried by the first packet needs to be transmitted between different VXLAN segments.

[0006] In the above scheme, the VTEP IP address of the second gateway is carried in the reserved field in the VXLAN header of the first message.

[0007] The method in the above scheme further includes: Receive a second message sent by the first virtual machine, wherein the second message represents an Ethernet frame whose destination is the second virtual machine; Based on the MAC address of the second virtual machine carried in the second message, a lookup is performed in the MAC address table to obtain the VTEP IP address of the second gateway; The first message is encapsulated based on the VTEP IP address of the second gateway and the second message.

[0008] This application embodiment also provides a message transmission method applied to a first gateway within a first VXLAN segment, the method comprising: Receive the first message sent by the first device within the first VXLAN segment; The first message represents a VXLAN message sent from a first virtual machine in the first VXLAN segment to a second virtual machine in the second VXLAN segment; the first message carries the VTEP IP address of the second gateway in the second VXLAN segment.

[0009] The method in the above scheme further includes: Based on the VTEP IP address of the second gateway carried in the first message, the identifier of the second VXLAN segment corresponding to the VTEP IP address of the second gateway is searched in the VTEP table to obtain the search result. The search result includes whether the identifier is found in the VTEP table or whether the identifier is not found in the VTEP table. Based on the search results, it is determined whether the first message needs to be re-encapsulated before forwarding it.

[0010] In the above scheme, determining whether the first packet needs to be re-encapsulated before forwarding it based on the search result includes: If the lookup result indicates that the identifier is found in the VTEP table, based on the identifier of the VXLAN segment indicated by the lookup result and the VTEP IP address of the second gateway, the field representing the identifier of the VXLAN segment and the field representing the next-hop IP address in the header of the first message are modified to obtain the processed first message.

[0011] In the above scheme, determining whether the first packet needs to be re-encapsulated before forwarding it based on the search result includes: If the search result indicates that the identifier is not found in the VTEP table, the first message is decapsulated to obtain the IP address of the second virtual machine; The routing information is obtained by querying the route based on the IP address of the second virtual machine; The first packet is re-encapsulated based on the routing information to obtain the processed first packet.

[0012] The method in the above scheme further includes: The VTEP table sent by the receiving control device indicates at least the correspondence between the VTEP IP address of the gateway and the identifier of the VXLAN segment.

[0013] The method in the above scheme further includes: Based on the VTEP IP address of the second gateway, the processed first message is sent to the second gateway within the second VXLAN segment.

[0014] This application also provides a message transmission device, including: The first sending unit is configured to send a first message to a first gateway within the first VXLAN segment; wherein the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VXLAN IP address of the second gateway within the second VXLAN segment.

[0015] This application also provides a message transmission device, including: The first receiving unit is configured to receive a first message sent by a first device within the first VXLAN segment; wherein the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VTEP IP address of a second gateway within the second VXLAN segment.

[0016] This application also provides a first device, including a first processor and a first memory for storing a computer program that can run on the first processor. Wherein, when the first processor is used to run the computer program, it executes the steps of any of the methods described above on the first device side.

[0017] This application also provides a first gateway, including a second processor and a second memory for storing computer programs that can run on the second processor. Wherein, when the second processor is used to run the computer program, it executes the steps of any of the methods described above on the first gateway side.

[0018] This application embodiment also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the methods described above on the first device side, or implements the steps of any of the methods described above on the first gateway side.

[0019] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the methods described above on the first device side, or implements the steps of any of the methods described above on the first gateway side.

[0020] In the message transmission method, apparatus, related devices, storage medium, and computer program products provided in this application embodiment, a first device sends a first message to a first gateway within the first VXLAN segment; the first gateway receives the first message sent by the first device within the first VXLAN segment; wherein, the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VTEP IP address of the second gateway within the second VXLAN segment. In this scheme, the first message sent by the first device to the first gateway carries the VTEP IP address of the second gateway within the VXLAN segment where the destination of the first message is located. This allows the first gateway to directly obtain the VTEP IP address of the second gateway from the first message when forwarding messages sent by the first virtual machine, without needing to query the entire network route to obtain the VTEP IP address of the second gateway, thus eliminating the secondary query process of the first gateway and improving the forwarding efficiency of VXLAN messages. Attached Figure Description

[0021] Figure 1 This is a schematic flowchart of a message transmission method provided in an embodiment of this application; Figure 2 This is a schematic diagram of a VXLAN packet structure provided in an embodiment of this application; Figure 3 This is a schematic flowchart of another message transmission method provided in the embodiments of this application; Figure 4 This is a schematic diagram of VXLAN packet flow provided in an application embodiment of this application; Figure 5 This is a schematic diagram of the structure of a message transmission device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of another message transmission device provided in the embodiments of this application; Figure 7 This is a schematic diagram of the first device structure provided in an embodiment of this application; Figure 8 This is a schematic diagram of the first gateway structure provided in the embodiments of this application. Detailed Implementation

[0022] With the development of cloud computing, the trend of enterprises migrating their business scale to the cloud is obvious. All cloud resource providers have built distributed resource systems globally to meet users' needs for accessing high-quality cloud services from the nearest location. As a result, distributed business deployment, off-site backup, and multi-site disaster recovery have become common considerations, and cross-regional network transmission between public cloud resource pools also faces more challenges.

[0023] Currently, cross-domain transmission of public clouds mainly adopts segmented virtual extended local area network (Segment VXLAN), which mainly includes: (1) adopting VXLAN overlay network scheme to ensure the end-to-end isolation capability of multi-tenants in cross-domain transmission of public clouds and reduce dependence on backbone network; (2) for public cloud resource pools, each resource pool is an independent VXLAN domain to maintain the independence of network resources, simplify the network architecture, and deploy cross-regional interconnection data center interconnection gateway (DCI, GW) equipment at the edge of the resource pool. Only the VXLAN tunnel endpoints (VTEP, VXLANTunnel Endpoints) Internet Protocol (IP) addresses of the DCI GW equipment need to be published to the other end resource pool; (3) Virtual Private Cloud (VPC, Virtual Private Cloud) in public cloud resource pool 1. Accessing VPC2 within public cloud resource pool 2 from Cloud 1 uses a three-segment VXLAN scheme: First, the virtual switch (OVS, Open vSwitch) within public cloud resource pool 1 encapsulates VXLAN packets, with the destination address being the VTEP IP address of the DCI GW in public cloud resource pool 1. Second, the DCI GW in public cloud resource pool 1 decapsulates the intra-domain VXLAN packets, performs a second lookup of the cross-domain network VPC2 route, and recapsulates the VXLAN packets, with the destination address being the VTEP IP address of the DCI GW in the peer public cloud resource pool 2. Third, the DCI GW in public cloud resource pool 2 decapsulates the VXLAN packets, performs a second lookup of the cross-domain network VPC2 route, and recapsulates the VXLAN packets, with the destination address being the VTEP IP address of the OVS corresponding to the host under VPC2.

[0024] The above-mentioned public cloud cross-domain transmission Segment VXLAN solution has some problems: (1) In the three-segment forwarding process, when VXLAN encapsulation is performed in the second segment, the service network segment route needs to be queried twice on the DCI GW. However, with the increase of customer services and the widespread application of distributed deployment of public cloud resource pools, the DCI GW device not only carries the routing information within the resource pool, but also carries the routing table entries of all tenants across the entire network. The number of entries can reach millions, reducing query efficiency and resulting in low forwarding efficiency; (2) The current DCI GW is generally equipped with white-box programmable switch equipment. The maximum number of entries in a single device is in the hundreds of thousands. However, with the development of business, the routing table format of DCI GW will become the biggest bottleneck, and the hardware equipment expansion cycle is long and the cost is high; (3) At present, in order to reduce the pressure of the routing table format of DCI GW, there is a route aggregation optimization scheme. However, route aggregation only has a certain effect when the network segments in a region are continuous. That is, the effect of route aggregation depends on the customer's network segment planning. Therefore, under the current customer VPC subnet network segment planning, the effect of route aggregation is limited.

[0025] Based on this, in various embodiments of this application, a first device sends a first message to a first gateway within the first VXLAN segment; the first gateway receives the first message sent by the first device within the first VXLAN segment; wherein, the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VTEP IP address of the second gateway within the second VXLAN segment. In the above scheme, the first message sent by the first device to the first gateway carries the VTEP IP address of the second gateway within the VXLAN segment where the destination of the first message is located. This allows the first gateway to directly obtain the VTEP IP address of the second gateway from the first message when forwarding messages sent by the first virtual machine, without needing to query the entire network route to obtain the VTEP IP address of the second gateway, thus eliminating the secondary query process of the first gateway and improving the forwarding efficiency of VXLAN messages.

[0026] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.

[0027] This application provides a message transmission method applied to a first device within a first VXLAN segment. The first device can be a device with an Open vSwitch (OVS) deployed on it. The OVS provides network connectivity and communication capabilities for virtual machines, for example, providing network connectivity and communication capabilities for virtual machines running on the first device. The first device can also be understood as a Layer 2 gateway. Figure 1 As shown, the method includes: Step 101: Send the first message to the first gateway within the first VXLAN segment.

[0028] The first message represents a VXLAN message sent from a first virtual machine in the first VXLAN segment to a second virtual machine in the second VXLAN segment; the first message carries the VXLAN tunnel endpoint (VTEP) Internet Protocol address (IP address) of the second gateway in the second VXLAN segment.

[0029] Here, when the first device receives a data packet sent by the virtual machine, it needs to encapsulate the data packet into a VXLAN packet so that it can be sent to the destination through the VXLAN tunnel. When the data packet sent by the virtual machine is a packet transmitted across VXLAN segments, for example, the source IP address of the data packet sent by the virtual machine is the IP address of the first virtual machine in the first VXLAN segment, and the destination IP address is the IP address of the second virtual machine in the second VXLAN segment, when encapsulating the VXLAN packet, that is, when encapsulating the first packet, in addition to encapsulating the next-hop IP address, the VXLAN network identifier (VNI) of this VXLAN segment, the VTEP IP address of the second gateway in the second VXLAN segment is also encapsulated in the header of the VXLAN packet. Since the data packets sent by the virtual machine need to be transmitted across segments, they need to be forwarded to the VXLAN segment where the destination virtual machine is located through a gateway used for communication between different VXLAN segments. Based on this, an encapsulated VXLAN packet is sent to the gateway in this VXLAN segment used for communication between different VXLAN segments, that is, a first packet is sent to the first gateway in the first VXLAN segment; the next-hop IP address in the first packet is the VTEP IP address of the first gateway. Both the first and second gateways represent network devices used for cross-segment or cross-domain transmission between different VXLAN segments or between a VXLAN segment and an external network. These network devices can include Data Center Interconnection (DCI) gateways (GWs); they can also be understood as Layer 3 gateways. The first gateway represents a gateway within the first VXLAN segment used for communication with other VXLAN segments, typically deployed at the edge of the first VXLAN segment. The second gateway represents a gateway within the second VXLAN segment used for communication with other VXLAN segments, typically deployed at the edge of the second VXLAN segment. It can receive VXLAN packets from the first VXLAN segment, decapsulate the VXLAN packets, and forward them to the target virtual machine, i.e., the second virtual machine. Data packets can also be understood as data packets. The VTEP IP address refers to the IP address of the VXLAN tunnel endpoint. A VXLAN segment refers to a logical Layer 2 network built using VXLAN technology. Each VXLAN segment is identified by a VNI. A VXLAN segment can also be understood as a VXLAN network, VXLAN subnet, VXLAN area, or VXLAN domain.

[0030] To enable the first device to automatically encapsulate a first packet carrying the VTEP IP address of a gateway within another VXLAN segment, thereby achieving fine-grained traffic control and flexible network policy configuration, in one embodiment, the method further includes: The first device receives a network flow table from the control device. The network flow table is used to instruct the first device to obtain the VTEP IP address of the second gateway in the second VXLAN segment by addressing when it is recognized that the data payload carried by the first packet needs to be transmitted between different VXLAN segments.

[0031] Here, before sending the first packet to the first gateway within the first VXLAN segment, a network flow table issued by the control device is received. This allows the device to process the data packet received from the first virtual machine according to the received network flow table. Specifically, based on the instructions in the network flow table, the device can obtain the VTEP IP address of the second gateway within the second VXLAN segment through addressing, and then send the VTEP IP address of the second gateway in the first packet to the first gateway. For example, if DCI traffic is detected, or the target resource pool is identified as another resource pool, or the destination IP address or destination MAC address of the data packet sent by the first virtual machine is identified as not being within this VXLAN segment, the first device is instructed to obtain the VTEP IP address of the second gateway within the second VXLAN segment through routing lookup. The network flow table may include matching fields such as source IP address, destination IP address, port, and protocol type, as well as corresponding action instructions such as lookup, encapsulation, forwarding, and dropping, to achieve fine-grained traffic control and flexible network policy configuration.

[0032] In practical applications, when the first device receives a data packet from the first virtual machine, it determines whether the data packet needs to be transmitted across VXLAN segments according to network flow table rules. If it determines that the data packet needs to be transmitted across VXLAN segments, it obtains the VTEP IP address and other information of the second gateway in the second VXLAN segment through addressing. The other information includes at least the next-hop IP address and / or MAC address. When encapsulating the first packet, it carries the VTEP IP address of the second gateway, so that the first gateway can directly perform a matching query based on the VTEP IP address of the second gateway after receiving the first packet, without having to look up the entire network routing table. This avoids the secondary routing query process of the first gateway in the traditional segment VXLAN scheme, improves forwarding efficiency, reduces hardware resource consumption, and avoids the entire network routing query, reducing the number of routing table entries of the first gateway, thereby reducing the hardware expansion cycle and cost.

[0033] To reduce update costs, in one embodiment, the VTEP IP address of the second gateway is carried in a reserved field in the VXLAN header of the first message.

[0034] Here, the VXLAN message includes a VXLAN header, which contains VXLAN flags, VNI, reserved fields, and group identifier (ID, Identity). The VTEP IP address of the second gateway can be carried through the reserved fields in the VXLAN header.

[0035] For example, VXLAN messages such as Figure 2 As shown, a VXLAN message includes a data payload, an internal IP header, an internal Ethernet header, a VXLAN header, an external User Datagram Protocol (UDP) header, an external IP header, and an external Ethernet header. The internal Ethernet header, for the data payload, may include one or more of the following: a first destination MAC address (MAC DA), a first source MAC address (MAC SA), a first Virtual Local Area Network (VLAN) tag, and a first Ethernet type. The internal IP header, also for the data payload, may include one or more of the following: a first destination IP address, a first source IP address, a first VLAN tag, and a first Ethernet type. The VXLAN header may include VXLAN tags, a user group ID, a VNI, and reserved fields. The reserved fields include a 24-bit reserved field between the VXLAN tags and the user group ID, and an 8-bit reserved field after the VNI, meaning the VXLAN header contains 32 bits of reserved fields. When transmitting across VXLAN segments, the IP address of the peer VTEP is carried in the VXLAN header. For example... Figure 2 The VTEP IP address of the second gateway is carried in a 32-bit reserved field in the VXLAN header; the external Ethernet header for the message sent by the current device may include one or more of the following: second destination MAC address, second source MAC address, second VLAN tag, and second Ethernet type; the external IP header for the message sent by the current device may include one or more of the following: second destination IP address, second source IP address, second VLAN tag, and second Ethernet type; the external UDP header may include information such as source port number, destination port number, length, and checksum.

[0036] In this embodiment, the second destination MAC address and the second source MAC address in the external Ethernet header represent the MAC addresses of the receiver and sender of the current packet, i.e., the MAC addresses of the receiver and sender of the first packet. In this embodiment, the receiver of the first packet is the first gateway, and the sender of the first packet is the first device. The first destination MAC address and the first source MAC address in the internal Ethernet header represent the final destination and the sender of the data payload. In this embodiment, the final destination of the data payload is the second virtual machine, and the sender of the data payload is the first virtual machine. The second destination IP address and the second source IP address in the external IP header represent the next-hop IP address of the packet and the IP address of this device. The next-hop IP address of the packet can also be understood as the IP address of the remote VTEP, or the destination IP address of the first packet. In this embodiment, the second destination IP address is the VTEP IP address of the first gateway in the first packet, and the IP address of this device can also be understood as the IP address of the local VTEP, or the source IP address of the first packet. In this embodiment, the second source IP address is the VTEP of the first device. The IP address; the first destination IP address and the first source IP address in the internal IP header represent the final destination IP address and the sender IP address of the data payload, respectively; the VLAN tag is an optional field; the VTEP IP address of the second gateway is the VTEP IP address of the gateway used to enable communication with other networks within the VXLAN segment to which the final destination of the currently forwarded packet belongs. The VXLAN segment to which the final destination of the currently forwarded packet belongs can also be understood as the target VXLAN segment or target VXLAN area. The first destination IP address can also be understood as the inner destination IP address, the first destination MAC address can also be understood as the inner destination MAC address, and the second destination IP address can also be understood as the outer destination IP address, and the second destination MAC address can also be understood as the outer destination MAC address.

[0037] To achieve efficient cross-regional data transmission, in one embodiment, the method further includes: Receive a second message sent by the first virtual machine, wherein the second message represents an Ethernet frame whose destination is the second virtual machine; Based on the MAC address of the second virtual machine carried in the second message, a lookup is performed in the MAC address table to obtain the VTEP IP address of the second gateway; The first message is encapsulated based on the VTEP IP address of the second gateway and the second message.

[0038] Here, when the first virtual machine sends a second message, the second message sent by the first virtual machine is received, so as to forward the data carried by the second message step by step to the target virtual machine, i.e., the second virtual machine; the second message carries at least the first source MAC address, the first destination MAC address, the first source IP address, the first destination IP address and the data payload; the first source MAC address is the MAC address of the first virtual machine, the first destination MAC address is the MAC address of the second virtual machine, the first source IP address is the IP address of the first virtual machine and the first destination IP address is the IP address of the second virtual machine.

[0039] Based on the MAC address of the second virtual machine carried in the second message, i.e., the first destination MAC address, a lookup is performed in the MAC address table to obtain the VTEP IP address of the second gateway. Specifically, through the mapping relationship in the MAC address table between the MAC address and the VNI, the remote VTEP IP address, and the IP address of the VTEP used for communication with the external network within the VXLAN segment to which the MAC address belongs, the IP address of the VTEP used for communication with the external network within the VXLAN segment to which the second virtual machine's MAC address belongs is obtained, i.e., the VTEP IP address of the second gateway. Here, the VNI represents the identifier of the VXLAN segment to which the MAC address belongs, and the remote VTEP IP address represents the next-hop IP address, or the IP address of the peer VTEP when the second message is forwarded. The MAC address table can be learned by sending Address Resolution Protocol (ARP) requests and receiving ARP replies.

[0040] If the VTEP IP address of the second gateway is obtained, the first message is encapsulated based on the VTEP IP address of the second gateway, the second message, and other information obtained from the query. Specifically, the second message is re-encapsulated based on the VTEP IP address of the second gateway and other information obtained from the query to obtain the first message. The VTEP IP address of the second gateway can be carried in the reserved field of the VXLAN header.

[0041] In this embodiment, the routing query process based on the VTEP IP of the second gateway in the first gateway is moved to the first device, and the query result is carried in the first message. The first device only needs to query the address table entries of its own VXLAN segment, avoiding the first gateway querying the entire network route, reducing the number of query entries and improving forwarding efficiency. For example, in a distributed computing power layout, there are L resource pools, each resource pool has M isolated networks, such as M Virtual Private Clouds (VPCs), each isolated network has N network segments, such as N subnets, which can also be understood as N VXLAN segments. In the traditional forwarding mode, L×M×N network segment routes need to be deployed on the first gateway. In this embodiment, only L×M entries need to be deployed on the first device, which reduces the number of entries by at least one order of magnitude compared to the traditional forwarding mode.

[0042] This application also provides a message transmission method applied to a first gateway within a first VXLAN segment. The first gateway represents a device that has deployed a VTEP for cross-segment communication, such as a DCI GW that has deployed a VTEP. The first gateway can also be understood as a Layer 3 gateway. Figure 3 As shown, the method includes: Step 301: Receive the first message sent by the first device in the first VXLAN segment.

[0043] The first message represents a VXLAN message sent from a first virtual machine in the first VXLAN segment to a second virtual machine in the second VXLAN segment; the first message carries the VTEP IP address of the second gateway in the second VXLAN segment.

[0044] Here, upon receiving a first message sent by a first device within the first VXLAN segment, the first message is processed based on the information carried in it. The processed first message is then forwarded to the second gateway based on the VTEP IP address of the second gateway carried in the first message. This eliminates the need for a secondary query to obtain the VTEP IP address of the second gateway, allowing the data sent by the first virtual machine to be directly forwarded to the second gateway. This enables the second gateway to forward the data sent by the first virtual machine to the destination virtual machine or the next-hop forwarding device. The VNI conversion within the processed first message can be achieved through VNI mapping.

[0045] Both the first gateway and the second gateway represent network devices used for cross-segment or cross-domain transmission between different VXLAN segments or between a VXLAN segment and an external network. These network devices can include a DCI GW, and can also be understood as a Layer 3 gateway. The first gateway represents a gateway within the first VXLAN segment used for communication with other VXLAN segments, typically deployed at the edge of the first VXLAN segment. The second gateway represents a gateway within the second VXLAN segment used for communication with other VXLAN segments, typically deployed at the edge of the second VXLAN segment. It can receive VXLAN packets from the first VXLAN segment, decapsulate the VXLAN packets, and forward them to the target virtual machine, i.e., the second virtual machine. Data packets can also be understood as data packets. The VTEP IP address refers to the IP address of the VXLAN tunnel endpoint. A VXLAN segment refers to a logical Layer 2 network built using VXLAN technology. Each VXLAN segment is identified by a VNI. A VXLAN segment can also be understood as a VXLAN network, VXLAN subnet, VXLAN area, or VXLAN domain.

[0046] To further improve forwarding efficiency, in one embodiment, the method further includes: Based on the VTEP IP address of the second gateway carried in the first message, the identifier of the second VXLAN segment corresponding to the VTEP IP address of the second gateway is searched in the VTEP table to obtain the search result. The search result includes whether the identifier is found in the VTEP table or whether the identifier is not found in the VTEP table. Based on the search results, it is determined whether the first message needs to be re-encapsulated before forwarding it.

[0047] Here, upon receiving a first packet sent by a first device within the first VXLAN segment, and recognizing that the first packet carries the VTEP IP of the second gateway (i.e., recognizing that the first packet needs to be transmitted across segments), the identifier of the VXLAN segment where the second gateway is located can be searched in the VTEP table based on the VTEP IP address of the second gateway carried in the first packet. This identifier is the VNI of the second VXLAN segment. The search result indicates that the identifier of the VXLAN segment where the second gateway is located is found in the VTEP table, and there is no need to re-encapsulate the first packet. If the identifier of the VXLAN segment where the second gateway is located is not found in the VTEP table, the first packet needs to be re-encapsulated. The VTEP table at least indicates the correspondence between the IP address of the peer VTEP and the identifier of the VXLAN segment to which the peer VTEP belongs. The identifier of the VXLAN segment to which the peer VTEP belongs can also be understood as the target VXLAN segment or the destination VXLAN segment. The VTEP table entry may also include the source VNI, that is, the VTEP table can indicate the correspondence between the source VNI and the IP address of the peer VTEP and the identifier of the VXLAN segment to which the peer VTEP belongs. The source VNI can be understood as the VNI of the VXLAN segment to which the sender of the first message belongs. For example, when the first gateway connects multiple VXLAN segments and manages the communication between multiple VXLAN segments, traffic isolation can be achieved through the source VNI in the VTEP table. The VTEP table can be configured in advance or learned from Ethernet Virtual Private Network (EVPN) routing exchange information.

[0048] In this embodiment, the first gateway can look up the VTEP table based on the VTEP IP address of the second gateway. If a matching entry is found, the VNI of the second VXLAN segment can be obtained, thus eliminating the need for the second gateway to perform VNI translation and improving forwarding efficiency.

[0049] To achieve efficient and flexible cross-segment forwarding and avoid maintaining a full network routing table, in one embodiment, the method further includes: The VTEP table sent by the receiving control device indicates at least the correspondence between the VTEP IP address of the gateway and the identifier of the VXLAN segment.

[0050] Here, before receiving the first packet sent by the first device within the first VXLAN segment, a VTEP table issued by the control device can be received first. The VTEP table can be configured by the control device for the first gateway, or it can be maintained in real time based on EVPN routing exchange information after receiving the VTEP table issued by the control device. The VTEP table at least indicates the correspondence between the gateway's VTEP IP address and the VXLAN segment identifier, that is, at least indicates the correspondence between the peer's VTEP IP address and the target VXLAN segment identifier, and can also indicate the correspondence between the source VNI and the target VXLAN segment identifier. In other words, the fields of the VTEP table can include the VTEP IP address and the target VNI, and can also include the source VNI.

[0051] To reduce the encapsulation process, in one embodiment, determining whether the first packet needs to be re-encapsulated before forwarding it based on the search result includes: If the lookup result indicates that the identifier is found in the VTEP table, based on the identifier of the VXLAN segment indicated by the lookup result and the VTEP IP address of the second gateway, the field representing the identifier of the VXLAN segment and the field representing the next-hop IP address in the header of the first message are modified to obtain the processed first message.

[0052] Here, when the lookup result indicates that the identifier of the VXLAN segment where the second gateway is located is found in the VTEP table, that is, when the lookup result indicates the identifier of the VXLAN segment where the second gateway is located, the processing of the first packet can be completed directly based on the identifier of the VXLAN segment where the second gateway is located indicated by the lookup result, the VTEP IP address of the second gateway carried in the first packet, and the VTEP IP address of the first gateway. This omits the steps of decapsulating and recapsulating the first packet. The field indicating the identifier of the VXLAN segment is the VNI field in the VXLAN header of the first packet, the field indicating the next-hop IP address is the destination IP address field in the external IP header of the first packet, that is, the second destination IP address field, and the field indicating the IP address of the local device is the source IP address field in the external IP header of the first packet, that is, the second source IP address field. Specifically, the second destination IP address in the external IP header of the first packet is modified from the VTEP IP address of the first gateway to the VTEP IP address of the second gateway; the second source IP address in the external IP header of the first packet is modified from the VTEP IP address of the first device to the VTEP IP address of the first gateway; and the VNI in the VXLAN header of the first packet is modified from the VNI of the first VXLAN segment to the VNI of the second VXLAN segment. The processed first packet is then forwarded to the second gateway.

[0053] To ensure successful message forwarding, in one embodiment, determining whether the first message needs to be re-encapsulated before forwarding based on the search result includes: If the search result indicates that the identifier is not found in the VTEP table, the first message is decapsulated to obtain the IP address of the second virtual machine; The routing information is obtained by querying the route based on the IP address of the second virtual machine; The first packet is re-encapsulated based on the routing information to obtain the processed first packet.

[0054] Here, if the lookup result indicates that the identifier of the VXLAN segment where the second gateway is located is not found in the VTEP table, the first packet is decapsulated to obtain the VNI of the VXLAN segment to which the first packet belongs and the second destination IP address of the first packet, that is, the VNI of the first VXLAN segment and the IP address of the second virtual machine. Then, the decapsulated first packet is forwarded to the Virtual Private Network (VPN) instance corresponding to the VNI of the first VXLAN segment. The VPN instance corresponding to the VNI of the first VXLAN segment queries the route based on the IP address of the second virtual machine, for example, by querying the Floating IP (FIP) table to obtain the routing information. Based on the routing information, the first packet is recapsulated to obtain the processed first packet.

[0055] To ensure efficient and smooth data forwarding to its destination, in one embodiment, the method further includes: Based on the VTEP IP address of the second gateway, the processed first message is sent to the second gateway within the second VXLAN segment.

[0056] Here, after processing the first packet based on the lookup result of the VTEP table, that is, modifying or re-encapsulating the first packet to obtain the processed first packet, the processed first packet is sent to the second gateway based on the next-hop IP address carried in the processed first packet, that is, the VTEP IP address of the second gateway.

[0057] The following section provides a more detailed description of this application with reference to application examples.

[0058] by Figure 4 Taking the VXLAN packet forwarding flow across VXLAN segments as an example, the first virtual machine is Virtual Machine (VM) 1, the second virtual machine is VM4, the first VXLAN segment is public cloud region 1, the second VXLAN segment is public cloud region 2, the first device is OVS1, the first gateway is DCI GW1, the second gateway is DCI GW2, and the control device belongs to the public cloud management layer. The public cloud management layer is used for network-wide service orchestration and automated deployment of configurations. The packet flow is: VM1-OVS1-DCI GW1-backbone network-DCI GW2-OVS2-VM4. The packet transmission method includes the following steps: Step 1: The first device receives the second message sent by the first virtual machine; based on the MAC address of the second virtual machine carried in the second message, it queries the MAC address table to obtain the VTEP IP address of the second gateway; based on the VTEP IP address of the second gateway and the second message, it encapsulates the first message.

[0059] Here, before the first device receives the second packet sent by the first virtual machine, the first device receives the network flow table issued by the control device. When the first device receives the second packet sent by the first virtual machine, according to the instructions of the network flow table issued by the control device, it queries the MAC address table based on the MAC address of the second virtual machine carried in the second packet, i.e., the MAC address of VM4, to obtain the VTEP IP address of the second gateway, i.e., the VTEP IP address of DCI GW2. Based on the VTEP IP address of the second gateway and other information obtained from the query, the second packet is re-encapsulated to obtain the first packet, in which the reserved field of the VXLAN header carries the VTEP IP address of the second gateway.

[0060] Step 2: The first device sends the first message to the first gateway within the first VXLAN segment.

[0061] Here, the first message represents a VXLAN message sent from the first virtual machine in the first VXLAN segment to the second virtual machine in the second VXLAN segment, that is, a VXLAN message sent from VM1 in public cloud region 1 to VM4 in public cloud region 2. In other words, the destination IP address of the first message is the IP address of VM4, and the source IP address is the IP address of VM1.

[0062] Step 3: Based on the VTEP IP address of the second gateway carried in the first packet, the first gateway looks up the identifier of the second VXLAN segment corresponding to the VTEP IP address of the second gateway in the VTEP table to obtain the lookup result.

[0063] Here, when the first gateway receives the first message sent by the first device, it searches for the identifier of the VXLAN segment corresponding to the VTEP IP address of the second gateway in the VTEP table based on the VTEP IP address of the second gateway carried in the first message, and obtains the search result; if the search result indicates that the identifier of the VXLAN segment corresponding to the second gateway is found in the VTEP table, step 4 is executed; if the search result indicates that the identifier of the VXLAN segment corresponding to the second gateway is not found in the VTEP table, step 5 is executed.

[0064] Step 4: Based on the VXLAN segment identifier and the VTEP IP address of the second gateway indicated by the lookup results, modify the field representing the VXLAN segment identifier and the field representing the next-hop IP address in the header of the first packet to obtain the processed first packet.

[0065] Here, if the lookup result indicates that the identifier of the VXLAN segment corresponding to the second gateway is found in the VTEP table, based on the VNI of the second VXLAN segment indicated by the lookup result and the VTEP IP address of the second gateway, the VNI in the VXLAN header and the destination IP address in the external IP header of the first packet are modified. That is, the destination IP address in the external IP header can be understood as the outer destination IP address. Furthermore, based on the MAC address and IP address of the first gateway and the MAC address of the second gateway, the corresponding fields in the header of the first packet are modified to obtain the processed first packet.

[0066] Step 5: Decapsulate the first packet to obtain the IP address of the second virtual machine; query the route based on the IP address of the second virtual machine to obtain the routing information; recapsulate the first packet based on the routing information to obtain the processed first packet.

[0067] Here, if the lookup result indicates that the identifier of the VXLAN segment corresponding to the second gateway is not found in the VTEP table, the first packet is decapsulated. Based on the VNI in the VXLAN header of the first packet, i.e. the VNI of the first VXLAN segment, the decapsulated first packet is forwarded to the VPN instance corresponding to the VNI of the first VXLAN segment. The VPN instance then queries the routing FIP table based on the inner IP address, i.e. the IP address of VM1, to obtain routing information. Based on the routing information, the first packet is recapsulated and forwarded.

[0068] Step 6: Based on the VTEP IP address of the second gateway, send the processed first message to the second gateway within the second VXLAN segment.

[0069] Here, based on the destination IP address in the outer IP header of the processed first message, i.e., the VTEP IP address of the second gateway, the processed first message is sent to the second gateway within the second VXLAN segment; the second gateway decapsulates the processed first message, and based on the inner destination IP address, i.e., the IP address of the second virtual machine, queries the route, recapsulates the first message, and forwards it to the second device within the second VXLAN segment; the second device decapsulates the received message, sends the decapsulated data message to the second virtual machine, and completes the cross-VXLAN segment transmission of the message.

[0070] To implement the method on the first device side of this application embodiment, this application embodiment also provides a message transmission device, disposed on the first device, such as... Figure 5 As shown, the device includes: The first sending unit 501 is configured to send a first message to a first gateway within the first VXLAN segment; wherein the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VXLAN IP address of the second gateway within the second VXLAN segment.

[0071] In one embodiment, the device further includes: The second receiving unit is used to receive a network flow table issued by the control device. The network flow table is used to instruct the first device to obtain the VTEP IP address of the second gateway in the second VXLAN segment by addressing when it is recognized that the data payload carried by the first packet needs to be transmitted between different VXLAN segments.

[0072] In one embodiment, the VTEP IP address of the second gateway is carried in a reserved field in the VXLAN header of the first message.

[0073] In one embodiment, the device further includes: The third receiving unit is configured to receive a second message sent by the first virtual machine, wherein the second message represents an Ethernet frame whose destination is the second virtual machine; The first query unit is used to query the MAC address table based on the MAC address of the second virtual machine carried in the second message to obtain the VTEP IP address of the second gateway; An encapsulation unit is used to encapsulate the first message based on the VTEP IP address of the second gateway and the second message.

[0074] In practical applications, the first sending unit 501, the second receiving unit, and the third receiving unit can be implemented by a processor in the message transmission device combined with a communication interface; the first query unit and the encapsulation unit can be implemented by a processor in the message transmission device.

[0075] To implement the method on the first gateway side of this application embodiment, this application embodiment also provides a message transmission device, which is installed on the first gateway, such as... Figure 6 As shown, the device includes: The first receiving unit 601 is configured to receive a first message sent by a first device within the first VXLAN segment; wherein the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VTEP IP address of a second gateway within the second VXLAN segment.

[0076] In one embodiment, the device further includes: The second lookup unit is used to look up the identifier of the second VXLAN segment corresponding to the VTEP IP address of the second gateway in the VTEP table based on the VTEP IP address of the second gateway carried in the first message, and obtain the lookup result. The lookup result includes whether the identifier is found in the VTEP table or whether the identifier is not found in the VTEP table. The determining unit is used to determine, based on the search result, whether the first message needs to be re-encapsulated before forwarding the first message.

[0077] In one embodiment, the determining unit is specifically configured to, when the lookup result indicates that the identifier is found in the VTEP table, modify the field representing the identifier of the VXLAN segment and the field representing the next-hop IP address in the header of the first packet based on the identifier of the VXLAN segment indicated by the lookup result and the VTEPIP address of the second gateway, to obtain the processed first packet.

[0078] In one embodiment, the determining unit is specifically used to decapsulate the first message to obtain the IP address of the second virtual machine when the search result indicates that the identifier is not found in the VTEP table; The routing information is obtained by querying the route based on the IP address of the second virtual machine; The first packet is re-encapsulated based on the routing information to obtain the processed first packet.

[0079] In one embodiment, the device further includes: The fourth receiving unit is used to receive the VTEP table sent by the control device. The VTEP table at least indicates the correspondence between the VTEP IP address of the gateway and the identifier of the VXLAN segment.

[0080] In one embodiment, the device further includes: The second sending unit is used to send the processed first message to the second gateway within the second VXLAN segment based on the VTEP IP address of the second gateway.

[0081] In practical applications, the first receiving unit 601, the fourth receiving unit, and the second sending unit can be implemented by a processor in the message transmission device combined with a communication interface, and the second searching unit and the determining unit can be implemented by a processor in the message transmission device.

[0082] It should be noted that the above embodiments of the message transmission device are only illustrated by the division of the above-described program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the message transmission device and message transmission method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0083] Based on the hardware implementation of the above program modules, and in order to implement the method on the first device side of the embodiments of this application, the embodiments of this application also provide a first device, such as... Figure 7 As shown, the first device 700 includes: The first communication interface 701 can exchange information with other network nodes.

[0084] The first processor 702 is connected to the first communication interface 701 to enable information interaction with other network nodes and to execute the methods provided by one or more technical solutions on the first device side when running a computer program.

[0085] The first memory 703 is used to store computer programs that can run on the first processor 702.

[0086] Specifically, the first communication interface 701 is used to send a first message to the first gateway within the first VXLAN segment; wherein, the first message represents a VXLAN message sent from the first virtual machine within the first VXLAN segment to the second virtual machine within the second VXLAN segment; the first message carries the VXLAN IP address of the second gateway within the second VXLAN segment.

[0087] In one embodiment, the first communication interface 701 is further configured to receive a network flow table issued by the control device. The network flow table is used to instruct the first device to obtain the VTEP IP address of the second gateway in the second VXLAN segment by addressing when it is recognized that the data payload carried by the first message needs to be transmitted between different VXLAN segments.

[0088] In one embodiment, the VTEP IP address of the second gateway is carried in a reserved field in the VXLAN header of the first message.

[0089] In one embodiment, the first communication interface 701 is further configured to receive a second message sent by the first virtual machine, the second message representing an Ethernet frame whose destination is the second virtual machine; The first processor 702 is configured to query the MAC address table based on the MAC address of the second virtual machine carried in the second message to obtain the VTEP IP address of the second gateway; and encapsulate the first message based on the VTEP IP address of the second gateway and the second message.

[0090] It should be noted that the specific processing procedures of the first processor 702 and the first communication interface 701 can be understood by referring to the above method.

[0091] Of course, in practical applications, the various components in the first device 700 are coupled together through the bus system 704. It can be understood that the bus system 704 is used to implement communication between these components. In addition to a data bus, the bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 7 The general designated all buses as Bus System 704.

[0092] The first memory 703 in this embodiment is used to store various types of data to support the operation of the first device 700. Examples of such data include any computer program used to operate on the first device 700.

[0093] The methods disclosed in the embodiments of this application can be applied to the first processor 702, or implemented by the first processor 702. The first processor 702 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in the first processor 702. The first processor 702 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The first processor 702 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the first memory 703. The first processor 702 reads the information in the first memory 703 and completes the steps of the aforementioned method in combination with its hardware.

[0094] In an exemplary embodiment, the first device 700 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0095] Based on the hardware implementation of the above program modules, and in order to implement the method on the first gateway side of this application embodiment, this application embodiment also provides a first gateway, as shown in FIG12, the first gateway 800 includes: The second communication interface 801 can exchange information with other network nodes.

[0096] The second processor 802 is connected to the second communication interface 801 to enable information interaction with other network nodes and to execute the methods provided by one or more technical solutions on the first gateway side when running computer programs.

[0097] The second memory 803 is used to store computer programs that can run on the second processor 802.

[0098] Specifically, the second communication interface 801 is used to receive a first message sent by a first device within the first VXLAN segment; wherein, the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within the second VXLAN segment; the first message carries the VTEPIP address of the second gateway within the second VXLAN segment.

[0099] In one embodiment, the second processor 802 is configured to look up the identifier of the second VXLAN segment corresponding to the VTEP IP address of the second gateway in the VTEP table based on the VTEP IP address of the second gateway carried in the first message, and obtain a lookup result, wherein the lookup result includes finding the identifier in the VTEP table or not finding the identifier in the VTEP table; Based on the search results, it is determined whether the first message needs to be re-encapsulated before forwarding it.

[0100] In one embodiment, the second processor 802 is specifically configured to, when the lookup result indicates that the identifier is found in the VTEP table, modify the field representing the identifier of the VXLAN segment and the field representing the next-hop IP address in the header of the first packet based on the identifier of the VXLAN segment indicated by the lookup result and the VTEP IP address of the second gateway, to obtain the processed first packet.

[0101] In one embodiment, the second processor 802 is specifically configured to, when the search result indicates that the identifier is not found in the VTEP table, decapsulate the first message to obtain the IP address of the second virtual machine; The routing information is obtained by querying the route based on the IP address of the second virtual machine; The first packet is re-encapsulated based on the routing information to obtain the processed first packet.

[0102] In one embodiment, the second communication interface 801 is further configured to receive the VTEP table issued by the control device, wherein the VTEP table at least indicates the correspondence between the VTEP IP address of the gateway and the identifier of the VXLAN segment.

[0103] In one embodiment, the second communication interface 801 is further configured to send the processed first message to the second gateway within the second VXLAN segment based on the VTEP IP address of the second gateway.

[0104] It should be noted that the specific processing procedures of the second processor 802 and the second communication interface 801 can be understood by referring to the above method.

[0105] Of course, in practical applications, the various components in the first gateway 800 are coupled together through the bus system 804. It can be understood that the bus system 804 is used to implement communication between these components. In addition to the data bus, the bus system 804 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 8 The general labeled all buses as Bus System 804.

[0106] The second memory 803 in this embodiment is used to store various types of data to support the operation of the first gateway 800. Examples of such data include any computer program used to operate on the first gateway 800.

[0107] The methods disclosed in the embodiments of this application can be applied to the second processor 802, or implemented by the second processor 802. The second processor 802 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in the second processor 802. The second processor 802 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The second processor 802 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the second memory 803. The second processor 802 reads the information in the second memory 803 and completes the steps of the aforementioned method in combination with its hardware.

[0108] In an exemplary embodiment, the first gateway 800 may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned method.

[0109] It is understood that the memories (first memory 703 and second memory 803) in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.

[0110] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory 703 storing a computer program, which can be executed by a first processor 702 of a first device 700 to complete the steps described in the aforementioned first device-side method. Another example is a second memory 703 storing a computer program, which can be executed by a second processor 802 of a first gateway 800 to complete the steps described in the aforementioned first gateway-side method. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0111] For example, embodiments of this application also provide a computer program product, including a computer program that can be executed by a first processor 702 of a first device 700 and a second processor 802 of a first gateway 800 to perform the steps described in any of the foregoing methods.

[0112] It should be noted that terms such as "first" and "second" are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. The term "and / or" in this document merely describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The terms "one or more" and "one or more" in this document are exemplary expressions and can be replaced with any possible expressions, such as one or more, at least one, or at least one. Furthermore, the technical solutions described in the embodiments of this application can be arbitrarily combined without conflict. The above descriptions are merely preferred embodiments of this application and are not intended to limit the scope of protection of this application.

Claims

1. A message transmission method, characterized in that, The method, applied to a first device within a first virtual extended local area network (VXLAN) segment, includes: Send the first message to the first gateway within the first VXLAN segment; The first message represents a VXLAN message sent from a first virtual machine in the first VXLAN segment to a second virtual machine in the second VXLAN segment; the first message carries the VXLAN tunnel endpoint (VTEP) Internet Protocol address (IP address) of the second gateway in the second VXLAN segment.

2. The method according to claim 1, characterized in that, The method further includes: The first device receives a network flow table from the control device. The network flow table is used to instruct the first device to obtain the VTEP IP address of the second gateway in the second VXLAN segment by addressing when it is recognized that the data payload carried by the first packet needs to be transmitted between different VXLAN segments.

3. The method according to claim 1 or 2, characterized in that, The VTEP IP address of the second gateway is carried in the reserved field of the VXLAN header of the first message.

4. The method according to claim 1, characterized in that, The method further includes: Receive a second message sent by the first virtual machine, wherein the second message represents an Ethernet frame whose destination is the second virtual machine; Based on the MAC address of the second virtual machine carried in the second message, a lookup is performed in the MAC address table to obtain the VTEP IP address of the second gateway; The first message is encapsulated based on the VTEP IP address of the second gateway and the second message.

5. A message transmission method, characterized in that, The method, applied to a first gateway within a first VXLAN segment, includes: Receive the first message sent by the first device within the first VXLAN segment; The first message represents a VXLAN message sent from a first virtual machine in the first VXLAN segment to a second virtual machine in the second VXLAN segment; the first message carries the VTEP IP address of the second gateway in the second VXLAN segment.

6. The method according to claim 5, characterized in that, The method further includes: Based on the VTEP IP address of the second gateway carried in the first message, the identifier of the second VXLAN segment corresponding to the VTEP IP address of the second gateway is searched in the VTEP table to obtain the search result. The search result includes whether the identifier is found in the VTEP table or whether the identifier is not found in the VTEP table. Based on the search results, it is determined whether the first message needs to be re-encapsulated before forwarding it.

7. The method according to claim 6, characterized in that, The step of determining whether the first packet needs to be re-encapsulated before forwarding it based on the search result includes: If the lookup result indicates that the identifier is found in the VTEP table, based on the identifier of the VXLAN segment indicated by the lookup result and the VTEP IP address of the second gateway, the field representing the identifier of the VXLAN segment and the field representing the next-hop IP address in the header of the first message are modified to obtain the processed first message.

8. The method according to claim 6, characterized in that, The step of determining whether the first packet needs to be re-encapsulated before forwarding it based on the search result includes: If the search result indicates that the identifier is not found in the VTEP table, the first message is decapsulated to obtain the IP address of the second virtual machine; The routing information is obtained by querying the route based on the IP address of the second virtual machine; The first packet is re-encapsulated based on the routing information to obtain the processed first packet.

9. The method according to any one of claims 6 to 8, characterized in that, The method further includes: The VTEP table sent by the receiving control device indicates at least the correspondence between the VTEP IP address of the gateway and the identifier of the VXLAN segment.

10. The method according to any one of claims 7 to 8, characterized in that, The method further includes: Based on the VTEP IP address of the second gateway, the processed first message is sent to the second gateway within the second VXLAN segment.

11. A message transmission device, characterized in that, include: The first sending unit is configured to send a first message to a first gateway within the first VXLAN segment; wherein the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VXLAN IP address of the second gateway within the second VXLAN segment.

12. A message transmission device, characterized in that, include: The first receiving unit is configured to receive a first message sent by a first device within the first VXLAN segment; wherein the first message represents a VXLAN message sent from a first virtual machine within the first VXLAN segment to a second virtual machine within a second VXLAN segment; the first message carries the VTEP IP address of a second gateway within the second VXLAN segment.

13. A first device, characterized in that, It includes a first processor and a first memory for storing computer programs that can run on the first processor. Wherein, when the first processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 4.

14. A first gateway, characterized in that, It includes a second processor and a second memory for storing computer programs that can run on the second processor. Wherein, when the second processor is used to run the computer program, it performs the steps of the method according to any one of claims 5 to 10.

15. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4, or the steps of the method according to any one of claims 5 to 10.

16. 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 method according to any one of claims 1 to 10.