CN109450767B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN109450767B
CN109450767B CN201811260264.5A CN201811260264A CN109450767B CN 109450767 B CN109450767 B CN 109450767B CN 201811260264 A CN201811260264 A CN 201811260264A CN 109450767 B CN109450767 B CN 109450767B
Authority
CN
China
Prior art keywords
message
identifier
access mode
update
preset field
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
CN201811260264.5A
Other languages
Chinese (zh)
Other versions
CN109450767A (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 H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C 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 H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201811260264.5A priority Critical patent/CN109450767B/en
Publication of CN109450767A publication Critical patent/CN109450767A/en
Priority to PCT/CN2019/113293 priority patent/WO2020083380A1/en
Application granted granted Critical
Publication of CN109450767B publication Critical patent/CN109450767B/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/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • H04L12/4645Details on frame tagging

Landscapes

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

Abstract

The embodiment of the application provides a message processing method and a device, the method is applied to VTEP in VXLAN, when a modification instruction aiming at an access mode of a first AC is received, a first VM corresponding to the first AC is determined in a recorded corresponding relation between the AC and the VM, an update reminding message is generated according to an identifier of the first VM, an identifier of a target access mode and a preset update reminding mark and is sent to GW equipment, the GW equipment updates an ARP table item according to the update reminding message, and forwards the received message according to the updated ARP table item. Based on the above processing, when the VTEP detects that the access mode of the AC is changed, the GW device can be timely reminded to update the ARP entry, so that the GW device can forward the packet according to the updated ARP entry, thereby avoiding the network service interruption.

Description

Message processing method and device
Technical Field
The present application relates to the field of computer network technologies, and in particular, to a method and an apparatus for processing a packet.
Background
VXLAN (Virtual eXtensible Virtual local area Network) is a two-layer VPN (Virtual Private Network) technology that uses a MAC (media access Control) in UDP (User data Protocol) encapsulation method. VXLAN may provide a two-layer interconnection for decentralized physical sites based on existing IP (Internet Protocol) networks.
As shown in fig. 1, VXLAN networking includes: VTEP (VXLAN Tunnel End Point), GW (gateway Way) device, multiple VMs (Virtual machine).
An AC (access Circuit) 1 is an interface connected to VM1 on the VTEP. The VTEP may receive a first packet sent by the VM1, where the first packet may carry Tag (Tag) 1. If the access mode of the AC1 is an Ethernet (Ethernet) access mode, the VTEP directly performs VXLAN encapsulation on the first packet, and sends the encapsulated first packet to the GW device. The GW device may forward the first packet to a destination device (which may be VM 2). In addition, the GW device may generate an ARP (Address Resolution Protocol) entry corresponding to the VM1, where a correspondence relationship between the VM1 and the Tag (i.e., Tag1 in the first message) is recorded in the ARP entry. When the GW device receives the second message sent by VM2 to VM1, the GW device may add Tag1 to the second message according to the ARP entry corresponding to VM1, and send the second message to the VTEP. The VTEP forwards the second packet to VM 1.
If the access mode of the AC1 is a Virtual Local Area Network (VLAN) access mode, the VTEP first deletes Tag1 in the first packet, then performs VXLAN encapsulation on the first packet, and sends the encapsulated first packet to the GW device, and similarly, the GW device may forward the first packet to VM2 and generate an ARP entry corresponding to VM1, where at this time, the Tag corresponding to VM1 is null. When the GW device receives the second message, the GW device does not add Tag to the second message according to the ARP entry corresponding to VM1, and sends the second message to the VTEP. VTEP adds Tag1 to the second message and sends it to VM 1.
However, if the AC1 changes from the ethernet access mode to the vlan access mode, at this time, after receiving the second packet, the GW device still adds Tag1 to the second packet, and sends the second packet to the VTEP. After receiving the second message added with the Tag1, the VTEP may add the Tag1 to the second message again, resulting in an error message. Or, the AC1 changes from the vlan access mode to the ethernet access mode, and at this time, after receiving the second packet, the GW device does not add Tag1 to the second packet, and sends the second packet to the VTEP. After receiving the second message, the VTEP also does not add Tag1 to the second message, which also causes a message error.
It can be seen that, in the prior art, when the access mode of the AC1 is changed, a message error is caused, and thus, the network service is interrupted.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for processing a packet, which can avoid interruption of a network service. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present application discloses a message processing method, where the method is applied to an extensible virtual local area network tunnel endpoint VTEP in an extensible virtual local area network VXLAN, where the VXLAN further includes a gateway GW device, and the method includes:
when a modification instruction aiming at an access mode of a first access circuit AC is received, determining a first VM corresponding to the first AC in a recorded corresponding relation between the AC and a virtual machine VM, wherein the modification instruction carries an identifier of a target access mode;
generating an update reminding message according to the identifier of the first VM, the identifier of the target access mode and a preset update reminding mark;
and sending the update reminding message to the GW equipment so that the GW equipment updates an Address Resolution Protocol (ARP) table entry according to the update reminding message and forwards the received message according to the updated ARP table entry.
Optionally, the generating an update notification message according to the identifier of the first VM, the identifier of the target access mode, and a preset update notification flag includes:
if the identifier of the target access mode represents an Ethernet access mode, when a data message sent by the first VM is received, performing VXLAN encapsulation on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a Virtual Local Area Network (VLAN) access mode, when a data message sent by the first VM is received, carrying out VXLAN packaging on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
Optionally, the generating an update notification message according to the identifier of the first VM, the identifier of the target access mode, and a preset update notification flag includes:
if the identifier of the target access mode represents an Ethernet access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a VLAN access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
In a second aspect, in order to achieve the above object, an embodiment of the present application discloses a message processing method, where the method is applied to a gateway GW device in a scalable virtual local area network VXLAN, where the VXLAN further includes a scalable virtual local area network tunnel endpoint VTEP, and the method includes:
when a message sent by the VTEP is received, judging whether the message carries a preset update reminding mark;
if the message carries the update reminding mark, updating an Address Resolution Protocol (ARP) table entry according to the message, and forwarding the received message according to the updated ARP table entry.
Optionally, the updating the ARP entry according to the packet includes:
analyzing a first preset field of the message to obtain an identifier of a first Virtual Machine (VM);
analyzing a second preset field of the message;
if the second preset field is empty, setting a Tag corresponding to the first VM in an ARP table entry to be empty;
and if the second preset field is not empty, acquiring a target Tag carried by the second preset field, and setting the Tag corresponding to the first VM in the ARP table entry as the target Tag.
In a third aspect, in order to achieve the above object, an embodiment of the present application discloses a packet processing apparatus, where the apparatus is applied to an extensible virtual local area network tunnel endpoint VTEP in an extensible virtual local area network VXLAN, where the VXLAN further includes a gateway GW device, and the apparatus includes:
a determining module, configured to determine, when a modification instruction for an access mode of a first access circuit AC is received, a first VM corresponding to the first AC in a recorded correspondence between the AC and a virtual machine VM, where the modification instruction carries an identifier of a target access mode;
the generating module is used for generating an update reminding message according to the identifier of the first VM, the identifier of the target access mode and a preset update reminding mark;
and the sending module is used for sending the update reminding message to the GW equipment so that the GW equipment updates an Address Resolution Protocol (ARP) table entry according to the update reminding message and forwards the received message according to the updated ARP table entry.
Optionally, the generating module is specifically configured to, if the identifier of the target access mode indicates an Ethernet access mode, perform VXLAN encapsulation on the data packet when receiving the data packet sent by the first VM, to obtain an update notification packet, where a first preset field in a VXLAN packet header of the update notification packet is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update notification flag;
and if the identifier of the target access mode represents a Virtual Local Area Network (VLAN) access mode, when a data message sent by the first VM is received, carrying out VXLAN packaging on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
Optionally, the generating module is specifically configured to perform VXLAN encapsulation on a preset protocol packet to obtain an update reminding packet if the identifier of the target access mode indicates an Ethernet access mode, where a first preset field in a VXLAN packet header of the update reminding packet is an identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a VLAN access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
In a fourth aspect, in order to achieve the above object, an embodiment of the present application discloses a packet processing apparatus, where the apparatus is applied to a gateway GW device in a scalable virtual local area network VXLAN, where the VXLAN further includes a scalable virtual local area network tunnel endpoint VTEP, and the apparatus includes:
the judging module is used for judging whether the message carries a preset updating reminding mark or not when the message sent by the VTEP is received;
and the updating module is used for updating an Address Resolution Protocol (ARP) table entry according to the message and forwarding the received message according to the updated ARP table entry if the message carries the updating reminding mark.
Optionally, the update module is specifically configured to analyze a first preset field of the packet to obtain an identifier of the first virtual machine VM;
analyzing a second preset field of the message;
if the second preset field is empty, setting a Tag corresponding to the first VM in an ARP table entry to be empty;
and if the second preset field is not empty, acquiring a target Tag carried by the second preset field, and setting the Tag corresponding to the first VM in the ARP table entry as the target Tag.
On the other hand, in order to achieve the above object, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the first aspect when executing the program stored in the memory.
On the other hand, in order to achieve the above object, an embodiment of the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of the second aspect when executing the program stored in the memory.
In another aspect, to achieve the above object, the present application provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: the method steps of the first aspect are implemented.
In another aspect, to achieve the above object, the present application provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: the method steps according to the second aspect are implemented.
In another aspect, to achieve the above object, the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method steps of the first aspect.
In another aspect, to achieve the above object, the present application provides a computer program product containing instructions, which when executed on a computer, causes the computer to perform the method steps of the second aspect.
The method and the device for processing the message can be applied to VTEP and GW equipment in VXLAN, and for example, when a modification instruction for an access mode of a first AC is received, the VTEP can determine the first VM corresponding to the first AC in the recorded corresponding relation between the AC and the VM, generate an update reminding message according to the identifier of the first VM, the identifier of a target access mode and a preset update reminding mark, and send the update reminding message to the GW equipment. The GW device may update the ARP entry according to the update notification message, and forward the received message according to the updated ARP entry. Based on the above processing, when the VTEP detects that the access mode of the AC is changed, the GW device can be timely reminded to update the ARP entry, so that the GW device can forward the received message according to the updated ARP entry, thereby avoiding the network service interruption.
Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a framework diagram of a networking provided in an embodiment of the present application;
fig. 2 is a flowchart of a message processing method according to an embodiment of the present application;
fig. 3 is a flowchart of a message processing method according to an embodiment of the present application;
fig. 4 is a flowchart of an example of a message processing method according to an embodiment of the present application;
fig. 5 is a flowchart of an example of a message processing method according to an embodiment of the present application;
fig. 6 is a flowchart of an example of a message processing method according to an embodiment of the present application;
fig. 7 is a flowchart of an example of a message processing method according to an embodiment of the present application;
fig. 8 is a structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 9 is a structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 10 is a block diagram of an electronic device according to an embodiment of the present disclosure;
fig. 11 is a structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a message processing method which can be applied to VTEP and GW equipment in VXLAN.
Referring to the application scenario in fig. 1, the message processing method of the present application may be applied to the VTEP in fig. 1. When a modification instruction for the access mode of the AC1 is received, the VTEP may determine the VM1 corresponding to the AC1, where the modification instruction carries an identifier of the target access mode. The VTEP may generate an update reminding message according to the identifier of the VM1, the identifier of the target access mode, and the preset update reminding flag, and send the update reminding message to the GW device, so that the GW device updates the ARP entry according to the update reminding message, and forwards the received message according to the updated ARP entry.
Correspondingly, the message processing method of the present application may also be applied to the GW device in fig. 1, where the GW device may receive a message sent by the VTEP, and then the GW device may determine whether the message carries a preset update prompting flag. If the message carries the update reminding mark, the GW device may update the ARP entry according to the message, and forward the received message according to the updated ARP entry. The ARP entry may be learned by the GW according to the received message, and specifically, the ARP entry may refer to table (1).
Watch (1)
IP address MAC address Outlet interface Tag
10.1.1.2 1-1-1 VXLAN tunnel 10
Table (1) is an ARP entry corresponding to VM1 in the GW device, where 10.1.1.2 is the IP address of VM1, 1-1-1 is the MAC address of VM1, and the VXLAN tunnel is the communication tunnel between the GW device and the VTEP. When the GW device receives a message with a destination address of the IP address of VM1, it may send the message to the VTEP through the VXLAN tunnel. After receiving the message, the VTEP may send the message to VM1, where 10 indicates the value of Tag added by the GW device for the message addressed to VM 1.
Based on the above processing, when the VTEP detects that the access mode of the AC1 is changed, the GW device may be prompted to update the ARP entry in time, so that the GW device may forward the received message according to the updated ARP entry, thereby avoiding network service interruption.
Referring to fig. 2, fig. 2 is a flowchart of a message processing method provided in an embodiment of the present application, where the method is applied to a VTEP in a VXLAN, where the VXLAN may further include a GW device, and a VXLAN tunnel may be set between the VTEP and the GW device, and the method may include the following steps:
s201: when a modification instruction for the access mode of the first AC is received, the first VM corresponding to the first AC is determined in the recorded correspondence between the AC and the VM.
Wherein, the modification instruction carries the identifier of the target access mode. The first AC may be any AC in the VTEP. The recorded correspondence between the AC and the VM may be determined by the VTEP according to the message sent by the VM in the local site and the AC at which the VTEP receives the message.
For example, when the VTEP receives a message sent by the VM1 through the AC1, the AC1 corresponds to the VM1 in the recorded correspondence between the AC and the VM. Specifically, see table (2).
Watch (2)
VM AC
10.1.1.2 AC1
When the VTEP receives the message sent by the VM1 through the AC1, the VTEP can generate the correspondence between the VM1 and the AC1 as shown in table (2). Where 10.1.1.2 in table (2) is the IP address of VM1, VM1 may be identified by the IP address of VM1 in this correspondence. In addition, VM1 may also be identified by the MAC address of VM 1.
The access mode of the AC may be set by a technician according to a service requirement, for example, the technician may perform the following configuration (may be referred to as configuration one) on the AC 1:
Interface ten1/0/1
service-instance 10
encapsulation s-vid 10
xconnect vsi vpnb
interface ten1/0/1 shows that Interface ten1/0/1 is configured, service-Instance 10 shows that a service Instance 10 is adopted to match messages received by Interface ten1/0/1, encapsulation s-vid 10 shows that a carried message with Tag of 10 is matched, and xconnect VSI vpnb shows that a message is forwarded by using a MAC address table of VSI (virtual switch Instance) named vpnb. Configuring one expression, matching the message carrying Tag 10 received from interface ten1/0/1 according to the message matching rule of service instance 10, and forwarding the message meeting the message matching rule according to the MAC address table of VSI named vpnb. The VSI provides a virtual switching instance of the two-layer switching service for VXLAN on the VTEP, which has all the functions of a conventional ethernet switch, such as source MAC address learning, MAC address aging, flooding, etc.
And configuring an access mode of the unspecified AC1 in the first configuration, namely a default VLAN access mode. When the configuration of the AC1 is configured to be one, the VTEP may delete Tag in the message sent by the VM1, and then perform VXLAN encapsulation on the message and send the message to the GW device.
Alternatively, the technician may configure AC1 as follows (which may be referred to as configuration two):
Interface ten1/0/1
service-instance 10
encapsulation s-vid 10
xconnect vsi vpnb acess-mode Ethernet
interface ten1/0/1 shows configuring Interface ten1/0/1, service-instance 10 shows matching messages received by Interface ten1/0/1 by adopting service instance 10, encapsulation s-vid 10 shows matching carried messages with Tag of 10, and xconnect vsi vpnb access-mode Ethernet shows that the specified access mode is Ethernet access mode.
When the configuration of the AC1 is configuration two, the VTEP performs no processing on the Tag in the message sent by the VM1, and directly performs VXLAN encapsulation on the message and sends the message to the GW device.
In implementation, when the access mode of the first AC is changed, the VTEP may receive a modification instruction for the access mode of the first AC accordingly. The VTEP may determine, from the recorded correspondence of ACs and VMs, a VM to which the first AC corresponds (i.e., the first VM). For example, for table (2), when the VTEP receives a modify instruction for AC1, the VTEP may determine VM1 corresponding to AC1 from table (2) and may obtain the identity of VM1 (i.e., IP address 10.1.1.2).
S202: and generating an update reminding message according to the identifier of the first VM, the identifier of the target access mode and a preset update reminding mark.
The preset update reminding mark can be set by a technician according to experience, and the GW device can identify the update reminding mark and update the ARP entry.
In implementation, after the VTEP determines the first VM corresponding to the first AC, the VTEP may generate an update notification message according to the identifier of the first VM, the identifier of the target access mode, and the update notification flag.
For the identifiers of different target access modes, the VTEP can generate the update reminding message in different modes.
Optionally, the VTEP may generate the update reminding message according to the data message sent by the first VM, and then S202 may include the following two cases:
in case one, if the identifier of the target access mode indicates the Ethernet access mode, when receiving the data packet sent by the first VM, VXLAN encapsulation is performed on the data packet to obtain an update reminding packet.
The first preset field in the VXLAN message header of the update reminding message is an identifier of the first VM, the second preset field is a Tag (target Tag) carried in the modification instruction, and the third preset field is an update reminding mark.
VTEP performs VXLAN encapsulation on the data packet, that is, adds a VXLAN packet header between an outer UDP (User Datagram Protocol) packet header of the data packet and an original two-layer data frame. See table (3).
Watch (3)
Outer IP message header Outer UDP message header VXLAN message header Original two-layer data frame
The structure of the VXLAN header can be seen in table (4).
Watch (4)
Figure BDA0001843733490000111
In table (4), VXLAN ID is a VXLAN identifier for identifying VXLAN; flag field rrrrirrrl: "I" is 1, indicating that the VXLAN ID in the VXLAN header is valid, and "I" is 0, indicating that the VXLAN ID in the VXLAN header is invalid. The other fields, unused for reservation, are set to 0.
The first, second, and third preset fields may belong to reserved unused fields in the VXLAN header.
In the implementation, if the target access mode is the Ethernet access mode, the modification instruction may carry the modified Tag (i.e. the target Tag). When receiving a data message sent by the first VM, the VTEP may set a first preset field in the VXLAN message header as an identifier of the first VM, set a second preset field in the VXLAN message header as a target Tag, and set a third preset field in the VXLAN message header as an update prompt flag, and then, the VTEP may add the VXLAN message header between an outer UDP message header and an original two-layer data frame of the data message to obtain an update prompt message.
And in the second situation, if the identifier of the target access mode represents the VLAN access mode, when the data message sent by the first VM is received, carrying out VXLAN packaging on the data message to obtain an update reminding message.
And a first preset field in a VXLAN message header of the update reminding message is an identifier of the first VM, a second preset field is empty, and a third preset field is an update reminding mark.
The VXLAN headers can be seen in the detailed description of table (4) above. The first, second, and third preset fields may belong to reserved unused fields in the VXLAN header.
In implementation, if the target access mode is a VLAN access mode, when the VTEP receives a data packet sent by the first VM, the VTEP may set a first preset field in a VXLAN packet header to an identifier of the first VM, set a second preset field in the VXLAN packet header to null, and set a third preset field in the VXLAN packet header to an update notification flag, and then the VTEP may add the VXLAN packet header between an outer UDP packet header and an original two-layer data frame of the data packet to obtain an update notification packet.
Optionally, the VTEP may further generate an update reminding message according to the protocol message, and then S202 may further include the following two cases:
and thirdly, if the identifier of the target access mode indicates the Ethernet access mode, carrying out VXLAN packaging on the preset protocol message to obtain an update reminding message.
The first preset field in the VXLAN message header of the update reminding message is the identifier of the first VM, the second preset field is the target Tag carried in the modification instruction, and the third preset field is the update reminding mark. The preset protocol message may be a VXLAN tunneling protocol message.
In the implementation, if the target access mode is the Ethernet access mode, the modification instruction may carry the modified Tag (i.e. the target Tag). The VTEP may set a first preset field in the VXLAN packet header as an identifier of the first VM, set a second preset field in the VXLAN packet header as a target Tag, and set a third preset field in the VXLAN packet header as an update prompting flag, and then, the VTEP may add the VXLAN packet header between an outer UDP packet header and an original two-layer data frame of the protocol packet to obtain an update prompting packet.
And fourthly, if the identifier of the target access mode represents the VLAN access mode, carrying out VXLAN packaging on the preset protocol message to obtain an update reminding message.
And a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is an update reminding mark. The preset protocol message may be a VXLAN tunneling protocol message.
In implementation, if the target access mode is the VLAN access mode, the VTEP may set a first preset field in the VXLAN packet header to the identifier of the first VM, set a second preset field in the VXLAN packet header to null, and set a third preset field in the VXLAN packet header to the update notification flag, and then the VTEP may add the VXLAN packet header to a position between the outer UDP packet header of the protocol packet and the original two-layer data frame to obtain the update notification packet.
S203: and sending an update reminding message to the GW equipment so that the GW equipment updates an ARP table entry according to the update reminding message and forwards the received message according to the updated ARP table entry.
In implementation, the VTEP may send an update notification message to the GW device through the VXLAN tunnel, and accordingly, the GW device may update the ARP entry after receiving the update notification message, and forward the received message according to the updated ARP entry, thereby avoiding service interruption.
Correspondingly, referring to fig. 3, fig. 3 is a flowchart of a message processing method provided in this embodiment, where the method is applied to a GW device in a VXLAN, the VXLAN may further include a VTEP, and a VXLAN tunnel may be set between the VTEP and the GW device, and the method may include the following steps:
s301: and when a message sent by the VTEP is received, judging whether the message carries a preset updating reminding mark.
Wherein, the preset update reminding mark can be set by a technician according to experience. Specifically, the VTEP may write the update alert flag into a field (e.g., the third preset field above) in the VXLAN header of the message.
In implementation, when the GW device receives a packet sent by the VTEP through the VXLAN tunnel, the GW device may determine whether the packet carries an update notification flag, so as to determine whether to update the ARP entry.
S302: if the message carries the update reminding mark, the ARP table entry is updated according to the message, and the received message is forwarded according to the updated ARP table entry.
In implementation, when the GW device determines that the packet sent by the VTEP carries the update prompting flag, the GW device may update the ARP entry according to the packet, and then the GW device may forward the received packet according to the updated ARP entry. The method for forwarding the received message by the GW device according to the updated ARP entry is the same as the prior art, and is not described herein again.
For example, the GW device may analyze a third preset field of a message received from the VTEP, and when the GW device determines that the third preset field of the message is an update prompting flag, the GW device may update an ARP entry according to the message.
In addition, when the GW device determines that the third preset field of the packet is not the update warning flag, the GW device does not need to update the ARP entry.
Optionally, the GW device may update the ARP entry according to information carried by a VXLAN packet header in a packet carrying the update notification flag. Specifically, S302 may include the following steps:
step one, a first preset field of the message is analyzed to obtain an identifier of the first virtual machine VM.
Wherein the first preset field may be set by a technician empirically. Specifically, the first preset field may belong to a reserved unused field in the VXLAN header of the message. The VXLAN headers can refer to the detailed description of table (3).
In implementation, when the GW device determines that the third preset field of the packet is the update prompting flag, the GW device may obtain an identifier of a VM (i.e., the first VM) carried by the first preset field in the packet.
And step two, analyzing a second preset field of the message.
Wherein the second preset field may be set by a technician empirically. Specifically, the second predetermined field may belong to a reserved unused field in the VXLAN header of the message.
In implementation, when the GW device determines that the third preset field of the packet is the update prompting flag, the GW device may analyze the second preset field of the packet and determine whether the second preset field is empty.
And step three, if the second preset field is empty, setting the Tag corresponding to the first VM in the ARP table entry to be empty.
In implementation, when the GW device determines that the second preset field of the packet is empty, the GW device may set a Tag corresponding to the first VM in the ARP entry to be empty.
For example, if the ARP entry corresponding to the first VM before update is table (1), the message received by the GW device carries the identifier of the first VM and the update notification flag, and the second preset field of the message is empty, the ARP entry corresponding to the first VM after update may refer to table (5).
Watch (5)
IP address MAC address Outlet interface Tag
10.1.1.2 1-1-1 VXLAN tunnel -
Wherein, 10.1.1.2 represents the IP address of the first VM, 1-1-1 represents the MAC address of the first VM, and the VXLAN tunnel is a communication tunnel between the GW device and the VTEP, indicating that the GW device does not add Tag when VXLAN encapsulates the message.
And step four, if the second preset field is not empty, acquiring a target Tag carried by the second preset field, and setting the Tag corresponding to the first VM in the ARP table entry as the target Tag.
In implementation, when the GW device determines that the second preset field of the packet is not empty, the GW device may obtain a Tag (i.e., a target Tag) carried by the second preset field. The GW device may set a Tag corresponding to the first VM in the ARP entry as a target Tag.
For example, if the ARP entry corresponding to the first VM before update is the table (5), the message received by the GW device carries the identifier and the update notification flag of the first VM, and the second preset field of the message is 20, the ARP entry corresponding to the first VM after update may refer to the table (6).
Watch (6)
IP address MAC address Outlet interface Tag
10.1.1.2 1-1-1 VXLAN tunnel 20
Wherein, 10.1.1.2 represents the IP address of the first VM, 1-1-1 represents the MAC address of the first VM, the VXLAN tunnel is a communication tunnel between the GW device and the VTEP, and 20 represents the value of Tag added by the GW device when VXLAN encapsulation is performed on the message.
Referring to fig. 4, fig. 4 is a flowchart of an example of a message processing method provided in an embodiment of the present application, where the embodiment takes the application of the method to the VTEP and GW device in fig. 1 as an example to explain, the method may include the following steps:
s401: when a modification instruction aiming at the access mode of the AC1 is received, the VTEP determines the VM1 corresponding to the AC1 in the recorded corresponding relation between the AC and the VM, and carries out VXLAN encapsulation on the data message sent by the VM1 to obtain a target message.
The modification instruction carries an identifier of a target access mode, the identifier of the target access mode represents an Ethernet access mode, and the modification instruction also carries a target Tag. The first preset field in the VXLAN message header of the target message is the identifier of VM1, the second preset field is the target Tag, and the third preset field is the preset update reminding mark.
S402: the VTEP sends a target message to the GW equipment.
S403: the GW equipment judges that the target message carries a preset updating reminding mark, analyzes a first preset field of the target message to obtain an identifier of the VM1, obtains a target Tag carried by a second preset field, modifies the Tag corresponding to the VM1 in the ARP table entry into the target Tag, and forwards the message sent to the VM1 according to the updated ARP table entry.
Referring to fig. 5, fig. 5 is a flowchart of an example of a message processing method provided in an embodiment of the present application, where the embodiment takes the application of the method to the VTEP and GW device in fig. 1 as an example to explain, the method may include the following steps:
s501: when a modification instruction aiming at the access mode of the AC1 is received, the VTEP determines the VM1 corresponding to the AC1 in the recorded corresponding relation between the AC and the VM, and carries out VXLAN encapsulation on the data message sent by the VM1 to obtain a target message.
The modification instruction carries an identifier of a target access mode, and the identifier of the target access mode represents a VLAN access mode. A first preset field in a VXLAN message header of the target message is an identifier of VM1, a second preset field is empty, and a third preset field is a preset update reminding mark.
S502: the VTEP sends a target message to the GW equipment.
S503: the GW equipment judges that the target message carries a preset updating reminding mark, analyzes a first preset field of the target message to obtain an identifier of the VM1, judges that a second preset field of the target message is empty, modifies a Tag corresponding to the VM1 in an ARP table entry into empty, and forwards the message sent to the VM1 according to the updated ARP table entry.
Referring to fig. 6, fig. 6 is a flowchart of an example of a message processing method provided in an embodiment of the present application, where the embodiment takes the application of the method to the VTEP and GW device in fig. 1 as an example to explain, the method may include the following steps:
s601: when a modification instruction aiming at the access mode of the AC1 is received, the VTEP determines the VM1 corresponding to the AC1 in the recorded corresponding relation between the AC and the VM, and carries out VXLAN encapsulation on a preset protocol message to obtain a target message.
The modification instruction carries an identifier of a target access mode, the identifier of the target access mode represents an Ethernet access mode, and the modification instruction also carries a target Tag. The first preset field in the VXLAN message header of the target message is the identifier of VM1, the second preset field is the target Tag, and the third preset field is the preset update reminding mark.
S602: the VTEP sends a target message to the GW equipment.
S603: the GW equipment judges that the target message carries a preset updating reminding mark, analyzes a first preset field of the target message to obtain an identifier of the VM1, obtains a target Tag carried by a second preset field, modifies the Tag corresponding to the VM1 in the ARP table entry into the target Tag, and forwards the message sent to the VM1 according to the updated ARP table entry.
Referring to fig. 7, fig. 7 is a flowchart of an example of a message processing method provided in an embodiment of the present application, where the embodiment takes the application of the method to the VTEP and GW device in fig. 1 as an example to explain, the method may include the following steps:
s701: when a modification instruction aiming at the access mode of the AC1 is received, the VTEP determines the VM1 corresponding to the AC1 in the recorded corresponding relation between the AC and the VM, and carries out VXLAN encapsulation on a preset protocol message to obtain a target message.
The modification instruction carries an identifier of a target access mode, and the identifier of the target access mode represents a VLAN access mode. A first preset field in a VXLAN message header of the target message is an identifier of VM1, a second preset field is empty, and a third preset field is a preset update reminding mark.
S702: the VTEP sends a target message to the GW equipment.
S703: the GW equipment judges that the target message carries a preset updating reminding mark, analyzes a first preset field of the target message to obtain an identifier of the VM1, judges that a second preset field of the target message is empty, modifies a Tag corresponding to the VM1 in an ARP table entry into empty, and forwards the message sent to the VM1 according to the updated ARP table entry.
As can be seen from the above examples, based on the message processing method in the embodiment of the present application, when a modification instruction for the access mode of the AC1 is received, the VTEP may determine the VM1 corresponding to the AC1 in the recorded correspondence between the AC and the VM, generate a target message according to the identifier of the VM1, the identifier of the target access mode, and the preset update prompting flag, and send the target message to the GW device. The GW device determines that the target message carries a preset update prompting flag, and the GW device may update an ARP entry according to the target message and forward the received message according to the updated ARP entry. Based on the above processing, when the VTEP detects that the access mode of the AC1 is changed, the GW device may be prompted to update the ARP entry in time, so that the GW device may forward the packet according to the updated ARP entry, thereby avoiding network service interruption.
Corresponding to the embodiment of the method in fig. 2, referring to fig. 8, fig. 8 is a structural diagram of a message processing apparatus provided in the embodiment of the present application, where the apparatus is applied to a VTEP in a VXLAN, and the VXLAN further includes a GW device, and the apparatus includes:
a determining module 801, configured to determine, when a modification instruction for an access manner of a first access circuit AC is received, a first VM corresponding to the first AC in a recorded correspondence between the AC and a virtual machine VM, where the modification instruction carries an identifier of a target access manner;
a generating module 802, configured to generate an update notification message according to the identifier of the first VM, the identifier of the target access manner, and a preset update notification flag;
a sending module 803, configured to send the update notification packet to the GW device, so that the GW device updates an Address Resolution Protocol (ARP) entry according to the update notification packet, and forwards a received packet according to the updated ARP entry.
Optionally, the generating module 802 is specifically configured to, if the identifier of the target access mode indicates an Ethernet access mode, perform VXLAN encapsulation on the data packet when receiving the data packet sent by the first VM, to obtain an update reminding packet, where a first preset field in a VXLAN packet header of the update reminding packet is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a Virtual Local Area Network (VLAN) access mode, when a data message sent by the first VM is received, carrying out VXLAN packaging on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
Optionally, the generating module 802 is specifically configured to perform VXLAN encapsulation on a preset protocol packet to obtain an update reminding packet if the identifier of the target access mode indicates an Ethernet access mode, where a first preset field in a VXLAN packet header of the update reminding packet is an identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a VLAN access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
Corresponding to the embodiment of the method in fig. 3, referring to fig. 9, fig. 9 is a structural diagram of a message processing apparatus provided in the embodiment of the present application, where the apparatus is applied to a GW device in a VXLAN, and the VXLAN further includes a VTEP, and the apparatus includes:
a determining module 901, configured to determine whether a preset update prompting flag is carried in a message sent by the VTEP when the message is received;
an updating module 902, configured to update an Address Resolution Protocol (ARP) entry according to the packet if the packet carries the update reminding flag, and forward the received packet according to the updated ARP entry.
Optionally, the updating module 902 is specifically configured to analyze a first preset field of the packet to obtain an identifier of the first virtual machine VM;
analyzing a second preset field of the message;
if the second preset field is empty, setting a Tag corresponding to the first VM in an ARP table entry to be empty;
and if the second preset field is not empty, acquiring a target Tag carried by the second preset field, and setting the Tag corresponding to the first VM in the ARP table entry as the target Tag.
As can be seen from the above, according to the message processing apparatus in the embodiment of the present application, when a modification instruction for an access mode of a first AC is received, a first VM corresponding to the first AC is determined in a recorded correspondence between the AC and the VM, and an update notification message is generated according to an identifier of the first VM, an identifier of a target access mode, and a preset update notification flag, and is sent to a GW device. The GW device may update the ARP entry according to the update notification message, and forward the received message according to the updated ARP entry. Based on the above processing, when the VTEP detects that the access mode of the AC is changed, the GW device can be timely reminded to update the ARP entry, so that the GW device can forward the packet according to the updated ARP entry, thereby avoiding the network service interruption.
The embodiment of the present application further provides an electronic device, as shown in fig. 10, which includes a processor 1001, a communication interface 1002, a memory 1003 and a communication bus 1004, wherein the processor 1001, the communication interface 1002 and the memory 1003 complete mutual communication through the communication bus 1004,
a memory 1003 for storing a computer program;
the processor 1001 is configured to, when executing the program stored in the memory 1003, cause the electronic device to execute the steps including:
when a modification instruction aiming at an access mode of a first access circuit AC is received, determining a first VM corresponding to the first AC in a recorded corresponding relation between the AC and a virtual machine VM, wherein the modification instruction carries an identifier of a target access mode;
generating an update reminding message according to the identifier of the first VM, the identifier of the target access mode and a preset update reminding mark;
and sending the update reminding message to the GW equipment so that the GW equipment updates an Address Resolution Protocol (ARP) table entry according to the update reminding message and forwards the received message according to the updated ARP table entry.
Optionally, the generating an update notification message according to the identifier of the first VM, the identifier of the target access mode, and a preset update notification flag includes:
if the identifier of the target access mode represents an Ethernet access mode, when a data message sent by the first VM is received, performing VXLAN encapsulation on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a Virtual Local Area Network (VLAN) access mode, when a data message sent by the first VM is received, carrying out VXLAN packaging on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
Optionally, the generating an update notification message according to the identifier of the first VM, the identifier of the target access mode, and a preset update notification flag includes:
if the identifier of the target access mode represents an Ethernet access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a VLAN access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
The embodiment of the present application further provides an electronic device, as shown in fig. 11, including a processor 1101, a communication interface 1102, a memory 1103 and a communication bus 1104, where the processor 1101, the communication interface 1102 and the memory 1103 complete mutual communication through the communication bus 1104,
a memory 1103 for storing a computer program;
the processor 1101 is configured to, when executing the program stored in the memory 1103, cause the electronic device to perform the following steps, including:
when a message sent by the VTEP is received, judging whether the message carries a preset update reminding mark;
if the message carries the update reminding mark, updating an Address Resolution Protocol (ARP) table entry according to the message, and forwarding the received message according to the updated ARP table entry.
Optionally, the updating the ARP entry according to the packet includes:
analyzing a first preset field of the message to obtain an identifier of a first Virtual Machine (VM);
analyzing a second preset field of the message;
if the second preset field is empty, setting a Tag corresponding to the first VM in an ARP table entry to be empty;
and if the second preset field is not empty, acquiring a target Tag carried by the second preset field, and setting the Tag corresponding to the first VM in the ARP table entry as the target Tag.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above-mentioned message processing methods applied to VTEP.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the message processing methods applied to the GW device.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the above-mentioned message processing methods applied to VTEP.
In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute any of the message processing methods applied to the GW device in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. A message processing method is applied to an extensible virtual local area network tunnel endpoint (VTEP) in an extensible virtual local area network (VXLAN), wherein the VXLAN further comprises a Gateway (GW) device, and the method comprises the following steps:
when a modification instruction aiming at an access mode of a first access circuit AC is received, determining a first VM corresponding to the first AC in a recorded corresponding relation between the AC and a virtual machine VM, wherein the modification instruction carries an identifier of a target access mode;
generating an update reminding message according to the identifier of the first VM, the identifier of the target access mode and a preset update reminding mark;
and sending the update reminding message to the GW equipment so that the GW equipment updates an Address Resolution Protocol (ARP) table entry according to the update reminding message and forwards the received message according to the updated ARP table entry.
2. The method according to claim 1, wherein generating an update notification message according to the identifier of the first VM, the identifier of the target access mode, and a preset update notification flag includes:
if the identifier of the target access mode represents an Ethernet access mode, when a data message sent by the first VM is received, performing VXLAN encapsulation on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a Virtual Local Area Network (VLAN) access mode, when a data message sent by the first VM is received, carrying out VXLAN packaging on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
3. The method according to claim 1, wherein generating an update notification message according to the identifier of the first VM, the identifier of the target access mode, and a preset update notification flag includes:
if the identifier of the target access mode represents an Ethernet access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding mark;
and if the identifier of the target access mode represents a VLAN access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
4. A message processing method is applied to a Gateway (GW) device in a scalable virtual local area network (VXLAN), wherein the VXLAN further comprises a scalable virtual local area network (VLANTunnel) endpoint (VTEP), and the method comprises the following steps:
when a message sent by the VTEP is received, judging whether the message carries a preset update reminding mark;
if the message carries the update reminding mark, updating an Address Resolution Protocol (ARP) table entry according to the message, and forwarding the received message according to the updated ARP table entry;
the message carrying the update reminding mark is that when the VTEP receives a modification instruction carrying an identifier of a target access mode for an access mode of a first access circuit AC, the VTEP determines a first VM corresponding to the first AC in a recorded correspondence between the AC and a virtual machine VM, and generates the first VM according to the identifier of the first VM, the identifier of the target access mode, and a preset update reminding mark.
5. The method of claim 4, wherein said updating ARP entries based on said packet comprises:
analyzing a first preset field of the message to obtain an identifier of a first Virtual Machine (VM);
analyzing a second preset field of the message;
if the second preset field is empty, setting a Tag corresponding to the first VM in an ARP table entry to be empty;
and if the second preset field is not empty, acquiring a target Tag carried by the second preset field, and setting the Tag corresponding to the first VM in the ARP table entry as the target Tag.
6. A message processing apparatus, wherein the apparatus is applied to an extensible virtual local area network tunnel endpoint VTEP in an extensible virtual local area network VXLAN, the VXLAN further comprising a gateway GW device, the apparatus comprising:
a determining module, configured to determine, when a modification instruction for an access mode of a first access circuit AC is received, a first VM corresponding to the first AC in a recorded correspondence between the AC and a virtual machine VM, where the modification instruction carries an identifier of a target access mode;
the generating module is used for generating an update reminding message according to the identifier of the first VM, the identifier of the target access mode and a preset update reminding mark;
and the sending module is used for sending the update reminding message to the GW equipment so that the GW equipment updates an Address Resolution Protocol (ARP) table entry according to the update reminding message and forwards the received message according to the updated ARP table entry.
7. The apparatus according to claim 6, wherein the generating module is specifically configured to, if the identifier of the target access mode indicates an Ethernet access mode, perform VXLAN encapsulation on the data packet when receiving the data packet sent by the first VM, to obtain an update notification packet, where a first preset field in a VXLAN packet header of the update notification packet is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update notification flag;
and if the identifier of the target access mode represents a Virtual Local Area Network (VLAN) access mode, when a data message sent by the first VM is received, carrying out VXLAN packaging on the data message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
8. The apparatus according to claim 6, wherein the generating module is specifically configured to perform VXLAN encapsulation on a preset protocol packet to obtain an update reminding packet if the identifier of the target access mode indicates an Ethernet access mode, where a first preset field in a VXLAN packet header of the update reminding packet is the identifier of the first VM, a second preset field is a target Tag carried in the modification instruction, and a third preset field is the update reminding flag;
and if the identifier of the target access mode represents a VLAN access mode, carrying out VXLAN packaging on a preset protocol message to obtain an update reminding message, wherein a first preset field in a VXLAN message header of the update reminding message is the identifier of the first VM, a second preset field is empty, and a third preset field is the update reminding mark.
9. A message processing apparatus, wherein the apparatus is applied to a gateway GW device in a scalable virtual local area network VXLAN, the VXLAN further including a scalable virtual local area network tunnel endpoint VTEP, the apparatus comprising:
the judging module is used for judging whether the message carries a preset updating reminding mark or not when the message sent by the VTEP is received;
the updating module is used for updating an Address Resolution Protocol (ARP) table entry according to the message and forwarding the received message according to the updated ARP table entry if the message carries the updating reminding mark;
the message carrying the update reminding mark is that when the VTEP receives a modification instruction carrying an identifier of a target access mode for an access mode of a first access circuit AC, the VTEP determines a first VM corresponding to the first AC in a recorded correspondence between the AC and a virtual machine VM, and generates the first VM according to the identifier of the first VM, the identifier of the target access mode, and a preset update reminding mark.
10. The apparatus according to claim 9, wherein the update module is specifically configured to parse a first preset field of the packet to obtain an identifier of the first virtual machine VM;
analyzing a second preset field of the message;
if the second preset field is empty, setting a Tag corresponding to the first VM in an ARP table entry to be empty;
and if the second preset field is not empty, acquiring a target Tag carried by the second preset field, and setting the Tag corresponding to the first VM in the ARP table entry as the target Tag.
11. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 1-3.
12. An electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
the memory is used for storing a computer program;
the processor, when executing the program stored in the memory, implementing the method steps of any of claims 4-5.
13. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: carrying out the method steps of any one of claims 1 to 3.
14. A machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, cause the processor to: -carrying out the method steps of any one of claims 4 to 5.
CN201811260264.5A 2018-10-26 2018-10-26 Message processing method and device Active CN109450767B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201811260264.5A CN109450767B (en) 2018-10-26 2018-10-26 Message processing method and device
PCT/CN2019/113293 WO2020083380A1 (en) 2018-10-26 2019-10-25 Message processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811260264.5A CN109450767B (en) 2018-10-26 2018-10-26 Message processing method and device

Publications (2)

Publication Number Publication Date
CN109450767A CN109450767A (en) 2019-03-08
CN109450767B true CN109450767B (en) 2020-06-12

Family

ID=65548726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811260264.5A Active CN109450767B (en) 2018-10-26 2018-10-26 Message processing method and device

Country Status (2)

Country Link
CN (1) CN109450767B (en)
WO (1) WO2020083380A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450767B (en) * 2018-10-26 2020-06-12 新华三技术有限公司 Message processing method and device
CN111935013B (en) * 2020-09-17 2021-01-08 南京中兴软件有限责任公司 Flow forwarding control method and device, flow forwarding method and chip, and switch

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612808A (en) * 2017-09-13 2018-01-19 新华三技术有限公司 Tunnel establishing method and device
CN107819677A (en) * 2017-10-26 2018-03-20 新华三技术有限公司 A kind of message forwarding method and device
CN108322338A (en) * 2018-01-23 2018-07-24 新华三技术有限公司 A kind of broadcast suppressing method and VTEP equipment

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9391906B2 (en) * 2013-04-19 2016-07-12 International Business Machines Corporation Overlay network priority inheritance
US9130775B2 (en) * 2013-07-10 2015-09-08 Cisco Technology, Inc. Support for virtual extensible local area network segments across multiple data center sites
CN112486626A (en) * 2016-08-30 2021-03-12 华为技术有限公司 Method and device for determining virtual machine migration
CN108075956B (en) * 2016-11-16 2020-05-22 新华三技术有限公司 Data processing method and device
CN107547349B (en) * 2017-07-31 2021-02-05 新华三技术有限公司 Virtual machine migration method and device
CN108337158B (en) * 2018-01-23 2020-12-04 新华三技术有限公司 Unicast message forwarding method and device
CN108199968B (en) * 2018-03-30 2020-12-25 新华三技术有限公司 Route processing method and device
CN109450767B (en) * 2018-10-26 2020-06-12 新华三技术有限公司 Message processing method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107612808A (en) * 2017-09-13 2018-01-19 新华三技术有限公司 Tunnel establishing method and device
CN107819677A (en) * 2017-10-26 2018-03-20 新华三技术有限公司 A kind of message forwarding method and device
CN108322338A (en) * 2018-01-23 2018-07-24 新华三技术有限公司 A kind of broadcast suppressing method and VTEP equipment

Also Published As

Publication number Publication date
CN109450767A (en) 2019-03-08
WO2020083380A1 (en) 2020-04-30

Similar Documents

Publication Publication Date Title
CN112486627B (en) Virtual machine migration method and device
US10237177B2 (en) Transfer device and transfer system
TWI744359B (en) Method for data transmission and network equipment
WO2016095822A1 (en) Flow transmission
US8755377B2 (en) Facilitating operation of one or more virtual networks
US20150358232A1 (en) Packet Forwarding Method and VXLAN Gateway
US10263808B2 (en) Deployment of virtual extensible local area network
EP3210347B1 (en) Pre-built match-action tables
US9847940B2 (en) Control method, packet processing device, and storage medium
EP3972207B1 (en) Message processing method, device, and computer storage medium
CN109067784B (en) Method and equipment for preventing cheating in VXLAN
CN107682275B (en) Message monitoring method and device
US10122548B2 (en) Services execution
US11805049B2 (en) Communication method and communications device
CN109450767B (en) Message processing method and device
CN108039968B (en) Network optimization method, device and computer readable storage medium
US10574573B2 (en) Connecting a PVLAN switch to a non-PVLAN device
US20190215191A1 (en) Deployment Of Virtual Extensible Local Area Network
CN115174474B (en) SRv 6-based SFC implementation method and device in private cloud
CN109246016B (en) Cross-VXLAN message processing method and device
CN108282404B (en) Route generation method, device and system
WO2023273957A1 (en) Computing power release method and apparatus, and computing power update method and apparatus
US20190089674A1 (en) Communication system, flow control apparatus, flow processing apparatus, and control method
CN116132555A (en) Message processing method and system
CN113765794B (en) Data transmission method and device, electronic equipment and medium

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