WO2019238002A1 - 传输报文的方法、网络边缘设备与报文传输系统 - Google Patents

传输报文的方法、网络边缘设备与报文传输系统 Download PDF

Info

Publication number
WO2019238002A1
WO2019238002A1 PCT/CN2019/090511 CN2019090511W WO2019238002A1 WO 2019238002 A1 WO2019238002 A1 WO 2019238002A1 CN 2019090511 W CN2019090511 W CN 2019090511W WO 2019238002 A1 WO2019238002 A1 WO 2019238002A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
message
vxlan
encapsulation
virtual machine
Prior art date
Application number
PCT/CN2019/090511
Other languages
English (en)
French (fr)
Inventor
赵崇日
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2019238002A1 publication Critical patent/WO2019238002A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9057Arrangements for supporting packet reassembly or resequencing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]

Definitions

  • the present application relates to the field of information technology, and more particularly, to a method for transmitting a message, a network edge device, and a message transmission system in the field of information technology.
  • a message transmission system for container communication includes at least two containers located on different virtual machines and a network device between the at least two containers.
  • the source container sends the packet to the network edge device on the source virtual machine where the source container is located, and the network edge device of the source virtual machine forwards the source container packet to the destination network edge device, and then The destination network edge device forwards the packet to the destination container.
  • the network edge device of the source virtual machine forwards the packet to the destination virtual machine through at least one access switch.
  • the source container on the source virtual machine sends a packet to the destination container on the destination virtual machine.
  • the packet first passes through the network edge device on the source virtual machine.
  • the network edge device encapsulates the packet with vxlan.
  • Then send the vxlan-encapsulated packet to the access switch, and the access switch performs vxlan encapsulation on the vxlan packet again.
  • the access switch sends the vxlan-encapsulated packet twice to the destination virtual machine. Destination container.
  • a network edge device sends When a vxlan-encapsulated packet is sent to an access switch, if the access switch does not support vxlan encapsulation for the vxlan packet, the access switch recognizes that the packet has been vxlan-encapsulated and sends the packet The packet is decapsulated, or the packet is directly discarded, which causes the communication link between the containers to fail.
  • the present application provides a method for transmitting a message.
  • the method can automatically configure a transmission path of a message when the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the vxlan message.
  • a communication link between containers running on different computing devices is opened, so that the communication link can transmit a message generated by vxlan encapsulation of a vxlan message.
  • a method for transmitting a message including: a network edge device of a first virtual machine determines a communication link between a first container on the first virtual machine and a second container on a second virtual machine Whether there is at least one access switch in the road that does not support vxlan encapsulation of the first packet, wherein the first packet is a vxlan packet directed to the second container, and the first packet is the network edge device pair
  • the IP packet of the first container is generated by vxlan encapsulation; if the communication link has at least one access switch that does not support vxlan encapsulation of the first packet, the network edge device performs the first packet.
  • the outer layer is encapsulated to generate a second message, and the second message is sent to an access switch.
  • the access switch is used to perform vxlan encapsulation on the second message, and is used to encapsulate the second message encapsulated by vxlan.
  • the text is sent to a second virtual machine, wherein the outer layer package and the vxlan package are different types of packages, the access switch is set in the communication link, and is connected to the first virtual machine.
  • the transmission path of the IP packet output by the sending container is automatically configured. In this way, the IP packet arrives at the access switch through vxlan encapsulation and outer encapsulation in turn, and then the access switch sends the IP packet encapsulated in vxlan encapsulation and outer encapsulation to the receiving container.
  • the method for transmitting a message provided by this application can enable the communication link between containers to have at least one access switch that does not support vxlan encapsulation of vxlan messages.
  • the vxlan packets of the edge device are encapsulated and sent to the access switch, so that the communication link can transmit the packets generated by vxlan encapsulation of vxlan packets.
  • the network edge device of the first virtual machine judges the difference between the first container on the first virtual machine and the second container on the second virtual machine.
  • Whether the communication link has at least one access switch that does not support vxlan encapsulation of the first message includes: the network edge device constructs a third message, and the third message is a vxlan message; the network edge device sends The third message is sent to the access switch, and the access switch is used to perform vxlan encapsulation on the third message and to send the third message encapsulated by vxlan to the second virtual machine; the network edge The device determines a communication link between the first container on the first virtual machine and the second container on the second virtual machine according to whether the device receives a response packet for the third packet sent by the second virtual machine.
  • the network edge device determines whether there is at least one access switch that does not support vxlan encapsulation of the first packet; if the communication link has at least one access switch that does not support vxlan encapsulation of the first packet, the network edge device The first message is encapsulated in an outer layer to generate a second message, and the second message is sent to the access switch, and specifically includes: if the network edge device does not receive the second message sent by the second virtual machine, In response to the three messages, the network edge device performs outer encapsulation on the first message to generate a second message, and sends the second message to the access switch.
  • the third packet may be constructed by a detection process in a network edge device, that is, the detection process is At the time of the third message, vxlan encapsulation of the third message is completed.
  • the third packet may also be a detection packet constructed by a vxlan encapsulation / decapsulation module in a network edge device to a detection process.
  • the text is generated by vxlan encapsulation.
  • the network edge device determines the first virtual machine.
  • the communication link between the container running on the machine and the container running on the second virtual machine has at least one access switch that does not support vxlan encapsulation of vxlan packets; otherwise, when the first virtual machine fails to successfully receive the first
  • the network edge device determines the access exchange support included in the communication link between the container running on the first virtual machine and the container running on the second virtual machine. Encapsulate vxlan packets.
  • the network edge device can flexibly determine whether to encapsulate the first packet according to the judgment result. Therefore, when it is determined that the outer layer of the first message does not need to be encapsulated, the signaling overhead can be effectively saved, and the transmission delay of the first message can be saved.
  • the first virtual machine determining whether the communication link has at least one access switch that does not support vxlan encapsulation of the first packet, including: the network edge device constructs a fourth packet, and the fourth packet
  • the packet is a packet that has been encapsulated by vxlan and the outer layer in turn.
  • the network edge device sends the fourth packet to the access switch.
  • the access switch is used to perform vxlan encapsulation on the fourth packet.
  • the network edge device judges whether the first virtual machine is on the first virtual machine according to whether it receives a response packet for the fourth packet sent by the second virtual machine Whether there is at least one access switch in the communication link between the first container and the second container on the second virtual machine that does not support vxlan encapsulation of the first packet; if the communication link has at least one An access switch that does not support vxlan encapsulation of the first packet is not supported.
  • the network edge device performs outer encapsulation on the first packet to generate a second packet, and sends the second packet to the access switch.
  • the method includes: if the network edge device receives a response message for the fourth message sent by the second virtual machine, the network edge device performs outer layer encapsulation on the first message to generate a second message, and The second message is sent to the access switch
  • the fourth packet may be constructed by a detection process in a network edge device, that is, the detection process is At the time of the fourth message, the operations of sequentially performing vxlan encapsulation and outer layer encapsulation on the fourth message are completed.
  • the fourth packet may also be a vxlan encapsulation / decapsulation module and an outer layer encapsulation / decapsulation in a network edge device.
  • the module generates vxlan encapsulation and outer encapsulation in sequence for the probe packets constructed by the probe process.
  • the network edge device determines that the fourth virtual packet is sent to the second virtual machine through the vxlan encapsulation and the outer encapsulation in sequence.
  • the network edge device determines The communication link between the container running on the first virtual machine and the container running on the second virtual machine has at least one access switch that does not support vxlan encapsulation of vxlan packets.
  • the network edge device can flexibly determine whether to encapsulate the first packet according to the judgment result. Therefore, when it is determined that the outer layer of the first message does not need to be encapsulated, the signaling overhead can be effectively saved, and the transmission delay of the first message can be saved.
  • the method further includes: the network edge device receives a fifth packet, and the fifth packet is sequentially passed The outer-encapsulated and vxlan-encapsulated packets; the network edge device de-encapsulates the fifth packet in turn, the outer-encapsulated and vxlan-encapsulated packets, and obtains the original packet corresponding to the fifth packet.
  • an interconnection protocol (Internet) between the first packet and a network carried in the second packet Internet Protocol (IP) addresses are the same.
  • the outer encapsulation includes at least a Generic Routing Encapsulation (GRE), a network protocol security encapsulation ( Internet Protocol (IPSec) encapsulation and IPv4 over IPv4 encapsulation.
  • GRE Generic Routing Encapsulation
  • IPSec Internet Protocol
  • a network edge device configured to execute the foregoing first aspect or the method in any possible implementation manner of the first aspect.
  • the network edge device may include a process and a module for executing the method in the first aspect or any possible implementation manner of the first aspect.
  • a network edge device includes an interface, a memory, and a processor.
  • the memory is configured to store instructions.
  • the processor is configured to execute instructions stored in the memory, and execution of the instructions stored in the memory is such that The processor executes the method in the first aspect or any possible implementation manner of the first aspect.
  • a message transmission system includes a first virtual machine, a second virtual machine, and an access switch.
  • a first container and a network edge device are deployed on the first virtual machine.
  • a second container is deployed on the second virtual machine;
  • the network edge device is configured to determine whether a communication link between the first container on the first virtual machine and the second container on the second virtual machine has at least one An access switch that does not support vxlan encapsulation of the first packet, where the first packet is a vxlan packet for the second container, and the first packet is the IP of the network edge device to the first container
  • the packet is generated by vxlan encapsulation;
  • the network edge device is further configured to: if the communication link has at least one access switch that does not support vxlan encapsulation of the first packet, perform an outer layer on the first packet Encapsulate to generate a second message and send the second message to the access switch;
  • the access switch is used to vxlan the second message and send the second message after vxlan
  • a chip includes an interface, a memory, and a processor.
  • the memory is configured to store instructions.
  • the processor is configured to execute instructions stored in the memory. Execution of the instructions stored in the memory causes the processing.
  • the processor executes the method in the first aspect or any possible implementation of the first aspect.
  • a computer-readable storage medium stores instructions. When the instructions are run on a computer, the computer is caused to execute the first aspect or any possible implementation manner of the first aspect. Method.
  • a computer program product containing instructions is provided, and when the computer program product is run on a computer, the computer is caused to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • FIG. 1 is a schematic block diagram of a message transmission system provided by the present application.
  • Figure 2 is a schematic diagram of GRE encapsulation of the original message.
  • Figure 3 is a schematic diagram of vxlan encapsulation of the original message.
  • FIG. 4 is a schematic flowchart of a method for transmitting a message provided by the present application.
  • FIG. 5 is a schematic flowchart of a message transmission path provided by the present application.
  • FIG. 6 is a schematic diagram of sequentially performing GRE encapsulation and vxlan encapsulation on an original packet provided by the present application.
  • FIG. 7 is another schematic flowchart of a message transmission path provided by the present application.
  • FIG. 8 is another schematic flowchart of a message transmission path provided by the present application.
  • FIG. 9 is a schematic block diagram of a network edge device provided by the present application.
  • FIG. 10 is another schematic block diagram of a network edge device provided by the present application.
  • the access switch When the communication link between the containers has at least one access switch that does not support vxlan encapsulation of vxlan packets, the access switch is configured by manual commands, and the configuration enables the designated port to pass the vxlan-encapsulated packets. To allow vxlan packets to be vxlan encapsulated again in the access switch.
  • the present application provides a message transmission system 100.
  • the message transmission system 100 includes at least two virtual machines (for example, the at least virtual machines are a first virtual machine 103 and a second virtual machine).
  • Machine 104 and at least one access switch, the first virtual machine 103 runs on the first computing device 101, the second virtual machine runs on the second computing device 102, and a container (for example, docker) is deployed on each virtual machine.
  • network edge devices for example, virtual network edge nodes (Network Virtualization Edge, NVE).
  • the network edge device deployed on each virtual machine is configured with a detection process, a vxlan encapsulation / decapsulation module and an outer encapsulation / decapsulation module.
  • the detection process is used to determine whether it is running in two different Does the communication link between the containers in the virtual machine on the computing device have at least one access switch that does not support vxlan encapsulation of vxlan packets?
  • the vxlan encapsulation / decapsulation module is used to vxlan encapsulation / decapsulation of packets Encapsulation, outer encapsulation / decapsulation module is used for outer encapsulation / decapsulation of packets.
  • the container deployed on the first virtual machine is the first container 105 (for example, docker1), and the network edge device deployed on the first virtual machine is the first network edge device 107 (for example, NVE1).
  • the configured detection process, vxlan encapsulation / decapsulation module, and outer encapsulation / decapsulation module are the detection process 1, vxlan encapsulation / decapsulation module 1, and outer encapsulation / decapsulation module 1, respectively;
  • the container deployed on the second virtual machine Is the second container 106 (for example, docker2), the network edge device deployed on the second virtual machine is the second network edge device 108 (for example, NVE2), the detection process configured in the second network edge device 107, and vxlan encapsulation / decomposition
  • the encapsulation module and the outer encapsulation / decapsulation module are a detection process 2, a vxlan encapsulation / decapsulation module 2 and an outer encapsulation / decapsulation module 2, respectively
  • the communication link between the first container 105 and the second container 106 includes
  • the access switch is a first access switch 109 and a second access switch 110, the first access switch 109 is connected to the first virtual machine 103, and the second access switch 110 is connected to the second virtual machine 104.
  • this application provides a method for transmitting messages by configuring a detection process, a vxlan encapsulation / decapsulation module, and an outer layer encapsulation / decapsulation module in a network edge device.
  • the detection process determines whether the communication link between containers running on different computing devices has at least one access switch that does not support vxlan encapsulation of vxlan packets, and that communication link has vxlan that does not support vxlan packets.
  • the transmission path of the IP packet output by the sending container is automatically configured, so that the IP packet reaches the access switch after vxlan encapsulation and outer encapsulation in turn.
  • the vxlan-encapsulated and outer-encapsulated IP packets are sent to the receiving container.
  • the method for transmitting a message provided by this application can enable the communication link between containers to have at least one access switch that does not support vxlan encapsulation of vxlan messages.
  • the vxlan packets of the edge device are encapsulated and sent to the access switch, so that the communication link can transmit the packets generated by vxlan encapsulation of vxlan packets.
  • GRE is a routing encapsulation protocol that provides a mechanism for encapsulating packets of one protocol into packets of another protocol, enabling packets to be transmitted on heterogeneous networks.
  • FIG. 2 shows a schematic diagram of GRE encapsulation of an original message (for example, an IP message).
  • vxlan is one of the layer 3 network virtualization (Network Virtualization Layer 3, NVO3) standard technologies defined by the Internet Engineering Task Force (IETF). It uses L2 (L-Over-L4) MAC-in-UDP. ) Packet encapsulation mode, which encapsulates Layer 2 packets with a Layer 3 protocol, which can expand the Layer 2 network within the range of Layer 3, while meeting the needs of large-scale Layer 2 virtual migration and multi-tenancy in the data center.
  • FIG. 3 shows a schematic diagram of vxlan encapsulation on an original message (for example, an Ethernet frame).
  • the method 200 for transmitting a message provided in this application is described in detail below with reference to the message transmission system shown in FIG. 1.
  • FIG. 4 shows a schematic flowchart of a method 200 for transmitting a message.
  • the method 200 includes at least the following steps.
  • the network edge device of the first virtual machine 103 determines whether the communication link between the first container 105 on the first virtual machine 103 and the second container 106 on the second virtual machine 104 has at least one unsupported pair.
  • the first packet is a vxlan-encapsulated access switch.
  • the first packet is a vxlan packet directed to the second container 106, and the first packet is an IP packet of the network edge device to the first container 105.
  • the text is generated by vxlan encapsulation.
  • the first network edge device 107 (for example, NVE1) of the first virtual machine 103 determines whether there is a communication link between the first container 105 (for example, docker1) and the second container 106 (for example, docker2). At least one access switch that does not support vxlan encapsulation of, for example, the first packet, the first packet is generated by NVE1 after vxlan encapsulation of the IP packet generated by docker1, and the first packet is to be sent Message to docker2.
  • the network edge device performs outer layer encapsulation on the first packet to generate a second packet, and The second message is sent to an access switch, wherein the outer layer encapsulation and the vxlan encapsulation are different types of encapsulation, the access switch is disposed in the communication link and is connected to the first virtual machine 103.
  • NVE1 determines that the communication link between docker1 and docker2 includes an access switch that does not support vxlan encapsulation of vxlan packets, NVE1 configures the transmission path for the IP packets generated by docker1 from docker1 to docker2 .
  • the above NVE1 configures the transmission path for the IP packets generated by docker1 from docker1 to docker2.
  • the specific implementation can be: NVE1 sends routing entries to the IP packets generated by docker1.
  • the transmission path is configured.
  • the transmission path of the IP packet generated by docker1 from docker1 to docker2 is the path indicated by the solid line in FIG. 5. As can be seen from FIG.
  • the IP packet is sent by docker1
  • the vxlan encapsulation / decapsulation module 1 first performs vxlan encapsulation (denoted as inner vxlan encapsulation) on the IP packet, and obtains a packet to be transmitted (that is, the first packet) encapsulated by the inner vxlan.
  • the outer package / decapsulation module 1 in the NVE1 performs outer layer encapsulation on the first message to generate a first message (for example, a second message) that is encapsulated by the outer layer.
  • the outer package and the vxlan encapsulation is a different type of encapsulation, for example, the outer encapsulation is a GRE encapsulation.
  • the outer layer encapsulation / decapsulation module 1 in the NVE1 sends the second packet to an access switch (for example, the first access switch 109) connected to the first virtual machine 103, because the second packet passes through Outer layer encapsulation, the second message is no longer a vxlan message. Therefore, the first access switch 109 cannot identify the hot message as a vxlan message (that is, the second message will not be decoded). Encapsulating or directly discarding the message), the first access switch 109 performs vxlan encapsulation on the hot packet (denoted as outer vxlan encapsulation), and sends the second packet encapsulated by the outer vxlan to the second Virtual machine 104.
  • an access switch for example, the first access switch 109
  • the first access switch 109 cannot identify the hot message as a vxlan message (that is, the second message will not be decoded). Encapsulating or directly discarding the message), the first access switch 109 performs vxlan encapsul
  • the second packet encapsulated by the outer vxlan is first received by the access switch (for example, the second access switch 110) connected to the second virtual machine 104.
  • the second packet encapsulated by vxlan is decapsulated by vxlan (denoted as outer vxlan decapsulation), and the second packet decapsulated by outer vxlan is sent to outer encapsulation / decapsulation module 2 in NVE2.
  • the outer encapsulation / decapsulation module 2 performs outer decapsulation on the second packet decapsulated by the outer vxlan.
  • the outer encapsulation / decapsulation module 2 sends the second packet decapsulated to the vxlan.
  • the vxlan encapsulation / decapsulation module 2 performs vxlan decapsulation on the second packet (denoted as outer vxlan decapsulation), obtains the original IP packet, and encodes the original IP packet.
  • the text is sent to docker2.
  • the IP packet is transmitted from docker1 in the first virtual machine 103 to docker2 in the second virtual machine 104.
  • a detection process configuring a detection process, a vxlan encapsulation / decapsulation module and an outer encapsulation / decapsulation module in a network edge device, and determining whether a communication link between containers running on different computing devices has at least one by a detection process
  • An access switch that does not support vxlan encapsulation of vxlan packets When the communication link has an access switch that does not support vxlan encapsulation of vxlan packets, the transmission path of the IP packet output from the container on the sending end is performed.
  • the method for transmitting a message provided by this application can enable the communication link between containers to have at least one access switch that does not support vxlan encapsulation of vxlan messages.
  • the vxlan packets of the edge device are encapsulated and sent to the access switch, so that the communication link can transmit the packets generated by vxlan encapsulation of vxlan packets.
  • the first packet generated after vxlan encapsulation of the IP packet the second packet generated after outer layer encapsulation of the first packet, and the second packet generated after vxlan encapsulation of the second packet are described above.
  • the IP addresses carried in the packets are the same.
  • the above uses the first virtual machine 103 as the sending end and the second virtual machine 104 as the receiving end as an example.
  • the communication link between docker1 and docker2 has at least one access switch that does not support vxlan encapsulation of vxlan packets.
  • the method for transmitting messages provided in this application is explained. However, this application is not limited to this.
  • the first virtual machine 103 may also serve as a receiving end, and may receive a packet sent by any virtual machine in the virtual machine network.
  • the first virtual machine 103 may receive a packet sent by the second virtual machine 104 (for example, , The fifth message), at this time, the transmission path of the fifth message sent by the second virtual machine 104 to the first virtual machine 103 is a path indicated by a dotted line in FIG. 5, and the vxlan encapsulation / decapsulation module 2 is used for Realize the function of vxlan encapsulation on the fifth message.
  • the outer encapsulation / decapsulation module 2 is used to implement the function of outer encapsulation on the fifth message.
  • the vxlan encapsulation / decapsulation module 1 is used to implement the fifth packet.
  • the message performs a vxlan decapsulation function.
  • the outer layer encapsulation / decapsulation module 1 is configured to implement a function of outer layer decapsulation of the fifth message.
  • vxlan encapsulation of IP packets is referred to as inner vxlan encapsulation
  • outer vxlan encapsulation similarly, vxlan-encapsulated second packets are vxlan-encapsulated.
  • Decapsulation is called outer vxlan decapsulation
  • vxlan decapsulation of vxlan-encapsulated IP packets is called inner vxlan decapsulation.
  • the outer encapsulation includes at least any one of a GRE encapsulation, an IPSec encapsulation, and an IPv4 encapsulation.
  • the outer encapsulation is GRE encapsulation, that is, the outer encapsulation / decapsulation module 1 in NVE1 performs inner vxlan encapsulation on the IP packet, generates a first packet, and generates the first packet. GRE encapsulation is performed to generate a second message. When the second message reaches the first access switch 109, the first access switch 109 encapsulates the second message with an outer vxlan and then encapsulates the second message. Send to the second virtual machine 104.
  • FIG. 6 shows a schematic diagram of (outer vxlan + GRE + inner vxlan) encapsulation on the IP packet.
  • step 201 when the NVE1 determines that the communication link between docker1 and docker2 includes an access switch that does not support vxlan encapsulation of vxlan packets, the method described in step 202 is used for the packet to be transmitted. For transmission
  • this NVE1 determines that the access switch in the communication link between docker1 and docker2 supports vxlan encapsulation of vxlan packets, it can issue routing entries to enable vxlan encapsulation / decapsulation module 1 in NVE1 to After the IP packet is encapsulated with the inner vxlan, a first packet is generated, and the first packet is sent to the first access switch 109, and the first access switch 109 performs an outer layer on the first packet.
  • vxlan encapsulation sends the encapsulated IP packet (outer vxlan + inner vxlan) to the second virtual machine 104.
  • the first packet encapsulated by the outer vxlan is first received by the second access switch 110 in the second virtual machine 104, and the second access switch 110 performs the first packet encapsulated by the outer vxlan.
  • the outer layer vxlan is decapsulated, and the first message decapsulated by vxlan is sent to the vxlan encapsulation / decapsulation module 2 in NVE2.
  • the vxlan encapsulation / decapsulation module 2 performs inner vxlan decapsulation on the first message. Encapsulate, obtain the original IP packet, and send the original IP packet to docker2. At this point, the IP packet is transmitted from docker1 in the first virtual machine 103 to docker2 in the second virtual machine 104.
  • the following uses the outer encapsulation as a GRE encapsulation as an example to describe how the NVE1 involved in step 101 determines whether the communication link between the containers includes an access switch that does not support vxlan encapsulation of vxlan packets.
  • the network edge device of the first virtual machine 103 determines whether there is a communication link between the first container 105 on the first virtual machine 103 and the second container 106 on the second virtual machine 104.
  • At least one access switch that does not support vxlan encapsulation of the first packet includes:
  • the network edge device constructs a third packet, and the third packet is a vxlan packet
  • the network edge device sends the third packet to the access switch, and the access switch is configured to perform vxlan encapsulation on the third packet, and is configured to send the third packet encapsulated by vxlan to the second virtual switch.
  • Machine 104
  • the network edge device judges whether the first container 105 on the first virtual machine 103 and the second container 105 on the second virtual machine 104 are received according to whether or not the response message for the third message sent by the second virtual machine 104 is received. Whether the communication link between the containers 106 has at least one second virtual machine 104 and a second virtual machine 104 that are not access switches that do not support vxlan encapsulation of the first packet.
  • the detection process (for example, detection process 1) in the NVE1 is used to construct a detection message or construct a response message for the received detection message.
  • NVE1 constructs a detection message (for example, a third message) through the detection process 1, and the third message is a vxlan message.
  • the vxlan encapsulation / decapsulation module 1 in NVE1 performs vxlan encapsulation on the detection message to generate the third message.
  • NVE1 determines whether the communication link between docker1 and docker2 includes an access switch that does not support vxlan encapsulation of vxlan packets. NVE1 constructs the third packet and The message is sent to NVE2.
  • NVE2 If NVE2 successfully receives the third message, it constructs a response message for the third message. If NVE1 successfully receives the third message, it determines whether there is a difference between docker1 and docker2.
  • the access switch in the communication link supports vxlan encapsulation of vxlan packets.
  • the following takes the third packet generated by vxlan encapsulation / decapsulation module 1 to perform vxlan encapsulation on the probe packet constructed by probe process 1.
  • the third packet is sent to NVE1 to determine the communication between docker1 and docker2.
  • the detailed process of whether the link includes an access switch that does not support vxlan encapsulation of vxlan packets is explained.
  • NVE1 configures the transmission path of the third packet from docker1 to docker2. For example, NVE1 sends routing entries to make the transmission path of the third packet from docker1 to docker2 the path indicated by the solid line in FIG. 7 .
  • the vxlan encapsulation and decapsulation module 1 first performs inner vxlan encapsulation on the probe message constructed by the probing process 1 to generate the third message.
  • the third packet encapsulated by the layer vxlan enters the first access switch 109.
  • the first access switch 109 supports vxlan encapsulation of vxlan packets.
  • the first access switch 109 does not support vxlan encapsulation of vxlan packets.
  • the following describes the methods for determining whether the communication link between docker1 and docker2 includes an access switch that does not support vxlan encapsulation of vxlan packets for the two situations described above.
  • the first access switch 109 When the first access switch 109 supports nested encapsulation of vxlan, the first access switch 109 performs outer vxlan encapsulation on the third packet received by the inner vxlan encapsulation, and passes the (outer vxlan + inner Layer vxlan) encapsulated third packet is sent to the second access switch 110, and the second access switch 110 decapsulates the received third packet (outer vxlan + inner vxlan) with outer vxlan Then, the vxlan encapsulation / decapsulation module 2 performs inner vxlan decapsulation on the third packet decapsulated by the outer vxlan, and the vxlan encapsulation / decapsulation module 2 decapsulates the (inner vxlan + outer vxlan). The third message is sent to the detection process 2.
  • the detection process 2 constructs a response message for the third message, and sends the response message for the third message to NVE1, and the response message for the third message is transmitted from docker1 to docker2.
  • the transmission path is configured. For example, by sending routing entries, the transmission path for the response packet for the third packet from docker1 to docker2 is the path indicated by the dashed line in FIG. 7.
  • the response message for the third message is first paired by the vxlan encapsulation / decapsulation module 2
  • the response packet for the third packet is encapsulated by the inner vxlan, and then the response packet for the third packet encapsulated by the inner vxlan enters the second access switch 110 (assuming the second access switch 110 Support vxlan nested encapsulation).
  • the second access switch 110 performs outer vxlan encapsulation on the received response message encapsulated with the inner vxlan for the third message, and encapsulates the third message encapsulated with (outer vxlan + inner vxlan).
  • the response message is sent to the first access switch 109, and the first access switch 109 de-encapsulates the received response message for the third message (outer vxlan + inner vxlan) and encapsulates the outer vxlan.
  • the vxlan encapsulation / decapsulation module 1 performs inner vxlan decapsulation on the response message decapsulated for the third packet after the outer vxlan decapsulation, and the vxlan encapsulation / decapsulation module 1 passes through (inner vxlan + outer vxlan) decapsulated response message for the third message is sent to the detection process 1.
  • the first access switch 109 When the first access switch 109 does not support vxlan encapsulation of the vxlan packet, the first access switch 109 de-encapsulates the third packet encapsulated by the inner vxlan or directly discards the second packet, so that The second message cannot successfully reach NVE2, so NVE1 cannot receive a response message from NVE2 to the third message.
  • the detection process 1 can start a timer when constructing the third message.
  • the timer expires, if NVE1 has not received the response message for the third message sent by NVE2, NVE1 can Make sure that the communication link between docker1 and docker2 includes an access switch that does not support vxlan encapsulation of vxlan packets.
  • NVE1 can also retry. For example, NVE1 sends the second message to NVE2 repeatedly. If the detection process 1 never receives the response message for the third message sent by NVE2, it is determined that docker1 and The communication link between docker2 includes an access switch that does not support vxlan encapsulation of vxlan packets.
  • NVE1 can further determine whether the communication link between docker1 and docker2 includes access that does not support vxlan encapsulation of vxlan packets. switch. Details are described below.
  • the first virtual machine 103 determines whether the communication link has at least one An access switch supporting vxlan encapsulation of the first packet includes:
  • the network edge device constructs a fourth packet, and the fourth packet is a packet that is sequentially encapsulated by vxlan and the outer layer;
  • the network edge device sends the fourth packet to the access switch, and the access switch is configured to perform vxlan encapsulation on the fourth packet and to send the fourth packet encapsulated by vxlan to the second virtual switch.
  • Machine 104
  • the network edge device judges whether the first container 105 on the first virtual machine 103 and the second container 105 on the second virtual machine 104 are received according to whether or not the response packet for the fourth packet is sent by the second virtual machine 104. Whether there is at least one access switch in the communication link between the containers 106 that does not support vxlan encapsulation of the first packet.
  • NVE1 constructs a detection packet (for example, a fourth packet) through the detection process 1.
  • the fourth packet is in sequence Packets that are encapsulated by vxlan and outer layer (for example, GRE encapsulation).
  • the fourth packet may also be generated by sequentially performing inner vxlan encapsulation and GRE encapsulation on the detection packet constructed by the detection process 1.
  • the detection packet constructed by the vxlan encapsulation / decapsulation module 1 for the detection process 1 The text is encapsulated in the inner layer of vxlan, and the GRE encapsulation / decapsulation module 1 performs GRE encapsulation on the detection packet constructed by the detection process.
  • the following takes the fourth packet generated by vxlan encapsulation / decapsulation module 1 and GRE encapsulation / decapsulation module 1 as the inner layer of vxlan encapsulation and GRE encapsulation of the probe packet constructed by probing process 1 as an example.
  • the fourth message is sent to determine whether the communication link between docker1 and docker2 includes an access switch that does not support vxlan encapsulation of vxlan messages.
  • NVE1 configures the transmission path of the fourth packet from docker1 to docker2. For example, by sending routing entries, the transmission path of the fourth packet from docker1 to docker2 is the path indicated by the solid line in FIG. 8.
  • the vxlan encapsulation and decapsulation module 1 performs inner-layer vxlan encapsulation on the probe packet constructed by the detection process 1, and the GRE encapsulation / decapsulation module 1 passes The inner vxlan-encapsulated probe packet is GRE-encapsulated. After the fourth packet is generated, the fourth packet encapsulated by GRE enters the first access switch 109.
  • the first access switch 109 performs outer vxlan encapsulation on the received fourth packet encapsulated with (GRE + inner vxlan), and sends the fourth packet encapsulated with (outer vxlan + GRE + inner vxlan).
  • the second access switch 110 performs outer vxlan decapsulation on the received fourth packet (outer vxlan + GRE + inner vxlan) and then GRE encapsulation / decapsulation Module 2 performs inner GRE decapsulation on the fourth packet decapsulated by the outer vxlan, and is encapsulated / decapsulated by vxlan.
  • Module 2 performs inner vxlan decapsulation on the fourth packet decapsulated by GRE, and is encapsulated by vxlan.
  • the / decapsulation module 2 sends the fourth packet decapsulated (inner vxlan + GRE + outer vxlan) to the detection process 2.
  • the detection process 2 constructs a response message for the fourth message, and sends the response message for the fourth message to NVE1, and the response message for the fourth message is transmitted from docker1 to docker2
  • the transmission path for the response packet for the fourth packet from docker1 to docker2 is the path indicated by the dashed line in FIG. 8.
  • the response message for the fourth message is first paired by the vxlan encapsulation / decapsulation module 2
  • the response packet for the fourth packet is encapsulated with inner vxlan, and then the GRE encapsulation / decapsulation module 2 performs GRE encapsulation for the response packet encapsulated with the inner vxlan for the fourth packet.
  • the response message for the fourth message enters the second access switch 110.
  • the second access switch 110 performs outer vxlan encapsulation on the received response packet for the fourth packet (GRE + inner vxlan), and encapsulates the received response packet in (outer vxlan + GRE + inner vxlan).
  • the response message for the fourth message is sent to the first access switch 109, and the first access switch 109 responds to the fourth message encapsulated by the received (outer vxlan + GRE + inner vxlan) packet.
  • the text is decapsulated by the outer vxlan, and then the GRE encapsulation / decapsulation module 1 performs the inner GRE decapsulation of the response message for the fourth message decapsulated by the outer vxlan, and then the vxlan encapsulation / decapsulation module 1
  • the GRE decapsulated response packet for the fourth packet is subjected to inner vxlan decapsulation, and the vxlan encapsulation / decapsulation module 1 pairs (inner vxlan + GRE + outer vxlan) decapsulated for the fourth packet
  • the response message is sent to the detection process 1.
  • NVE1 can flexibly determine whether or not to encapsulate the first packet based on the judgment result. When it is determined that the outer layer of the first message is not required to be encapsulated, the signaling overhead can be effectively saved, and the transmission delay of the first message can be saved.
  • the third message and the fourth message may be directly sent by the detection process 1 to the first access switch 109. No need to go through vxlan encapsulation / decapsulation module 1 and GRE encapsulation / decapsulation module 1.
  • the NVE1 in FIG. 1, FIG. 7, and FIG. 8 described above may include only the detection process 1.
  • the wiring method when the access switch and the computing device are connected in this application can be the Top (Rank, TOR) wiring method, the End (Row, EOR) wiring method, and the ( Any of the Middle (Row, MOR) wiring methods is not specifically limited in this application.
  • the above method uses the communication link between docker1 and docker2 to include the first access switch 109 and the second access switch 110 as an example to describe the method for transmitting a packet in this application.
  • the communication link between docker1 and docker2 may include only one access switch, which is connected to both the first virtual machine 103 and the second access switch. 110 connection, the first virtual machine 103 and the second virtual machine 104 communicate through different ports on the access switch.
  • the actions performed by the first access switch 109 and the second access switch 110 in the above method 100 are all performed by the access switch, that is, The access switch is responsible for both vxlan encapsulation of the packets received from the first virtual machine 103 and vxlan decapsulation of the packets to be sent to the second virtual machine 104.
  • FIG. 9 is a schematic block diagram of a network edge device 300 according to an embodiment of the present application.
  • the network edge device 300 includes a detection process 301, a vxlan encapsulation / decapsulation module 302, and an outer layer encapsulation / decapsulation module 303.
  • a detection process 301 configured to determine whether the communication link between the first container on the first virtual machine and the second container on the second virtual machine has at least one access that does not support vxlan encapsulation of the first packet.
  • a switch wherein the first packet is a vxlan packet directed to the second container;
  • a vxlan encapsulation / decapsulation module 302 configured to perform vxlan encapsulation on the IP packet of the first container to generate the first packet;
  • An outer layer encapsulation / decapsulation module 303 is configured to: if the communication link has at least one access switch that does not support vxlan encapsulation of the first message, outer layer encapsulation of the first message to generate a second message And send the second message to the access switch, wherein the outer encapsulation and the vxlan encapsulation are different types of encapsulation, and the access switch is disposed in the communication link and communicates with the first virtual machine connection.
  • the detection process 301 is further configured to construct a third message, where the third message is a vxlan message;
  • the detection process 301 is further configured to send the third packet to the access switch, and the access switch is configured to perform vxlan encapsulation on the third packet and to send the third packet encapsulated by vxlan to The second virtual machine;
  • the detection process 301 is further configured to determine whether a first container on the first virtual machine and a second container on the second virtual machine are received according to whether a response packet for the third packet sent by the second virtual machine is received. Whether the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the first packet;
  • the outer layer encapsulation / decapsulation module 303 is specifically configured to: if the detection process 201 does not receive a response message for the third message sent by the second virtual machine, perform outer layer encapsulation on the first message. To generate a second message and send the second message to the access switch.
  • the detection process 301 is further configured to construct a fourth message, and the fourth message is a message that is sequentially encapsulated by vxlan and the outer layer;
  • the detection process 301 is further configured to send the fourth packet to the access switch, and the access switch is configured to perform vxlan encapsulation on the fourth packet and to send the fourth packet encapsulated by vxlan to The second virtual machine;
  • the detection process 301 is further configured to determine whether a first container on the first virtual machine and a second container on the second virtual machine are received according to whether a response packet for the fourth packet sent by the second virtual machine is received. Whether the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the first packet;
  • the outer layer encapsulation / decapsulation module 303 is specifically configured to: if the detection process 301 receives a response message for the fourth message sent by the second virtual machine, perform outer layer encapsulation on the first message to Generate a second message and send the second message to the access switch.
  • the outer layer encapsulation / decapsulation module 303 is further configured to receive a fifth message, where the fifth message is a message that passes through the outer layer encapsulation and vxlan encapsulation in sequence;
  • the outer-layer encapsulation / decapsulation module 303 is further configured to de-encapsulate the fifth packet.
  • the vxlan encapsulation / decapsulation module 302 is further configured to perform vxlan decapsulation on the fifth packet that has been decapsulated by the outer layer to obtain an original packet corresponding to the fifth packet.
  • the protocol IP address of the interconnection between the source network carried in the first message and the second message is the same.
  • the outer layer encapsulation includes at least any one of a general routing encapsulation GRE, a network protocol security encapsulation IPSec encapsulation, and an IPv4 over IPv4 encapsulation.
  • the network edge device 300 may be the first network edge device 107 or the second network edge device 108 in FIG. 1.
  • FIG. 10 is a schematic block diagram of a network edge device 400 according to an embodiment of the present application.
  • the network edge device 400 includes: a memory 401, a processor 402, and an interface 403.
  • the memory 401, the processor 402, and the interface 403 are used to run the network in FIG.
  • the network edge devices shown are as follows.
  • the memory 401 is configured to store a program.
  • the processor 402 is configured to execute a program stored in the memory.
  • the processor 804 is used to determine a first container on the first virtual machine and a second container on the second virtual machine. Whether the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the first packet, wherein the first packet is a vxlan packet directed to the second container;
  • the processor 402 is further configured to perform vxlan encapsulation on the IP packet of the first container to generate the first packet.
  • the processor 402 is further configured to: if the communication link has at least one access switch that does not support vxlan encapsulation of the first packet, perform outer layer encapsulation on the first packet to generate a second packet;
  • An interface 403 is configured to send the second packet to the access switch
  • the outer package and the vxlan package are different types of packages.
  • the access switch is disposed in the communication link and is connected to the first virtual machine.
  • the processor 402 is further configured to construct a third message, where the third message is a vxlan message;
  • the processor 402 is further configured to send the third packet to the access switch, and the access switch is configured to perform vxlan encapsulation on the third packet and to send the third packet encapsulated by vxlan to The second virtual machine;
  • the processor 402 is further configured to determine whether a first container on the first virtual machine and a second container on the second virtual machine are received according to whether a response packet for the third packet sent by the second virtual machine is received. Whether the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the first packet;
  • the processor 402 is further configured to: if a response message for the third message sent by the second virtual machine is not received, outer-encapsulate the first message to generate a second message, and The second message is sent to the access switch.
  • the processor 402 is further configured to construct a fourth message, and the fourth message is a message that is sequentially encapsulated by vxlan and the outer layer;
  • the processor 402 is further configured to send the fourth packet to the access switch, and the access switch is configured to perform vxlan encapsulation on the fourth packet and to send the fourth packet encapsulated by vxlan to The second virtual machine;
  • the processor 402 is further configured to determine whether a first container on the first virtual machine and a second container on the second virtual machine are received according to whether a response packet for the fourth packet sent by the second virtual machine is received. Whether the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the first packet;
  • the processor 402 is further configured to, if a response message for the fourth message sent by the second virtual machine is received, outer-encapsulate the first message to generate a second message, and The second message is sent to the access switch.
  • the interface 403 is further configured to receive a fifth packet, where the fifth packet is a packet that passes through the outer encapsulation and vxlan encapsulation in order;
  • the processor 402 is further configured to de-encapsulate the fifth packet from the outer layer;
  • the processor 402 is further configured to perform vxlan decapsulation on the fifth packet that has been de-encapsulated to obtain an original packet corresponding to the fifth packet.
  • the protocol IP address of the interconnection between the source network carried in the first message and the second message is the same.
  • the outer layer encapsulation includes at least any one of a general routing encapsulation GRE, a network protocol security encapsulation IPSec encapsulation, and an IPv4 over IPv4 encapsulation.
  • the network edge device 400 may be the first network edge device 107 or the second network edge device 108 in FIG. 1.
  • the message transmission system includes a first virtual machine, a second virtual machine, an access switch, and a second access switch.
  • a first container and a first virtual machine are deployed on the first virtual machine.
  • a network edge device, a second container and a second network edge device are deployed on the second virtual machine;
  • the network edge device is configured to determine whether there is at least one communication link between the first container on the first virtual machine and the second container on the second virtual machine that does not support vxlan encapsulation of the first packet.
  • An access switch wherein the first packet is a vxlan packet directed to the second container, and the first packet is generated by the network edge device performing vxlan encapsulation on the IP packet of the first container;
  • the network edge device is further configured to: if the communication link has at least one access switch that does not support vxlan encapsulation of the first packet, perform outer layer encapsulation on the first packet to generate a second packet, and Sending the second packet to the access switch;
  • the access switch is configured to perform vxlan encapsulation on the second packet, and send the second packet encapsulated by vxlan to the second virtual machine,
  • the outer package and the vxlan package are different types of packages, the access switch and the second access switch are arranged in the communication link, the access switch is connected to the first virtual machine, and the second The access switch is connected to the first virtual machine.
  • the network edge device is further configured to construct a third packet, where the third packet is a vxlan packet;
  • the network edge device is further configured to send the third packet to the access switch, and the access switch is configured to perform vxlan encapsulation on the third packet and to send the third packet encapsulated by vxlan to The second virtual machine;
  • the network edge device is further configured to determine whether a first container on the first virtual machine and a second container on the second virtual machine are received according to whether a response packet for the third packet sent by the second virtual machine is received. Whether the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the first packet;
  • the network edge device is further configured to, if a response message for the third message sent by the second virtual machine is not received, outer-encapsulate the first message to generate a second message, and The second message is sent to the access switch.
  • the network edge device is further configured to construct a fourth message, where the fourth message is a message that is sequentially encapsulated by vxlan and the outer layer;
  • the network edge device is further configured to send the fourth packet to the access switch, and the access switch is configured to vxlan encapsulate the fourth packet and send the fourth packet encapsulated with vxlan to The second virtual machine;
  • the network edge device is further configured to determine whether a first container on the first virtual machine and a second container on the second virtual machine are received according to whether a response packet for the fourth packet sent by the second virtual machine is received. Whether the communication link between the containers has at least one access switch that does not support vxlan encapsulation of the first packet;
  • the network edge device is further configured to, if receiving a response message for the fourth message sent by the second virtual machine, perform outer layer encapsulation on the first message to generate a second message, and The second message is sent to the access switch.
  • the network edge device is further configured to receive a fifth packet, where the fifth packet is a packet that passes through the outer encapsulation and vxlan encapsulation in order;
  • the network edge device is further configured to de-encapsulate the fifth packet and de-encapsulate vxlan in order to obtain an original packet corresponding to the fifth packet.
  • the protocol IP address of the interconnection between the source network carried in the first message and the second message is the same.
  • the outer layer encapsulation includes at least any one of a general routing encapsulation GRE, a network protocol security encapsulation IPSec encapsulation, and an IPv4 over IPv4 encapsulation.
  • the message transmission system may be the message transmission system 100 shown in FIG. 1, the first virtual machine is the first virtual machine 103 shown in FIG. 1, and the second virtual machine is shown in FIG. 1.
  • the second virtual machine 104 shown in FIG. 1 is the first container 105 shown in FIG. 1, the second container is the second container 106 shown in FIG. 1, and the network edge device is shown in FIG. 1.
  • the first network edge device 107 is shown
  • the second network edge device is the second network edge device 108 shown in FIG. 1
  • the access switch is the first access switch 109 shown in FIG. 1
  • the first The second access switch is the second access switch 110 shown in FIG. 1.
  • This application provides a chip, which includes an interface, a memory, and a processor.
  • the memory is used to store instructions.
  • the processor is used to execute the instructions stored in the memory.
  • the execution of the instructions stored in the memory causes the processor.
  • the method for transmitting a message in the embodiment of the present application is executed.
  • This application provides a computer-readable storage medium.
  • the computer-readable storage medium stores instructions. When the instructions are run on a computer, the computer is caused to execute the method for transmitting a message according to the embodiments of the present application.
  • This application provides a computer program product containing instructions.
  • the computer program product runs on a computer, the computer causes the computer to execute the method for transmitting a message according to the embodiments of the present application.
  • the disclosed systems, devices, and methods may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division.
  • multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially a part that contributes to the existing technology or a part of the technical solution can be embodied in the form of a software product.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
  • the foregoing storage media include: U disks, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks or compact discs and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供一种传输报文的方法,包括:第一虚拟机的网络边缘设备判断第一容器与第二容器之间的通信链路中是否具有不支持对第一报文进行vxlan封装的接入交换机,第一报文是针对第二容器的vxlan报文,且是对第一容器的IP报文进行vxlan封装产生的;若否,对第一报文进行外层封装,产生第二报文,将第二报文发送至接入交换机,外层封装与vxlan封装为不同类型的封装。该方法在通信链路具有不支持对vxlan报文进行vxlan封装的接入交换机时,对报文的传输路径进行自动配置,对来自网络边缘设备的vxlan报文进行外层封装后发送至接入交换机,使得通信链路能够传输对vxlan报文进行vxlan封装后产生的报文。

Description

传输报文的方法、网络边缘设备与报文传输系统 技术领域
本申请涉及信息技术领域,并且更具体地,涉及信息技术领域中的传输报文的方法、网络边缘设备与报文传输系统。
背景技术
容器作为一种新兴的虚拟化方式,与传统的虚拟化方式相比具有众多的优势。在数据中心中,容器部署在数据中心的若干虚拟机上。一种用于容器通信的报文传输系统包括位于不同虚拟机上的至少两个容器和至少两个容器之间的网络设备。
在该报文传输系统中,不同虚拟机上的至少两个容器的通信需要通过其所在的虚拟机。具体地,源端容器将报文发送给源端容器所在的源端虚拟机上的网络边缘设备,由源端虚拟机的网络边缘设备将源端容器报文转发至目的端的网络边缘设备,再由目的端网络边缘设备将报文转发至目的端容器,其中源端虚拟机的网络边缘设备通过至少一个接入交换机将报文转发至目的端虚拟机。容器之前通过可扩展虚拟局域网(Virtual Extensible LAN,vxlan)网络通信,当虚拟机之间也通过vxlan网络进行通信时,需要对容器的报文进行两层vxlan封装,具体如下。
源端虚拟机上的源端容器向目的端虚拟机上的目的端容器发送报文,该报文首先经过源端虚拟机上的网络边缘设备,该网络边缘设备对该报文进行vxlan封装,再将经过vxlan封装的报文发送至接入交换机,由接入交换机再次对该vxlan报文进行vxlan封装,接入交换机将连续经过两次vxlan封装的该报文发送至目的端虚拟机上的目的端容器。
然而,在报文传输系统中,可能存在某两个虚拟机上的容器之间的通信链路中具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机,例如,当网络边缘设备将经过vxlan封装的报文发送至接入交换机时,若该接入交换机不支持对vxlan报文进行vxlan封装,此时,接入交换机识别到该报文已经进行过vxlan封装,便会对该报文进行解封装,或者,直接丢弃该报文,进而导致容器之间的通信链路不通。
发明内容
本申请提供一种传输报文的方法,该方法能够在容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机时,通过对报文的传输路径进行自动配置,从而导通运行在不同计算设备上的容器之间的通信链路,使得该通信链路能够传输对vxlan报文进行vxlan封装后产生的报文。
第一方面,提供了一种传输报文的方法,包括:第一虚拟机的网络边缘设备判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,该第一报文是针对该第二容器的vxlan报文,该第一报文是该网络边缘设备对该第一容器的IP报文进行vxlan封装而产生的;若该通信链路中具有至少一个不支持对第一报文进行vxlan封装 的接入交换机,该网络边缘设备对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机,该接入交换机用于对该第二报文进行vxlan封装,并用于将经过vxlan封装的该第二报文发送至第二虚拟机,其中,该外层封装与该vxlan封装为不同类型的封装,该接入交换机设置在该通信链路中,且与该第一虚拟机连接。
通过在网络边缘设备中配置探测进程、vxlan封装/解封装模块与外层封装/解封装模块,并通过探测进程判断运行在不同计算设备上的容器之间的通信链路是否具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机,在该通信链路中具有不支持对vxlan报文进行vxlan封装的接入交换机时,通过对发送端容器输出的IP报文的传输路径进行自动配置,使得该IP报文依次经过vxlan封装与外层封装后到达接入交换机,再由接入交换机将依次经过vxlan封装与外层封装的IP报文发送至接收端容器。
本申请提供的传输报文的方法能够在容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机时,通过对报文的传输路径进行自动配置,对来自网络边缘设备的vxlan报文进行外层封装后发送至接入交换机,使得该通信链路能够传输对vxlan报文进行vxlan封装后产生的报文。
结合第一方面,在第一方面的第一种实现方式中,该第一虚拟机的网络边缘设备判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,包括:该网络边缘设备构造第三报文,该第三报文为vxlan报文;该网络边缘设备将该第三报文发送至该接入交换机,该接入交换机用于对该第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至该第二虚拟机;该网络边缘设备根据是否接收到该第二虚拟机发送的针对该第三报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;该若通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,该网络边缘设备对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机,具体包括:若该网络边缘设备未接收到该第二虚拟机发送的针对该第三报文的回应报文,该网络边缘设备对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机。
结合第一方面的第一种实现方式,在第一方面的第二种实现方式中,该第三报文可以是网络边缘设备中的探测进程构造的,即,该探测进程在对该构造该第三报文时,便完成了对该第三报文的vxlan封装。
结合第一方面的第一种实现方式,在第一方面的第三种实现方式中,该第三报文还可以是由网络边缘设备中的vxlan封装/解封装模块对探测进程构造的探测报文进行vxlan封装生成的。
通过向第二虚拟机发送经过vxlan嵌套封装的第三报文,当第一虚拟机成功接收到第二虚拟机发送的针对第三报文的回应报文时,网络边缘设备确定第一虚拟机上运行的容器与第二虚拟机上运行的容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机;否则,当第一虚拟机未能成功接收到第二虚拟机发送的针对第三报文的回应报文时,网络边缘设备确定第一虚拟机上运行的容器与第二虚拟机上运行的容器之间的通信链路中包括的接入交换支持对vxlan报文进行vxlan封 装。
通过对容器之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机进行判断,使得网络边缘设备能够根据判断结果,灵活地确定是否对第一报文进行外层封装,从而在确定无需对第一报文进行外层封装时,能够有效地节省信令开销,并且能够节省第一报文的传输时延。
结合第一方面的第一种至第三种实现方式,在第一方面的第四种实现方式中,若该网络边缘设备未接收到该第二虚拟机发送的针对该第三报文的回应报文,该第一虚拟机判断该通信链路中是否具有至少一个不支持对该第一报文进行vxlan封装的接入交换机,包括:该网络边缘设备构造第四报文,该第四报文为依次经过vxlan封装与该外层封装的报文;该网络边缘设备将该第四报文发送至该接入交换机,该接入交换机用于对该第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至该第二虚拟机;该网络边缘设备根据是否接收到该第二虚拟机发送的针对该第四报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;该若该通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,该网络边缘设备对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机,具体包括:若该网络边缘设备接收到该第二虚拟机发送的针对该第四报文的回应报文,该网络边缘设备对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机
结合第一方面的第四种实现方式,在第一方面的第五种实现方式中,该第四报文可以是网络边缘设备中的探测进程构造的,即,该探测进程在对该构造该第四报文时,便完成了对该第四报文依次进行vxlan封装与外层封装的操作。
结合第一方面的第四种实现方式,在第一方面的第六种实现方式中,该第四报文还可以是由网络边缘设备中的vxlan封装/解封装模块与外层封装/解封装模块对探测进程构造的探测报文依次进行vxlan封装与外层封装后生成的。
通过向第二虚拟机发送依次经过vxlan封装与外层封装的第四报文,当第一虚拟机成功接收到第二虚拟机发送的针对第四报文的回应报文时,网络边缘设备确定第一虚拟机上运行的容器与第二虚拟机上运行的容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机。
通过对容器之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机进行判断,使得网络边缘设备能够根据判断结果,灵活地确定是否对第一报文进行外层封装,从而在确定无需对第一报文进行外层封装时,能够有效地节省信令开销,并且能够节省第一报文的传输时延。
结合第一方面的第一种至第六种实现方式,在第一方面的第七种实现方式中,该方法还包括:该网络边缘设备接收第五报文,该第五报文为依次经过该外层封装与vxlan封装的报文;该网络边缘设备对该第五报文依次进行解该外层封装与vxlan解封装,获得该第五报文对应的原始报文。
结合第一方面的第一种至第七种实现方式,在第一方面的第八种实现方式中,该第一报文与该第二报文中携带的网络之间互连的协议(Internet Protocol,IP)地址相 同。
结合第一方面的第一种至第八种实现方式,在第一方面的第九种实现方式中,该外层封装至少包括通用路由封装(Generic Routing Encapsulation,GRE)、网络协议安全性封装(Internet Protocol Security,IPSec)封装与IPv4 over IPv4封装中的任意一种。
第二方面,提供一种网络边缘设备,该网络边缘设备用于执行上述第一方面或第一方面的任一可能的实现方式中的方法。具体地,该网络边缘设备可以包括用于执行第一方面或第一方面的任一可能的实现方式中的方法的进程与模块。
第三方面,提供一种网络边缘设备,该装置包括接口、存储器和处理器,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,并且对该存储器中存储的指令的执行使得该处理器执行第一方面或第一方面的任一可能的实现方式中的方法。
第四方面,提供一种报文传输系统,该报文传输系统包括:第一虚拟机、第二虚拟机、接入交换机,该第一虚拟机上部署有第一容器和网络边缘设备,该第二虚拟机上部署有第二容器;该网络边缘设备,用于判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,该第一报文是针对该第二容器的vxlan报文,该第一报文是该网络边缘设备对该第一容器的IP报文进行vxlan封装而产生的;该网络边缘设备,还用于若该通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机;该接入交换机,用于对该第二报文进行vxlan封装,并将经过vxlan封装的该第二报文发送至该第二虚拟机,其中,该外层封装与该vxlan封装为不同类型的封装,该接入交换机设置在该通信链路中,且与该第一虚拟机连接。
第五方面,提供一种芯片,该芯片包括接口、存储器和处理器,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,并且对该存储器中存储的指令的执行使得该处理器执行第一方面或第一方面的任一可能的实现方式中的方法。
第六方面,提供一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行第一方面或第一方面的任一可能的实现方式中的方法。
第七方面,提供一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行第一方面或第一方面的任一可能的实现方式中的方法。
附图说明
图1是本申请提供的报文传输系统的示意性框图。
图2是对原始报文进行GRE封装的原理性示意图。
图3是对原始报文进行vxlan封装的原理性示意图。
图4是本申请提供的传输报文的方法的示意性流程图。
图5是本申请提供的报文传输路径的示意性流程图。
图6是本申请提供的对原始报文依次进行GRE封装与vxlan封装的原理性示意图。
图7是本申请提供的报文传输路径的另一示意性流程图。
图8是本申请提供的报文传输路径的另一示意性流程图。
图9是本申请提供的网络边缘设备的示意性框图。
图10是本申请提供的网络边缘设备的另一示意性框图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
首先,对当容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机时的传输报文的一般方法进行说明。
当容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机时,通过手动命令对接入交换机进行配置,通过配置,使得指定端口放通经过vxlan封装的报文,允许vxlan报文在接入交换机中进行再一次的vxlan封装。
该方法的主要问题在于以下两点:
1)配置工作量大,云数据中心中大量的接入交换机都需要通过手动命令配置,而且需要根据端口配置。
2)当云数据中心中既有支持对vxlan报文进行vxlan封装的接入交换机,又有不支持对vxlan报文进行vxlan封装的接入交换机时,无法确定哪些接入交换机需要进行配置,此外,由于容器支持快速弹性伸缩和迁移,容器可能会由与某个接入交换机通信的虚拟机上迁移到与其他任意一个接入交换机通信的虚拟机上,进一步增加了手动配置接入交换机的工作量和难度。
针对该问题,本申请提供一种报文传输系统100,如图1所示,该报文传输系统100包括至少两个虚拟机(例如,该至少虚拟机为第一虚拟机103与第二虚拟机104)与至少一个接入交换机,第一虚拟机103运行在第一计算设备101上,第二虚拟机运行在第二计算设备102上,每个虚拟机上部署有容器(例如,docker)与网络边缘设备,例如,虚拟网络边缘节点(Network Virtualization Edge,NVE。
从图1中可以看出,每个虚拟机上部署的网络边缘设备中配置有探测进程、vxlan封装/解封装模块与外层封装/解封装模块,探测进程用于判断运行在两个不同的计算设备上的虚拟机中的容器之间的通信链路中是否具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机,vxlan封装/解封装模块用于对报文进行vxlan封装/解封装,外层封装/解封装模块用于对报文进行外层封装/解封装。
其中,第一虚拟机上部署的容器为第一容器105(例如,docker1),第一虚拟机上部署的网络边缘设备为第一网络边缘设备107(例如,NVE1),第一网络边缘设备中配置的探测进程、vxlan封装/解封装模块与外层封装/解封装模块分别为探测进程1、vxlan封装/解封装模块1与外层封装/解封装模块1;第二虚拟机上部署的容器为第二容器106(例如,docker2),第二虚拟机上部署的网络边缘设备为第二网络边缘设备108(例如,NVE2),第二网络边缘设备107中配置的探测进程、vxlan封装/解封装模块与外层封装/解封装模块分别为探测进程2、vxlan封装/解封装模块2与外层封装/解封装模块2,该第一容器105与第二容器106之间的通信链路包括的接入交换机为第一接入交换机109与第二接入交换机110,第一接入交换机109与第一虚拟机103连接,第二接入交换机110与第二虚拟机104连接。
基于图1中所示的报文传输系统,本申请提供一种传输报文的方法,通过在网 络边缘设备中配置探测进程、vxlan封装/解封装模块与外层封装/解封装模块,并通过探测进程判断运行在不同计算设备上的容器之间的通信链路是否具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机,在该通信链路中具有不支持对vxlan报文进行vxlan封装的接入交换机时,通过对发送端容器输出的IP报文的传输路径进行自动配置,使得该IP报文依次经过vxlan封装与外层封装后到达接入交换机,再由接入交换机将依次经过vxlan封装与外层封装的IP报文发送至接收端容器。
本申请提供的传输报文的方法能够在容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机时,通过对报文的传输路径进行自动配置,对来自网络边缘设备的vxlan报文进行外层封装后发送至接入交换机,使得该通信链路能够传输对vxlan报文进行vxlan封装后产生的报文。
为了更好地理解本申请,在对本申请的实施例进行介绍之前,首先对本申请涉及的专用术语进行说明。
通用路由封装
GRE为一种路由封装协议,提供了将一种协议的报文封装在另一种协议报文中的机制,使得报文能够在异种网络中传输。
具体实现为:对通信链路两端的设备分别进行配置,使得配置后的设备能够对报文进行GRE封装和GRE解封装。图2示出了对原始报文(例如,IP报文)进行GRE封装的示意图。
可扩展虚拟局域网
vxlan是由国际互联网工程任务组(The Internet Engineering Task Force,IETF)定义的第3层的网络虚拟化(Network Virtualization over Layer 3,NVO3)标准技术之一,采用L2 over L4(MAC-in-UDP)的报文封装模式,将二层报文用三层协议进行封装,可实现二层网络在三层范围内进行扩展,同时满足数据中心大二层虚拟迁移和多租户的需求。图3示出了对原始报文(例如,以太网帧)进行vxlan封装的示意图。
下面结合图1中所示的报文传输系统对本申请提供的传输报文的方法200进行详细说明。
图4示出了传输报文的方法200的示意性流程图,该方法200至少包括以下步骤。
201,第一虚拟机103的网络边缘设备判断该第一虚拟机103上的第一容器105与第二虚拟机104上的第二容器106之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,该第一报文是针对该第二容器106的vxlan报文,该第一报文是该网络边缘设备对该第一容器105的IP报文进行vxlan封装而产生的。
具体地,第一虚拟机103的第一网络边缘设备107(例如,NVE1)判断的第一容器105(例如,docker1)与第二容器106(例如,docker2)之间的通信链路中是否具有至少一个不支持对例如,第一报文进行vxlan封装的接入交换机,该第一报文是由NVE1对docker1生成的IP报文进行vxlan封装后生成的,且该第一报文是待发送至docker2的报文。
202,若该通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,该网络边缘设备对该第一报文进行外层封装以产生第二报文,并将该第二报文发 送至接入交换机,其中,该外层封装与该vxlan封装为不同类型的封装,该接入交换机设置在该通信链路中,且与该第一虚拟机103连接。
具体地,若NVE1确定docker1与docker2之间的通信链路中包括不支持对vxlan报文进行vxlan封装的接入交换机时,NVE1对docker1生成的IP报文由docker1传输至docker2的传输路径进行配置。
作为示例而非限定,上述的NVE1对docker1生成的IP报文由docker1传输至docker2的传输路径进行配置,具体实现时可以为:NVE1通过下发路由表项,对该docker1生成的IP报文的传输路径进行配置,通过配置,使得该docker1生成的IP报文由docker1传输至docker2的传输路径为图5中的实线表示的路径,从图5中可以看出,该IP报文由docker1发送至NVE1后,首先由vxlan封装/解封装模块1对该IP报文进行vxlan封装(记为内层vxlan封装),获得经过内层vxlan封装的待传输报文(即,第一报文)。
再由该NVE1中的外层封装/解封装模块1对该第一报文进行外层封装,生成经过外层封装的第一报文(例如,第二报文),该外层封装与该vxlan封装为不同类型的封装,例如,该外层封装为GRE封装。
该NVE1中的外层封装/解封装模块1将该第二报文发送至与第一虚拟机103连接的接入交换机(例如,第一接入交换机109),由于该第二报文经过了外层封装,第二报文不再是vxlan报文,因此,该第一接入交换机109便不能识别出该第热报文为vxlan报文(即,不会对该第二报文进行解封装或者直接丢弃该报文),第一接入交换机109对该第热报文进行vxlan封装(记为外层vxlan封装),并将经过外层vxlan封装的该第二报文发送至第二虚拟机104。
此时,经过外层vxlan封装的第二报文首先被与第二虚拟机104连接的接入交换机(例如,第二接入交换机110)接收,该第二接入交换机110对该经过外层vxlan封装的第二报文进行vxlan解封装(记为外层vxlan解封装),并将经过外层vxlan解封装的第二报文发送至NVE2中的外层封装/解封装模块2,由该外层封装/解封装模块2对该经过外层vxlan解封装的第二报文进行外层解封装,该外层封装/解封装模块2将经过外层解封装的第二报文发送至vxlan封装/解封装模块2,由该vxlan封装/解封装模块2对该第二报文进行vxlan解封装(记为外层vxlan解封装),获得原始的IP报文,并将该原始的IP报文发送至docker2。至此,该IP报文便由第一虚拟机103中的docker1传输至第二虚拟机104中的docker2。
因此,通过在网络边缘设备中配置探测进程、vxlan封装/解封装模块与外层封装/解封装模块,并通过探测进程判断运行在不同计算设备上的容器之间的通信链路是否具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机,在该通信链路中具有不支持对vxlan报文进行vxlan封装的接入交换机时,通过对发送端容器输出的IP报文的传输路径进行自动配置,使得该IP报文依次经过vxlan封装与外层封装后到达接入交换机,再由接入交换机将依次经过vxlan封装与外层封装的IP报文发送至接收端容器。
本申请提供的传输报文的方法能够在容器之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机时,通过对报文的传输路径进行自动配置,对 来自网络边缘设备的vxlan报文进行外层封装后发送至接入交换机,使得该通信链路能够传输对vxlan报文进行vxlan封装后产生的报文。
作为示例而非限定,上述对IP报文进行vxlan封装后生成的第一报文、对第一报文进行外层封装后生成的第二报文与对第二报文进行vxlan封装后生成的报文中携带的IP地址相同。
上述以第一虚拟机103作为发送端,第二虚拟机104作为接收端为例,对当docker1与docker2之间的通信链路具有至少一个不支持对vxlan报文进行vxlan封装的接入交换机时,本申请提供的传输报文的方法进行了说明。但本申请并不限定于此。
例如,第一虚拟机103还可以作为接收端,可以接收虚拟机网络中的任意一个虚拟机发送的报文,例如,该第一虚拟机103可以接收第二虚拟机104发送的报文(例如,第五报文),此时,第五报文由第二虚拟机104发送至第一虚拟机103的传输路径为图5中的虚线表示的路径,该vxlan封装/解封装模块2用于实现对第五报文进行vxlan封装的功能,该外层封装/解封装模块2用于实现对第五报文进行外层封装的功能,该vxlan封装/解封装模块1用于实现对第五报文进行vxlan解封装的功能,该外层封装/解封装模块1用于实现对第五报文进行外层解封装的功能。
关于第二虚拟机104向第一虚拟机103发送第五报文时的传输流程请参考上述相关描述,为了简洁,此处不再赘述。
为了便于区分,将上述对IP报文的vxlan封装称为内层vxlan封装,将上述对第二报文的vxlan封装称为外层vxlan封装;同样地,将vxlan封装的第二报文进行vxlan解封装称为外层vxlan解封装,将vxlan封装的IP报文进行vxlan解封装称为内层vxlan解封装。
作为示例而非限定,该外层封装至少包括GRE封装、IPSec封装与IPv4 over IPv4封装中的任意一种。
具体地,例如,该外层封装为GRE封装,即,NVE1中的外层封装/解封装模块1对该IP报文进行内层vxlan封装,生成第一报文,并对该第一报文进行GRE封装,生成第二报文,当该第二报文到达第一接入交换机109时,该第一接入交换机109对该第二报文进行外层vxlan封装后将该第二报文发送至第二虚拟机104。图6示出了对该IP报文进行(外层vxlan+GRE+内层vxlan)封装的示意图。
在上述步骤201中,当该NVE1确定docker1与docker2之间的通信链路中包括不支持对vxlan报文进行vxlan封装的接入交换机时,则使用步骤202中描述的方法对该待传输报文进行传输;
当该NVE1确定docker1与docker2之间的通信链路中的接入交换机支持对vxlan报文进行vxlan封装时,则可以通过下发路由表项,使得NVE1中的vxlan封装/解封装模块1在对该IP报文进行内层vxlan封装后,生成第一报文,便将该第一报文发送至第一接入交换机109,由该第一接入交换机109对该第一报文进行外层vxlan封装,将经过(外层vxlan+内层vxlan)封装的IP报文发送至第二虚拟机104。
此时,经过外层vxlan封装的第一报文首先被第二虚拟机104中的第二接入交换机110接收,该第二接入交换机110对该经过外层vxlan封装的第一报文进行外层vxlan解封装,并将经过vxlan解封装的第一报文发送至NVE2中的vxlan封装/解封装模块2, 由该vxlan封装/解封装模块2对该第一报文进行内层vxlan解封装,获得原始的IP报文,并将该原始的IP报文发送至docker2。至此,该IP报文便由第一虚拟机103中的docker1传输至第二虚拟机104中的docker2。
下面以该外层封装为GRE封装为例,对步骤101中涉及的NVE1确定容器之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机的方法进行说明。
作为示例而非限定,该第一虚拟机103的网络边缘设备判断该第一虚拟机103上的第一容器105与第二虚拟机104上的第二容器106之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,包括:
该网络边缘设备构造第三报文,该第三报文为vxlan报文;
该网络边缘设备将该第三报文发送至该接入交换机,该接入交换机用于对该第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至该第二虚拟机104;
该网络边缘设备根据是否接收到该第二虚拟机104发送的针对该第三报文的回应报文,判断该第一虚拟机103上的第一容器105与第二虚拟机104上的第二容器106之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机第二虚拟机104第二虚拟机104。
具体地,例如,如图7所示,该NVE1中的探测进程(例如,探测进程1)用于构造探测报文或者为接收到的探测报文构造回应报文。
例如,NVE1通过探测进程1构造探测报文(例如,第三报文),该第三报文为vxlan报文。
此外,NVE1还可以通过探测进程1构造探测报文后,由NVE1中的vxlan封装/解封装模块1对探测报文进行vxlan封装,生成该第三报文。
在本申请实施例中,NVE1确定docker1与docker2之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机时,NVE1通过构造该第三报文,并将该第三报文发送至NVE2。
若NVE2成功接收到该第三报文,则通过构造针对该第三报文的回应报文,若NVE1成功接收到该针对第三报文的回应报文时,则确定docker1与docker2之间的通信链路中的接入交换机支持对vxlan报文进行vxlan封装。
下面以该第三报文是由vxlan封装/解封装模块1对探测进程1构造的探测报文进行vxlan封装生成的为例,对NVE1通过下发第三报文确定docker1与docker2之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机的详细过程进行说明。
NVE1对第三报文由docker1传输至docker2的传输路径进行配置,例如,NVE1通过下发路由表项,使得第三报文由docker1传输至docker2的传输路径为图7中的实线表示的路径。
从图7中的实线表示的传输路径可以看出,首先由vxlan封装解封装模块1对该探测进程1构造的探测报文进行内层vxlan封装,生成该第三报文,之后,经过内层vxlan封装的第三报文便进入第一接入交换机109。
此时,会出现以下两种情况:
情况1
第一接入交换机109支持对vxlan报文进行vxlan封装。
情况2
第一接入交换机109不支持对vxlan报文进行vxlan封装。
下面针对上述两种情况对NVE1确定docker1与docker2之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机的方法分别进行说明。
情况1
当第一接入交换机109支持vxlan的嵌套封装时,第一接入交换机109会对接收到的经过内层vxlan封装的第三报文进行外层vxlan封装,并将经过(外层vxlan+内层vxlan)封装的第三报文发送至第二接入交换机110,由第二接入交换机110对接收到的经过(外层vxlan+内层vxlan)封装的第三报文进行外层vxlan解封装,再由vxlan封装/解封装模块2对经过外层vxlan解封装的第三报文进行内层vxlan解封装,由vxlan封装/解封装模块2对经过(内层vxlan+外层vxlan)解封装的第三报文发送至探测进程2。
此时,探测进程2会构造针对第三报文的回应报文,并将该针对第三报文的回应报文发送至NVE1,对针对第三报文的回应报文由docker1传输至docker2的传输路径进行配置,例如,通过下发路由表项,使得针对第三报文的回应报文由docker1传输至docker2的传输路径为图7中的虚线表示的路径。
从图7中表示的虚线的传输路径可以看出,探测进程2构造该针对第三报文的回应报文后,该针对第三报文的回应报文首先由vxlan封装/解封装模块2对该针对第三报文的回应报文进行内层vxlan封装,之后,经过内层vxlan封装的针对第三报文的回应报文便进入第二接入交换机110(假设该第二接入交换机110支持vxlan的嵌套封装)。
第二接入交换机110会对接收到的经过内层vxlan封装的针对第三报文的回应报文进行外层vxlan封装,并将经过(外层vxlan+内层vxlan)封装的针对第三报文的回应报文发送至第一接入交换机109,由第一接入交换机109对接收到的经过(外层vxlan+内层vxlan)封装的针对第三报文的回应报文进行外层vxlan解封装,再由vxlan封装/解封装模块1对经过外层vxlan解封装的针对第三报文的回应报文进行内层vxlan解封装,由vxlan封装/解封装模块1将经过(内层vxlan+外层vxlan)解封装的针对第三报文的回应报文发送至探测进程1。
在探测进程1接收到的NVE2发送的针对第三报文的回应报文时,则确定docker1与docker2之间的通信链路中的接入交换机支持对vxlan报文进行vxlan封装。
情况2
当第一接入交换机109不支持对vxlan报文进行vxlan封装时,第一接入交换机109会对经过内层vxlan封装的第三报文进行vxlan解封装或者直接丢弃该第二报文,使得该第二报文无法成功到达NVE2,因此,NVE1便无法接收到NVE2针对第三报文构造的回应报文。
针对情况2,探测进程1可以在构造第三报文的时候启动定时器,当该定时器超时时,若NVE1仍没有接收到NVE2发送的针对第三报文的回应报文时,则NVE1可以确定docker1与docker2之间的通信链路中包括不支持对vxlan报文进行vxlan封装的接入交换机。
进一步地,NVE1还可以进行重试,例如,NVE1重复多次向NVE2发送第二报文,若探测进程1始终没有接收到NVE2发送的针对第三报文的回应报文时,则确定docker1与docker2之间的通信链路中包括不支持对vxlan报文进行vxlan封装的接入交换机。
在本申请中,为了提高探测结果的可靠性,在上述情况2的基础上,NVE1还可以进一步确定docker1与docker2之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机。下面进行详细说明。
作为示例而非限定,若该网络边缘设备未接收到该第二虚拟机104发送的针对该第三报文的回应报文,该第一虚拟机103判断该通信链路中是否具有至少一个不支持对该第一报文进行vxlan封装的接入交换机,包括:
该网络边缘设备构造第四报文,该第四报文为依次经过vxlan封装与该外层封装的报文;
该网络边缘设备将该第四报文发送至该接入交换机,该接入交换机用于对该第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至该第二虚拟机104;
该网络边缘设备根据是否接收到该第二虚拟机104发送的针对该第四报文的回应报文,判断该第一虚拟机103上的第一容器105与第二虚拟机104上的第二容器106之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机。
第二虚拟机104第一虚拟机103第二虚拟机104第二虚拟机104具体地,例如,NVE1通过探测进程1构造探测报文(例如,第四报文),该第四报文为依次经过vxlan封装与外层封装(例如,GRE封装)的报文。
此外,该第四报文还可以是对由探测进程1构造的探测报文依次进行内层vxlan封装与GRE封装生成的,其中,由vxlan封装/解封装模块1对探测进程1构造的探测报文进行内层vxlan封装,由GRE封装/解封装模块1对探测进程构造的探测报文进行GRE封装。
下面以该第四报文是由vxlan封装/解封装模块1与GRE封装/解封装模块1依次对探测进程1构造的探测报文进行内层vxlan封装与GRE封装生成的为例,对NVE1通过下发第四报文确定docker1与docker2之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机的详细过程进行说明。
NVE1对第四报文由docker1传输至docker2的传输路径进行配置,例如,通过下发路由表项,使得第四报文由docker1传输至docker2的传输路径为图8中的实线表示的路径。
从图8中的实线表示的传输路径可以看出,首先由vxlan封装解封装模块1对该探测进程1构造的探测报文进行内层vxlan封装,并且由GRE封装/解封装模块1对经过内层vxlan封装的探测报文进行GRE封装,生成该第四报文之后,经过GRE封装的第四报文便进入第一接入交换机109。
第一接入交换机109会对接收到的经过(GRE+内层vxlan)封装的第四报文进行外层vxlan封装,并将经过(外层vxlan+GRE+内层vxlan)封装的第四报文发送至第二接入交换机110,由第二接入交换机110对接收到的经过(外层vxlan+GRE+内层vxlan)封装的第四报文进行外层vxlan解封装,再由GRE封装/解封装模块2对经过 外层vxlan解封装的第四报文进行内层GRE解封装,再由vxlan封装/解封装模块2对经过GRE解封装的第四报文进行内层vxlan解封装,由vxlan封装/解封装模块2对经过(内层vxlan+GRE+外层vxlan)解封装的第四报文发送至探测进程2。
此时,探测进程2会构造针对该第四报文的回应报文,并将该针对第四报文的回应报文发送至NVE1,对针对第四报文的回应报文由docker1传输至docker2的传输路径进行配置,例如,通过下发路由表项,使得针对第四报文的回应报文由docker1传输至docker2的传输路径为图8中的虚线表示的路径。
从图8中表示的虚线的传输路径可以看出,探测进程2构造该针对第四报文的回应报文后,该针对第四报文的回应报文首先由vxlan封装/解封装模块2对该针对第四报文的回应报文进行内层vxlan封装,再由GRE封装/解封装模块2对经过内层vxlan封装的针对第四报文的回应报文进行GRE封装,之后,经过GRE封装的针对第四报文的回应报文便进入第二接入交换机110。
第二接入交换机110会对接收到的经过(GRE+内层vxlan)封装的针对第四报文的回应报文进行外层vxlan封装,并将经过(外层vxlan+GRE+内层vxlan)封装的针对第四报文的回应报文发送至第一接入交换机109,由第一接入交换机109对接收到的经过(外层vxlan+GRE+内层vxlan)封装的针对第四报文的回应报文进行外层vxlan解封装,再由GRE封装/解封装模块1对经过外层vxlan解封装的针对第四报文的回应报文进行内层GRE解封装,再由vxlan封装/解封装模块1对经过GRE解封装的针对第四报文的回应报文进行内层vxlan解封装,由vxlan封装/解封装模块1对经过(内层vxlan+GRE+外层vxlan)解封装的针对第四报文的回应报文发送至探测进程1。
在探测进程1接收到的NVE2发送的针对第四报文的回应报文时,则结合上述情况2进一步确定docker1与docker2之间的通信链路中包括不支持对vxlan报文进行vxlan封装的接入交换机。
通过对容器之间的通信链路中是否包括不支持对vxlan报文进行vxlan封装的接入交换机进行判断,使得NVE1能够根据判断结果,灵活地确定是否对第一报文进行外层封装,从而在确定无需对第一报文进行外层封装时,能够有效地节省信令开销,并且能够节省第一报文的传输时延。
需要说明的是,当上述第三报文与第四报文是由探测进程1生成的情况下,该第三报文与第四报文可以由探测进程1直接发送至第一接入交换机109,无需经过vxlan封装/解封装模块1与GRE封装/解封装模块1。此时,上述图1、图7与图8中的NVE1可以仅包括探测进程1。
还需要说明的是,本申请中的接入交换机与计算设备连接时的布线方式可以是柜顶(Top of Rank,TOR)布线方式、列末(End of Row,EOR)布线方式以及列中(Middle of Row,MOR)布线方式中的任意一种,本申请不做特别限定。
还需要说明的是,上述以docker1与docker2之间的通信链路中包括第一接入交换机109与第二接入交换机110为例,对本申请的传输报文的方法进行说明。但本申请并不限定于此,例如,docker1与docker2之间的通信链路中可以仅包括一个接入交换机,该接入交换机既与第一虚拟机103连接,同时又与第二接入交换机110连接,该第一虚拟机103与第二虚拟机104通过该接入交换机上的不同端口进行通信。
当docker1与docker2之间的通信链路中仅包括一个接入交换机时,上述方法100中由第一接入交换机109与第二接入交换机110执行的动作均由该接入交换机完成,即,该接入交换机既负责对从第一虚拟机103接收的报文进行vxlan封装,又负责对待发送至第二虚拟机104的报文进行vxlan解封装。
上文结合图1至图8,描述了本申请实施例提供的传输报文的方法,下面结合图9至图10描述本申请实施例提供的网络边缘设备。
图9为本申请实施例提供的网络边缘设备300的示意性框图,该网络边缘设备300包括探测进程301、vxlan封装/解封装模块302与外层封装/解封装模块303。
探测进程301,用于判断第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,该第一报文是针对该第二容器的vxlan报文;
vxlan封装/解封装模块302,用于对该第一容器的IP报文进行vxlan封装,产生该第一报文;
外层封装/解封装模块303,用于若该通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机,其中,该外层封装与该vxlan封装为不同类型的封装,该接入交换机设置在该通信链路中,且与该第一虚拟机连接。
可选地,该探测进程301,还用于构造第三报文,该第三报文为vxlan报文;
该探测进程301,还用于将该第三报文发送至该接入交换机,该接入交换机用于对该第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至该第二虚拟机;
该探测进程301,还用于根据是否接收到该第二虚拟机发送的针对该第三报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
该外层封装/解封装模块303,具体用于:若该探测进程201未接收到该第二虚拟机发送的针对该第三报文的回应报文,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机。
可选地,该探测进程301,还用于构造第四报文,该第四报文为依次经过vxlan封装与该外层封装的报文;
该探测进程301,还用于将该第四报文发送至该接入交换机,该接入交换机用于对该第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至该第二虚拟机;
该探测进程301,还用于根据是否接收到该第二虚拟机发送的针对该第四报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
该外层封装/解封装模块303,具体用于:若该探测进程301接收到该第二虚拟机发送的针对该第四报文的回应报文,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机。
可选地,该外层封装/解封装模块303,还用于接收第五报文,该第五报文为依次 经过该外层封装与vxlan封装的报文;
该外层封装/解封装模块303,还用于对该第五报文进行解该外层封装;
该vxlan封装/解封装模块302,还用于对经过该解外层封装的第五报文进行vxlan解封装,获得该第五报文对应的原始报文。
可选地,该第一报文与该第二报文中携带的源网络之间互连的协议IP地址相同。
可选地,该外层封装至少包括通用路由封装GRE、网络协议安全性封装IPSec封装与IPv4 over IPv4封装中的任意一种。
需要说明的是,该网络边缘设备300可以为图1中的第一网络边缘设备107或第二网络边缘设备108。
图10为本申请实施例提供的网络边缘设备400的示意性框图,该网络边缘设备400包括:存储器401、处理器402与接口403,存储器401、处理器402与接口403用于运行图10中所示的网络边缘设备,具体如下。
存储器401,用于存储程序。
处理器402,用于执行该存储器中存储的程序,当该存储器中的程序被执行时,该处理器804,用于判断第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,该第一报文是针对该第二容器的vxlan报文;
该处理器402,还用于对该第一容器的IP报文进行vxlan封装,产生该第一报文。
该处理器402,还用于若该通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,对该第一报文进行外层封装以产生第二报文;
接口403,用于将该第二报文发送至接入交换机,
其中,该外层封装与该vxlan封装为不同类型的封装,该接入交换机设置在该通信链路中,且与该第一虚拟机连接。
可选地,该处理器402,还用于构造第三报文,该第三报文为vxlan报文;
该处理器402,还用于将该第三报文发送至该接入交换机,该接入交换机用于对该第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至该第二虚拟机;
该处理器402,还用于根据是否接收到该第二虚拟机发送的针对该第三报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
该处理器402,还用于若未接收到该第二虚拟机发送的针对该第三报文的回应报文,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机。
可选地,该处理器402,还用于构造第四报文,该第四报文为依次经过vxlan封装与该外层封装的报文;
该处理器402,还用于将该第四报文发送至该接入交换机,该接入交换机用于对该第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至该第二虚拟机;
该处理器402,还用于根据是否接收到该第二虚拟机发送的针对该第四报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
该处理器402,还用于若接收到该第二虚拟机发送的针对该第四报文的回应报文, 对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机。
可选地,接口403,还用于接收第五报文,该第五报文为依次经过该外层封装与vxlan封装的报文;
该处理器402,还用于对该第五报文进行解该外层封装;
该处理器402,还用于对经过该解外层封装的第五报文进行vxlan解封装,获得该第五报文对应的原始报文。
可选地,该第一报文与该第二报文中携带的源网络之间互连的协议IP地址相同。
可选地,该外层封装至少包括通用路由封装GRE、网络协议安全性封装IPSec封装与IPv4 over IPv4封装中的任意一种。
需要说明的是,该网络边缘设备400可以为图1中的第一网络边缘设备107或第二网络边缘设备108。
本申请提供了一种报文传输系统,该报文传输系统包括:第一虚拟机、第二虚拟机、接入交换机与第二接入交换机,该第一虚拟机上部署有第一容器和网络边缘设备该第二虚拟机上部署有第二容器与第二网络边缘设备;
该网络边缘设备,用于判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,该第一报文是针对该第二容器的vxlan报文,该第一报文是该网络边缘设备对该第一容器的IP报文进行vxlan封装而产生的;
该网络边缘设备,还用于若该通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机;
该接入交换机,用于对该第二报文进行vxlan封装,并将经过vxlan封装的该第二报文发送至该第二虚拟机,
其中,该外层封装与该vxlan封装为不同类型的封装,该接入交换机与该第二接入交换机设置在该通信链路中,该接入交换机与该第一虚拟机连接,该第二接入交换机与该第一虚拟机连接。
可选地,该网络边缘设备,还用于构造第三报文,该第三报文为vxlan报文;
该网络边缘设备,还用于将该第三报文发送至该接入交换机,该接入交换机用于对该第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至该第二虚拟机;
该网络边缘设备,还用于根据是否接收到该第二虚拟机发送的针对该第三报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
该网络边缘设备,还用于若未接收到该第二虚拟机发送的针对该第三报文的回应报文,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机。
可选地,该网络边缘设备,还用于构造第四报文,该第四报文为依次经过vxlan封装与该外层封装的报文;
该网络边缘设备,还用于将该第四报文发送至该接入交换机,该接入交换机用于 对该第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至该第二虚拟机;
该网络边缘设备,还用于根据是否接收到该第二虚拟机发送的针对该第四报文的回应报文,判断该第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
该网络边缘设备,还用于若接收到该第二虚拟机发送的针对该第四报文的回应报文,对该第一报文进行外层封装以产生第二报文,并将该第二报文发送至接入交换机。
可选地,该网络边缘设备,还用于接收第五报文,该第五报文为依次经过该外层封装与vxlan封装的报文;
该网络边缘设备,还用于对该第五报文依次进行解该外层封装与vxlan解封装,获得该第五报文对应的原始报文。
可选地,该第一报文与该第二报文中携带的源网络之间互连的协议IP地址相同。
可选地,该外层封装至少包括通用路由封装GRE、网络协议安全性封装IPSec封装与IPv4 over IPv4封装中的任意一种。
需要说明的是,该报文传输系统可以为图1中所示的报文传输系统100,该第一虚拟机为图1中所示的第一虚拟机103、该第二虚拟机为图1中所示的第二虚拟机104,该第一容器为图1中所示的第一容器105,该第二容器为图1中所示的第二容器106,该网络边缘设备为图1中所示的第一网络边缘设备107,该第二网络边缘设备为图1中所示的第二网络边缘设备108,该接入交换机为图1中所示的第一接入交换机109,该第二接入交换机为图1中所示的第二接入交换机110。
本申请提供了一种芯片,该芯片包括接口、存储器和处理器,该存储器用于存储指令,该处理器用于执行该存储器存储的指令,并且对该存储器中存储的指令的执行使得该处理器执行本申请实施例的传输报文的方法。
本申请提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当该指令在计算机上运行时,使得计算机执行本申请实施例的传输报文的方法。
本申请提供了一种包含指令的计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行本申请实施例的传输报文的方法。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些 接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (24)

  1. 一种传输报文的方法,其特征在于,包括:
    第一虚拟机的网络边缘设备判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,所述第一报文是针对所述第二容器的vxlan报文,所述第一报文是所述网络边缘设备对所述第一容器的IP报文进行vxlan封装而产生的;
    若所述通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,所述网络边缘设备对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机,
    其中,所述外层封装与所述vxlan封装为不同类型的封装,所述接入交换机设置在所述通信链路中,且与所述第一虚拟机连接。
  2. 根据权利要求1所述的方法,其特征在于,所述第一虚拟机的网络边缘设备判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,包括:
    所述网络边缘设备构造第三报文,所述第三报文为vxlan报文;
    所述网络边缘设备将所述第三报文发送至所述接入交换机,所述接入交换机用于对所述第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至所述第二虚拟机;
    所述网络边缘设备根据是否接收到所述第二虚拟机发送的针对所述第三报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述若所述通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,所述网络边缘设备对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机,具体包括:
    若所述网络边缘设备未接收到所述第二虚拟机发送的针对所述第三报文的回应报文,所述网络边缘设备对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  3. 根据权利要求2所述的方法,其特征在于,若所述网络边缘设备未接收到所述第二虚拟机发送的针对所述第三报文的回应报文,所述第一虚拟机判断所述通信链路中是否具有至少一个不支持对所述第一报文进行vxlan封装的接入交换机,包括:
    所述网络边缘设备构造第四报文,所述第四报文为依次经过vxlan封装与所述外层封装的报文;
    所述网络边缘设备将所述第四报文发送至所述接入交换机,所述接入交换机用于对所述第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至所述第二虚拟机;
    所述网络边缘设备根据是否接收到所述第二虚拟机发送的针对所述第四报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述若所述通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交 换机,所述网络边缘设备对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机,具体包括:
    若所述网络边缘设备接收到所述第二虚拟机发送的针对所述第四报文的回应报文,所述网络边缘设备对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  4. 根据权利要求1至3中任一项所述的方法,其特征在于,所述方法还包括:
    所述网络边缘设备接收第五报文,所述第五报文为依次经过所述外层封装与vxlan封装的报文;
    所述网络边缘设备对所述第五报文依次进行解所述外层封装与vxlan解封装,获得所述第五报文对应的原始报文。
  5. 根据权利要求1至4中任一项所述的方法,其特征在于,所述第一报文与所述第二报文中携带的源网络之间互连的协议IP地址相同。
  6. 根据权利要求1至5中任一项所述的方法,其特征在于,所述外层封装至少包括通用路由封装GRE、网络协议安全性封装IPSec封装与IPv4 over IPv4封装中的任意一种。
  7. 一种网络边缘设备,其特征在于,所述网络边缘设备设置在第一虚拟机上,包括:
    探测进程,用于判断第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,所述第一报文是针对所述第二容器的vxlan报文;
    vxlan封装/解封装模块,用于对所述第一容器的IP报文进行vxlan封装,产生所述第一报文;
    外层封装/解封装模块,用于若所述通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机,
    其中,所述外层封装与所述vxlan封装为不同类型的封装,所述接入交换机设置在所述通信链路中,且与所述第一虚拟机连接。
  8. 根据权利要求7所述的网络边缘设备,其特征在于,
    所述探测进程,还用于构造第三报文,所述第三报文为vxlan报文;
    所述探测进程,还用于将所述第三报文发送至所述接入交换机,所述接入交换机用于对所述第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至所述第二虚拟机;
    所述探测进程,还用于根据是否接收到所述第二虚拟机发送的针对所述第三报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述外层封装/解封装模块,具体用于:若所述探测进程未接收到所述第二虚拟机发送的针对所述第三报文的回应报文,对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  9. 根据权利要求8所述的网络边缘设备,其特征在于,
    所述探测进程,还用于构造第四报文,所述第四报文为依次经过vxlan封装与所述外层封装的报文;
    所述探测进程,还用于将所述第四报文发送至所述接入交换机,所述接入交换机用于对所述第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至所述第二虚拟机;
    所述探测进程,还用于根据是否接收到所述第二虚拟机发送的针对所述第四报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述外层封装/解封装模块,具体用于:若所述探测进程接收到所述第二虚拟机发送的针对所述第四报文的回应报文,对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  10. 根据权利要求7至9中任一项所述的网络边缘设备,其特征在于,
    所述外层封装/解封装模块,还用于接收第五报文,所述第五报文为依次经过所述外层封装与vxlan封装的报文;
    所述外层封装/解封装模块,还用于对所述第五报文进行解所述外层封装;
    所述vxlan封装/解封装模块,还用于对经过所述解外层封装的第五报文进行vxlan解封装,获得所述第五报文对应的原始报文。
  11. 根据权利要求7至10中任一项所述的网络边缘设备,其特征在于,所述第一报文与所述第二报文中携带的源网络之间互连的协议IP地址相同。
  12. 根据权利要求7至11中任一项所述的网络边缘设备,其特征在于,所述外层封装至少包括通用路由封装GRE、网络协议安全性封装IPSec封装与IPv4 over IPv4封装中的任意一种。
  13. 一种网络边缘设备,其特征在于,包括存储器、处理器与接口,
    存储器,用于存储程序;
    处理器,用于执行该存储器中存储的程序,当该存储器中的程序被执行时,该处理器,用于判断第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,所述第一报文是针对所述第二容器的vxlan报文;
    所述处理器,还用于对所述第一容器的IP报文进行vxlan封装,产生所述第一报文;
    所述处理器,还用于若所述通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,对所述第一报文进行外层封装以产生第二报文;
    接口,用于将所述第二报文发送至接入交换机,
    其中,所述外层封装与所述vxlan封装为不同类型的封装,所述接入交换机设置在所述通信链路中,且与所述第一虚拟机连接。
  14. 根据权利要求13所述的网络边缘设备,其特征在于,
    所述处理器,还用于构造第三报文,所述第三报文为vxlan报文;
    所述处理器,还用于将所述第三报文发送至所述接入交换机,所述接入交换机用于对所述第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至所述第 二虚拟机;
    所述处理器,还用于根据是否接收到所述第二虚拟机发送的针对所述第三报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述处理器,还用于若未接收到所述第二虚拟机发送的针对所述第三报文的回应报文,对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  15. 根据权利要求14所述的网络边缘设备,其特征在于,
    所述处理器,还用于构造第四报文,所述第四报文为依次经过vxlan封装与所述外层封装的报文;
    所述处理器,还用于将所述第四报文发送至所述接入交换机,所述接入交换机用于对所述第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至所述第二虚拟机;
    所述处理器,还用于根据是否接收到所述第二虚拟机发送的针对所述第四报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述处理器,还用于若接收到所述第二虚拟机发送的针对所述第四报文的回应报文,对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  16. 根据权利要求13至15中任一项所述的网络边缘设备,其特征在于,
    所述接口,还用于接收第五报文,所述第五报文为依次经过所述外层封装与vxlan封装的报文;
    所述处理器,还用于对所述第五报文进行解所述外层封装;
    所述处理器,还用于对经过所述解外层封装的第五报文进行vxlan解封装,获得所述第五报文对应的原始报文。
  17. 根据权利要求13至16中任一项所述的网络边缘设备,其特征在于,所述第一报文与所述第二报文中携带的源网络之间互连的协议IP地址相同。
  18. 根据权利要求13至17中任一项所述的网络边缘设备,其特征在于,所述外层封装至少包括通用路由封装GRE、网络协议安全性封装IPSec封装与IPv4 over IPv4封装中的任意一种。
  19. 一种报文传输系统,其特征在于,所述报文传输系统包括:第一虚拟机、第二虚拟机、接入交换机,所述第一虚拟机上部署有第一容器和网络边缘设备,所述第二虚拟机上部署有第二容器;
    所述网络边缘设备,用于判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机,其中,所述第一报文是针对所述第二容器的vxlan报文,所述第一报文是所述网络边缘设备对所述第一容器的IP报文进行vxlan封装而产生的;
    所述网络边缘设备,还用于若所述通信链路中具有至少一个不支持对第一报文进行vxlan封装的接入交换机,对所述第一报文进行外层封装以产生第二报文,并将所 述第二报文发送至接入交换机;
    所述接入交换机,用于对所述第二报文进行vxlan封装,并将经过vxlan封装的所述第二报文发送至所述第二虚拟机,
    其中,所述外层封装与所述vxlan封装为不同类型的封装,所述接入交换机设置在所述通信链路中,且与所述第一虚拟机连接。
  20. 根据权利要求19所述的报文传输系统,其特征在于,
    所述网络边缘设备,还用于构造第三报文,所述第三报文为vxlan报文;
    所述网络边缘设备,还用于将所述第三报文发送至所述接入交换机,所述接入交换机用于对所述第三报文进行vxlan封装,并用于将经过vxlan封装的第三报文发送至所述第二虚拟机;
    所述网络边缘设备,还用于根据是否接收到所述第二虚拟机发送的针对所述第三报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述网络边缘设备,还用于若未接收到所述第二虚拟机发送的针对所述第三报文的回应报文,对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  21. 根据权利要求20所述的报文传输系统,其特征在于,
    所述网络边缘设备,还用于构造第四报文,所述第四报文为依次经过vxlan封装与所述外层封装的报文;
    所述网络边缘设备,还用于将所述第四报文发送至所述接入交换机,所述接入交换机用于对所述第四报文进行vxlan封装,并用于将经过vxlan封装的第四报文发送至所述第二虚拟机;
    所述网络边缘设备,还用于根据是否接收到所述第二虚拟机发送的针对所述第四报文的回应报文,判断所述第一虚拟机上的第一容器与第二虚拟机上的第二容器之间的通信链路中是否具有至少一个不支持对第一报文进行vxlan封装的接入交换机;
    所述网络边缘设备,还用于若接收到所述第二虚拟机发送的针对所述第四报文的回应报文,对所述第一报文进行外层封装以产生第二报文,并将所述第二报文发送至接入交换机。
  22. 根据权利要求19至21中任一项所述的报文传输系统,其特征在于,
    所述网络边缘设备,还用于接收第五报文,所述第五报文为依次经过所述外层封装与vxlan封装的报文;
    所述网络边缘设备,还用于对所述第五报文依次进行解所述外层封装与vxlan解封装,获得所述第五报文对应的原始报文。
  23. 根据权利要求19至22中任一项所述的报文传输系统,其特征在于,所述第一报文与所述第二报文中携带的源网络之间互连的协议IP地址相同。
  24. 根据权利要求19至23中任一项所述的报文传输系统,其特征在于,所述外层封装至少包括通用路由封装GRE、网络协议安全性封装IPSec封装与IPv4 over IPv4封装中的任意一种。
PCT/CN2019/090511 2018-06-11 2019-06-10 传输报文的方法、网络边缘设备与报文传输系统 WO2019238002A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810594640.8A CN108989248B (zh) 2018-06-11 2018-06-11 传输报文的方法、网络边缘设备与报文传输系统
CN201810594640.8 2018-06-11

Publications (1)

Publication Number Publication Date
WO2019238002A1 true WO2019238002A1 (zh) 2019-12-19

Family

ID=64540215

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/090511 WO2019238002A1 (zh) 2018-06-11 2019-06-10 传输报文的方法、网络边缘设备与报文传输系统

Country Status (2)

Country Link
CN (1) CN108989248B (zh)
WO (1) WO2019238002A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108989248B (zh) * 2018-06-11 2020-07-07 华为技术有限公司 传输报文的方法、网络边缘设备与报文传输系统
CN115277482B (zh) * 2022-06-10 2023-08-22 浙江清捷智能科技有限公司 一种工业边缘设备的在线检测方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105306335A (zh) * 2015-11-11 2016-02-03 杭州数梦工场科技有限公司 报文的转发方法和装置
CN105591982A (zh) * 2015-07-24 2016-05-18 杭州华三通信技术有限公司 一种报文传输的方法和装置
US20170078198A1 (en) * 2015-09-15 2017-03-16 Cisco Technology, Inc. Method and apparatus for advanced statistics collection
CN107332775A (zh) * 2017-08-14 2017-11-07 上海新炬网络信息技术股份有限公司 基于docker容器的跨宿主机互访系统及其控制方法
CN108989248A (zh) * 2018-06-11 2018-12-11 华为技术有限公司 传输报文的方法、网络边缘设备与报文传输系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017113306A1 (zh) * 2015-12-31 2017-07-06 华为技术有限公司 可扩展虚拟局域网报文发送方法、计算机设备和可读介质
CN107317752B (zh) * 2016-04-27 2020-12-01 华为技术有限公司 一种转发数据报文的方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105591982A (zh) * 2015-07-24 2016-05-18 杭州华三通信技术有限公司 一种报文传输的方法和装置
US20170078198A1 (en) * 2015-09-15 2017-03-16 Cisco Technology, Inc. Method and apparatus for advanced statistics collection
CN105306335A (zh) * 2015-11-11 2016-02-03 杭州数梦工场科技有限公司 报文的转发方法和装置
CN107332775A (zh) * 2017-08-14 2017-11-07 上海新炬网络信息技术股份有限公司 基于docker容器的跨宿主机互访系统及其控制方法
CN108989248A (zh) * 2018-06-11 2018-12-11 华为技术有限公司 传输报文的方法、网络边缘设备与报文传输系统

Also Published As

Publication number Publication date
CN108989248B (zh) 2020-07-07
CN108989248A (zh) 2018-12-11

Similar Documents

Publication Publication Date Title
US10684885B2 (en) Port mirroring in a virtualized computing environment
EP3544240B1 (en) Data processing
US9819511B2 (en) Bidirectional forwarding detection over a virtual extensible local area network
US8908704B2 (en) Switch with dual-function management port
CN107426077B (zh) 用于实现物理网络和虚拟网络互通的方法和设备
WO2016055027A1 (en) Table entry in software defined network
CN105763359A (zh) 用于交织结构交换机集群的分布式双向转发检测协议(d-bfd)
US10284461B2 (en) Method and related apparatus for probing packet forwarding path
CN106685826B (zh) 交换机堆叠系统、从设备、交换芯片及处理协议报文方法
EP3245768B1 (en) Bidirectional forwarding detection over network virtualization using generic routing encapsulation
WO2015184739A1 (zh) 故障检测方法及装置
CN107306215B (zh) 一种数据处理方法、系统及节点
CN111614505B (zh) 报文处理的方法和网关设备
CN106330605B (zh) 一种报文处理方法及装置
WO2022042503A1 (zh) 一种报文传输方法、装置及系统
WO2019238002A1 (zh) 传输报文的方法、网络边缘设备与报文传输系统
CN111130982B (zh) 报文转发方法、装置、网关设备及可读存储介质
CN106209554B (zh) 跨虚拟可扩展局域网的报文转发方法和设备
CN110235417B (zh) 一种sdn及其报文转发的方法和装置
CN106789540B (zh) 一种网关部署方法和装置
JP7152665B2 (ja) 情報処理装置、情報処理システム、および設定プログラム
CN106878066A (zh) 故障检测方法及装置
WO2019056239A1 (zh) 报文同步方法和装置
WO2015188706A1 (zh) 数据帧的处理方法、装置与系统
CN106059846B (zh) 应用于vxlan中的故障分析方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19819450

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19819450

Country of ref document: EP

Kind code of ref document: A1