CN106789635B - Message forwarding method and device - Google Patents

Message forwarding method and device Download PDF

Info

Publication number
CN106789635B
CN106789635B CN201610176722.1A CN201610176722A CN106789635B CN 106789635 B CN106789635 B CN 106789635B CN 201610176722 A CN201610176722 A CN 201610176722A CN 106789635 B CN106789635 B CN 106789635B
Authority
CN
China
Prior art keywords
edge device
link
neighbor
virtual machine
logical tunnel
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
CN201610176722.1A
Other languages
Chinese (zh)
Other versions
CN106789635A (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 CN201610176722.1A priority Critical patent/CN106789635B/en
Publication of CN106789635A publication Critical patent/CN106789635A/en
Application granted granted Critical
Publication of CN106789635B publication Critical patent/CN106789635B/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
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/22Alternate routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure

Landscapes

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

Abstract

The embodiment of the invention provides a message forwarding method and a message forwarding device. The specific implementation mode of the method comprises the following steps: when the first edge device detects that the first link fails, selecting a first neighbor edge device as a second edge device, wherein the first neighbor edge device and the first edge device have a Border Gateway Protocol (BGP) neighbor relation and are connected with the target virtual machine; obtaining a first logical tunnel between the first edge device and the second edge device; when the first edge device receives a target packet sent to the target virtual machine, forwarding the target packet to the second edge device through the first logical tunnel, so that the second edge device forwards the target packet to the target virtual machine. The embodiment can prevent data loss when a link in the EVPN network fails, and avoid convergence of network topology caused by link failure and failure recovery.

Description

Message forwarding method and device
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for forwarding a packet.
Background
The multihoming link is a link connection mode in which one Virtual machine in an Ethernet Virtual Private Network (EVPN) establishes a connection with two or more edge devices.
An ethernet Virtual private Network EVPN is a Network built on a Virtual eXtensible local area Network (VXLAN). A virtual extensible local area network (VXLAN) is an overlay network technology, namely a virtual network is constructed on a traditional network, and the traditional network does not need any adaptation. The method uses the MAC inUDP method to package the data, namely, the original message is packaged in the UDP message. The infrastructure of a VXLAN network includes edge devices (VTEPs) of its core network and customer premise equipment (virtual machines, VMs), etc. A plurality of edge devices of the VXLAN network establish a neighbor relation through a BGP protocol, a logic tunnel for transmitting messages is established between the neighbor edge devices, and a link for transmitting the messages is established between the edge devices and the virtual machine. The method comprises the steps that a virtual machine generally only establishes a link with an edge device, the link belongs to a single-attribute link and cannot realize load sharing, and when the link between the virtual machine and the edge device fails, a message cannot be sent to the virtual machine. The problem that load sharing cannot be realized can be solved in the EVPN network.
The biggest differences between EVPN and VXLAN networks are: the EVPN network can realize load sharing, dynamically establish links between edge devices and virtual machines, and enable one virtual machine to establish links with two or more edge devices, and the link connection mode is called a multi-homing link.
As shown in fig. 1, in which the virtual machine VM3 establishes links with both edge devices VTEP2 and VTEP3, this connection mode of the virtual machine VM3 belongs to a multi-homed link; both virtual machines VM1 and VM2 establish a link with the edge device VTEP1, and this connection of virtual machines VM1 and VM2 is a single home link.
When data service transmitted from the virtual machine VM1 to the VM3 in the same logical two-layer network exists, the VM1 transmits the service to the edge device VTEP1 in the EVPN network, the VTEP1 encapsulates the service data into a VXLAN packet after performing VXLAN header, UDP header, IP header, MAC header, and the like, and then transmits the packet to the remote VTEP3 device through a logical tunnel, and the VTEP3 decapsulates the received packet to obtain information such as an IP address in the packet, encapsulates the packet, and transmits the packet to the target virtual machine VM3 corresponding to the IP address. And ending the message sending process. The encapsulated message includes information such as IP addresses (internet protocol addresses) and MAC addresses (physical addresses) of the source virtual machine and the destination virtual machine.
In the prior art, for a networking mode of a multi-homing link in an EVPN network, one virtual machine VM establishes multiple links with multiple VTEP devices at the same time. When a certain link fails, the VTEP device corresponding to the link needs to send a failure message to its neighboring edge devices to avoid data loss. When the failed link is recovered, the VTEP device corresponding to the link also needs to send a failure repair message to its neighboring edge devices to recover data transmission.
However, during the time when the failure has occurred and before the failure message is sent to other VTEP devices, the data sent over the link will be lost. Moreover, when a failure occurs and when the failure is repaired, the VTEP device sends an advertisement to its neighboring edge devices, which may result in convergence of the network topology. For a large number of VTEP devices, such notification would consume a large amount of resources of the network system when there are multiple failures.
Disclosure of Invention
The embodiment of the invention aims to provide a message forwarding method and a message forwarding device, which can prevent data loss when a link in an EVPN network fails and avoid network topology convergence caused by link failure and failure recovery.
In order to achieve the above object, the present invention discloses a packet forwarding method, which is applied to a first edge device in an ethernet virtual private network EVPN network, wherein a first link is formed between the first edge device and a target virtual machine, and the target virtual machine is connected to two or more edge devices, and the method includes:
when the first edge device detects that the first link fails, selecting a first neighbor edge device as a second edge device, wherein the first neighbor edge device and the first edge device have a Border Gateway Protocol (BGP) neighbor relation and are connected with the target virtual machine;
obtaining a first logical tunnel between the first edge device and the second edge device;
when the first edge device receives a target packet sent to the target virtual machine, forwarding the target packet to the second edge device through the first logical tunnel, so that the second edge device forwards the target packet to the target virtual machine.
In order to achieve the above object, the present invention further discloses a packet forwarding apparatus applied to a first edge device in an ethernet virtual private network EVPN network, where the first edge device and a target virtual machine form a first link therebetween, and the target virtual machine is connected to two or more edge devices, the apparatus including:
the detection module is used for detecting whether the first link fails or not;
a selecting module, configured to select a first neighbor edge device as a second neighbor edge device when the first link fails, where the first neighbor edge device and the first edge device have a Border Gateway Protocol (BGP) neighbor relationship and are connected to the target virtual machine;
an obtaining module configured to obtain a first logical tunnel between the first edge device and the second edge device;
the receiving module is used for receiving a target message sent to the target virtual machine;
and a forwarding module, configured to forward the target packet to the second edge device through the first logical tunnel, so that the second edge device forwards the target packet to the target virtual machine.
As can be seen from the foregoing technical solutions, in the embodiments of the present invention, when a first edge device detects that a first link fails, the first edge device selects a first neighbor edge device as a second edge device to obtain a first logical tunnel between the first edge device and the second edge device; and when the first edge device receives the target message, the target message is sent to the second edge device through the first logic tunnel, so that the second edge device forwards the target message to the target virtual machine. Wherein the first neighbor edge device has a Border Gateway Protocol (BGP) neighbor relationship with the first edge device and is connected to the target virtual machine.
That is to say, when the first link fails, the first edge device selects a neighboring edge device connected to the target virtual machine, and forwards the target packet by using the logical tunnel between the first edge device and the neighboring edge device, and finally forwards the target packet to the target virtual machine.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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 invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
FIG. 1 is a link connection diagram of a multi-homed link;
fig. 2 is a schematic flow chart of a message forwarding method according to an embodiment of the present invention;
fig. 3 is a schematic flowchart of step S101 in fig. 2 according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating connection relationships between neighboring edge devices in an example;
fig. 5 is a schematic structural diagram of a message forwarding apparatus according to an embodiment of the present invention.
Detailed Description
The technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. It is to be understood that the described embodiments are merely a few embodiments of the invention, and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, are within the scope of the present invention.
The embodiment of the invention provides a message forwarding method and a message forwarding device, which are applied to first edge equipment in an EVPN (event-transient-noise network), can prevent data loss when a link fails, and avoid network topology convergence caused by link failure and failure recovery.
It should be noted that, in the embodiment of the present invention, the EVPN network includes a plurality of edge devices, an established connection exists between the edge devices, an established connection also exists between the edge device and a virtual machine of the user side, and a message between the virtual machines is transmitted through the plurality of edge devices in the EVPN network. In this embodiment, the connection established between the edge devices is referred to as a logical tunnel, and the connection established between the edge devices and the virtual machine is referred to as a link.
The present invention will be described in detail below with reference to specific examples.
Fig. 2 is a schematic flow chart of a message forwarding method provided in an embodiment of the present invention, which is applied to a first edge device in an EVPN network, where the first edge device forms a first link with a target virtual machine of a user end, and the target virtual machine is connected to two or more edge devices, and the method includes the following steps:
step S101: and when the first edge device detects that the first link fails, selecting a first neighbor edge device as a second edge device, wherein the first neighbor edge device and the first edge device have a Border Gateway Protocol (BGP) neighbor relation and are connected with the target virtual machine.
The process of the present embodiment is specifically performed by the first edge device in the EVPN network.
The first edge device and the target virtual machine are directly connected, and when a first link between the first edge device and the target virtual machine fails, the first edge device can detect the link failure. The process of detecting link failure by edge device belongs to the prior art, and the specific process is not repeated.
In the embodiment of the invention, when the first link fails, the target message sent to the target virtual machine through the first edge device cannot be successfully forwarded. To solve this problem, a first neighbor edge device connected to the target virtual machine may be selected from neighbor edge devices having a BGP neighbor relationship with the first edge device, so that the first neighbor edge device can assist in forwarding the packet sent from the first edge device to the target virtual machine.
The first edge device selects one of the first neighbor edge devices as the second edge device when the first link fails, and the process may have various embodiments. For example, the first neighbor edge device may be selected in different manners based on information stored in the first edge device that is related to the first link.
It should be noted that the second edge device and the first edge device have an established BGP neighbor relationship therebetween, and may communicate respective address information and the like therebetween.
Step S102: a first logical tunnel between the first edge device and the second edge device is obtained.
There may or may not be an established logical tunnel between the first edge device and its neighboring edge devices. Therefore, in this embodiment, in order to obtain the first logical tunnel more accurately, step S102 may specifically include: judging whether a logical tunnel is established between the first edge device and the second edge device, and if so, determining the established logical tunnel as a first logical tunnel; otherwise, a logical tunnel is established between the first edge device and the second edge device, and the established logical tunnel is determined as the first logical tunnel.
Specifically, whether an established logical tunnel exists between the first edge device and the second edge device may be determined according to the address information of the second edge device, which may of course be determined in other manners, and the specific manner of the determination is not limited in the present invention. When it is determined that there is no established logical tunnel between the first edge device and the second edge device, a logical tunnel is established between the first edge device and the second edge device, which belongs to the prior art and is not described in detail again.
Step S103: when the first edge device receives a target packet sent to the target virtual machine, forwarding the target packet to the second edge device through the first logical tunnel, so that the second edge device forwards the target packet to the target virtual machine.
In this embodiment, in order to more accurately send the target packet to the target virtual machine, step S103 may specifically include: de-encapsulating the received message to obtain a target message sent to the target virtual machine; repackaging the decapsulated target message according to the obtained target message and the address information of the second edge device; and forwarding the repackaged target message to the second edge device. And the target message comprises the address information of the target virtual machine.
In one example, when the first edge device obtains a message, it may be determined that the message is a target message when it is detected that destination address information in the message is address information of a target virtual machine. Assume that the IP address of the target virtual machine is 100.0.0.1 and the IP address of the second edge device is 2.2.2.2. When the original forwarding table item "destination 100.0.0.1 → local 0.0.0" in the first edge device is changed to "destination 100.0.0.1 → second edge device 2.2.2.2", the repackaged target packet can be forwarded to the second edge device through the first logical tunnel, and after receiving the target packet, the second edge device can send the target packet to the target virtual machine according to the destination address in the target packet.
Specifically, the messages received by the first edge device are sent by other edge devices in the EVPN network.
As can be seen from the above, in the embodiment of the present invention, when a first link fails, a first edge device selects a neighboring edge device connected to a target virtual machine, and forwards a target packet by using a logical tunnel between the first edge device and the neighboring edge device, and finally forwards the target packet to the target virtual machine.
In another embodiment of the present invention, in order to more accurately and efficiently select a first neighbor edge device as a second edge device, in step S101 of the embodiment shown in fig. 2, selecting a first neighbor edge device as a second edge device may be performed according to a flowchart shown in fig. 3, which may specifically include:
step S101A: and obtaining a second link with the virtual machine identifier being the same as the first link according to the virtual machine identifier corresponding to the first link and the link information of the link stored by the first edge device, and determining a neighbor edge device corresponding to the second link as the first neighbor edge device.
Wherein the first edge device has stored therein: link information of a link connected to the first edge device, and link information of a link connected to the first neighbor edge device; the link information of each link includes: address information of the edge device connected with the link and a virtual machine identifier corresponding to the link.
Specifically, the virtual machine Identifier may include one or more of Ethernet Segment Identifiers (ESIs) of links connected to the virtual machine, address information of the virtual machine, and other information that uniquely identifies the virtual machine. The Address information may also include an Internet Protocol Address (IP Address), a Media Access Control Address (MAC Address), and the like.
More specifically, a second link having the same virtual machine identifier as the first link may be searched from the link information stored in the first edge device to obtain one or more second links, and then the edge device connected to the second link is determined as the first neighbor edge device according to the link information of the second link stored in the first edge device.
Step S101B: and selecting one edge device from the first neighbor edge devices as a second edge device according to the link information of the second link.
There may be more than one first neighboring edge device determined in step S101A, and therefore, in particular, one edge device may be selected from the first neighboring edge devices as the second edge device in different manners.
In one example, assume that a first edge device is represented by VTEP3, two neighbor edge devices are represented by VTEP2 and VTEP4, respectively, a target virtual machine is represented by VM3, and the connection relationship between the neighbor edge devices is shown in fig. 4. The link information stored on VTEP3 includes the contents of table 1:
Figure BDA0000950463750000071
TABLE 1
When VTEP3 detects a failure of link 3, VTEP3 may select a virtual machine identification, e.g., an entry of ESI value, from its stored link information, where link 3 corresponds to an ESI value of 3, look up all links with ESI value of 3 from the link information in table 1, obtain link 2 and link 4, and determine the neighbor edge devices VTEP2 and VTEP4 connected to these two links as the first neighbor edge device. In this example, there are 2 first neighbor edge devices, one of which is selected as the second edge device.
In another embodiment of the present invention, when there are multiple second links obtained, step S101B in the embodiment of fig. 3 may specifically include: acquiring address information of a first neighbor edge device corresponding to each second link; and determining the first neighbor edge device with the address information meeting the first preset rule as the second edge device.
Wherein the address information includes an IP address, a MAC address, and the like. The first preset rule may be that a maximum value or a minimum value of the IP address or the MAC address is taken, that is, a first neighbor edge device corresponding to the maximum or minimum IP address is determined as a second edge device, or a first neighbor edge device corresponding to the maximum or minimum MAC address is determined as a second edge device. Of course, the preset rule may have other forms, which is not limited in the embodiment of the present invention.
In another embodiment of the present invention, when there are multiple second links obtained, in order to select a better second edge device, in the embodiment shown in fig. 3, step S101B may specifically include:
step 1: and detecting whether a logical tunnel is established between the first neighbor edge device corresponding to each second link and the first edge device.
Step 2: selecting one edge device from second neighbor edge devices as a second edge device, wherein the second neighbor edge device is a first neighbor edge device which establishes a logical tunnel with the first edge device.
When there are multiple second links obtained, as a preferred scheme, an edge device that has established a logical tunnel between the first edge device and the first neighbor edge device in the first neighbor edge device corresponding to the second link may be determined as a second neighbor edge device, and one edge device is selected from the second neighbor device as the second edge device.
As can be seen from the above, one of the second neighboring edge devices having the established logical tunnel with the first edge device is preferentially selected as the second edge device, and there is no need to establish a logical tunnel between the first edge device and the second edge device, so that the message forwarding process can be more efficient, and network device resources can also be saved.
In another embodiment of the present invention, in the embodiment shown in fig. 3, when there are a plurality of determined second neighbor edge devices, in order to further determine a better second edge device, the step 2 may further include:
acquiring hop count between the first edge device and each second neighbor edge device; and determining a second neighbor edge device with the hop count meeting a second preset rule as the second edge device.
Wherein the first edge device has stored therein: a number of hops between the first edge device and a second neighboring edge device.
Specifically, determining a second neighbor edge device whose hop count satisfies a second preset rule as the second edge device may include: and determining the second neighbor edge device corresponding to the minimum hop count as the second edge device. Therefore, the determined hop count between the second edge device and the first edge device is minimum, and when the first edge device forwards the target message through the second edge device, the hop count is less, so that the efficiency of message transmission can be improved, and system resources are saved. Of course, the second preset rule may also include other manners, which are not limited in the embodiment of the present invention.
In another embodiment of the present invention, in order to make the process of forwarding to the target virtual machine through the first edge device more efficient when the first link is recovered, in the embodiment shown in fig. 2, when the first edge device detects that the first link is recovered, the first logical tunnel is deactivated, and the target packet is forwarded through the recovered first link.
Specifically, since the number of logical tunnels that can be established by the edge device in the EVPN network is limited, when the first edge device detects that the first link is restored to connect, the first logical tunnel may also be deleted, and the target packet is forwarded through the restored first link. Therefore, a part of network resources can be released, and the carrying capacity of the network system is improved.
Fig. 5 is a schematic structural diagram of a packet forwarding apparatus provided in an embodiment of the present invention, which corresponds to the method embodiment shown in fig. 2, and is applied to a first edge device in an ethernet virtual private network EVPN network, where the first edge device and a target virtual machine of a user end form a first link therebetween, and the same virtual machine is connected to at least two edge devices, where the apparatus includes:
a detecting module 501, configured to detect whether the first link fails;
a selecting module 502, configured to select a first neighbor edge device as a second neighbor edge device when the first link fails, where the first neighbor edge device and the first edge device have a Border Gateway Protocol (BGP) neighbor relationship and are connected to the target virtual machine;
an obtaining module 503, configured to obtain a first logical tunnel between the first edge device and the second edge device;
a receiving module 504, configured to receive a target packet sent to the target virtual machine;
a forwarding module 505, configured to forward the target packet to the second edge device through the first logical tunnel, so that the second edge device forwards the target packet to the target virtual machine.
In this embodiment, the obtaining module 503 may specifically be configured to:
judging whether a logical tunnel is established between the first edge device and the second edge device, and if so, determining the established logical tunnel as a first logical tunnel; otherwise, a logical tunnel is established between the first edge device and the second edge device, and the established logical tunnel is determined as the first logical tunnel.
In this embodiment, the apparatus may further include a second link obtaining module (not shown in the figure);
the second link obtaining module is configured to: obtaining a second link with the virtual machine identifier same as the first link according to the virtual machine identifier corresponding to the first link and link information of the link stored by the first edge device;
the selection module 502 may specifically be configured to: and after the second link is obtained, determining the neighbor edge device corresponding to the second link as a first neighbor edge device, and selecting one edge device from the first neighbor edge device as a second edge device according to the link information of the second link.
Wherein the first edge device has stored therein: link information of a link connected to the first edge device, and link information of a link connected to the first neighbor edge device; the link information of each link includes: address information of the edge device connected with the link and a virtual machine identifier corresponding to the link.
In this embodiment, the apparatus may further include an address information obtaining module (not shown in the figure);
the address information obtaining module is configured to: when a plurality of second links are obtained, obtaining the address information of a first neighbor edge device corresponding to each second link;
the selection module 502 may specifically be configured to: after obtaining the address information of the first neighbor edge device corresponding to each second link, determining the first neighbor edge device whose address information satisfies a first preset rule as the second edge device.
In this embodiment, the apparatus may further include a logical tunnel detection module (not shown in the figure);
the logical tunnel detection module is configured to: when a plurality of second links are obtained, detecting whether a logical tunnel is established between a first neighbor edge device corresponding to each second link and the first edge device;
the selection module 502 may specifically be configured to: after detecting whether a logical tunnel is established between a first neighbor edge device corresponding to each second link and the first edge device, selecting one edge device from second neighbor edge devices as a second edge device, wherein the second neighbor edge device is the first neighbor edge device which has established the logical tunnel with the first edge device.
In this embodiment, the apparatus may further include a hop count obtaining module (not shown in the figure):
the hop count acquisition module is configured to: acquiring hop count between the first edge device and each second neighbor edge device;
the selection module is specifically configured to: and after the hop count between the first edge device and each second neighbor edge device is obtained, determining the second neighbor edge device with the hop count meeting a second preset rule as the second edge device.
Wherein the first edge device has stored therein: a number of hops between the first edge device and a second neighboring edge device.
In this embodiment, the apparatus may further include a logical tunnel deactivation module (not shown in the figure);
the logical tunnel deactivation module is to: deactivating the first logical tunnel when the first edge device detects that the first link resumes connection;
the forwarding module 505 may specifically be configured to: and after the first logic tunnel is deactivated, forwarding the target message through the recovered first link.
Since the device embodiment is obtained based on the message forwarding method embodiment, and has the same technical effect as the method, the technical effect of the device embodiment is not described herein again.
For the apparatus embodiment, since it is substantially similar to the method embodiment, it is described relatively simply, and reference may be made to some descriptions of the method embodiment for relevant points.
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.
It will be understood by those skilled in the art that all or part of the steps in the above embodiments can be implemented by hardware associated with program instructions, and the program can be stored in a computer readable storage medium. The storage medium referred to herein is a ROM/RAM, a magnetic disk, an optical disk, or the like.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A message forwarding method is applied to a first edge device in an Ethernet Virtual Private Network (EVPN) network, a first link is formed between the first edge device and a target virtual machine, and the target virtual machine is connected with two or more edge devices, and the method comprises the following steps:
when the first edge device detects that the first link fails, selecting a first neighbor edge device as a second edge device, wherein the first neighbor edge device and the first edge device have a Border Gateway Protocol (BGP) neighbor relation, and the first neighbor edge device is connected with the target virtual machine;
obtaining a first logical tunnel between the first edge device and the second edge device;
when the first edge device receives a target packet sent to the target virtual machine, forwarding the target packet to the second edge device through the first logical tunnel, so that the second edge device forwards the target packet to the target virtual machine.
2. The method of claim 1, wherein the first edge device has stored therein: link information of a link connected to the first edge device, and link information of a link connected to the first neighbor edge device; the link information of each link includes: address information of the edge device connected with the link and a virtual machine identifier corresponding to the link;
the selecting a first neighbor edge device as a second edge device includes:
according to the virtual machine identifier corresponding to the first link and link information of the link stored by the first edge device, obtaining a second link with the same virtual machine identifier as the first link, and determining a neighbor edge device corresponding to the second link as a first neighbor edge device;
and selecting one edge device from the first neighbor edge devices as a second edge device according to the link information of the second link.
3. The method according to claim 2, wherein when there are a plurality of second links obtained, said selecting one edge device from the first neighbor edge devices as the second edge device according to the link information of the second links comprises:
acquiring address information of a first neighbor edge device corresponding to each second link; and determining the first neighbor edge device with the address information meeting the first preset rule as the second edge device.
4. The method according to claim 2, wherein when there are a plurality of second links obtained, said selecting one edge device from the first neighbor edge devices as the second edge device according to the link information of the second links comprises:
detecting whether a logic tunnel is established between a first neighbor edge device corresponding to each second link and the first edge device;
selecting one edge device from second neighbor edge devices as a second edge device, wherein the second neighbor edge device is a first neighbor edge device which establishes a logical tunnel with the first edge device.
5. The method of claim 4, wherein the first edge device has stored therein: a hop count between the first edge device and a second neighboring edge device;
the selecting one edge device from the second neighbor edge devices as a second edge device includes:
acquiring hop count between the first edge device and each second neighbor edge device; and determining a second neighbor edge device with the hop count meeting a second preset rule as the second edge device.
6. The method according to any one of claims 1 to 5, wherein the obtaining a first logical tunnel between the first edge device and the second edge device comprises:
judging whether a logical tunnel is established between the first edge device and the second edge device, and if so, determining the established logical tunnel as a first logical tunnel; otherwise, a logical tunnel is established between the first edge device and the second edge device, and the established logical tunnel is determined as the first logical tunnel.
7. The method of claim 1, further comprising:
and when the first edge device detects that the first link is recovered, the first logic tunnel is deactivated, and the target message is forwarded through the recovered first link.
8. A message forwarding device is applied to a first edge device in an Ethernet Virtual Private Network (EVPN) network, a first link is formed between the first edge device and a target virtual machine of a user side, and the same virtual machine is connected with two or more edge devices, and the message forwarding device comprises:
the detection module is used for detecting whether the first link fails or not;
a selecting module, configured to select a first neighbor edge device as a second neighbor edge device when the first link fails, where the first neighbor edge device and the first edge device have a Border Gateway Protocol (BGP) neighbor relationship, and the first neighbor edge device is connected to the target virtual machine;
an obtaining module configured to obtain a first logical tunnel between the first edge device and the second edge device;
the receiving module is used for receiving a target message sent to the target virtual machine;
and a forwarding module, configured to forward the target packet to the second edge device through the first logical tunnel, so that the second edge device forwards the target packet to the target virtual machine.
9. The apparatus of claim 8, wherein the first edge device has stored therein: link information of a link connected to the first edge device, and link information of a link connected to the first neighbor edge device; the link information of each link includes: address information of the edge device connected with the link and a virtual machine identifier corresponding to the link;
the apparatus further comprises a second link obtaining module;
the second link obtaining module is configured to: obtaining a second link with the virtual machine identifier same as the first link according to the virtual machine identifier corresponding to the first link and link information of the link stored by the first edge device;
the selection module is specifically configured to: and after the second link is obtained, determining the neighbor edge device corresponding to the second link as a first neighbor edge device, and selecting one edge device from the first neighbor edge device as a second edge device according to the link information of the second link.
10. The apparatus of claim 9, wherein the apparatus further comprises an address information obtaining module;
the address information obtaining module is configured to: when a plurality of second links are obtained, obtaining the address information of a first neighbor edge device corresponding to each second link;
the selection module is specifically configured to: after obtaining the address information of the first neighbor edge device corresponding to each second link, determining the first neighbor edge device whose address information satisfies a first preset rule as the second edge device.
11. The apparatus of claim 9, further comprising a logical tunnel detection module;
the logical tunnel detection module is configured to: when a plurality of second links are obtained, detecting whether a logical tunnel is established between a first neighbor edge device corresponding to each second link and the first edge device;
the selection module is specifically configured to: after detecting whether a logical tunnel is established between a first neighbor edge device corresponding to each second link and the first edge device, selecting one edge device from second neighbor edge devices as a second edge device, wherein the second neighbor edge device is the first neighbor edge device which has established the logical tunnel with the first edge device.
12. The apparatus of claim 11, wherein the first edge device has stored therein: a hop count between the first edge device and a second neighboring edge device;
the device also comprises a hop count acquisition module:
the hop count acquisition module is configured to: acquiring hop count between the first edge device and each second neighbor edge device;
the selection module is specifically configured to: and after the hop count between the first edge device and each second neighbor edge device is obtained, determining the second neighbor edge device with the hop count meeting a second preset rule as the second edge device.
13. The device according to any one of claims 8 to 12, wherein the obtaining module is specifically configured to:
judging whether a logical tunnel is established between the first edge device and the second edge device, and if so, determining the established logical tunnel as a first logical tunnel; otherwise, a logical tunnel is established between the first edge device and the second edge device, and the established logical tunnel is determined as the first logical tunnel.
14. The apparatus of claim 8, further comprising a logical tunnel disabling module;
the logical tunnel deactivation module is to: deactivating the first logical tunnel when the first edge device detects that the first link resumes connection;
the forwarding module is specifically configured to: and after the first logic tunnel is deactivated, forwarding the target message through the recovered first link.
CN201610176722.1A 2016-03-25 2016-03-25 Message forwarding method and device Active CN106789635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610176722.1A CN106789635B (en) 2016-03-25 2016-03-25 Message forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610176722.1A CN106789635B (en) 2016-03-25 2016-03-25 Message forwarding method and device

Publications (2)

Publication Number Publication Date
CN106789635A CN106789635A (en) 2017-05-31
CN106789635B true CN106789635B (en) 2020-08-14

Family

ID=58972056

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610176722.1A Active CN106789635B (en) 2016-03-25 2016-03-25 Message forwarding method and device

Country Status (1)

Country Link
CN (1) CN106789635B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108075969B (en) 2016-11-17 2020-01-03 新华三技术有限公司 Message forwarding method and device
WO2019056239A1 (en) * 2017-09-21 2019-03-28 华为技术有限公司 Packet synchronization method and device
CN108494686B (en) * 2018-02-28 2021-05-28 新华三技术有限公司 Route processing method and device
CN108718276B (en) * 2018-04-10 2021-04-27 新华三技术有限公司 Message forwarding method and device
CN110391951B (en) * 2018-04-17 2022-11-08 中兴通讯股份有限公司 Ethernet segment identifier adjacency detection processing method and device and storage medium
CN111988222A (en) * 2020-08-31 2020-11-24 网易(杭州)网络有限公司 Data transmission method and device, electronic equipment and computer readable storage medium
CN113452551B (en) * 2021-06-11 2022-07-08 烽火通信科技股份有限公司 VXLAN tunnel topology monitoring method, device, equipment and storage medium
CN113726556B (en) * 2021-08-06 2024-05-31 国网电力科学研究院有限公司 Edge internet of things proxy node operation and maintenance method, system, storage medium and computing equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2613477A1 (en) * 2010-09-08 2013-07-10 Huawei Technologies Co., Ltd. Method for triggering route switching and service provider-end provider edge device
CN103973459A (en) * 2013-01-24 2014-08-06 中兴通讯股份有限公司 Method and device for transmitting multicast messages among IPv6 multicast islands
CN104270298A (en) * 2014-09-30 2015-01-07 杭州华三通信技术有限公司 Method and device for forwarding message in VXLAN
CN104767680A (en) * 2015-04-15 2015-07-08 杭州华三通信技术有限公司 Rapid route switch method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9036639B2 (en) * 2012-11-29 2015-05-19 Futurewei Technologies, Inc. System and method for VXLAN inter-domain communications
CN103647853B (en) * 2013-12-04 2018-07-03 华为技术有限公司 One kind sends ARP file transmitting methods, VTEP and VxLAN controllers in VxLAN
CN104135420B (en) * 2014-07-31 2017-12-29 华为技术有限公司 A kind of method, equipment and the system of message forwarding
CN104168140B (en) * 2014-08-14 2017-11-14 新华三技术有限公司 VTEP abnormal conditions processing method and processing devices

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2613477A1 (en) * 2010-09-08 2013-07-10 Huawei Technologies Co., Ltd. Method for triggering route switching and service provider-end provider edge device
CN103973459A (en) * 2013-01-24 2014-08-06 中兴通讯股份有限公司 Method and device for transmitting multicast messages among IPv6 multicast islands
CN104270298A (en) * 2014-09-30 2015-01-07 杭州华三通信技术有限公司 Method and device for forwarding message in VXLAN
CN104767680A (en) * 2015-04-15 2015-07-08 杭州华三通信技术有限公司 Rapid route switch method and device

Also Published As

Publication number Publication date
CN106789635A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
CN106789635B (en) Message forwarding method and device
EP3471347B1 (en) Vxlan packet processing method, device and system
US10191758B2 (en) Directing data traffic between intra-server virtual machines
US11349687B2 (en) Packet processing method, device, and system
US10193707B2 (en) Packet transmission method and apparatus
WO2018054156A1 (en) Vxlan message forwarding method, device and system
CN106254203B (en) Message forwarding method and device
CN107733793B (en) Forwarding table item maintenance method and device
EP3148127A1 (en) Egress protection for bum traffic with link failures in evpn
WO2021258754A1 (en) Message indication method and apparatus, and device and storage medium
WO2016066119A1 (en) Deployment of virtual extensible local area network
CN110798403B (en) Communication method, communication device and communication system
WO2020135395A1 (en) Notification method and device for prefix identifier of cross-interior gateway protocol
US20210029022A1 (en) Packet forwarding method and apparatus
CN112511444A (en) Multicast traffic transmission method, device, communication node and storage medium
CN105471725A (en) Routing method and routing device for traversing autonomous system
CN108833272B (en) Route management method and device
CN108540386B (en) Method and device for preventing service flow interruption
CN106911547B (en) Message forwarding method and device
CN107682261B (en) Flow forwarding method and device
WO2018107974A1 (en) Routing switching-back method, and controller and system
CN109218176B (en) Message processing method and device
CN106789523B (en) Method and device for creating logical tunnel
EP2704373B1 (en) Method, apparatus and system for neighbor discovery
CN103414642A (en) Maintaining method and device of information forwarding

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