CN109412926B - Tunnel establishment method and device - Google Patents

Tunnel establishment method and device Download PDF

Info

Publication number
CN109412926B
CN109412926B CN201811369370.7A CN201811369370A CN109412926B CN 109412926 B CN109412926 B CN 109412926B CN 201811369370 A CN201811369370 A CN 201811369370A CN 109412926 B CN109412926 B CN 109412926B
Authority
CN
China
Prior art keywords
edge device
tunnel
host
message
information
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
CN201811369370.7A
Other languages
Chinese (zh)
Other versions
CN109412926A (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.)
New H3C Information 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 CN201811369370.7A priority Critical patent/CN109412926B/en
Publication of CN109412926A publication Critical patent/CN109412926A/en
Application granted granted Critical
Publication of CN109412926B publication Critical patent/CN109412926B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/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/02Topology update or discovery
    • H04L45/04Interdomain routing, e.g. hierarchical routing
    • 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

Landscapes

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

Abstract

The application provides a tunnel establishment method and a device, wherein the method comprises the following steps: receiving a first route notification message sent by a second edge device, wherein the first route notification message comprises a tunnel encapsulation type; the first route advertisement message specifically includes: automatically discovering a routing message by the Ethernet; or, an ethernet segment routing message; and if the tunnel encapsulation type is a preset type, establishing a tunnel between the first edge device and the second edge device, wherein one end of the tunnel is the first edge device, and the other end of the tunnel is the second edge device. Through the technical scheme of the application, a tunnel establishment mode can be newly added.

Description

Tunnel establishment method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a tunnel establishment method and apparatus.
Background
Ethernet Virtual Private Network (EVPN) is a two-layer Virtual Private Network (VPN) technology. The control plane adopts a Multi-Protocol Border Gateway Protocol (MP-BGP) to announce routing information, and the data plane adopts a Virtual eXtensible Local Area Network (VXLAN) encapsulation to forward messages.
In the EVPN network, a plurality of hosts and a plurality of scalable virtual local area network Tunnel End Point (VTEP) devices may be included, and the VTEP devices may be edge devices of the EVPN network, and processes related to VXLAN are performed at the VTEP devices.
In order to enable VXLAN processing by a VTEP device, a VXLAN tunnel needs to be established between two VTEP devices, for example, the VXLAN tunnel may be established in a dynamic manner.
Specifically, after the host a accessing the VTEP device 1 gets online, the host a may send an Address Resolution Protocol (ARP) message to the VTEP device 1. After receiving the ARP packet, the VTEP device 1 may generate a forwarding entry (e.g., forwarding entry 1) according to the ARP packet, and send a routing message to the VTEP device 2, and the VTEP device 2 may establish a VXLAN tunnel between the VTEP device 2 and the VTEP device 1 by using the routing message. Further, after receiving the message of the host a as the destination device, the VTEP device 2 may send the message to the VTEP device 1 by using the VXLAN tunnel, and the VTEP device 1 may send the message to the host a by using the forwarding table 1.
However, if the host a is a silent host, that is, the host a does not actively send the ARP packet after being online, the process of sending the routing message from the VTEP device 1 to the VTEP device 2 is not triggered, so that the VTEP device 2 cannot establish the VXLAN tunnel. Since a VXLAN tunnel is not established between the VTEP device 2 and the VTEP device 1, for a message whose destination device is the host a, the VTEP device 2 cannot send the message to the VTEP device 1, which in turn causes that the message cannot be correctly sent to the host a, resulting in abnormal service.
Disclosure of Invention
The application provides a tunnel establishment method and a tunnel establishment device, which can newly add a tunnel establishment mode.
In a first aspect, the present application provides a tunnel establishment method, applied to a first edge device, including:
receiving a first route notification message sent by a second edge device, wherein the first route notification message comprises a tunnel encapsulation type; wherein the first route advertisement message specifically includes: automatically discovering a routing message by the Ethernet; or, an ethernet segment routing message;
and if the tunnel encapsulation type is a preset type, establishing a tunnel between the first edge device and the second edge device, wherein one end of the tunnel is the first edge device, and the other end of the tunnel is the second edge device.
With reference to the first aspect, in a first possible implementation manner, the first route advertisement message further includes ES information of an ethernet segment, where the ES information is ES information corresponding to a host when the second edge device provides a multi-homing access service for the host;
after receiving the first route advertisement message sent by the second edge device, the method further includes:
and determining whether the first edge device and the second edge device provide multi-homing access service for the same host according to the ES information.
With reference to the first aspect, in a second possible implementation manner, after the establishing a tunnel with the second edge device, the method further includes:
if the first route notification message includes the first network identifier of the home network of the second edge device, and the network identifier of the home network of the first edge device is the first network identifier, establishing a mapping relationship between the first network identifier and the tunnel identifier of the tunnel;
receiving a second route notification message sent by a second edge device, wherein the second route notification message comprises a first host address and a second network identifier of a home network of the second edge device;
inquiring the mapping relation through the second network identifier to obtain a tunnel identifier corresponding to the second network identifier;
and generating a first forwarding table entry, where the first forwarding table entry includes the first host address and a first outgoing interface, and the first outgoing interface is the tunnel identifier.
With reference to the first aspect, in a third possible implementation manner, after the establishing a tunnel with the second edge device, the method further includes:
receiving a third route notification message sent by a second edge device, wherein the third route notification message comprises a second host address;
determining a tunnel between the first edge device and the second edge device according to the address information of the first edge device and the address information of the second edge device;
and generating a second forwarding table entry, where the second forwarding table entry includes the second host address and a second outgoing interface, and the second outgoing interface is the determined tunnel identifier of the tunnel.
With reference to the first aspect, in a fourth possible implementation manner, the preset type specifically includes:
extensible virtual local area network encapsulation types; or, the network virtualizes the generic routing encapsulation type; alternatively, a multiprotocol label switching encapsulation type; alternatively, multiprotocol label switching and generic routing encapsulation types; alternatively, the extensible virtual local area network and the generic protocol extension encapsulation types.
In a second aspect, the present application provides a tunnel establishment apparatus, applied to a first edge device, including:
a receiving module, configured to receive a first route advertisement message sent by a second edge device, where the first route advertisement message includes a tunnel encapsulation type; wherein the first route advertisement message specifically includes: automatically discovering a routing message by the Ethernet; or, an ethernet segment routing message;
and the establishing module is used for establishing a tunnel between the first edge device and the second edge device when the tunnel encapsulation type is a preset type, wherein one end of the tunnel is the first edge device, and the other end of the tunnel is the second edge device.
With reference to the second aspect, in a first possible implementation manner, the first route advertisement message further includes ES information of an ethernet segment, where the ES information is ES information corresponding to a host when the second edge device provides a multi-homing access service for the host; the device further comprises:
a determining module, configured to determine whether the first edge device and the second edge device provide a multi-homing access service for a same host according to the ES information.
With reference to the second aspect, in a second possible implementation manner, the establishing module is further configured to, when the first route advertisement message includes a first network identifier of a home network of the second edge device, if the network identifier of the home network of the first edge device is the first network identifier, establish a mapping relationship between the first network identifier and the tunnel identifier of the tunnel;
the receiving module is further configured to receive a second route advertisement message sent by the second edge device, where the second route advertisement message includes the first host address and a second network identifier of a home network of the second edge device;
the device further comprises:
the query module is used for querying the mapping relation through the second network identifier to obtain a tunnel identifier corresponding to the second network identifier;
a generating module, configured to generate a first forwarding table entry, where the first forwarding table entry includes the first host address and a first outgoing interface, and the first outgoing interface is the tunnel identifier.
With reference to the second aspect, in a third possible implementation manner, the receiving module is further configured to receive a third route notification message sent by a second edge device, where the third route notification message includes a second host address;
the device further comprises:
a determining module, configured to determine a tunnel between the first edge device and the second edge device according to the address information of the first edge device and the address information of the second edge device;
a generating module, configured to generate a second forwarding table entry, where the second forwarding table entry includes the second host address and a second outgoing interface, and the second outgoing interface is a tunnel identifier of the determined tunnel.
With reference to the second aspect, in a fourth possible implementation manner, the preset type specifically includes:
extensible virtual local area network encapsulation types; or, the network virtualizes the generic routing encapsulation type; alternatively, a multiprotocol label switching encapsulation type; alternatively, multiprotocol label switching and generic routing encapsulation types; alternatively, the extensible virtual local area network and the generic protocol extension encapsulation types.
In a third aspect, the present application provides an edge device comprising: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; the processor is configured to execute machine executable instructions to implement the tunnel establishment method steps described above.
In a fourth aspect, the present application provides a machine-readable storage medium having stored thereon machine-executable instructions that, when invoked and executed by a processor, may cause the processor to carry out the tunnel establishment method steps described above.
As can be seen from the above technical solutions, in the embodiment of the present application, after receiving a first routing advertisement message (e.g., an ethernet auto discovery routing message (i.e., a type 1 routing message), or an ethernet segment routing message (i.e., a type 4 routing message), etc.) sent by a second edge device, a first edge device may establish a tunnel, that is, a tunnel may be established based on the type 1 routing message or the type 4 routing message of an EVPN, instead of establishing a tunnel depending on the type 2 routing message, the type 3 routing message, or the type 5 routing message of the EVPN, so that a new tunnel establishment manner may be added, and correct establishment of the tunnel may be ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
fig. 2 is a flowchart of a tunnel establishment method in an embodiment of the present application;
fig. 3 is a block diagram of a tunnel establishment apparatus according to an embodiment of the present application;
fig. 4 is a hardware configuration diagram of an edge device according to an embodiment of the present application.
Detailed Description
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
The embodiment of the application provides a tunnel establishment method, which can be applied to an EVPN network adopting a multi-homing access networking. In an EVPN network, in order to improve reliability, a multi-homing access service may be provided to a host (e.g., a Virtual Machine (VM), a physical server, etc.) through at least two edge devices (e.g., VTEP devices, etc.). Referring to fig. 1, a schematic view of an application scenario of the embodiment of the present application is shown, taking an example of providing a multi-homing access service for a host through two edge devices. In practical applications, the multi-homing access service can be provided for the host through more edge devices, which is not limited to this.
Referring to fig. 1, edge device 121 and edge device 122 are used to provide multi-homed access services for host 111. The link between the edge device 121 and the host 111 may be referred to as an Ethernet Segment (ES), and the ES may be represented by an Ethernet Segment Identifier (ESI). The link between the edge device 122 and the host 111 may also be referred to as an ES, and the ES may be represented by ESI. The link between the edge device 121 and the host 111 and the link between the edge device 122 and the host 111 may correspond to the same ESI. For example, the ESI of the link between edge device 121 and host 111 is 1, and the ESI of the link between edge device 122 and host 111 is 1.
Referring to fig. 1, the edge device 122 is connected to the host 112, and the EVPN network does not provide multi-homed access services to the host 112 through multiple edge devices. Furthermore, edge device 123 is connected to host 113, and the EVPN network does not provide multi-homed access services to host 113 through multiple edge devices.
In summary, in the embodiment of the present application, the EVPN network may include a plurality of edge devices, and for convenience of distinction, these edge devices may be referred to as a first edge device and a second edge device. Wherein one edge device for providing the multi-homing access service for the host is referred to as a second edge device, and the remaining edge devices are referred to as first edge devices. For example, edge device 121 can be referred to as a second edge device, and edge devices 122 and 123 can be referred to as first edge devices. Alternatively, edge device 122 can be referred to as a second edge device, and edge devices 121 and 123 can be referred to as first edge devices.
In the above application scenario, referring to fig. 2, a flowchart of a tunnel establishment method is shown.
In step 201, the second edge device sends a first route advertisement message to the first edge device, where the first route advertisement message may include a tunnel encapsulation type.
In step 202, the first edge device receives a first route advertisement message sent by the second edge device.
In one example, the first route advertisement message may include, but is not limited to: ethernet auto-discovery routing messages (i.e., type 1 routing messages); alternatively, the messages are routed over an ethernet segment (i.e., type 4 routing messages). The Ethernet Auto Discovery Route (Ethernet Auto Discovery Route) message may be an MP-BGP based Route advertisement message for advertising ES information, i.e., type 1 routing of EVPN, in the multi-homed network. The Ethernet Segment Route (Ethernet Segment Route) message may be an MP-BGP based Route advertisement message for advertising ES information and VTEP information, i.e., EVPN class 4 routing, in the multi-homed network.
In one example, the first route advertisement message may carry an extended community attribute, and the extended community attribute may include a Tunnel Encapsulation type (Tunnel Encapsulation) field, which may include, but is not limited to: extensible virtual local area network encapsulation types; or, the network virtualizes the generic routing encapsulation type; alternatively, a multiprotocol label switching encapsulation type; alternatively, multiprotocol label switching and generic routing encapsulation types; alternatively, the extensible virtual local area network and the generic protocol extension encapsulation types.
For example, when the value of the tunnel encapsulation type field is 8, it indicates an extensible virtual local area network (VXLAN) encapsulation type. When the value of the tunnel Encapsulation type field is 9, the Network Virtualization using Generic Routing Encapsulation (NVGRE) Encapsulation type is represented. When the value of the tunnel encapsulation type field is 10, the tunnel encapsulation type field indicates a Multi Protocol Label Switching (MPLS) encapsulation type. When the value of the tunnel Encapsulation type field is 11, the tunnel Encapsulation type field indicates the multiprotocol Label Switching and Generic Routing Encapsulation (MPLS in GRE) Encapsulation type. When the value of the tunnel encapsulation type field is 12, it represents the encapsulation type of the eXtensible Virtual Local Area Network and the general Protocol Extension (VXLAN GPE).
Step 203, if the tunnel encapsulation type is the preset type, the first edge device establishes a tunnel with the second edge device, where one end of the tunnel is the first edge device and the other end is the second edge device. For example, the first edge device may establish a tunnel, such as a VXLAN tunnel, between the first edge device and the second edge device based on address information (e.g., IP address) of the first edge device and address information of the second edge device.
Specifically, after receiving the first route advertisement message, the first edge device obtains the tunnel encapsulation type from the first route advertisement message, and if the tunnel encapsulation type is the preset type, the first edge device may establish a VXLAN tunnel (hereinafter referred to as VXLAN tunnel a) according to the IP address of the first edge device and the IP address of the second edge device. For example, the source IP address of VXLAN tunnel a may be the IP address of the first edge device and the destination IP address of VXLAN tunnel a may be the IP address of the second edge device.
In one example, a preset type for triggering the establishment of the VXLAN tunnel may be agreed upon in advance. For example, the predetermined VXLAN encapsulation type is a predetermined type, or the predetermined NVGRE encapsulation type is a predetermined type, or the predetermined MPLS in GRE encapsulation type is a predetermined type, or the predetermined VXLAN GPE encapsulation type is a predetermined type, which is not limited herein.
In the subsequent process, the appointed VXLAN encapsulation type is a preset type as an example. Based on this, when the second edge device sends the first route advertisement message, if the VXLAN tunnel needs to be established by triggering, the tunnel encapsulation type is set to be the VXLAN encapsulation type (for example, the value of the tunnel encapsulation type field is 8). And if the VXLAN tunnel is not required to be established by triggering, not setting the tunnel encapsulation type as the VXLAN encapsulation type.
Further, after receiving the first route advertisement message and acquiring the tunnel encapsulation type from the first route advertisement message, the first edge device indicates that a VXLAN tunnel needs to be established if the tunnel encapsulation type is a VXLAN encapsulation type, and therefore, a VXLAN tunnel a can be established according to the IP address of the first edge device and the IP address of the second edge device. If the tunnel encapsulation type is not the VXLAN encapsulation type, it means that the VXLAN tunnel does not need to be established, and therefore, VXLAN tunnel a may not be established any more.
In one example, the first edge device can obtain the IP address of the second edge device before establishing VXLAN tunnel a based on the IP address of the first edge device and the IP address of the second edge device. Specifically, if the first route advertisement message includes the IP address of the second edge device, the first edge device may obtain the IP address of the second edge device from the first route advertisement message. Or, since the second edge device is a BGP neighbor of the first edge device and the first edge device is configured with an IP address of the BGP neighbor, the first edge device may use the IP address of the BGP neighbor as the IP address of the second edge device.
To sum up, the first edge device may obtain its own IP address, obtain the IP address of the second edge device, and then establish the VXLAN tunnel a using its own IP address and the IP address of the second edge device.
As can be seen from the above technical solutions, in this embodiment of the application, after receiving a routing Advertisement message (such as a type 1 routing message or a type 4 routing message) sent by a second edge device, a first edge device may establish a VXLAN tunnel, that is, a VXLAN tunnel may be established based on the type 1 routing message or the type 4 routing message of an EVPN, instead of establishing a VXLAN tunnel based on a type 2 routing message (MAC/IP Address) that does not depend on the EVPN any more, for advertising a routing of a MAC (Media Access Control) Address and an IP Address), a type 3 routing message (Inclusive Multicast Ethernet Tag Route) or a type 5 routing message (IP Prefix Route for advertising a routing of an IP Prefix), and establish a VXLAN tunnel.
Optionally, in an example, the first routing advertisement message may further include ES information (e.g., ESI), and the ES information is ES information corresponding to the host when the second edge device provides the multihoming access service for the host. Based on this, after the first edge device receives the first route advertisement message sent by the second edge device, the first edge device may further determine, according to the ES information, whether the first edge device and the second edge device provide the multi-homing access service for the same host, and perform corresponding processing according to a determination result.
When the second edge device provides the multihoming access service for the host, the second edge device may send a first route advertisement message to the first edge device, where the first route advertisement message may include ES information corresponding to the host, and the first edge device may receive the first route advertisement message.
Referring to fig. 1, the second edge device is edge device 121, and the first edge device is edge device 122 and edge device 123, for example. Since edge device 121 and edge device 122 are used to provide multi-homing access services for host 111, edge device 121 may send a first route advertisement message to edge device 122 and edge device 123, which may include ES information corresponding to host 111, which may be the ESI of the link between edge device 121 and host 111, such as ESI 1. In this way, both edge device 122 and edge device 123 may receive the first route advertisement message.
Taking the processing procedure of the edge device 122 as an example, after receiving the first route advertisement message, the edge device 122 may obtain the ESI1 from the first route advertisement message. Since edge device 122 is configured to provide multi-home access service for host 111, and ESI of the link between edge device 122 and host 111 is ESI1, it may be determined that edge device 122 and edge device 121 provide multi-home access service for the same host 111 by using ESI1 in the first route advertisement message, and then adopt a processing manner of multi-home access service.
When the processing mode of the multi-homing access service is adopted, only 1 edge device of the edge devices 122 and 121 sends a broadcast message to the host 111. For example, an edge device with a small agreed IP address sends a broadcast message to host 111. Based on this, when the edge device 122 receives the broadcast packet sent by the edge device 123, assuming that the IP address of the edge device 122 is small, the edge device 122 may forward the broadcast packet to the host 111; assuming that the IP address of edge device 122 is large, the broadcast packet is no longer forwarded to host 111.
Of course, the processing manner of the multi-homing access service is only an example, and is not limited thereto.
Taking the processing procedure of the edge device 123 as an example, after receiving the first route advertisement message, the edge device 123 may obtain the ESI1 from the first route advertisement message. Since the edge device 123 does not provide the multi-homing access service for the host 111, it can be determined that the edge device 123 and the edge device 121 do not provide the multi-homing access service for the same host, and a processing manner of the multi-homing access service is not required.
Further, as shown in fig. 1, assuming that the host 111 is a silent host, that is, the host 111 does not send an ARP packet after being online, the edge device 121 is not triggered to send a type 2 routing message, a type 3 routing message, or a type 5 routing message of the EVPN to the edge device 122 and the edge device 123. However, edge device 121 can send EVPN type 1 routing messages or type 4 routing messages to edge device 122 and edge device 123. Thus, edge device 122 and edge device 123 cannot establish a VXLAN tunnel associated with edge device 121 based on a type 2 routing message, a type 3 routing message, or a type 5 routing message, but can establish a VXLAN tunnel associated with edge device 121 based on a type 1 routing message or a type 4 routing message.
Thus, if host 112 sends a message addressed to host 111, edge device 122 may send the message to edge device 121 via the VXLAN tunnel, and edge device 121 sends the message to host 111. If host 113 sends a message with a destination address of host 111, edge device 123 may send the message to edge device 121 through the VXLAN tunnel, and edge device 121 sends the message to host 111.
Optionally, in the above embodiment, the first Route advertisement message may further include a Route Target (RT) attribute. Based on this, the first edge device may also compare whether the RT attribute included in the first route advertisement message is the same as the RT attribute configured locally by the first edge device before establishing the VXLAN tunnel a. If so, the first edge device may establish VXLAN tunnel a. If not, the first edge device may discard the first route advertisement message without establishing VXLAN tunnel a.
Optionally, in the above embodiment, the first route advertisement message may further include a first Network Identifier (such as a VXLAN Network Identifier (VNI)) of a home Network (i.e., a VXLAN Network) of the second edge device, and this first Network Identifier is taken as the Network Identifier R for example.
Based on this, after the first edge device establishes the VXLAN tunnel a with the second edge device, it may also compare whether the network identifier R included in the first route advertisement message is the same as the network identifier of the home network of the first edge device. If the network identifier is the same, that is, the network identifier of the home network of the first edge device is also the network identifier R, the first edge device may further establish a mapping relationship between the network identifier R and a tunnel identifier of the VXLAN tunnel a (e.g., VXLAN tunnel a).
Optionally, in an example, after the first edge device establishes the VXLAN tunnel a with the second edge device, the VXLAN tunnel a may also be learned into a forwarding entry of the first edge device, and in order to learn the VXLAN tunnel a into the forwarding entry, the following processing may be performed.
In case one, the second edge device sends a second route advertisement message to the first edge device, which may include the first host address and a second network identification of the home network of the second edge device. After receiving the second route advertisement message sent by the second edge device, the first edge device may query the mapping relationship (i.e., the mapping relationship between the network identifier and the tunnel identifier of the VXLAN tunnel) through the second network identifier, so as to obtain the tunnel identifier of the VXLAN tunnel corresponding to the second network identifier. The first edge device may then generate a first forwarding table entry, which may include the first host address and a first outgoing interface, which is the tunnel identification of the VXLAN tunnel.
Referring to fig. 1, the edge device 121 may learn a host address (e.g., an IP address and/or a MAC address, etc.) of the host 111, for example, the edge device 121 may learn the host address of the host 111 based on an ARP packet sent by the host 111, which is not limited in this regard. Edge device 121 may then send a second route advertisement message (e.g., EVPN type 2 route message, etc.) to edge device 122 and edge device 123, which may include the host address and network identification R of host 111.
After receiving the second route advertisement message sent by the edge device 121, the edge device 122 queries the mapping relationship through the network identifier R included in the second route advertisement message, so as to obtain the tunnel identifier of the VXLAN tunnel a. Edge device 122 then generates a forwarding entry that may include the host address of host 111 and an outgoing interface that is the tunnel identification of VXLAN tunnel a.
Further, after receiving the message with the destination address of the host 111, the edge device 122 may send the message to the edge device 121 through the VXLAN tunnel a based on the forwarding table.
In addition, the processing flow of the edge device 123 receiving the second route notification message is similar to the processing flow of the edge device 122 receiving the second route notification message, and is not repeated here.
In the above embodiment, the forwarding table entry may be a two-layer forwarding table entry (e.g., an MAC forwarding table entry), or may be a three-layer forwarding table entry (e.g., a routing forwarding table entry), and the forwarding table entry is not limited.
Case two, the second edge device sends a third route advertisement message to the first edge device, which may include the second host address. After receiving the third route notification message sent by the second edge device, the first edge device may determine, according to the address information of the first edge device and the address information of the second edge device, the VXLAN tunnel between the first edge device and the second edge device. Then, the first edge device may generate a second forwarding entry, where the second forwarding entry may include the second host address and a second outgoing interface, and the second outgoing interface is a tunnel identifier of the VXLAN tunnel.
Referring to fig. 1, edge device 121 can learn a host address (e.g., IP address and/or MAC address, etc.) of host 111 and send a third route advertisement message (e.g., EVPN class 2 route message, etc.) to edge device 122, which can include the host address of host 111.
After receiving the third route advertisement message, edge device 122 determines a VXLAN tunnel, i.e., VXLAN tunnel a, between edge device 122 and edge device 121 according to the IP address of edge device 121 and the IP address of edge device 122. Edge device 122 generates a forwarding entry that may include the host address of host 111 and an outgoing interface, and the outgoing interface is the tunnel identification of VXLAN tunnel a.
In the above embodiment, the forwarding table entry may be a two-layer forwarding table entry (e.g., an MAC forwarding table entry), or may be a three-layer forwarding table entry (e.g., a routing forwarding table entry), and the forwarding table entry is not limited.
Before edge device 122 determines the VXLAN tunnel between edge device 122 and edge device 121 according to the IP address of edge device 121 and the IP address of edge device 122, the IP address of edge device 121 may also be obtained. Specifically, if the third route advertisement message includes the IP address of the edge device 121, the IP address of the edge device 121 may be obtained from the third route advertisement message. Alternatively, since edge device 121 is a BGP neighbor of edge device 122 and edge device 122 is configured with an IP address of the BGP neighbor, edge device 122 may use the IP address of the BGP neighbor as the IP address of edge device 121.
Based on the same application concept as the method, an embodiment of the present application further provides a tunnel establishment apparatus, applied to a first edge device, as shown in fig. 3, which is a structural diagram of the apparatus, and the apparatus includes:
a receiving module 31, configured to receive a first route advertisement message sent by a second edge device, where the first route advertisement message includes a tunnel encapsulation type; wherein the first route advertisement message specifically includes: automatically discovering a routing message by the Ethernet; or, an ethernet segment routing message;
the establishing module 32 is configured to establish a tunnel with the second edge device when the tunnel encapsulation type is a preset type, where one end of the tunnel is the first edge device, and the other end of the tunnel is the second edge device.
In one example, the first route advertisement message further includes ES information corresponding to a host when the second edge device provides a multihoming access service for the host;
the device further comprises (not shown in the figures): a determining module, configured to determine whether the first edge device and the second edge device provide a multi-homing access service for a same host according to the ES information.
In an example, the establishing module 32 is further configured to, when the first route advertisement message includes a first network identifier of a home network of the second edge device, if the network identifier of the home network of the first edge device is the first network identifier, establish a mapping relationship between the first network identifier and a tunnel identifier of the tunnel;
the receiving module 31 is further configured to receive a second route advertisement message sent by the second edge device, where the second route advertisement message includes a first host address and a second network identifier of a home network of the second edge device;
the device further comprises (not shown in the figures):
the query module is used for querying the mapping relation through the second network identifier to obtain a tunnel identifier corresponding to the second network identifier;
a generating module, configured to generate a first forwarding table entry, where the first forwarding table entry includes the first host address and a first outgoing interface, and the first outgoing interface is the tunnel identifier.
In an example, the receiving module 31 is further configured to receive a third route notification message sent by the second edge device, where the third route notification message includes the second host address;
the device further comprises (not shown in the figures):
a determining module, configured to determine a tunnel between the first edge device and the second edge device according to the address information of the first edge device and the address information of the second edge device;
a generating module, configured to generate a second forwarding table entry, where the second forwarding table entry includes the second host address and a second outgoing interface, and the second outgoing interface is a tunnel identifier of the determined tunnel.
The preset types specifically include: extensible virtual local area network encapsulation types; or, the network virtualizes the generic routing encapsulation type; alternatively, a multiprotocol label switching encapsulation type; alternatively, multiprotocol label switching and generic routing encapsulation types; alternatively, the extensible virtual local area network and the generic protocol extension encapsulation types.
For an edge device (e.g., a first edge device) provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture may be as shown in fig. 4. The method comprises the following steps: a machine-readable storage medium and a processor, wherein:
a machine-readable storage medium: the instruction code is stored.
A processor: the method comprises the steps of communicating with a machine-readable storage medium, reading and executing instruction codes stored in the machine-readable storage medium, and realizing the tunnel establishment operation disclosed in the above example of the application.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A tunnel establishment method is applied to a first edge device and comprises the following steps:
receiving a first route notification message sent by a second edge device, wherein the first route notification message comprises a tunnel encapsulation type; wherein the first route advertisement message specifically includes: automatically discovering a routing message by the Ethernet; or, an ethernet segment routing message; the Ethernet automatic discovery routing message is a routing notification message based on a multi-protocol border gateway protocol (MP-BGP) and is used for notifying ES information in the multi-homing networking; the Ethernet segment routing message is a MP-BGP-based routing notification message used for notifying ES information and VTEP information of an extensible virtual local area network tunnel endpoint in the multi-homing networking;
and if the tunnel encapsulation type is a preset type, establishing a tunnel between the first edge device and the second edge device, wherein one end of the tunnel is the first edge device, and the other end of the tunnel is the second edge device.
2. The method of claim 1, wherein the first route advertisement message further includes ES information of an ethernet segment, and the ES information is ES information corresponding to a host when the second edge device provides a multihoming access service for the host;
after receiving the first route advertisement message sent by the second edge device, the method further includes:
and determining whether the first edge device and the second edge device provide multi-homing access service for the same host according to the ES information.
3. The method of claim 1, wherein after the establishing the tunnel with the second edge device, the method further comprises:
if the first route notification message includes the first network identifier of the home network of the second edge device, and the network identifier of the home network of the first edge device is the first network identifier, establishing a mapping relationship between the first network identifier and the tunnel identifier of the tunnel;
receiving a second route notification message sent by a second edge device, wherein the second route notification message comprises a first host address and a second network identifier of a home network of the second edge device;
inquiring the mapping relation through the second network identifier to obtain a tunnel identifier corresponding to the second network identifier;
and generating a first forwarding table entry, where the first forwarding table entry includes the first host address and a first outgoing interface, and the first outgoing interface is the tunnel identifier.
4. The method of claim 1, wherein after the establishing the tunnel with the second edge device, the method further comprises:
receiving a third route notification message sent by a second edge device, wherein the third route notification message comprises a second host address;
determining a tunnel between the first edge device and the second edge device according to the address information of the first edge device and the address information of the second edge device;
and generating a second forwarding table entry, where the second forwarding table entry includes the second host address and a second outgoing interface, and the second outgoing interface is the determined tunnel identifier of the tunnel.
5. The method according to claim 1, wherein the preset type specifically comprises:
extensible virtual local area network encapsulation types; or, the network virtualizes the generic routing encapsulation type; alternatively, a multiprotocol label switching encapsulation type; alternatively, multiprotocol label switching and generic routing encapsulation types; alternatively, the extensible virtual local area network and the generic protocol extension encapsulation types.
6. A tunnel establishment apparatus, applied to a first edge device, comprising:
a receiving module, configured to receive a first route advertisement message sent by a second edge device, where the first route advertisement message includes a tunnel encapsulation type; wherein the first route advertisement message specifically includes: automatically discovering a routing message by the Ethernet; or, an ethernet segment routing message; the Ethernet automatic discovery routing message is a routing notification message based on a multi-protocol border gateway protocol (MP-BGP) and is used for notifying ES information in the multi-homing networking; the Ethernet segment routing message is a MP-BGP-based routing notification message used for notifying ES information and VTEP information of an extensible virtual local area network tunnel endpoint in the multi-homing networking;
and the establishing module is used for establishing a tunnel between the first edge device and the second edge device when the tunnel encapsulation type is a preset type, wherein one end of the tunnel is the first edge device, and the other end of the tunnel is the second edge device.
7. The apparatus of claim 6, wherein the first route advertisement message further includes ES information of an ethernet segment, and the ES information is ES information corresponding to a host when the second edge device provides a multi-homing access service for the host; the device further comprises:
a determining module, configured to determine whether the first edge device and the second edge device provide a multi-homing access service for a same host according to the ES information.
8. The apparatus of claim 6,
the establishing module is further configured to, when the first route advertisement message includes a first network identifier of a home network of the second edge device, if the network identifier of the home network of the first edge device is the first network identifier, establish a mapping relationship between the first network identifier and the tunnel identifier of the tunnel;
the receiving module is further configured to receive a second route advertisement message sent by the second edge device, where the second route advertisement message includes the first host address and a second network identifier of a home network of the second edge device;
the device further comprises:
the query module is used for querying the mapping relation through the second network identifier to obtain a tunnel identifier corresponding to the second network identifier;
a generating module, configured to generate a first forwarding table entry, where the first forwarding table entry includes the first host address and a first outgoing interface, and the first outgoing interface is the tunnel identifier.
9. The apparatus of claim 6,
the receiving module is further configured to receive a third route notification message sent by the second edge device, where the third route notification message includes a second host address;
the device further comprises:
a determining module, configured to determine a tunnel between the first edge device and the second edge device according to the address information of the first edge device and the address information of the second edge device;
a generating module, configured to generate a second forwarding table entry, where the second forwarding table entry includes the second host address and a second outgoing interface, and the second outgoing interface is a tunnel identifier of the determined tunnel.
10. The apparatus according to claim 6, wherein the preset type specifically comprises:
extensible virtual local area network encapsulation types; or, the network virtualizes the generic routing encapsulation type; alternatively, a multiprotocol label switching encapsulation type; alternatively, multiprotocol label switching and generic routing encapsulation types; alternatively, the extensible virtual local area network and the generic protocol extension encapsulation types.
CN201811369370.7A 2018-11-16 2018-11-16 Tunnel establishment method and device Active CN109412926B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811369370.7A CN109412926B (en) 2018-11-16 2018-11-16 Tunnel establishment method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811369370.7A CN109412926B (en) 2018-11-16 2018-11-16 Tunnel establishment method and device

Publications (2)

Publication Number Publication Date
CN109412926A CN109412926A (en) 2019-03-01
CN109412926B true CN109412926B (en) 2021-04-27

Family

ID=65473541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811369370.7A Active CN109412926B (en) 2018-11-16 2018-11-16 Tunnel establishment method and device

Country Status (1)

Country Link
CN (1) CN109412926B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112311645A (en) * 2019-07-31 2021-02-02 中兴通讯股份有限公司 Method, system and first GW for realizing DCI three-layer communication
CN113872845B (en) * 2020-06-30 2023-04-07 华为技术有限公司 Method for establishing VXLAN tunnel and related equipment
CN112511401B (en) * 2020-11-19 2022-02-15 锐捷网络股份有限公司 Network connection method, device, equipment and medium
CN113765783B (en) * 2021-08-05 2022-11-18 新华三大数据技术有限公司 Communication method and device
CN117640501A (en) * 2022-08-18 2024-03-01 维沃移动通信有限公司 Message transmission method, communication device, and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494686A (en) * 2018-02-28 2018-09-04 新华三技术有限公司 Route processing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105337865B (en) * 2014-06-03 2018-09-21 华为技术有限公司 A kind of methods, devices and systems for establishing forwarding-table item
US10116467B2 (en) * 2016-10-17 2018-10-30 Cisco Technology, Inc. Ethernet tag mapping in virtual private wire service using ethernet virtual private network
CN108574616B (en) * 2017-03-14 2021-02-12 华为技术有限公司 Method, equipment and system for processing route
CN108600109B (en) * 2018-03-19 2020-12-04 新华三技术有限公司 Message forwarding method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494686A (en) * 2018-02-28 2018-09-04 新华三技术有限公司 Route processing method and device

Also Published As

Publication number Publication date
CN109412926A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
CN109412926B (en) Tunnel establishment method and device
US10404592B2 (en) System and method to facilitate content forwarding using bit index explicit replication (BIER) in an information-centric networking (ICN) environment
EP3240247B1 (en) Egress peer engineering using ipv4-mapped ipv6 addresses
CN109104364B (en) Designated forwarder election method and device
CN109729012B (en) Unicast message transmission method and device
CN112087386B (en) Message processing method, device and system
CN108259299B (en) Forwarding table item generating method and device and machine-readable storage medium
CN108259347B (en) Message transmission method and device
CN110430076B (en) Route management method and device
CN108718278B (en) Message transmission method and device
WO2018082652A1 (en) Information transmission method, apparatus and system and apparatus
CN108600109B (en) Message forwarding method and device
CN110798403B (en) Communication method, communication device and communication system
CN107547391B (en) Message transmission method and device
CN109412949B (en) Data message transmission method and device
CN108600074B (en) Method and device for forwarding multicast data message
US10205663B1 (en) Managing host computing devices
CN108965092B (en) Data message transmission method and device
CN106161253B (en) Message processing method and device
CN106982163B (en) Method and gateway for acquiring route on demand
CN108494701B (en) Load sharing method and device
CA3104756C (en) Loop avoidance communications method, device, and system
CN108199968B (en) Route processing method and device
CN110300057B (en) Method, computer readable medium and provider edge device for agent advertisement
US20200314016A1 (en) Tunneling inter-domain stateless internet protocol multicast packets

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230602

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.