CN113938354A - Routing information updating method and device, electronic equipment and computer readable medium - Google Patents

Routing information updating method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN113938354A
CN113938354A CN202111186316.0A CN202111186316A CN113938354A CN 113938354 A CN113938354 A CN 113938354A CN 202111186316 A CN202111186316 A CN 202111186316A CN 113938354 A CN113938354 A CN 113938354A
Authority
CN
China
Prior art keywords
virtual machine
routing information
target virtual
mac address
tunnel endpoint
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.)
Pending
Application number
CN202111186316.0A
Other languages
Chinese (zh)
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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202111186316.0A priority Critical patent/CN113938354A/en
Publication of CN113938354A publication Critical patent/CN113938354A/en
Pending legal-status Critical Current

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/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • 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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The invention discloses a method and a device for updating routing information, electronic equipment and a computer readable medium, and relates to the technical field of communication. The method comprises the following steps: responding to a received virtual machine migration message sent by a destination tunnel endpoint, and sending an MAC address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine; under the condition that MAC address verification response information returned by the target virtual machine is not received within a preset time period, updating current routing information corresponding to the target virtual machine; and under the condition of receiving MAC address verification response information returned by the target virtual machine within a preset time period, sending current routing information corresponding to the target virtual machine to all tunnel endpoints except the tunnel endpoint, so that all tunnel endpoints update the routing information corresponding to the target virtual machine which is pre-stored respectively based on the current routing information. The invention can ensure that the routing information of the virtual machine stored by each tunnel endpoint accords with the actual migration condition of the virtual machine.

Description

Routing information updating method and device, electronic equipment and computer readable medium
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for updating routing information, an electronic device, and a computer-readable medium.
Background
In the existing virtual machine migration technology, a server to which a virtual machine is newly migrated needs to be known through a number value, which is an attribute value of a migration extended community. For example, after a VM (Virtual Machine) migrates from VTEP (VXLAN Tunnel End Point) 1 to VTEP3, VTEP3 synchronizes EVPN routing information corresponding to the VM carrying the migration extended community attribute values to VTEP1 and VTEP 2. Each time VM migrates 1 time, VTEP maintains number plus 1. After receiving the EVPN routing information, VTEP1 and VTEP2 compare the number value in the EVPN routing information with the number value maintained by themselves, and perform forwarding table item switching operation of VM migration when the number value in the EVPN routing information is greater than the maintained number value.
However, when the VM repeatedly migrates between a plurality of VTEPs and network congestion occurs between the VTEPs, the number value of the migration may not be well synchronized with the recording. Therefore, after the VM migrates, the number value issued by the target VTEP where the VM currently locates is smaller than the number values currently recorded by the source VTEP and the synchronous VTEP (other VTEPs for short), the VTEP cannot perform the forwarding table item switching action of the VM migrates, and the information of the VM stored by the VTEP does not accord with the actual information of the VM, thereby causing the migration failure of the virtual machine.
Disclosure of Invention
Therefore, the invention provides a method, a device, electronic equipment and a computer readable medium for updating routing information, so as to ensure that the routing information of the virtual machine stored by each tunnel endpoint conforms to the actual migration condition of the virtual machine, thereby ensuring the successful migration of the virtual machine.
In order to achieve the above object, a first aspect of the present invention provides a method for updating routing information, including:
responding to a received virtual machine migration message sent by a destination tunnel endpoint, and sending an MAC address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine;
under the condition that MAC address verification response information returned by the target virtual machine is not received within a preset time period, updating current routing information corresponding to the target virtual machine based on the virtual machine migration message;
and under the condition of receiving MAC address verification response information returned by the target virtual machine within a preset time period, sending current routing information corresponding to the target virtual machine to all tunnel endpoints except the tunnel endpoint, so that all tunnel endpoints update the respective pre-stored routing information corresponding to the target virtual machine based on the current routing information.
Optionally, the step of sending, in response to receiving a virtual machine migration packet sent by a destination tunnel endpoint, an MAC address verification request to an ingress interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine includes:
determining current routing information corresponding to the target virtual machine based on pre-stored local routing information and a target MAC address of the target virtual machine included in the virtual machine migration message;
and sending a MAC address verification request to an input interface corresponding to the target virtual machine based on the current routing information.
Optionally, the step of determining, based on pre-stored local routing information and the virtual machine migration packet including a target MAC address of a target virtual machine, current routing information corresponding to the target virtual machine further includes:
and based on the target MAC address, inquiring and obtaining current routing information corresponding to the target virtual machine from pre-stored local routing information, wherein the current routing information comprises the MAC address of an input interface and the type of an output interface corresponding to the target virtual machine.
Optionally, the step of sending a MAC address verification request to an ingress interface corresponding to the target virtual machine based on the current routing information includes:
and sending an MAC address verification request to an input interface corresponding to the target virtual machine under the condition that the type of the output interface is an AC interface, wherein the MAC address verification request comprises a source address which is the MAC address of the input interface and a destination address which is the target MAC address.
Optionally, the current routing information further includes: and the next hop MAC address corresponding to the target virtual machine is the MAC address of the original tunnel endpoint.
Optionally, the virtual machine migration packet includes an MAC address of the destination tunnel endpoint; the step of updating the current routing information corresponding to the target virtual machine based on the virtual machine migration packet includes:
and updating the next hop MAC address from the MAC address of the original tunnel endpoint to the MAC address of the target tunnel endpoint.
Optionally, each tunnel endpoint except the original tunnel endpoint is configured to update, in response to the current routing information corresponding to the target virtual machine, a next-hop MAC address corresponding to the target virtual machine in the pre-stored routing information corresponding to the target virtual machine to the MAC address of the original tunnel endpoint.
A second aspect of the present invention provides a routing information updating apparatus, including:
the first processing module is used for responding to a received virtual machine migration message sent by a destination tunnel endpoint and sending an MAC address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine;
the updating module is used for updating the current routing information corresponding to the target virtual machine based on the virtual machine migration message under the condition that the MAC address verification response information returned by the target virtual machine is not received within a preset time period;
and the second processing module is used for sending current routing information corresponding to the target virtual machine to all tunnel endpoints except the tunnel endpoint under the condition of receiving MAC address verification response information returned by the target virtual machine within a preset time period, so that all tunnel endpoints update the pre-stored routing information corresponding to the target virtual machine based on the current routing information.
A third aspect of the present invention provides an electronic device comprising:
one or more processors;
a storage device having one or more programs stored thereon, which when executed by the one or more processors, cause the one or more processors to implement the method of any one of the aspects provided herein;
one or more I/O interfaces connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
A fourth aspect of the invention provides a computer readable medium having stored thereon a computer program which, when executed by a processor, carries out the method according to any one of the items provided in the first aspect of the invention.
The invention has the following advantages:
the invention provides a routing information updating method, a routing information updating device, electronic equipment and a computer readable medium. The method comprises the following steps: responding to a received virtual machine migration message sent by a destination tunnel endpoint, and sending an MAC address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine; under the condition that MAC address verification response information returned by the target virtual machine is not received within a preset time period, updating current routing information corresponding to the target virtual machine based on the virtual machine migration message; under the condition that MAC address verification response information returned by the target virtual machine is received within a preset time period, current routing information corresponding to the target virtual machine is sent to all tunnel endpoints except the tunnel endpoints, so that all tunnel endpoints can update the pre-stored routing information corresponding to the target virtual machine based on the current routing information, the routing information of the virtual machine stored by each tunnel endpoint can be guaranteed to be consistent with the actual migration condition of the virtual machine, and the successful migration of the virtual machine is further guaranteed.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention and not to limit the invention.
Fig. 1 is a flowchart of a method for updating routing information according to an embodiment of the present invention;
fig. 2 is a flowchart of a specific implementation manner of step S101 according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a route updating apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following detailed description of embodiments of the invention refers to the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present invention, are given by way of illustration and explanation only, not limitation.
VXLAN (Virtual extensible LAN, extensible Virtual local area Network) is a two-layer VPN (Virtual Private Network) technology based on an IP Network and adopting a "MAC (Media Access Control Address, also called physical Address) in UDP (User Datagram Protocol)" encapsulation form. VXLAN can provide two-layer interconnection for dispersed physical sites based on existing service provider or enterprise IP networks and can provide service isolation for different tenants. VXLAN is used primarily in data center networks. VXLAN has the following characteristics:
(1) support a large number of tenants: by using the 24-bit identifier, at most 24 power (16777216) VXLANs of 2 can be supported, so that the number of supported tenants is increased on a large scale, and the problem of insufficient resources of the traditional two-layer network VLAN is solved.
(2) Easy maintenance: a large two-layer network is established based on an IP network, so that the network deployment and maintenance are easier, and the existing IP network technology can be fully utilized, such as load sharing by utilizing an equivalent route; only the edge device of the IP core network needs to carry out VXLAN processing, and the network intermediate device only needs to forward the message according to the IP header, thereby reducing the difficulty and the cost of network deployment.
The VXLAN technology takes the existing three-layer physical network as an Underlay network, and a virtual two-layer network, namely an Overlay network, is constructed on the three-layer physical network. The Overlay network realizes the transfer of the second-layer message of the tenant between different sites across a three-layer network by using a three-layer forwarding path provided by the Underlay network through a packaging technology. The Underlay network is transparent to the tenants, and different sites of the same tenant behave as if they are operating in one local area network. A typical network model for VXLAN includes the following sections:
1. VM (Virtual Machine): multiple virtual machines can be created on one server, and different virtual machines can belong to different VXLANs. Virtual machines belonging to the same VXLAN are in the same logic two-layer network and are communicated with each other in two layers; two levels of isolation between virtual machines belonging to different VXLANs. VXLAN is identified by VXLAN ID, also known as VNI (VXLAN Network Identifier), which is 24 bits long.
2. VTEP (VXLAN Tunnel End Point ): edge device of VXLAN. The VXLAN processing is performed on the VTEP, for example, to identify the VXLAN to which the ethernet data frame belongs, to perform two-layer forwarding on the data frame based on the VXLAN, and to encapsulate/decapsulate the packet. The VTEP may be an independent physical device or a server where the virtual machine is located.
3. VXLAN tunnel: a point-to-point logical tunnel between two VTEPs. After encapsulating a VXLAN header, a UDP header and an IP header for a data frame, the VTEP forwards the encapsulated message to a far-end VTEP through a VXLAN tunnel, and the far-end VTEP decapsulates the encapsulated message.
4. Core equipment: devices in an IP core network. The core device does not participate in VXLAN processing, and only needs to forward the message in three layers according to the destination IP address of the encapsulated message.
5. VSI (Virtual Switch Instance): a virtual switching instance on the VTEP provides a two-layer switching service for VXLAN. The VSI can be viewed as a VXLAN-based virtual switch on a VTEP that performs layer two forwarding, with all the functions of a traditional ethernet switch, including source MAC address learning, MAC address aging, flooding, etc. VSIs correspond one-to-one to VXLANs.
6. AC (Attachment Circuit, access Circuit): the VTEP connects physical or virtual circuits of the local site. On a VTEP, the three-tier interface or Ethernet service instance (service instance) associated with a VSI is referred to as the AC. Wherein an ethernet service instance is created on a layer two ethernet interface that defines a series of matching rules for matching data frames received from the layer two ethernet interface. The service instance AC is configured under 1 two-layer physical port.
In addition, EVPN (Ethernet Virtual Private Network) is a two-layer VPN technology, where the control plane uses MP-BGP (multimedia Extension-Border Gateway Protocol) to announce EVPN routing information, and the data plane uses VXLAN encapsulation to forward packets. EVPN has advantages over VXLAN:
A. the configuration is simplified: the automatic discovery of VTEP, the automatic establishment of VXLAN tunnel and the automatic association of VXLAN tunnel and VXLAN are realized through MP-BGP, the manual configuration of a user is not needed, and the difficulty of network deployment is reduced.
B. Separating the control plane from the data plane: the control plane is responsible for issuing routing information, and the data plane is responsible for forwarding messages, so that the division of labor is clear, and the management is easy.
In the existing virtual machine migration technology, a server to which a virtual machine is newly migrated needs to be known through a number value, which is an attribute value of a migration extended community. For example, after a VM (Virtual Machine) migrates from VTEP (VXLAN Tunnel End Point) 1 to VTEP3, VTEP3 synchronizes EVPN routing information corresponding to the VM carrying the migration extended community attribute values to VTEP1 and VTEP 2. Each time VM migrates 1 time, VTEP maintains number plus 1. After receiving the EVPN routing information, VTEP1 and VTEP2 compare the number value in the EVPN routing information with the number value maintained by themselves, and perform forwarding table item switching operation of VM migration when the number value in the EVPN routing information is greater than the maintained number value.
However, when the VM repeatedly migrates between a plurality of VTEPs and network congestion occurs between the VTEPs, the number value of the migration may not be well synchronized with the recording. Therefore, after the VM migrates, the number value issued by the target VTEP where the VM currently locates is smaller than the number values currently recorded by the source VTEP and the synchronous VTEP (other VTEPs for short), the VTEP cannot perform the forwarding table item switching action of the VM migrates, and the information of the VM stored by the VTEP does not accord with the actual information of the VM, thereby causing the migration failure of the virtual machine.
In order to solve the above problem, an embodiment of the present invention provides a method for updating routing information, which is applied to an original tunnel endpoint. The original tunnel endpoint is a tunnel endpoint to which the target virtual machine belongs before the migration occurs, that is, the target virtual machine is connected to the original tunnel endpoint before the migration occurs.
Fig. 1 is a flowchart of a method for updating routing information according to an embodiment of the present invention.
As shown in fig. 1, the method includes steps S101 to S103:
step S101, responding to the received virtual machine migration message sent by the destination tunnel endpoint, and sending an MAC address verification request to an access interface corresponding to the destination virtual machine based on the current routing information corresponding to the destination virtual machine.
The destination tunnel endpoint is a tunnel endpoint which detects that the target virtual machine is migrated to the destination tunnel endpoint. The virtual machine migration message is a message which is sent to the original tunnel endpoint by the target tunnel endpoint after the target virtual machine is detected to migrate to the target tunnel endpoint, and is used for identifying the migration of the target virtual machine, wherein the virtual machine migration message comprises a target MAC address of the target virtual machine.
In one embodiment, an original tunnel endpoint receives a virtual machine migration message sent by a destination tunnel endpoint. Because the target virtual machine may have a situation of repeated migration, the original tunnel endpoint cannot determine whether the target virtual machine has actually migrated from the original tunnel endpoint to the destination tunnel endpoint currently based on the virtual machine migration packet. Under the condition that the target virtual machine actually realizes the migration, the target virtual machine is currently connected to a target tunnel endpoint; in the case that the target virtual machine does not actually implement the migration, the target virtual machine is still currently connected to the original tunnel endpoint. Therefore, the original tunnel endpoint needs to send a MAC address verification request to determine the current actual migration situation of the target virtual machine.
Fig. 2 is a flowchart of a specific implementation manner of step S101 according to an embodiment of the present invention. In one embodiment, as shown in fig. 2, the step of, by an original tunnel endpoint, in response to receiving a virtual machine migration packet sent by a destination tunnel endpoint, sending a MAC address verification request to an ingress interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine includes steps S201 to S202:
step S201, determining current routing information corresponding to the target virtual machine based on the pre-stored local routing information and the target MAC address of the target virtual machine included in the virtual machine migration packet.
The local routing information prestored in the original tunnel endpoint includes current routing information corresponding to each target virtual machine.
Specifically, the original tunnel endpoint may obtain, by querying from pre-stored local routing information, current routing information corresponding to the target virtual machine based on the target MAC address, where the current routing information includes the MAC address of the ingress interface corresponding to the target virtual machine, and the ingress interface corresponding to the target virtual machine is a port that is connected to the original tunnel endpoint on the target virtual machine.
And step S202, sending a MAC address verification request to an input interface corresponding to the target virtual machine based on the current routing information.
In a specific embodiment, the current routing information corresponding to the target virtual machine further includes a type of the egress interface. Specifically, the step of sending a MAC address verification request to an ingress interface corresponding to the target virtual machine based on the current routing information includes:
and sending a MAC address verification request to an input interface corresponding to the target virtual machine under the condition that the type of the output interface is an AC interface.
The output interface is an interface of the target virtual machine for connecting other equipment; the MAC address authentication request includes: source address, destination address, frame type, protocol type, and remaining bytes. The source address included in the MAC address verification request is the MAC address of the ingress interface, and the destination address is the destination MAC address. The frame type is set to a preset number, which is a number that is not defined at present. The protocol type, which is adjacent to and after the frame type in the data structure, may be set to 00 to indicate that the packet is of the type that authenticates the MAC address request. The remaining bytes are padding bytes.
Step S102, under the condition that the MAC address verification response information returned by the target virtual machine is not received in the preset time period, the current routing information corresponding to the target virtual machine is updated based on the virtual machine migration message.
The preset time period may be specifically set according to actual conditions, for example, 1 second, or 10 seconds, and is not specifically limited herein.
In one embodiment, the current routing information further comprises: and the next hop MAC address corresponding to the target virtual machine is the MAC address of the original tunnel endpoint. The virtual machine migration message further comprises: MAC address of destination tunnel endpoint. The step of updating the current routing information corresponding to the target virtual machine based on the virtual machine migration packet includes: and updating the next hop MAC address from the MAC address of the original tunnel endpoint to the MAC address of the destination tunnel endpoint.
It should be noted that, the MAC address verification response message returned by the target virtual machine is not received within the preset time period, which indicates that the target virtual machine has actually implemented migration, that is, the target virtual machine is currently connected to the destination tunnel endpoint. Therefore, the next hop MAC address corresponding to the target virtual machine is updated to the MAC address of the target tunnel endpoint, so that the next hop corresponding to the target virtual machine points to the target tunnel endpoint, and the routing information of the target virtual machine stored by the original tunnel endpoint can be ensured to be consistent with the actual migration condition of the target virtual machine. In addition, other tunnel endpoints except the original tunnel endpoint and the destination tunnel endpoint may be used to update the routing information corresponding to the target virtual machine, which is pre-stored in each tunnel endpoint, based on the virtual machine migration packet sent by the destination tunnel endpoint, so as to ensure that the routing information of the virtual machine, which is stored in each tunnel endpoint, conforms to the actual migration situation of the virtual machine.
It should be further noted that, because the routing information of the target virtual machine stored by each tunnel endpoint matches the actual migration condition of the target virtual machine, each function of the target virtual machine after migration can be performed normally, and successful migration of the target virtual machine is guaranteed.
Step S103, under the condition that MAC address verification response information returned by the target virtual machine is received within a preset time period, current routing information corresponding to the target virtual machine is sent to all tunnel endpoints except the tunnel endpoint, so that all tunnel endpoints can update the routing information corresponding to the target virtual machine which is pre-stored respectively based on the current routing information.
And the MAC address verification response information is response information returned by the target virtual machine in response to the MAC address verification request. The MAC address authentication response message includes: the tunnel endpoint detection method comprises the steps of obtaining a source address, a destination address, a frame type, a protocol type and other bytes, wherein the source address is a destination MAC address, and the destination address is an MAC address of an original tunnel endpoint; the frame type is the same as the frame type included in the MAC address authentication request, and is a preset number that is not defined at present. The protocol type may be set to 01 to indicate that the packet is an authentication MAC address response packet type. The remaining bytes are padding bytes.
The current routing information corresponding to the target virtual machine comprises: and the next hop MAC address corresponding to the target virtual machine is the MAC address of the original tunnel endpoint.
In one embodiment, each tunnel endpoint except the original tunnel endpoint is configured to update, in response to the current routing information corresponding to the target virtual machine, a next-hop MAC address corresponding to the target virtual machine in the pre-stored routing information corresponding to the target virtual machine to the MAC address of the original tunnel endpoint.
It should be noted that, the MAC address verification response message returned by the target virtual machine is received within the preset time period, which indicates that the target virtual machine does not actually implement migration, that is, the target virtual machine is currently still connected to the original tunnel endpoint. Therefore, the original tunnel endpoint does not need to update the current routing information corresponding to the target virtual machine, that is, the original tunnel endpoint only needs to maintain the next-hop MAC address corresponding to the target virtual machine prestored by itself to be unchanged, and the routing information of the virtual machine stored by the original tunnel endpoint can be guaranteed to be consistent with the actual migration condition of the virtual machine.
For other tunnel endpoints (including a destination tunnel endpoint) except the original tunnel endpoint, the original tunnel endpoint can send current routing information corresponding to the target virtual machine to each tunnel endpoint, and each tunnel endpoint except the original tunnel endpoint is used for responding to the current routing information corresponding to the target virtual machine and updating a next hop MAC address corresponding to the target virtual machine in the prestored routing information corresponding to the target virtual machine into the MAC address of the original tunnel endpoint, so that even if the next hop corresponding to the target virtual machine still points to the original tunnel endpoint, the routing information of the virtual machine stored in each tunnel endpoint is ensured to be consistent with the actual migration condition of the virtual machine.
It should be further noted that, because the routing information of the target virtual machine stored by each tunnel endpoint coincides with the actual migration condition of the target virtual machine, it can be ensured that each corresponding parameter of the target virtual machine is normal before migration occurs in the subsequent process, thereby ensuring that the target virtual machine is successfully migrated.
The embodiment of the invention provides a method for updating routing information, which comprises the following steps: firstly, responding to a received virtual machine migration message sent by a destination tunnel endpoint, and sending an MAC address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine; then, under the condition that MAC address verification response information returned by the target virtual machine is not received within a preset time period, updating current routing information corresponding to the target virtual machine based on the virtual machine migration message; under the condition that MAC address verification response information returned by the target virtual machine is received within a preset time period, current routing information corresponding to the target virtual machine is sent to all tunnel endpoints except the tunnel endpoints, so that all tunnel endpoints can update the pre-stored routing information corresponding to the target virtual machine based on the current routing information, the routing information of the virtual machine stored by each tunnel endpoint can be guaranteed to be consistent with the actual migration condition of the virtual machine, and the successful migration of the virtual machine is further guaranteed.
Fig. 3 is a schematic structural diagram of a routing information updating apparatus according to an embodiment of the present invention. As shown in fig. 3, the routing information updating apparatus includes: a first processing module 31, an update module 32 and a second processing module 33.
The first processing module 31 is configured to, in response to receiving a virtual machine migration packet sent by a destination tunnel endpoint, send an MAC address verification request to an ingress interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine.
The first processing module 31 is specifically configured to: and determining current routing information corresponding to the target virtual machine based on the pre-stored local routing information and the target MAC address of the target virtual machine included in the virtual machine migration message, and sending an MAC address verification request to an access interface corresponding to the target virtual machine based on the current routing information.
The updating module 32 is configured to update the current routing information corresponding to the target virtual machine based on the virtual machine migration packet when the MAC address verification response information returned by the target virtual machine is not received within the preset time period.
In one embodiment, the current routing information further comprises: and the next hop MAC address corresponding to the target virtual machine is the MAC address of the original tunnel endpoint. The virtual machine migration message further comprises: MAC address of destination tunnel endpoint. The step of updating, by the update module 32, the current routing information corresponding to the target virtual machine based on the virtual machine migration packet specifically includes: and updating the next hop MAC address from the MAC address of the original tunnel endpoint to the MAC address of the destination tunnel endpoint.
The second processing module 33 is configured to, in a case that MAC address verification response information returned by the target virtual machine is received within a preset time period, update, by all tunnel endpoints, current routing information corresponding to all tunnel endpoint target virtual machines except for the tunnel endpoint target virtual machine, so that all tunnel endpoints update respective pre-stored routing information corresponding to the target virtual machine based on the current routing information.
The operation modes of the modules in the routing information updating device provided by this embodiment correspond to the steps in the routing updating method, and therefore, the detailed operation modes of the modules in the routing information updating device can be referred to the routing updating method provided by this embodiment.
The embodiment of the invention provides a routing information updating device, wherein a first processing module is used for responding to a received virtual machine migration message sent by a destination tunnel endpoint and sending an MAC address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine; the updating module is used for updating the current routing information corresponding to the target virtual machine based on the virtual machine migration message under the condition that the MAC address verification response information returned by the target virtual machine is not received within the preset time period; the second processing module is used for sending current routing information corresponding to the target virtual machine to all tunnel endpoints except the tunnel endpoint under the condition that MAC address verification response information returned by the target virtual machine is received within a preset time period, so that all tunnel endpoints update the pre-stored routing information corresponding to the target virtual machine based on the current routing information, the routing information of the virtual machine stored by each tunnel endpoint can be guaranteed to be consistent with the actual migration condition of the virtual machine, and the successful migration of the virtual machine is further guaranteed.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Referring to fig. 4, an embodiment of the present invention provides an electronic device, including:
one or more processors 401;
a memory 402 on which one or more programs are stored, which when executed by the one or more processors, cause the one or more processors to implement the routing information updating method of any one of the above;
one or more I/O interfaces 403 coupled between the processor and the memory and configured to enable information interaction between the processor and the memory.
Among them, the processor 401 is a device having data processing capability, which includes but is not limited to a Central Processing Unit (CPU), etc.; memory 402 is a device having data storage capabilities including, but not limited to, random access memory (RAM, more specifically SDRAM, DDR, etc.), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), FLASH memory (FLASH); an I/O interface (read/write interface) 403 is connected between the processor 401 and the memory 402, and can realize information interaction between the processor 401 and the memory 402, which includes but is not limited to a data Bus (Bus) and the like.
In some embodiments, the processor 401, memory 402, and I/O interface 403 are interconnected via a bus, which in turn connects with other components of the computing device.
The present embodiment further provides a computer readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for updating routing information provided in the present embodiment, and in order to avoid repeated descriptions, specific steps of the method for updating routing information are not described herein again.
It will be understood by those of ordinary skill in the art that all or some of the steps of the above inventive method, systems, functional modules/units in the apparatus may be implemented as software, firmware, hardware, and suitable combinations thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be performed by several physical components in cooperation. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as is well known to those of ordinary skill in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, Digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. In addition, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media as known to those skilled in the art.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element.
Those skilled in the art will appreciate that although some embodiments described herein include some features included in other embodiments instead of others, combinations of features of different embodiments are meant to be within the scope of the embodiments and form different embodiments.
It will be understood that the above embodiments are merely exemplary embodiments taken to illustrate the principles of the present invention, which is not limited thereto. It will be apparent to those skilled in the art that various modifications and improvements can be made without departing from the spirit and substance of the invention, and these modifications and improvements are also considered to be within the scope of the invention.

Claims (10)

1. A method for updating routing information, the method comprising:
responding to a received virtual machine migration message sent by a destination tunnel endpoint, and sending an MAC (media access control) address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine;
under the condition that MAC address verification response information returned by the target virtual machine is not received within a preset time period, updating current routing information corresponding to the target virtual machine based on the virtual machine migration message;
and under the condition of receiving MAC address verification response information returned by the target virtual machine within a preset time period, sending current routing information corresponding to the target virtual machine to all tunnel endpoints except the tunnel endpoint, so that all tunnel endpoints update the respective pre-stored routing information corresponding to the target virtual machine based on the current routing information.
2. The method according to claim 1, wherein the step of sending a MAC address verification request to the ingress interface corresponding to the target virtual machine based on the current routing information corresponding to the target virtual machine in response to receiving the virtual machine migration packet sent by the destination tunnel endpoint includes:
determining current routing information corresponding to the target virtual machine based on pre-stored local routing information and a target MAC address of the target virtual machine included in the virtual machine migration message;
and sending a MAC address verification request to an input interface corresponding to the target virtual machine based on the current routing information.
3. The method according to claim 2, wherein the step of determining the current routing information corresponding to the target virtual machine based on the pre-stored local routing information and the target MAC address of the target virtual machine included in the virtual machine migration packet further includes:
and based on the target MAC address, inquiring and obtaining current routing information corresponding to the target virtual machine from pre-stored local routing information, wherein the current routing information comprises the MAC address of an input interface and the type of an output interface corresponding to the target virtual machine.
4. The method of claim 3, wherein the step of sending a MAC address verification request to an ingress interface corresponding to the target virtual machine based on the current routing information comprises:
and sending a MAC address verification request to an input interface corresponding to the target virtual machine under the condition that the type of the output interface is an AC (access circuit) interface, wherein the MAC address verification request comprises a source address which is the MAC address of the input interface and a destination address which is the target MAC address.
5. The method of claim 2, wherein the current routing information further comprises: and the next hop MAC address corresponding to the target virtual machine is the MAC address of the original tunnel endpoint.
6. The method of claim 5, wherein the virtual machine migration packet includes a MAC address of the destination tunnel endpoint; the step of updating the current routing information corresponding to the target virtual machine based on the virtual machine migration packet includes:
and updating the next hop MAC address from the MAC address of the original tunnel endpoint to the MAC address of the target tunnel endpoint.
7. The method according to claim 5, wherein each tunnel endpoint except the original tunnel endpoint is configured to update a next-hop MAC address corresponding to a target virtual machine in the pre-stored routing information corresponding to the target virtual machine to the MAC address of the original tunnel endpoint in response to the current routing information corresponding to the target virtual machine.
8. A routing information updating apparatus, characterized in that the apparatus comprises:
the first processing module is used for responding to a received virtual machine migration message sent by a destination tunnel endpoint and sending an MAC address verification request to an access interface corresponding to a target virtual machine based on current routing information corresponding to the target virtual machine;
the updating module is used for updating the current routing information corresponding to the target virtual machine based on the virtual machine migration message under the condition that the MAC address verification response information returned by the target virtual machine is not received within a preset time period;
and the second processing module is used for sending current routing information corresponding to the target virtual machine to all tunnel endpoints except the tunnel endpoint under the condition of receiving MAC address verification response information returned by the target virtual machine within a preset time period, so that all tunnel endpoints update the pre-stored routing information corresponding to the target virtual machine based on the current routing information.
9. An electronic device, comprising:
one or more processors;
memory having one or more programs stored thereon that, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1-7;
one or more I/O interfaces connected between the processor and the memory and configured to enable information interaction between the processor and the memory.
10. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202111186316.0A 2021-10-12 2021-10-12 Routing information updating method and device, electronic equipment and computer readable medium Pending CN113938354A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111186316.0A CN113938354A (en) 2021-10-12 2021-10-12 Routing information updating method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111186316.0A CN113938354A (en) 2021-10-12 2021-10-12 Routing information updating method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN113938354A true CN113938354A (en) 2022-01-14

Family

ID=79278856

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111186316.0A Pending CN113938354A (en) 2021-10-12 2021-10-12 Routing information updating method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN113938354A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106998297A (en) * 2017-03-22 2017-08-01 新华三技术有限公司 A kind of virtual machine migration method and device
CN107547349A (en) * 2017-07-31 2018-01-05 新华三技术有限公司 A kind of method and device of virtual machine (vm) migration
CN107612834A (en) * 2017-09-13 2018-01-19 杭州迪普科技股份有限公司 A kind of EVPN route renewing methods based on virtual unit migration
CN109067784A (en) * 2018-09-19 2018-12-21 迈普通信技术股份有限公司 The method and apparatus of anti-fraud in a kind of VXLAN
CN109189549A (en) * 2018-08-01 2019-01-11 新华三技术有限公司 Virtual machine migration method and device
US20190034226A1 (en) * 2016-08-30 2019-01-31 Huawei Technologies Co., Ltd. Method and apparatus for determining virtual machine migration
CN111736958A (en) * 2020-06-29 2020-10-02 中国联合网络通信集团有限公司 Virtual machine migration method, system, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190034226A1 (en) * 2016-08-30 2019-01-31 Huawei Technologies Co., Ltd. Method and apparatus for determining virtual machine migration
CN112486626A (en) * 2016-08-30 2021-03-12 华为技术有限公司 Method and device for determining virtual machine migration
CN106998297A (en) * 2017-03-22 2017-08-01 新华三技术有限公司 A kind of virtual machine migration method and device
CN107547349A (en) * 2017-07-31 2018-01-05 新华三技术有限公司 A kind of method and device of virtual machine (vm) migration
CN107612834A (en) * 2017-09-13 2018-01-19 杭州迪普科技股份有限公司 A kind of EVPN route renewing methods based on virtual unit migration
CN109189549A (en) * 2018-08-01 2019-01-11 新华三技术有限公司 Virtual machine migration method and device
CN109067784A (en) * 2018-09-19 2018-12-21 迈普通信技术股份有限公司 The method and apparatus of anti-fraud in a kind of VXLAN
CN111736958A (en) * 2020-06-29 2020-10-02 中国联合网络通信集团有限公司 Virtual machine migration method, system, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
US11102033B2 (en) Method and apparatus for implementing a flexible virtual local area network
US10666561B2 (en) Virtual machine migration
US9621373B2 (en) Proxy address resolution protocol on a controller device
CN107612808B (en) Tunnel establishment method and device
US9992106B2 (en) Generating a host route
CN108199963B (en) Message forwarding method and device
US10187290B2 (en) Method, system, and apparatus for preventing tromboning in inter-subnet traffic within data center architectures
US20150169351A1 (en) Configuring virtual media access control addresses for virtual machines
US10924299B2 (en) Packet forwarding
US11477114B2 (en) Packet forwarding method and apparatus
CN108092890B (en) Route establishing method and device
CN108418740B (en) Message processing method and device
CN111736958A (en) Virtual machine migration method, system, computer equipment and storage medium
CN107659484B (en) Method, device and system for accessing VXLAN network from VLAN network
CN113746717B (en) Network equipment communication method and network equipment communication device
EP4239973A1 (en) Packet sending method, device, and system
JP2022537296A (en) EVPN message transfer method, system, storage medium and terminal
US8015320B2 (en) Load distribution and redundancy using tree aggregation
US20230164070A1 (en) Packet sending method, device, and system
CN107995110B (en) Traffic forwarding method and device
CN113438333B (en) Network address allocation method, device and equipment
CN115190100A (en) Data forwarding method, VTEP gateway, electronic device and readable storage medium
CN113938354A (en) Routing information updating method and device, electronic equipment and computer readable medium
CN115174312B (en) Broadcast information transmission method, tunnel endpoint device, electronic device, and medium
WO2022001666A1 (en) Method for creating vxlan tunnel and related devices

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220114