CN106998286B - VX L AN message forwarding method and device - Google Patents

VX L AN message forwarding method and device Download PDF

Info

Publication number
CN106998286B
CN106998286B CN201710311213.XA CN201710311213A CN106998286B CN 106998286 B CN106998286 B CN 106998286B CN 201710311213 A CN201710311213 A CN 201710311213A CN 106998286 B CN106998286 B CN 106998286B
Authority
CN
China
Prior art keywords
message
address
vtep device
opposite
gateway
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710311213.XA
Other languages
Chinese (zh)
Other versions
CN106998286A (en
Inventor
王洋
王富涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201710311213.XA priority Critical patent/CN106998286B/en
Publication of CN106998286A publication Critical patent/CN106998286A/en
Application granted granted Critical
Publication of CN106998286B publication Critical patent/CN106998286B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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]
    • 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/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/2592Translation of Internet protocol [IP] addresses using tunnelling or encapsulation

Landscapes

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

Abstract

The application provides a VX L AN message forwarding method and device, which are applied to local terminal VTEP equipment, and the method comprises the steps of receiving AN IP address of a second VM and AN IP address of opposite terminal VTEP equipment which are transmitted by opposite terminal VTEP equipment through VX L AN gateway equipment, creating a mapping relation between the IP address of the second VM and the IP address of the opposite terminal VTEP equipment, establishing a VX L AN tunnel between the local terminal VTEP equipment and the opposite terminal VTEP equipment based on the mapping relation, and sending a unicast message to the opposite terminal VTEP equipment based on the VX L AN tunnel after the unicast message sent to the second VM by a first VM is received, so that the opposite terminal VTEP equipment forwards the unicast message to a second VM., so that the problem of low forwarding efficiency caused by large workload of VX L AN gateway equipment in a three-layer cross-tunnel forwarding process of a VX L AN message is solved.

Description

VX L AN message forwarding method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and AN apparatus for forwarding a VX L AN message.
Background
With the rapid development of cloud computing, the virtualization degree of a data center is higher and higher, and requirements for a physical Network are also more and more strict, for example, a TOR (Top of Rack) switch needs to support a large-specification MAC address table, 4094V L ANs (Virtual L environmental Area networks, Virtual local Area networks) cannot divide a mass of Virtual machines, Network isolation of multiple tenants needs to be supported, and the like.
In practical application, when a local VM (Virtual Machine) and AN opposite VM are in different VX L AN networks, a message sent by the local VM to the opposite VM is sent to a VX L AN gateway device by a VTEP (VX L AN Tunneling EndPoint, VX L AN tunnel terminal) device accessed by the local VM, and then the message is subjected to connection encapsulation, routing check and encapsulation by the VX L AN gateway device and then sent to a VTEP device accessed by the opposite VM.
Disclosure of Invention
In view of this, the present application provides a method and AN apparatus for forwarding a VX L AN message, so as to solve the problem in the prior art that the forwarding efficiency is low due to a large workload of VX L AN gateway devices in a process of forwarding a VX L AN message across a tunnel at three layers.
Specifically, the method is realized through the following technical scheme:
a VX L AN message forwarding method is applied to a local terminal VTEP device, wherein the local terminal VTEP device is accessed to a first VM, AN opposite terminal VTEP device is accessed to a second VM, the first VM is interconnected with the second VM belonging to different VX L AN networks through a VX L AN gateway device, and the method comprises the following steps:
receiving the IP address of the second VM and the IP address of the opposite-end VTEP device, which are transmitted by the opposite-end VTEP device through the VX L AN gateway device, wherein the IP address of the opposite-end VTEP device is carried in a VX L AN message header of a VX L AN message sent by the VX L AN gateway device;
creating a mapping relation between the IP address of the second VM and the IP address of the opposite-end VTEP device, and establishing a VX L AN tunnel between the local-end VTEP device and the opposite-end VTEP device based on the mapping relation;
after receiving the unicast message sent by the first VM to the second VM, sending the unicast message to the opposite-end VTEP device based on the VX L AN tunnel, so that the opposite-end VTEP device forwards the unicast message to the second VM.
In the VX L AN message forwarding method, a first VX L AN tunnel is established between the local terminal VTEP device and the VX L AN gateway device, and a second VX L AN tunnel is established between the VX L AN gateway device and the opposite terminal VTEP device;
the receiving the IP address of the second VM transparently transmitted by the peer VTEP device through the VX L AN gateway device and the IP address of the peer VTEP device includes:
receiving a VX L AN message sent by the VX L AN gateway device through the first VX L AN tunnel, wherein the VX L AN message is a unicast message sent to the first VM by the second VM encapsulating a VX L AN message header;
and decapsulating a VX L AN message header of the VX L AN message, and acquiring the IP address of the opposite-end VTEP device carried by the VX L AN message header and the source IP of the unicast message, wherein the source IP of the unicast message is the IP address of the second VM.
In the VX L AN packet forwarding method, before the creating a mapping relationship between the IP address of the second VM and the IP address of the VTEP device at the opposite end, the method further includes:
receiving a VX L AN message sent by the VX L AN gateway equipment, wherein the VX L AN message is AN ARP request message sent by the second VM encapsulating a VX L AN message header to the VX L AN gateway equipment, and the VX L AN message header carries a VNI of the second VM;
acquiring a source IP and a source MAC of the ARP request message and a VNI of the second VM, and generating an ARP table entry corresponding to the second VM based on the source IP, the source MAC and the VNI of the second VM; the source IP is an IP address of the second VM, and the MAC is a MAC address of the second VM.
In the VX L AN packet forwarding method, before the creating a mapping relationship between the IP address of the second VM and the IP address of the VTEP device at the opposite end, the method further includes:
receiving a notification message sent by the VX L AN gateway equipment, wherein the notification message carries AN ARP table entry which is created by the VX L AN gateway equipment and corresponds to the second VM, and the ARP table entry is created by the VX L AN gateway equipment based on a source IP (Internet protocol) and a source MAC (media access control) of AN ARP request message which is sent to the VX L AN gateway equipment by the second VM encapsulating a VX L AN message header and a VNI (virtual network interface) of the second VM;
and acquiring the ARP table entry corresponding to the second VM carried in the notification message, and locally storing the ARP table entry corresponding to the second VM.
In the VX L AN packet forwarding method, the creating a mapping relationship between the IP address of the second VM and the IP address of the VTEP device at the opposite end includes:
and generating a mapping relation between the IP address of the second VM, the IP address of the opposite-end VTEP device and the VNI of the second VM based on the corresponding relation between the IP address of the second VM and the IP address of the opposite-end VTEP device and the locally-stored ARP table entry corresponding to the second VM.
A VX L AN message forwarding device is applied to a local terminal VTEP device, wherein the local terminal VTEP device has access to a first VM, AN opposite terminal VTEP device has access to a second VM, the first VM is interconnected with the second VM belonging to different VX L AN networks through a VX L AN gateway device, and the device comprises:
a receiving unit, configured to receive the IP address of the second VM and the IP address of the opposite-end VTEP device that are transparently transmitted by the opposite-end VTEP device through the VX L AN gateway device, where the IP address of the opposite-end VTEP device is carried in a VX L AN message header of a VX L AN message sent by the VX L AN gateway device;
a creating unit, configured to create a mapping relationship between AN IP address of the second VM and AN IP address of the peer VTEP device, and establish a VX L AN tunnel between the local VTEP device and the peer VTEP device based on the mapping relationship;
a sending unit, configured to send, after receiving a unicast packet sent by the first VM to the second VM, the unicast packet to the peer VTEP device based on the VX L AN tunnel, so that the peer VTEP device forwards the unicast packet to the second VM.
In the VX L AN message forwarding apparatus, a first VX L AN tunnel is established between the local VTEP device and the VX L AN gateway device, and a second VX L AN tunnel is established between the VX L AN gateway device and the opposite VTEP device;
the receiving unit is further configured to:
receiving a VX L AN message sent by the VX L AN gateway device through the first VX L AN tunnel, wherein the VX L AN message is a unicast message sent to the first VM by the second VM encapsulating a VX L AN message header;
and decapsulating a VX L AN message header of the VX L AN message, and acquiring the IP address of the opposite-end VTEP device carried by the VX L AN message header and the source IP of the unicast message, wherein the source IP of the unicast message is the IP address of the second VM.
In the VX L AN message forwarding apparatus, the receiving unit is further configured to:
receiving a VX L AN message sent by the VX L AN gateway equipment, wherein the VX L AN message is AN ARP request message sent by the second VM encapsulating a VX L AN message header to the VX L AN gateway equipment, and the VX L AN message header carries a VNI of the second VM;
acquiring a source IP and a source MAC of the ARP request message and a VNI of the second VM, and generating an ARP table entry corresponding to the second VM based on the source IP, the source MAC and the VNI of the second VM; the source IP is an IP address of the second VM, and the MAC is a MAC address of the second VM.
In the VX L AN message forwarding apparatus, the receiving unit is further configured to:
receiving a notification message sent by the VX L AN gateway equipment, wherein the notification message carries AN ARP table entry which is created by the VX L AN gateway equipment and corresponds to the second VM, and the ARP table entry is created by the VX L AN gateway equipment based on a source IP (Internet protocol) and a source MAC (media access control) of AN ARP request message which is sent to the VX L AN gateway equipment by the second VM encapsulating a VX L AN message header and a VNI (virtual network interface) of the second VM;
and acquiring the ARP table entry corresponding to the second VM carried in the notification message, and locally storing the ARP table entry corresponding to the second VM.
In the VX L AN message forwarding apparatus, the creating unit is further configured to:
and generating a mapping relation between the IP address of the second VM, the IP address of the opposite-end VTEP device and the VNI of the second VM based on the corresponding relation between the IP address of the second VM and the IP address of the opposite-end VTEP device and the locally-stored ARP table entry corresponding to the second VM.
In the embodiment of the application, a local terminal VTEP device receives AN IP address of a second VM transmitted by AN opposite terminal VTEP device through a VX L AN gateway device and the IP address of the opposite terminal VTEP device, wherein the IP address of the opposite terminal VTEP device is carried in a VX L AN message header of a VX L AN message sent by the VX L AN gateway device;
in the embodiment of the application, the local terminal VTEP device establishes a VX L AN tunnel between the local terminal VTEP device and the opposite terminal VTEP device based on the mapping relation between the IP address of the opposite terminal VTEP device and the IP address of the second VM, and can directly send the unicast message sent by the first VM to the second VM to the opposite terminal VTEP device through the VX L AN tunnel, and after the VX L AN gateway device receives the unicast message encapsulated with the VX L AN message header, the unicast message encapsulated with the VX L AN message header can be subjected to common three-layer forwarding without decapsulating the VX L AN message header and adding a new VX L AN message header, so that the workload is reduced, and the forwarding efficiency is effectively improved.
Drawings
Fig. 1 is a network architecture diagram of VX L AN message forwarding in the prior art;
fig. 2 is a network architecture diagram of VX L AN message forwarding shown in the present application;
fig. 3 is a flowchart illustrating an VXA L N message forwarding method according to the present application;
fig. 4 is a schematic diagram of a VX L AN header of the prior art;
fig. 5 is a schematic diagram of a VX L AN header shown in the present application;
fig. 6 is a logic block diagram of an VXA L N message forwarding device shown in the present application;
fig. 7 is a hardware structure diagram of a VX L AN message forwarding apparatus according to the present application.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the following description of the prior art and the technical solutions in the embodiments of the present invention with reference to the accompanying drawings is provided.
Referring to fig. 1, which is a Network architecture diagram of forwarding a VX L AN message in the prior art, as shown in fig. 1, a VNI (VX L AN Network Identifier, Virtual extensible local Area Network identity) of a VX L AN Network where VM1 is located is 1000, a V L AN ID (Virtual L environmental Area Network Identifier, Virtual local Area Network Identifier) of VM1 is 101, AN IP address of VM1 is 10.1.1.100/24, AN MAC address is MAC1, and VM1 accesses VTEP 1 through Port 1;
the VNI of the VX L AN network where the VM2 is located is 2000, the V L AN ID of the VM2 is 102, the IP address of the VM2 is 20.1.1.200/24, the MAC address is MAC 2, and the VM2 accesses the VTEP2 through Port 4.
VX L AN gateway equipment is provided with VX L AN gateway interface 1, VX L AN gateway interface 1 is designated as a three-layer gateway of VX L AN 1000 and is a default gateway of VM1, the IP address is 10.1.1.1/24, the MAC address is MAC GW1, VX L AN gateway equipment is also provided with VX L AN gateway interface 2, VX L AN gateway interface 2 is designated as a three-layer gateway of VX L AN 2000 and is a default gateway of VM2, the IP address is 20.1.1.1/24, and the MAC address is MAC GW 2.
A first VX L AN Tunnel, namely Tunnel 1 in the figure, is established between VTEP 1 and VX L AN gateway equipment, and a second VX L AN Tunnel, namely Tunnel 2 in the figure, is established between VTEP2 and VX L AN gateway equipment.
The VM is a virtual machine that uses virtualization technology to virtualize a plurality of hosts on one physical server. Each virtual host is independent of each other, and has respective operating systems and logically independent devices such as memories, CPUs, network cards and the like, and from the perspective of application programs, the virtual hosts are mostly not different from physical servers.
The VTEP equipment refers to equipment at the end point of a tunnel in a VX L AN network, and is used for sending and receiving VX L AN messages in the VX L AN network, wherein the VX L AN messages are messages encapsulating VX L AN message headers, one VTEP equipment can be accessed to a plurality of VMs in different or same VX L AN networks, and the two-layer network address and the three-layer network address of each VM are different.
The VX L AN gateway device refers to a gateway device in a VX L AN network, is preconfigured with gateway interfaces corresponding to a plurality of VX L AN networks and is used for forwarding VX L AN messages crossing the VX L AN network, and in addition, the VX L AN gateway device can also complete three-layer forwarding of common IP messages.
Now, a method for forwarding a VX L AN message in the prior art is described from the perspective of VTEP 1, where a first VM mentioned below refers to VM1, a local end VTEP device refers to VTEP 1, AN opposite end VTEP device refers to VTEP2, and a second VM refers to VM 2.
In the prior art, the communication process between the first VM and the second VM may be divided into two stages:
in a first stage, a first VM learns the MAC address of a default gateway;
in the second stage, the local VTEP device forwards the unicast message sent by the first VM to the second VM through the first VX L AN tunnel to the VX L AN gateway device, the VX L AN gateway device forwards the unicast message to the opposite VTEP device through the second VX L AN tunnel, and the opposite VTEP device receives the unicast message and forwards the unicast message to the second VM.
The first stage is explained below:
first, a first VM sends an Address Resolution Protocol (ARP) request to obtain a MAC Address of a default gateway 10.1.1.1/24, where a destination MAC is a broadcast MAC Address and a source MAC is a MAC Address MAC1 of the first VM; and the first VM sends the ARP request to the local VTEP equipment.
After receiving AN ARP request message sent by a first VM, a local VTEP device encapsulates the ARP request message into a VX L AN header, broadcasts the encapsulated ARP request message in a VX L AN network with a VNI of 1000, and learns AN MAC entry corresponding to the first VM at the same time, where the MAC entry includes a mapping relationship between the VNI of the first VM, AN MAC address of the first VM, a first interface index, and a V L AN ID of the first VM, where the first interface index is AN interface index Port1 of the first VM accessing the local VTEP device, the learned entry is used for subsequent unicast forwarding, and the learned MAC entry is stored in AN MAC table, as shown in table 1 below:
Figure BDA0001287163310000081
TABLE 1
After receiving the ARP request message encapsulating the VX L AN packet header from the first VX L AN tunnel, the VX L AN gateway device decapsulates the ARP request message, determines that the request address of the ARP request message is the IP address of the local VX L AN gateway interface 1, and sends AN ARP reply message encapsulating a VX L AN packet header to the local VTEP device through the first VX L AN tunnel, so as to return the MAC address of the VX L AN gateway interface 1 to the local VTEP device, wherein the source MAC of the ARP reply message is MAC GW1, the destination MAC is MAC 1. the VX L AN gateway device may also learn the MAC entry corresponding to the first VM, the learned entry is used for subsequent unicast forwarding, and the learned MAC entry is stored in the MAC table, as shown in table 2 below:
Figure BDA0001287163310000082
TABLE 2
After receiving the ARP reply message encapsulating the VX L AN packet header, the local VTEP equipment decapsulates the VX L AN packet header, reads the packet header of the ARP reply message, and searches for AN MAC table to obtain AN MAC entry corresponding to the MAC1, the local VTEP equipment sends the ARP reply message to the first VM through the Port1 and the vlan id 101, learns the MAC entry corresponding to the VX L AN gateway interface 1 on the VX L AN gateway equipment, and stores the learned MAC entry in the MAC table, as shown in table 3 below:
Figure BDA0001287163310000091
TABLE 3
After receiving the ARP reply message, the first VM records the correspondence between the IP address and the MAC address of the VX L AN gateway interface 1 in the local ARP table.
At this time, the first VM successfully learns the MAC address of the default gateway, and subsequently may send a unicast packet through the default gateway.
The second stage is explained below:
the first VM sends a unicast message to the second VM, wherein the source MAC of the unicast message is MAC1, the destination MAC is MAC address MAC GW1 of VX L AN gateway interface 1, the source IP is IP address 10.1.1.100/24 of the first VM, and the destination IP is IP address 20.1.1.200/24 of the second VM.
After receiving the unicast message, the local-end VTEP device determines the VNI of the first VM sending the unicast message according to the first interface index Port1 receiving the unicast message, then searches the MAC table according to the VNI of the first VM and the destination MAC of the unicast message to obtain the MAC table entry corresponding to VX L AN gateway interface 1, then packages the unicast message with a VX L AN message header, and sends the unicast message with the packed VX L AN message header to VX L AN gateway device where VX L AN gateway interface 1 is located through the first VX L AN tunnel.
After receiving the unicast message encapsulating the VX L AN message header, the VX L AN gateway device decapsulates the VX L AN message header and then judges whether the destination MAC of the unicast message is a local MAC address or not, because the destination MAC of the unicast message is the MAC GW1, the VX L AN gateway device can determine that the destination MAC of the unicast message is the MAC address of the local VX L AN gateway interface 1, and further determine that the unicast message needs to be forwarded by three layers.
In this case, the VX L AN gateway device can look up a routing table according to the destination IP of the unicast message, and determine a corresponding routing table entry, where the routing table entry includes AN egress interface corresponding to the second VM, the egress interface corresponding to the second VM is VX L AN gateway interface 2, and VX L AN gateway interface 2 is a default gateway of the VX L AN network with VNI of 2000.
After the VX L AN gateway device determines that the unicast message needs to be sent to a VX L AN network with VNI of 2000, the destination MAC of the unicast message can be changed into the MAC address MAC 2 of the second VM, the source MAC is changed into the MAC address MAC GW 2 of VX L AN gateway interface 2, then a VX L AN message header is packaged for the unicast message, and the unicast message packaged with the VX L AN message header is sent to AN opposite-end VTEP device through a second VX L AN tunnel, wherein the VNI carried in the VX L AN message header is 2000.
At this time, the default VX L AN gateway device has learned the MAC address of the second VM, and the process of learning the MAC address is similar to the process of learning the MAC address of the first VM by the VX L AN gateway device, which is not described herein again;
before learning the MAC address of the second VM, VX L AN gateway device may cache the unicast message first, and send the unicast message after learning is completed.
After receiving the unicast message encapsulating the VX L AN message header through a second VX L AN tunnel, the opposite-end VTEP device decapsulates the VX L AN message header, then searches a local MAC table according to the destination MAC of the unicast message, obtains AN MAC table entry corresponding to the second VM, and sends the unicast message to the second VM according to a Port 4 in the MAC table entry and the virtual local area network identifier 102.
To this end, communication between the first VM and the second VM is completed. The process of sending the unicast message to the first VM by the second VM is similar to the process of sending the unicast message to the second VM by the first VM, and is not described herein again.
In the process of sending the unicast message from the first VM to the second VM, it can be found that the VX L AN gateway device needs to decapsulate the unicast message of the encapsulated VX L AN message header received from the first VX L AN tunnel, decapsulate the VX L AN message header, then send the unicast message of the encapsulated VX L AN message header from the second VX L AN tunnel to the opposite VTEP device, the opposite VTEP device decapsulates the unicast message of the encapsulated VX L AN message header and sends the decapsulated unicast message to the second VM. in the whole process, and the VX L AN gateway device needs to decapsulate the unicast message header of VX L AN, and then encapsulates the new VX L AN message header, so that the work content is cumbersome, the pressure on the performance is high, and the forwarding efficiency is not high.
In order to solve the above problem, in this embodiment of the application, the local VTEP device learns a mapping relationship between AN IP address of the second VM and AN IP address of the opposite VTEP device in advance, and establishes a VX L AN tunnel between the local VTEP device and the opposite VTEP device based on the mapping relationship, and after subsequently receiving a unicast packet sent to the second VM by the first VM, the unicast packet can be directly sent to the opposite VTEP device through the VX L AN tunnel, so that the opposite VTEP device forwards the unicast packet to the second VM. in the whole forwarding process, and the VX L AN gateway device only needs to perform common three-layer IP forwarding without decapsulating a VX L AN packet header and then encapsulating a new VX L AN packet header, thereby reducing workload and effectively improving forwarding efficiency.
Referring to fig. 2, for a network architecture diagram for forwarding a VX L AN message shown in this application, as shown in fig. 2, the network architecture diagram is similar to that of fig. 1, a VNI of a VX L AN network where VM1 is located is 1000, a V L AN ID of VM1 is 101, AN IP address of VM1 is 10.1.1.100/24, a MAC address is MAC1, and VM1 accesses VTEP 1 through Port 1;
the VNI of the VX L AN network where VM2 is located is 2000, the V L AN ID of VM2 is 102, the IP address of VM2 is 20.1.1.200/24, the MAC address is MAC 2, and VM2 accesses VTEP2 through Port 4.
VX L AN gateway equipment is provided with VX L AN gateway interface 1, the VX L AN gateway interface 1 is designated as a three-layer gateway of VX L AN 1000 and is a default gateway of VM1, the IP address is 10.1.1.1/24, and the MAC address is MAC GW 1;
VX L AN gateway device is also configured with VX L AN gateway interface 2, VX L AN gateway interface 2 is designated as a three-layer gateway of VX L AN 2000 and is a default gateway of VM2, the IP address is 20.1.1.1/24, and the MAC address is MAC GW 2.
A first VX L AN Tunnel, namely Tunnel 1 in the figure, is established between VTEP 1 and VX L AN gateway equipment, and a second VX L AN Tunnel, namely Tunnel 2 in the figure, is established between VTEP2 and VX L AN gateway equipment.
Fig. 2 differs from fig. 1 in that a third VX L AN Tunnel, i.e., Tunnel 3 in the figure, is established between VTEP 1 and VTEP2, and the establishment procedure of the third VX L AN Tunnel will be described below.
Now, a description is given to the VX L AN packet forwarding method in the present application from the perspective of VTEP 1, where the first VM mentioned below refers to VM1, the local VTEP device refers to VTEP 1, the opposite VTEP device refers to VTEP2, the second VM refers to VM2, the first interface index refers to Port1, and the fourth interface index refers to Port 4.
Please refer to fig. 3, which is a flowchart of a VX L AN message forwarding method shown in the present application, AN execution main body of the method is a local VTEP device, and the method includes the following steps:
step 301, receiving the IP address of the second VM and the IP address of the opposite-end VTEP device, which are transparently transmitted by the opposite-end VTEP device through the VX L AN gateway device, wherein the IP address of the opposite-end VTEP device is carried in a VX L AN message header of a VX L AN message sent by the VX L AN gateway device.
Step 302, creating a mapping relation between the IP address of the second VM and the IP address of the opposite-end VTEP device, and establishing a VX L AN tunnel between the local-end VTEP device and the opposite-end VTEP device based on the mapping relation.
Step 303, after receiving the unicast message sent by the first VM to the second VM, sending the unicast message to the opposite-end VTEP device based on the VX L AN tunnel, so that the opposite-end VTEP device forwards the unicast message to the second VM.
If the local VTEP device and the opposite VTEP device use the IP address of the local loopback interface when establishing the VX L AN tunnel and forwarding the packet, the reliability of the VX L AN packet forwarding process can be improved.
In the embodiment of the application, a VX L AN message header can be expanded, and when a third VX L AN tunnel is established between local end VTEP equipment and opposite end VTEP equipment, VX L AN gateway equipment carries the IP address of the local end VTEP equipment or the opposite end VTEP equipment by using the expanded VX L AN message header.
Referring to fig. 4, a schematic diagram of a VX L AN header in the prior art, and referring to fig. 5, a schematic diagram of a VX L AN header in the present application is shown, as shown in the figure, the VX L AN header in the present application has more IP high fields and IP low fields than the VX L AN header in the prior art, the IP high fields can be used for recording the first 24 bits of AN IP address, and the IP low fields can be used for recording the last 8 bits of the IP address.
In an embodiment of the present application, the communication between the first VM and the second VM may be divided into three phases:
in a first stage, a first VM learns the MAC address of a default gateway;
in the second stage, a cross-network segment VX L AN tunnel (namely a third VX L AN tunnel) is established between the local end VTEP device and the opposite end VTEP device;
in the third stage, the local VTEP device sends the unicast message sent by the first VM to the second VM to the peer VTEP device through the third VX L AN tunnel, and the peer VTEP device receives the unicast message and forwards the unicast message to the second VM.
The first stage is explained below:
first, a first VM sends an ARP request to obtain an MAC address of a default gateway 10.1.1.1/24, wherein a target MAC is a broadcast MAC address, and a source MAC is an MAC address MAC1 of the first VM; and the first VM sends the ARP request to the local VTEP equipment.
In this embodiment of the present application, after receiving AN ARP request packet sent by a first VM, a local VTEP device encapsulates the ARP request packet into a VX L AN header, broadcasts the encapsulated ARP request packet in a VX L AN network with a VNI of 1000, and learns AN MAC entry corresponding to the first VM at the same time, where the learned entry is used for subsequent unicast forwarding, and the learned MAC entry is stored in AN MAC table, as shown in table 4 below:
Figure BDA0001287163310000131
TABLE 4
In this embodiment of the present application, after receiving the ARP request packet encapsulating the VX L AN packet header from the first VX L AN tunnel, the VX L AN gateway device decapsulates the ARP request packet, determines that the request address of the ARP request packet is the IP address of the local VX L AN gateway interface 1, and sends AN ARP reply packet encapsulating the VX L AN packet header to the local VTEP device through the first VX L AN tunnel, so as to return the MAC address of the VX L AN gateway interface 1 to the local VTEP device;
the source MAC of the ARP reply packet is MAC GW1, the destination MAC is MAC 1. VX L AN gateway device may also learn AN MAC entry corresponding to the first VM, the learned entry is used for subsequent unicast forwarding, and the learned MAC entry is stored in AN MAC table, as shown in table 5 below:
Figure BDA0001287163310000141
TABLE 5
In this embodiment, after receiving the ARP reply message encapsulating the VX L AN header, the local VTEP device decapsulates the VX L AN header, reads the header of the ARP reply message, where the target MAC is MAC1, and searches for AN MAC table to obtain AN MAC entry corresponding to MAC 1.
The local VTEP device sends the ARP reply message to the first VM through Port1 and vlan id 101, learns the MAC entry corresponding to VX L AN gateway interface 1 on the VX L AN gateway device, and stores the learned MAC entry in the MAC table, as shown in table 6 below:
Figure BDA0001287163310000142
TABLE 6
In this embodiment of the present application, after receiving the ARP reply packet, the first VM records the correspondence between the IP address and the MAC address of the VX L AN gateway interface 1 in the local ARP table.
At this time, the first VM successfully learns the MAC address of the default gateway, and subsequently may send a unicast packet through the default gateway.
In the embodiment of the present application, ARP tables on a VTEP device and a VX L AN gateway device may be expanded in advance, and a vni.vx L AN gateway device may be recorded in the expanded ARP table, and may obtain a VNI of a first VM from a VX L AN header, and read a source IP and a source MAC of the ARP request message, to obtain AN IP address of the first VM and a MAC address of the first VM.
The VX L AN gateway device can store AN ARP entry corresponding to the first VM in AN extended ARP table, the ARP entry including a mapping of the first VM's IP address, the first VM's MAC address, and the first VM's VNI, as shown in table 7 below:
Figure BDA0001287163310000151
TABLE 7
After learning the ARP entry corresponding to the first VM, the VX L AN gateway device may advertise the learned ARP entry to the peer VTEP device.
In AN embodiment shown, the VX L AN gateway device may change a destination IP in the VX L AN header of the ARP request message encapsulating the VX L AN header to AN IP address of the peer VTEP device, and change a destination MAC to AN MAC address of the peer VTEP device;
after the change is completed, the VX L AN gateway device sends the ARP request message encapsulating the VX L AN message header to AN opposite end VTEP device, wherein the VX L AN message header carries the VNI of the first VM.
After receiving the ARP request message encapsulating the VX L AN header, the VTEP device at the opposite end may decapsulate the VX L AN header, and read the VNI carried by the VX L AN header, that is, the VNI of the first VM;
in addition, the VTEP device at the opposite end may also read the source IP and the source MAC of the ARP request packet, and obtain the IP address of the first VM and the MAC address of the first VM. At this time, the opposite-end VTEP device learns the ARP entry corresponding to the first VM, and may store the ARP entry in the local ARP table. As shown in table 8 below:
Figure BDA0001287163310000152
TABLE 8
In another embodiment shown, the VX L AN gateway device can send AN announcement message carrying AN ARP entry to the peer VTEP device after learning the ARP entry corresponding to the first VM.
After receiving the notification message, the VTEP device at the opposite end may directly obtain the ARP entry corresponding to the first VM, which is carried in the notification message, and locally store the ARP entry. The notification message may be a BGP (border gateway Protocol) based notification message.
The process of the second VM learning the MAC address of the default gateway is similar to the above process, and is not described herein again. In addition, when the second VM learns the MAC address of the default gateway, the local VTEP device can also learn the ARP entry corresponding to the second VM, and the learning process is similar to the process of the opposite VTEP device learning the ARP entry corresponding to the first VM, and is not described herein again.
The second stage is explained below:
in this embodiment of the application, the establishment of the third VX L AN tunnel between the local VTEP device and the peer VTEP device may be completed when the first VM first sends a unicast message to the second VM after the first VM learns the MAC address of the default gateway.
Specifically, the first VM sends a unicast message to the second VM, wherein the source MAC of the unicast message is MAC1, the destination MAC is MAC address MAC GW1 of VX L AN gateway interface 1, the source IP is IP address 10.1.1.100/24 of the first VM, and the destination IP is IP address 20.1.1.200/24 of the second VM.
In this embodiment of the application, after receiving the unicast message, the local VTEP device determines, according to the first interface index of the received unicast message, the VNI of the first VM that sends the unicast message, then searches the MAC table according to the VNI of the first VM and the destination MAC of the unicast message, obtains the MAC table entry corresponding to VX L AN gateway interface 1, then encapsulates the unicast message with a VX L AN message header, and sends, through the first VX L AN tunnel, the unicast message encapsulating the VX L AN message header to the VX L AN gateway device where VX L AN gateway interface 1 is located.
In the embodiment of the present application, after receiving the unicast message encapsulating the VX L AN packet header, the VX L AN gateway device decapsulates the VX L AN packet header and records the source IP in the VX L AN packet header, that is, the IP address of the local VTEP device, and the VX L AN gateway device may determine whether the destination MAC of the unicast message is a local MAC address.
Since the destination MAC of the unicast message is MAC GW1, the VX L AN gateway device can determine that the destination MAC of the unicast message is the MAC address of the local VX L AN gateway interface 1, and further determine that the unicast message needs to be forwarded by three layers.
In this case, the VX L AN gateway device can look up a routing table according to the destination IP of the unicast message, and determine a corresponding routing table entry, where the routing table entry includes AN egress interface corresponding to the second VM, the egress interface corresponding to the second VM is VX L AN gateway interface 2, and VX L AN gateway interface 2 is a default gateway of the VX L AN network with VNI of 2000.
After the VX L AN gateway device determines that the unicast message needs to be sent to a VX L AN network with VNI of 2000, the destination MAC of the unicast message can be changed into the MAC address MAC 2 of the second VM, the source MAC is changed into the MAC address MAC GW 2 of VX L AN gateway interface 2, and then a VX L AN message header is packaged for the unicast message, wherein the VNI carried in the VX L AN message header is 2000;
in addition, the VX L AN gateway device can fill the source IP (i.e. the IP address of the local VTEP device) recorded during decapsulating the VX L AN message header into the VX L AN message header, fill the first 24 bits of the source IP into the IP high-order field, and fill the last 8 bits of the source IP into the IP low-order field, for example, when the VX L AN gateway device fills the IP address 1.1.1.1 into the VX L AN message header, fill 1.1.1 into the IP high-order field, and fill 1 into the IP low-order field.
After the above steps are completed, the VX L AN gateway device can send the unicast message repackaging the VX L AN headers to the opposite-end VTEP device through the second VX L AN tunnel.
In this embodiment of the present application, after receiving the unicast packet encapsulating the VX L AN packet header, the VTEP device at the opposite end may decapsulate the VX L AN packet header, then learn the MAC entry corresponding to the VX L AN gateway interface 2 on the VX L AN gateway device, and store the learned MAC entry in the MAC table, as shown in the following table 9:
Figure BDA0001287163310000171
TABLE 9
The opposite terminal VTEP device searches the MAC table according to the target MAC of the unicast message, acquires the MAC table entry corresponding to the MAC 2, and then sends the unicast message to the second VM through the Port 4 and the virtual local area network identifier 104.
In addition, the opposite-end VTEP device can also obtain the IP address of the local-end VTEP device carried by the VX L AN packet header.
Specifically, the opposite-end VTEP device can read the field value of the IP high-order field of the VX L AN header to obtain the first 24 bits of the IP address of the local-end VTEP device, and read the field value of the IP low-order field of the VX L AN header to obtain the last 8 bits of the IP address of the local-end VTEP device.
And after the opposite-end VTEP equipment obtains the first 24 bits and the last 8 bits of the IP address of the home-end VTEP equipment, assembling and sorting the IP addresses into a complete IP address of the home-end VTEP equipment.
After obtaining the IP address of the local VTEP device and the IP address of the first VM, the opposite VTEP device may record a mapping relationship between the IP address of the local VTEP device and the IP address of the first VM, where the mapping relationship is used to subsequently establish a third VX L AN tunnel, and the opposite VTEP device may search a local ARP table according to the IP address of the first VM, obtain AN ARP table entry corresponding to the first VM, and then generate a mapping relationship between the IP address of the first VM, the IP address of the local VTEP device, and the VNI of the first VM, and store the mapping relationship in a preset IP address mapping table, as shown in table 10 below:
Figure BDA0001287163310000181
watch 10
The opposite-end VTEP device can establish a third VX L AN tunnel with the local-end VTEP device according to the mapping relation, at this time, the opposite-end VTEP device can send the unicast message sent by the second VM to the first VM to the local-end VTEP device through the third VX L AN tunnel.
The local terminal VTEP device can obtain the mapping relation between the IP address of the opposite terminal VTEP device and the IP address of the second VM according to the mode equivalent to the opposite terminal VTEP device, generate the mapping relation between the IP address of the second VM, the IP address of the opposite terminal VTEP device and the VNI of the second VM by combining the ARP table entry corresponding to the second VM, and then establish a third VX L AN tunnel between the local terminal VTEP device and the opposite terminal VTEP device according to the mapping relation.
After the third VX L AN tunnel is established between the local VTEP device and the opposite VTEP device, the local VTEP device can communicate with the opposite VTEP device through the third VX L AN tunnel.
The third stage is explained below:
the first VM sends a unicast message to the second VM, wherein the source MAC of the unicast message is MAC1, the destination MAC is MAC address MAC GW1 of VX L AN gateway interface 1, the source IP is IP address 10.1.1.100/24 of the first VM, and the destination IP is IP address 20.1.1.200/24 of the second VM.
In the embodiment of the application, after receiving the unicast message, the local VTEP device may determine whether the source IP and the destination IP of the unicast message belong to the same network segment.
On one hand, if the source IP and the target IP of the unicast message belong to the same network segment, the unicast message is forwarded by a common VX L AN two-layer, the local VTEP equipment can determine the VNI of a first VM sending the unicast message according to AN interface index (for example, a port number) receiving the unicast message, then searches AN MAC table according to the VNI of the first VM and a target MAC of the unicast message to obtain AN MAC table item corresponding to the target MAC, and then forwards the unicast message according to the MAC table item after packaging a VX L AN message header;
on the other hand, if the source IP and the destination IP of the unicast message do not belong to the same network segment, the unicast message is forwarded across the tunnel by going through three layers of VX L AN, after the local VTEP device determines that the source IP and the destination IP of the unicast message sent by the first VM to the second VM do not belong to the same network segment, the local IP address mapping table is searched according to the destination IP to obtain the mapping relation of the IP address of the second VM, the IP address of the opposite-end VTEP device and the VNI of the second VM, and in addition, the local VTEP device can search a local ARP table according to the destination IP to obtain AN ARP table item corresponding to the second VM, wherein the ARP table item comprises the mapping relation of the IP address of the second VM, the MAC address of the second VM and the VNI of the second VM;
after obtaining the ARP entry corresponding to the second VM, the local VTEP device may change the destination MAC of the unicast message to the MAC address of the second VM, and then encapsulate a VX L AN header for the unicast message, where the destination MAC in the VX L AN header is the MAC address of the VX L AN gateway device, the destination IP is the IP address of the opposite VTEP device, and the VX L AN header carries the VNI of the second VM, and the local VTEP device sends the unicast message encapsulating the VX L AN header to the VX L AN gateway device.
In this embodiment, after receiving the unicast packet encapsulating the VX L AN packet header, the VX L AN gateway device may forward the unicast packet encapsulating the VX L AN packet header to AN opposite-end VTEP device in a normal IP three-layer forwarding manner.
In this embodiment of the present application, after receiving the unicast packet encapsulating the VX L AN packet header, the opposite-end VTEP device decapsulates the VX L AN packet header, and then searches a local MAC table according to a destination MAC (i.e., a MAC address of the second VM) of the unicast packet to obtain a MAC entry corresponding to the second VM, where the MAC entry includes a mapping relationship between the MAC address of the second VM, the VNI of the second VM, the fourth interface index, and the V L AN ID of the second VM.
And after the opposite-end VTEP equipment obtains the MAC table entry corresponding to the second VM, the unicast message is sent to the second VM according to the fourth interface index and the V L AN ID of the second VM.
And the process that the first VM sends the unicast message to the second VM is finished.
To sum up, in the technical solution of the present application, a local VTEP device receives AN IP address of a second VM transparently transmitted by AN opposite VTEP device through a VX L AN gateway device, and AN IP address of the opposite VTEP device, where the IP address of the opposite VTEP device is carried in a VX L AN packet header of a VX L AN packet sent by the VX L AN gateway device, the local VTEP device may create a mapping relationship between the IP address of the second VM and the IP address of the opposite VTEP device, and establish a VX L AN tunnel between the local VTEP device and the opposite VTEP device based on the mapping relationship, and after receiving a unicast packet sent to the second VM by a first VTEP device, the local VTEP device sends the unicast packet to the opposite VTEP device based on the VX L AN tunnel, so that the VTEP device forwards the unicast packet to the second VM;
in the application, after the local-end VTEP device establishes a VX L AN tunnel with the opposite-end VTEP device, the unicast message sent by the first VM to the second VM can be directly sent to the opposite-end VTEP device through the VX L AN tunnel so as to be forwarded to the second VM by the opposite-end VTEP device, and in the whole forwarding process, after the VX L AN gateway device receives the unicast message encapsulating the VX L AN message header, the unicast message encapsulating the VX L AN message header can be subjected to common three-layer forwarding without decapsulating the VX L AN message header and encapsulating a new VX L AN message header, so that the workload is reduced, the performance pressure of the VX L AN gateway device is reduced, and the forwarding efficiency is effectively improved.
Corresponding to the foregoing embodiments of the VX L AN message forwarding method, the present application also provides embodiments of a VX L AN message forwarding apparatus.
Referring to fig. 6, it is a logic block diagram of an VXA L N message forwarding apparatus shown in the present application:
as shown in fig. 6, the VX L AN message forwarding apparatus 60 includes:
a receiving unit 610, configured to receive the IP address of the second VM transparently transferred by the opposite-end VTEP device through the VX L AN gateway device, and the IP address of the opposite-end VTEP device, where the IP address of the opposite-end VTEP device is carried in a VX L AN message header of a VX L AN message sent by the VX L AN gateway device.
A creating unit 620, configured to create a mapping relationship between the IP address of the second VM and the IP address of the peer VTEP device, and establish a VX L AN tunnel between the local VTEP device and the peer VTEP device based on the mapping relationship.
A sending unit 630, configured to send, after receiving the unicast packet sent by the first VM to the second VM, the unicast packet to the peer VTEP device based on the VX L AN tunnel, so that the peer VTEP device forwards the unicast packet to the second VM.
In this example, a first VX L AN tunnel is established between the local VTEP device and the VX L AN gateway device, and a second VX L AN tunnel is established between the VX L AN gateway device and the opposite VTEP device;
the receiving unit 610 is further configured to:
receiving a VX L AN message sent by the VX L AN gateway device through the first VX L AN tunnel, wherein the VX L AN message is a unicast message sent to the first VM by the second VM encapsulating a VX L AN message header;
and decapsulating a VX L AN message header of the VX L AN message, and acquiring the IP address of the opposite-end VTEP device carried by the VX L AN message header and the source IP of the unicast message, wherein the source IP of the unicast message is the IP address of the second VM.
In this example, the receiving unit 610 is further configured to:
receiving a VX L AN message sent by the VX L AN gateway equipment, wherein the VX L AN message is AN ARP request message sent by the second VM encapsulating a VX L AN message header to the VX L AN gateway equipment, and the VX L AN message header carries a VNI of the second VM;
acquiring a source IP and a source MAC of the ARP request message and a VNI of the second VM, and generating an ARP table entry corresponding to the second VM based on the source IP, the source MAC and the VNI of the second VM; the source IP is an IP address of the second VM, and the MAC is a MAC address of the second VM.
In this example, the receiving unit 610 is further configured to:
receiving a notification message sent by the VX L AN gateway equipment, wherein the notification message carries AN ARP table entry which is created by the VX L AN gateway equipment and corresponds to the second VM, and the ARP table entry is created by the VX L AN gateway equipment based on a source IP (Internet protocol) and a source MAC (media access control) of AN ARP request message which is sent to the VX L AN gateway equipment by the second VM encapsulating a VX L AN message header and a VNI (virtual network interface) of the second VM;
and acquiring the ARP table entry corresponding to the second VM carried in the notification message, and locally storing the ARP table entry corresponding to the second VM.
In this example, the creating unit 620 is further configured to:
and generating a mapping relation between the IP address of the second VM, the IP address of the opposite-end VTEP device and the VNI of the second VM based on the corresponding relation between the IP address of the second VM and the IP address of the opposite-end VTEP device and the locally-stored ARP table entry corresponding to the second VM.
In terms of hardware, as shown in fig. 7, the present application VX L AN message forwarding apparatus is a hardware structure diagram of the present application VTEP apparatus at the local end, except for the processor, the memory, the network interface, and the nonvolatile memory shown in fig. 7, the local VTEP apparatus at the local end where the apparatus is located usually includes other hardware according to the actual function of the VX L AN message forwarding apparatus in the embodiment, which is not described again.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. A VX L AN message forwarding method, applied to a local VTEP device, where the local VTEP device has access to a first VM, and AN opposite VTEP device has access to a second VM, the first VM is interconnected with the second VM belonging to different VX L AN networks through a VX L AN gateway device, a first VX L AN tunnel is established between the local VTEP device and the VX L AN gateway device, and a second VX L AN tunnel is established between the VX L AN gateway device and the opposite VTEP device, the method comprising:
receiving a VX L AN message sent by the VX L AN gateway device through the first VX L AN tunnel, wherein the VX L AN message is a unicast message sent to the first VM by the second VM encapsulating a VX L AN message header;
decapsulating a VX L AN message header of the VX L AN message, and acquiring the IP address of the opposite-end VTEP device carried by the VX L AN message header and the source IP of the unicast message, wherein the source IP of the unicast message is the IP address of the second VM, and the IP address of the opposite-end VTEP device is carried in a VX L AN message header of a VX L AN message sent by the VX L AN gateway device;
creating a mapping relation between the IP address of the second VM and the IP address of the opposite-end VTEP device, and establishing a cross-network-segment VX L AN tunnel between the local-end VTEP device and the opposite-end VTEP device based on the mapping relation;
after receiving the unicast message sent by the first VM to the second VM, sending the unicast message to the opposite-end VTEP device based on the cross-network-segment VX L AN tunnel, so that the opposite-end VTEP device forwards the unicast message to the second VM.
2. The method of claim 1, wherein prior to creating the mapping between the IP address of the second VM and the IP address of the peer VTEP device, further comprising:
receiving a VX L AN message sent by the VX L AN gateway equipment, wherein the VX L AN message is AN ARP request message sent by the second VM encapsulating a VX L AN message header to the VX L AN gateway equipment, and the VX L AN message header carries a VNI of the second VM;
acquiring a source IP and a source MAC of the ARP request message and a VNI of the second VM, and generating an ARP table entry corresponding to the second VM based on the source IP, the source MAC and the VNI of the second VM; the source IP is an IP address of the second VM, and the MAC is a MAC address of the second VM.
3. The method of claim 1, wherein prior to creating the mapping between the IP address of the second VM and the IP address of the peer VTEP device, further comprising:
receiving a notification message sent by the VX L AN gateway equipment, wherein the notification message carries AN ARP table entry which is created by the VX L AN gateway equipment and corresponds to the second VM, and the ARP table entry is created by the VX L AN gateway equipment based on a source IP (Internet protocol) and a source MAC (media access control) of AN ARP request message which is sent to the VX L AN gateway equipment by the second VM encapsulating a VX L AN message header and a VNI (virtual network interface) of the second VM;
and acquiring the ARP table entry corresponding to the second VM carried in the notification message, and locally storing the ARP table entry corresponding to the second VM.
4. The method according to claim 2 or 3, wherein the creating a mapping relationship between the IP address of the second VM and the IP address of the peer VTEP device comprises:
and generating a mapping relation between the IP address of the second VM, the IP address of the opposite-end VTEP device and the VNI of the second VM based on the corresponding relation between the IP address of the second VM and the IP address of the opposite-end VTEP device and the locally-stored ARP table entry corresponding to the second VM.
5. A VX L AN packet forwarding apparatus, applied to a local VTEP device, where the local VTEP device has access to a first VM, and AN opposite VTEP device has access to a second VM, the first VM is interconnected with the second VM belonging to a different VX L AN network through a VX L AN gateway device, a first VX L AN tunnel is established between the local VTEP device and the VX L AN gateway device, and a second VX L AN tunnel is established between the VX L AN gateway device and the opposite VTEP device, the apparatus comprising:
a receiving unit for receiving the received data,
receiving a VX L AN message sent by the VX L AN gateway device through the first VX L AN tunnel, wherein the VX L AN message is a unicast message sent to the first VM by the second VM encapsulating a VX L AN message header;
decapsulating a VX L AN message header of the VX L AN message, and acquiring the IP address of the opposite-end VTEP device carried by the VX L AN message header and the source IP of the unicast message, wherein the source IP of the unicast message is the IP address of the second VM, and the IP address of the opposite-end VTEP device is carried in a VX L AN message header of a VX L AN message sent by the VX L AN gateway device;
a creating unit, configured to create a mapping relationship between AN IP address of the second VM and AN IP address of the opposite-end VTEP device, and establish a cross-network segment VX L AN tunnel between the local-end VTEP device and the opposite-end VTEP device based on the mapping relationship;
a sending unit, configured to send, after receiving a unicast packet sent by the first VM to the second VM, the unicast packet to the peer VTEP device based on the inter-network segment VX L AN tunnel, so that the peer VTEP device forwards the unicast packet to the second VM.
6. The apparatus of claim 5, wherein the receiving unit is further configured to:
receiving a VX L AN message sent by the VX L AN gateway equipment, wherein the VX L AN message is AN ARP request message sent by the second VM encapsulating a VX L AN message header to the VX L AN gateway equipment, and the VX L AN message header carries a VNI of the second VM;
acquiring a source IP and a source MAC of the ARP request message and a VNI of the second VM, and generating an ARP table entry corresponding to the second VM based on the source IP, the source MAC and the VNI of the second VM; the source IP is an IP address of the second VM, and the MAC is a MAC address of the second VM.
7. The apparatus of claim 5, wherein the receiving unit is further configured to:
receiving a notification message sent by the VX L AN gateway equipment, wherein the notification message carries AN ARP table entry which is created by the VX L AN gateway equipment and corresponds to the second VM, and the ARP table entry is created by the VX L AN gateway equipment based on a source IP (Internet protocol) and a source MAC (media access control) of AN ARP request message which is sent to the VX L AN gateway equipment by the second VM encapsulating a VX L AN message header and a VNI (virtual network interface) of the second VM;
and acquiring the ARP table entry corresponding to the second VM carried in the notification message, and locally storing the ARP table entry corresponding to the second VM.
8. The apparatus according to claim 6 or 7, wherein the creating unit is further configured to:
and generating a mapping relation between the IP address of the second VM, the IP address of the opposite-end VTEP device and the VNI of the second VM based on the corresponding relation between the IP address of the second VM and the IP address of the opposite-end VTEP device and the locally-stored ARP table entry corresponding to the second VM.
CN201710311213.XA 2017-05-05 2017-05-05 VX L AN message forwarding method and device Active CN106998286B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710311213.XA CN106998286B (en) 2017-05-05 2017-05-05 VX L AN message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710311213.XA CN106998286B (en) 2017-05-05 2017-05-05 VX L AN message forwarding method and device

Publications (2)

Publication Number Publication Date
CN106998286A CN106998286A (en) 2017-08-01
CN106998286B true CN106998286B (en) 2020-08-04

Family

ID=59435314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710311213.XA Active CN106998286B (en) 2017-05-05 2017-05-05 VX L AN message forwarding method and device

Country Status (1)

Country Link
CN (1) CN106998286B (en)

Families Citing this family (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107493222B (en) * 2017-08-15 2020-06-09 杭州迪普科技股份有限公司 VXLAN message forwarding method and device
CN107659484B (en) * 2017-10-13 2020-08-21 锐捷网络股份有限公司 Method, device and system for accessing VXLAN network from VLAN network
CN107911495B (en) * 2017-11-16 2020-12-04 新华三技术有限公司 MAC address synchronization method and VTEP
CN107896188B (en) * 2017-12-22 2020-08-28 迈普通信技术股份有限公司 Data forwarding method and device
CN108199963B (en) * 2017-12-27 2020-01-07 新华三技术有限公司 Message forwarding method and device
CN109995639B (en) * 2018-01-02 2021-06-04 中国移动通信有限公司研究院 Data transmission method, device, switch and storage medium
CN110034993B (en) * 2018-01-11 2020-12-25 华为技术有限公司 Method, equipment and network system for transmitting data
CN108600069B (en) * 2018-03-29 2020-12-25 新华三技术有限公司 Link switching method and device
CN108833250A (en) * 2018-06-22 2018-11-16 山东超越数控电子股份有限公司 A kind of retransmission method between VxLAN and VLAN
CN111371667A (en) * 2019-10-23 2020-07-03 上海科技网络通信有限公司 LTE VPDN networking method based on VxLAN technology under cloud computing environment
CN111130978B (en) * 2019-12-03 2021-11-23 杭州迪普科技股份有限公司 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN113660164A (en) * 2020-05-12 2021-11-16 华为技术有限公司 Message forwarding method and network equipment
CN113872845B (en) * 2020-06-30 2023-04-07 华为技术有限公司 Method for establishing VXLAN tunnel and related equipment
CN113923075A (en) * 2020-07-09 2022-01-11 华为技术有限公司 Data transmission method and device
CN113347101B (en) * 2021-06-01 2022-11-15 中国联合网络通信集团有限公司 Routing information sending control method, VTEP and computer readable storage medium
CN113590268B (en) * 2021-08-06 2023-11-24 中国联合网络通信集团有限公司 Virtual machine migration method, ARP proxy gateway and VTEP
CN115190100A (en) * 2022-07-04 2022-10-14 中国联合网络通信集团有限公司 Data forwarding method, VTEP gateway, electronic device and readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647853A (en) * 2013-12-04 2014-03-19 华为技术有限公司 Method for sending ARP message in VxLAN, VTEP and VxLAN controller
CN105099922A (en) * 2015-06-18 2015-11-25 杭州华三通信技术有限公司 Cross-VXLAN (Virtual eXtensible Local Area Network) data message forwarding method and device
CN106209643A (en) * 2016-07-14 2016-12-07 杭州华三通信技术有限公司 Message forwarding method and device
CN106330719A (en) * 2016-10-26 2017-01-11 杭州迪普科技有限公司 VXLAN message forwarding method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9509527B2 (en) * 2014-06-30 2016-11-29 Arista Networks, Inc. Method and system for VXLAN encapsulation offload

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103647853A (en) * 2013-12-04 2014-03-19 华为技术有限公司 Method for sending ARP message in VxLAN, VTEP and VxLAN controller
CN105099922A (en) * 2015-06-18 2015-11-25 杭州华三通信技术有限公司 Cross-VXLAN (Virtual eXtensible Local Area Network) data message forwarding method and device
CN106209643A (en) * 2016-07-14 2016-12-07 杭州华三通信技术有限公司 Message forwarding method and device
CN106330719A (en) * 2016-10-26 2017-01-11 杭州迪普科技有限公司 VXLAN message forwarding method and device

Also Published As

Publication number Publication date
CN106998286A (en) 2017-08-01

Similar Documents

Publication Publication Date Title
CN106998286B (en) VX L AN message forwarding method and device
CN107070691B (en) Cross-host communication method and system of Docker container
KR101840904B1 (en) Virtualization gateway between virtualized and non-virtualized networks
US10367733B2 (en) Identifier-based virtual networking
US10205657B2 (en) Packet forwarding in data center network
US9036639B2 (en) System and method for VXLAN inter-domain communications
CN106254256B (en) Data message forwarding method and equipment based on three layers of VXLAN gateway
EP3239984B1 (en) Methods and systems for analyzing record and usage in post package repair
CN112702252A (en) Message processing method, system and related equipment
JP2019517168A (en) Interconnection between physical and virtual networks
US20150304450A1 (en) Method and apparatus for network function chaining
CN108900414B (en) Forwarding table generation method and device
WO2015113410A1 (en) Data packet processing method and apparatus
CN106453023B (en) It is a kind of for physical equipment and the communication means of virtual network, equipment and system
CN106330719B (en) A kind of VXLAN message forwarding method and device
CN107493222B (en) VXLAN message forwarding method and device
CN113326228A (en) Message forwarding method, device and equipment based on remote direct data storage
CN113132202A (en) Message transmission method and related equipment
CN114389905B (en) Network traffic statistics method, related device and medium
CN110752989A (en) Method and device for forwarding east-west traffic
US11516125B2 (en) Handling packets travelling towards logical service routers (SRs) for active-active stateful service insertion
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN116418632A (en) Message processing method, device, equipment and machine-readable storage medium
WO2019134637A1 (en) Method, device, and system for multi-type network virtualization overlay interconnection
CN116170406A (en) System and method for implementing virtual machine to public network communication

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant