Tunnel BFD session establishment method and device

By automatically interacting between edge nodes to generate and send BFD session establishment packets, the efficiency and accuracy of manual configuration of tunnel BFD sessions are solved, and automatic establishment and efficient configuration of tunnel BFD sessions are realized.

CN112491638BActive Publication Date: 2025-04-04ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010753186.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-30
Publication Date
2025-04-04
Estimated Expiration
2040-07-30

AI Technical Summary

Technical Problem

In the prior art, tunnel BFD sessions are established by manual configuration, which leads to high labor and time costs, and is prone to configuration errors, and lacks automated solutions.

Method used

By automatically interacting between edge nodes, BFD session establishment packets are generated and sent, including BFD status fields, to automatically switch the BFD state of the edge node, so as to establish a tunnel BFD session when the BFD state of the edge node and the BFD state of the opposite node are in a preset state.

Benefits of technology

Automatic establishment of tunnel BFD sessions is realized, which significantly improves the efficiency and accuracy of BFD session establishment, and avoids errors and high costs caused by manual configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112491638B_ABST
    Figure CN112491638B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method and device for establishing a tunnel BFD session, wherein the method for establishing a tunnel BFD session includes: obtaining first content information, generating a first tunnel bidirectional forwarding detection BFD session establishment message according to the first content information, sending the first tunnel BFD session establishment message to the second edge node; receiving a second tunnel BFD session establishment message sent by the second edge node; and establishing a tunnel BFD session between the first edge node and the second edge node when the BFD state of the first edge node and the BFD state of the second edge node are in a preset state. Therefore, the embodiment of the present invention can solve a series of problems caused by the tunnel BFD session in the related art that can only be established by manual configuration, so as to achieve the effect of automatically establishing the tunnel BFD session.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of communications, and in particular to a method and device for establishing a tunnel BFD session. Background Art

[0002] Overlay Network is a widely used network type. Figure 1 It is a schematic diagram of the structure of the stacked network provided according to the relevant technology, such as Figure 1 As shown, the stacked network includes two different types of network nodes, edge nodes and intermediate nodes. Customer equipment (Customer Equipment) connects to the edge node to access the stacked network. The edge node will add an outer encapsulation to all data packets entering the stacked network. The outer encapsulation includes an outer source address and an outer destination address for forwarding by the intermediate node, wherein the outer source address points to the local edge node to which the outer encapsulation is added, and the outer destination address points to the remote edge node. After the remote edge node receives the data packet to which the outer encapsulation is added, it will first remove the outer encapsulation of the data packet, and then send the data packet without the outer encapsulation to the client-side port of the connected customer equipment.

[0003] During the implementation of the cascade network, one or more tunnels for message forwarding need to be established between two edge nodes based on the client-side ports to which they are connected. Generally speaking, a tunnel bidirectional forwarding detection (BFD) session needs to be enabled for each tunnel to perform connectivity detection on the tunnel. In the related art, the establishment of the tunnel BFD session usually relies on manual configuration. Since the number of edge nodes in the cascade network of the data center is very large, the manual configuration process not only consumes a lot of manpower and time costs for configuration operations, but also easily generates configuration errors.

[0004] In view of a series of problems caused by the establishment of the tunnel BFD session by manual configuration in the above-mentioned related technologies, no effective solutions have been proposed in the related technologies. Summary of the invention

[0005] The embodiments of the present invention provide a method and device for establishing a tunnel BFD session, so as to at least solve a series of problems caused by the establishment of a tunnel BFD session by manual configuration in the related art.

[0006] According to an embodiment of the present invention, a method for establishing a tunnel BFD session is provided, wherein the method is applied to a first edge node and includes:

[0007] Acquire first content information, generate a first tunnel bidirectional forwarding detection BFD session establishment message according to the first content information, and send the first tunnel BFD session establishment message to the second edge node; wherein the first tunnel BFD session establishment message carries a first BFD state field, and the first BFD state field is used to instruct the second edge node to switch the BFD state of the second edge node according to the first BFD state field;

[0008] receiving a second tunnel BFD session establishment message sent by the second edge node; wherein the second tunnel BFD session establishment message is generated by the second edge node according to the second content information obtained in advance, and the second tunnel BFD session establishment message carries a second BFD state field, and the second BFD state field is used to instruct the first edge node to switch the BFD state of the first edge node according to the second BFD state field;

[0009] In a case where the BFD state of the first edge node and the BFD state of the second edge node are in a preset state, a tunnel BFD session is established between the first edge node and the second edge node.

[0010] According to another embodiment of the present invention, a tunnel BFD session establishment device is further provided, characterized in that it is arranged in a first edge node, and the device includes:

[0011] A sending module, used to obtain first content information, generate a first tunnel BFD session establishment message according to the first content information, and send the first tunnel BFD session establishment message to the second edge node; wherein the first tunnel BFD session establishment message carries a first BFD state field, and the first BFD state field is used to instruct the second edge node to switch the BFD state of the second edge node according to the first BFD state field;

[0012] A receiving module, configured to receive a second tunnel BFD session establishment message sent by the second edge node; wherein the second tunnel BFD session establishment message is generated by the second edge node according to the second content information obtained in advance, and the second tunnel BFD session establishment message carries a second BFD state field, and the second BFD state field is used to instruct the first edge node to switch the BFD state of the first edge node according to the second BFD state field;

[0013] An establishing module is used to establish a tunnel BFD session between the first edge node and the second edge node when the BFD state of the first edge node and the BFD state of the second edge node are in a preset state.

[0014] According to another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when running.

[0015] According to another embodiment of the present invention, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0016] According to the embodiment of the present invention, since the first edge node can obtain the first content information, and generate the first tunnel bidirectional forwarding detection BFD session establishment message according to the first content information, the first tunnel BFD session establishment message is sent to the second edge node; wherein the first tunnel BFD session establishment message carries a first BFD state field, and the first BFD state field is used to indicate that the second edge node switches the BFD state of the second edge node according to the first BFD state field; and further, the first edge node receives the second tunnel BFD session establishment message sent by the second edge node; wherein the second tunnel BFD session establishment message is generated by the second edge node according to the pre-acquired second content information, and the second tunnel BFD session establishment message carries a second BFD state field, and the second BFD state field is used to indicate that the first edge node switches the BFD state of the first edge node according to the second BFD state field; in this way, when the BFD state of the first edge node and the BFD state of the second edge node are in a preset state, a tunnel BFD session is established between the first edge node and the second edge node. Since the embodiment of the present invention can realize the automatic establishment of the tunnel BFD session between the first edge node and the second edge node without relying on manual operation, the embodiment of the present invention can solve a series of problems caused by the tunnel BFD session relying on manual configuration in the related technology, so as to achieve the effect of realizing the automatic establishment of the tunnel BFD session. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a structural schematic diagram of a stacked network provided according to the relevant technology;

[0018] Figure 2 1 is a schematic diagram of the format of a VXLAN tunnel encapsulation header provided according to an embodiment of the present invention;

[0019] Figure 3 1 is a schematic diagram of the format of a VXLAN-GPE tunnel encapsulation header provided according to an embodiment of the present invention;

[0020] Figure 4 is a schematic diagram of the format of a Geneve tunnel encapsulation header provided according to an embodiment of the present invention;

[0021] Figure 5 It is a schematic diagram of the format of a BFD control message provided according to an embodiment of the present invention;

[0022] Figure 6 is a schematic diagram of a BFD session state change provided according to an embodiment of the present invention;

[0023] Figure 7 is a flowchart of a method for establishing a tunnel BFD session according to an embodiment of the present invention;

[0024] Figure 8 It is a schematic diagram of the format of a first tunnel BFD session establishment message provided according to an embodiment of the present invention;

[0025] Fig. 9 It is a schematic diagram of the format of a second tunnel BFD session establishment message provided according to an embodiment of the present invention;

[0026] Fig.10 1 is a schematic diagram of a format of a BFD session establishment message provided according to an exemplary embodiment of the present invention (I);

[0027] Fig.11 1 is a schematic diagram of the format of a BFD session establishment message provided according to an exemplary embodiment of the present invention (II);

[0028] Fig.12 1 is a schematic diagram of the format of a BFD session establishment message provided according to an exemplary embodiment of the present invention (III);

[0029] Fig.13 The present invention is a flowchart of a device for establishing a tunnel BFD session according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0032] To further illustrate the method and device for establishing a tunnel BFD session in the embodiment of the present invention, the application scenario of the method and device for establishing a tunnel BFD session in the embodiment of the present invention is described below:

[0033] In the overlay network technology, the data center servers as client devices can be interconnected through the overlay network tunnels established between edge nodes. Generally speaking, the overlay network tunnel protocols involved in the overlay network technology include the Virtual eXtensible Local Area Network (VXLAN) tunnel protocol, the Generic Protocol Extension for VXLAN (VXLAN-GPE) tunnel protocol, and the Generic Network Virtualization Encapsulation (Geneve) tunnel protocol. The above three tunnel protocols are indicated by specific User Datagram Protocol (UDP) destination port numbers.

[0034] In one example, Figure 2 : is a schematic diagram of the format of a VXLAN tunnel encapsulation header provided according to an embodiment of the present invention, such as Figure 2 As shown, the VXLAN tunnel protocol can be indicated by the UDP destination port number 4789. Figure 3 : is a schematic diagram of the format of a VXLAN-GPE tunnel encapsulation header provided according to an embodiment of the present invention, such as Figure 3 As shown, the VXLAN-GPE tunnel protocol can be indicated by the UDP destination port number 4790. Figure 4 : is a schematic diagram of the format of the Geneve tunnel encapsulation header provided according to an embodiment of the present invention, such as Figure 4 As shown, the Geneve tunnel protocol can be indicated by the UDP destination port number 6081. The above three tunnel encapsulation headers all carry a virtual network identifier (Virtual Network Interface, VNI) used to isolate virtual networks. At the same time, the VXLAN-GPE tunnel encapsulation header and the Geneve tunnel encapsulation header also carry the Next Protocol or Protocol Type used to indicate the next layer protocol, while VXLAN does not carry a similar indication field; therefore, the VXLAN-GPE tunnel protocol and the Geneve tunnel protocol can support multiple different types of encapsulation modes, such as Ethernet frame encapsulation mode and Internet Protocol (IP) message encapsulation mode; VXLAN can only support Ethernet frame encapsulation mode.

[0035] Generally speaking, VXLAN tunnels, VXLAN-GPE tunnels, and Geneve tunnels can be connected through the BFD basic protocol. When the BFD basic protocol is applied to the connectivity detection of VXLAN tunnels, VXLAN-GPE tunnels, and Geneve tunnels, the BFD session established on the above tunnels can be called a tunnel BFD session.

[0036] Figure 5 1 is a schematic diagram of the format of a BFD control message provided according to an embodiment of the present invention. The BFD control message (BFD Detection Control Packet) specified by the BFD basic protocol has a format such as Figure 5 In a BFD control message, the local identifier (My Discriminator) and the peer identifier (Your Discriminator) are used to identify the BFD session to which the BFD control message belongs. The former indicates the identifier configured locally for the BFD session, and the latter indicates the identifier configured on the peer for the BFD session.

[0037] The establishment of a tunnel BFD session usually requires that the two ends of the session send three BFD control packets to each other to achieve the status of the BFD session from downline (DOWN), to startup (INIT), and then to online (UP). Figure 6 2 is a schematic diagram of a BFD session state change according to an embodiment of the present invention. The state change of the BFD session is as follows: Figure 6 As shown. Once both ends of the BFD session are in the online state, it indicates that the BFD session is successfully established. BFD sessions usually run in asynchronous mode. In this mode, the network nodes at both ends of the BFD session periodically send BFD control packets to each other. If one end of the BFD session does not receive the BFD control packet sent by the other end within a certain detection time, it is announced that the BFD session has changed from the online state to the offline state, and subsequent operations such as protection switching may be triggered.

[0038] Currently, the establishment and sending of the above-mentioned BFD control messages and the establishment of tunnel BFD sessions are all manually configured by the management personnel. Among the large number of edge nodes in the data center stacking network, one or more message forwarding tunnels will be established between each two edge nodes based on the client-side port, and a tunnel BFD session can be enabled for each tunnel. Therefore, establishing a BFD session through the above-mentioned manual configuration method not only requires a lot of manpower and time costs for configuration operations, but also easily leads to configuration errors.

[0039] To this end, an embodiment of the present invention provides a method and device for establishing a tunnel BFD session, which can automatically establish the above-mentioned tunnel BFD session, thereby significantly improving the efficiency and accuracy of BFD session establishment. The following is an explanation of the method and device for establishing a tunnel BFD session in an embodiment of the present invention:

[0040] On the one hand, an embodiment of the present invention provides a tunnel BFD session establishment method, which is applied to a first edge node. Figure 7 : is a flow chart of a method for establishing a tunnel BFD session according to an embodiment of the present invention. Figure 7 As shown, the tunnel BFD session establishment method in the embodiment of the present invention includes:

[0041] S102, the first edge network node obtains the first content information, generates a first tunnel BFD session establishment message according to the first content information, and sends the first tunnel BFD session establishment message to the second edge node; wherein the first tunnel BFD session establishment message carries a first BFD state field, and the first BFD state field is used to instruct the second edge node to switch the BFD state of the second edge node according to the first BFD state field;

[0042] S104, the first edge network node receives a second tunnel BFD session establishment message sent by the second edge node; wherein the second tunnel BFD session establishment message is generated by the second edge node according to the second content information obtained in advance, and the second tunnel BFD session establishment message carries a second BFD state field, and the second BFD state field is used to instruct the first edge node to switch the BFD state of the first edge node according to the second BFD state field;

[0043] S106: When the BFD state of the first edge node and the BFD state of the second edge node are in a preset state, establish a tunnel BFD session between the first edge node and the second edge node.

[0044] It should be noted that the first edge node and the second edge node in the embodiment of the present invention are used to indicate the edge nodes on both sides of the tunnel. In the embodiment of the present invention, the order of step S102 and step S104 can be swapped. The embodiment of the present invention does not limit the order between the first edge node generating and sending the first tunnel BFD session establishment message to the second edge node, and the second edge node generating and sending the second tunnel BFD session establishment message to the first edge node. The above process is explained by way of example below:

[0045] In one example, the first edge node may first generate a first tunnel BFD session establishment message according to the first content information, send the first tunnel BFD session establishment message to the second edge node, and then receive the second tunnel BFD session establishment message sent by the second edge node. In another example, the first edge node may first receive the second tunnel BFD session establishment message sent by the second edge node, and then generate a first tunnel BFD session establishment message according to the first content information, and send the first tunnel BFD session establishment message to the second edge node. In another example, the first edge node may receive the second tunnel BFD session establishment message sent by the second edge node, and at the same time generate a first tunnel BFD session establishment message according to the first content information, and send the first tunnel BFD session establishment message to the second edge node.

[0046] It should be noted that, in the above example, the edge node that preferentially generates and sends the tunnel BFD session establishment message to another edge node may be used as the first edge node, and the corresponding other edge node may be used as the second edge node.

[0047] In an embodiment of the present invention, a management entity of the data center network may send a tunnel BFD session establishment request to the first edge network node to instruct the first edge node to establish a tunnel BFD session with the second edge node, that is, the first edge network node obtains a tunnel BFD session establishment request for indicating the establishment of a tunnel BFD session between the first edge node and the second edge node before obtaining the first content information in the above step S102. It should be noted that the above tunnel BFD session establishment request can be sent not only to the first edge node, but also to the second edge node, and can also be sent to the first edge node and the second edge node at the same time. The embodiment of the present invention does not limit this.

[0048] On the other hand, in the embodiment of the present invention, other indication methods may be used to indicate that a tunnel BFD session is established between the first edge node and the second edge node, which is not limited in the embodiment of the present invention.

[0049] The following is a description of a process in which the first edge node obtains the first content information after obtaining the indication of tunnel BFD session establishment through an exemplary embodiment:

[0050] In an exemplary embodiment, in the above step S102, obtaining the first content information includes:

[0051] Sending a first request message to a second edge node, so that the second edge node returns a first response message in response to the first request message; wherein the first response message carries first content information;

[0052] The first content information is acquired according to the first response message.

[0053] Through the technical solution in the above example embodiment, the first edge node can request the second edge node to return a first response message carrying the first content information through a first request message, so that the first edge node can obtain the first content information and then generate and send a first tunnel BFD session establishment message. It should be noted that the first content information carried in the first response message returned by the second edge node can be determined by the second edge node according to the client-side port to which it is connected. In an example embodiment, the above first content information includes at least one of the following:

[0054] The media access control layer MAC address of the client-side port connected to the second edge node, the Internet Protocol IP address of the client-side port connected to the second edge node, the VNI to which the client-side port connected to the second edge node belongs, the tunnel encapsulation protocol used by the client-side port connected to the second edge node, the tunnel encapsulation mode used by the client-side port connected to the second edge node, and the tunnel BFD session local identifier configured for the first edge node for the client-side port connected to the second edge node.

[0055] Figure 8 : is a schematic diagram of the format of a first tunnel BFD session establishment message provided according to an embodiment of the present invention. The encapsulation format of the first tunnel BFD session establishment message is as follows: Figure 8 As shown, Figure 8 As shown, in the above-mentioned first tunnel BFD session establishment message, the first BFD status field is encapsulated in the first tunnel BFD session establishment message, and the first tunnel BFD session establishment message also includes: a tunnel encapsulation message header, a data address message header, a user datagram protocol UDP header for indicating tunnel encapsulation, and a peer identifier;

[0056] Among them, the encapsulation message header is used to carry the VNI; the data address message header is used to carry the MAC address and IP address; the UDP header used to indicate the tunnel encapsulation is used to carry the tunnel encapsulation protocol; and the peer identifier is used to carry the tunnel BFD session local identifier.

[0057] In an exemplary embodiment, when the encapsulation mode is Ethernet frame encapsulation mode, the data address message header is composed of an Ethernet header and an IP header; or, when the encapsulation mode is IP message encapsulation mode, the data address message header is composed of an IP header.

[0058] In the above step S104, the second edge node may obtain the second content information in a variety of ways. In an example embodiment, the above first request message carries the second content information, and the second content information is obtained by the second edge node according to the first request message. In this way, after receiving the first request message sent by the first edge node, the second edge node can obtain the second content information carried therein, and then generate a second tunnel BFD session establishment message according to the second content information, and send it to the first edge node.

[0059] In another example embodiment, the second edge node may actively request the first edge node to send the second content information, that is, in the above step S104, before receiving the second tunnel BFD session establishment message sent by the second edge node, the step further includes:

[0060] A second request message sent by the second edge node is received, and a second response message carrying the second content information is returned to the second edge node according to the second request message, so that the second edge node obtains the second content information according to the second response message.

[0061] In this way, after receiving the second request information returned by the first edge node, the second edge node can obtain the second content information carried therein, and then generate a second tunnel BFD session establishment message according to the second content information, and send it to the first edge node. In the above different example embodiments, the composition of the second content information is the same. In an exemplary embodiment, in the above step S102, the second content information includes at least one of the following:

[0062] The MAC address of the client-side port connected to the first edge node, the IP address of the client-side port connected to the first edge node, the VNI to which the client-side port connected to the first edge node belongs, the tunnel encapsulation protocol used by the client-side port connected to the first edge node, the tunnel encapsulation mode used by the client-side port connected to the first edge node, and the tunnel BFD session local identifier configured for the first edge node for the client-side port connected to the first edge node.

[0063] Fig. 9 : is a schematic diagram of the format of the second tunnel BFD session establishment message provided according to an embodiment of the present invention. The encapsulation format of the second tunnel BFD session establishment message is as follows: Fig. 9 As shown, Fig. 9 As shown, in an exemplary embodiment, the second BFD status field is encapsulated in a second tunnel BFD session establishment message, and the second tunnel BFD session establishment message further includes: a tunnel encapsulation message header, a data address message header, a UDP header for indicating tunnel encapsulation, and a peer identifier;

[0064] Among them, the encapsulation message header is used to carry the VNI; the data address message header is used to carry the MAC address and IP address; the UDP header used to indicate the tunnel encapsulation is used to carry the tunnel encapsulation protocol; and the peer identifier is used to carry the tunnel BFD session local identifier.

[0065] In an exemplary embodiment, when the encapsulation mode is Ethernet frame encapsulation mode, the data address message header is composed of an Ethernet header and an IP header; or, when the encapsulation mode is IP message encapsulation mode, the data address message header is composed of an IP header.

[0066] The first request message, the first response message, the second request message, and the second response message can be implemented based on different mechanisms or protocols. In one example, the first request message can be generated based on the Internet Control Message Protocol (ICMP) Ping mechanism, and the first response message is generated based on the ICMP Ping mechanism; correspondingly, the second request message is generated based on the Internet Control Message Protocol ICMP Ping mechanism, and the second response message is generated based on the ICMP Ping mechanism. In this example, the first tunnel BFD session establishment message and the second tunnel BFD session establishment message are messages generated based on the ICMP Ping mechanism.

[0067] In another example, the first request message is generated according to the Interior Gateway Protocol (IGP), and the first response message is generated according to the IGP; correspondingly, the second request message is generated according to the Interior Gateway Protocol IGP, and the second response message is generated according to the IGP. In this example, the first tunnel BFD session establishment message and the second tunnel BFD session establishment message are messages generated based on the IGP.

[0068] In another example, the first request message is generated according to the Border Gateway Protocol (BGP), and the first response message is generated according to BGP; correspondingly, the second request message is generated according to the Border Gateway Protocol BGP, and the second response message is generated according to BGP. In this example, the first tunnel BFD session establishment message and the second tunnel BFD session establishment message are messages generated based on BGP.

[0069] It should be noted that, by establishing the first tunnel BFD session establishment message and the second tunnel BFD session based on the above ICMP Ping mechanism, the impact scope and timing can be further accurately controlled, for example, the establishment time between the two edge nodes where the tunnel BFD session is to be established can be specified.

[0070] In an embodiment of the present invention, the first BFD status field in the first tunnel BFD session establishment message can be determined by the current BFD status of the first edge node, so that after the second edge node receives the first tunnel BFD session establishment message, it can switch its own BFD status according to the BFD status indicated in the first BFD status field. Correspondingly, the second BFD status field in the second tunnel BFD session establishment message can be determined by the current BFD status of the second edge node, so that after the first edge node receives the second tunnel BFD session establishment message, it can switch its own BFD status according to the BFD status indicated in the second BFD status field. In an example embodiment, in the above step S104, after the first edge node switches the BFD status of the first edge node according to the second BFD status field, it also includes:

[0071] Resending the first tunnel BFD session establishment message to the second edge node, wherein the first BFD state field in the first tunnel BFD session establishment message is the current BFD state of the first edge node;

[0072] Receive a second tunnel BFD session establishment message resent by the second edge node; wherein the second BFD state field in the second tunnel BFD session establishment message is the current BFD state of the second edge node;

[0073] The BFD state of the first edge node includes one of the following: DOWN state, INIT state, and UP state; the BFD state of the second edge node includes one of the following: DOWN state, INIT state, and UP state.

[0074] The process of repeatedly sending the first tunnel BFD session establishment message and the second tunnel BFD session establishment message is a process of switching the BFD states of the first edge node and the second edge node between the DOWN state, the INIT state, and the UP state. The process in the above example embodiment is described below:

[0075] At the initial moment, the BFD status of the first edge node and the second edge node are both in the DOWN state. Correspondingly, in the above step S102, the first BFD status field in the first tunnel BFD session establishment message (recorded as the first tunnel BFD session establishment message 01) sent by the first edge node to the second edge node indicates the DOWN state. After the second edge node receives the above first tunnel BFD session establishment message 01, it switches its own BFD state to the INIT state. Correspondingly, in the above step S104, the second BFD status field in the second tunnel BFD session establishment message (recorded as the second tunnel BFD session establishment message 01) sent by the second edge node to the first edge node indicates the DOWN state. After the first edge node receives the above second tunnel BFD session establishment message 01, it switches its own BFD state to the INIT state.

[0076] At the first moment, the first edge node repeatedly sends the first tunnel BFD session establishment message (recorded as the first tunnel BFD session establishment message 02) to the second edge node. The first BFD state field in the first tunnel BFD session establishment message 02 indicates the current BFD state of the first edge node, that is, the INIT state. After the second edge node receives the first tunnel BFD session establishment message 02, it switches its own BFD state to the UP state. Correspondingly, the second edge node repeatedly sends the second tunnel BFD session establishment message (recorded as the second tunnel BFD session establishment message 02) to the first edge node. The second BFD state field in the second tunnel BFD session establishment message 02 indicates the current BFD state of the second edge node, that is, the INIT state. After the first edge node receives the second tunnel BFD session establishment message 02, it switches its own BFD state to the UP state.

[0077] At the second moment, the first edge node repeatedly sends the first tunnel BFD session establishment message (recorded as the first tunnel BFD session establishment message 03) to the second edge node. The first BFD state field in the first tunnel BFD session establishment message 03 indicates the current BFD state of the first edge node, that is, the UP state. After the second edge node receives the first tunnel BFD session establishment message 02, since its own BFD session state is already in the UP state, it can be determined through the first tunnel BFD session establishment message 03 that the BFD states of the first edge node and the second edge node are both in the UP state. Correspondingly, the second edge node can also repeatedly send the second tunnel BFD session establishment message (recorded as the second tunnel BFD session establishment message 03) to the first edge node. The second BFD state field in the second tunnel BFD session establishment message 03 indicates the current BFD state of the second edge node, that is, the UP state. Since its own BFD session state is already in the UP state, it can be determined through the first tunnel BFD session establishment message 03 that the BFD states of the first edge node and the second edge node are both in the UP state.

[0078] The above-mentioned BFD state of the first edge node and the BFD state of the second edge node are both in the UP state, which means that the BFD state of the first edge node and the BFD state of the second edge node in the embodiment of the present invention are in a preset state. Thus, when the BFD state of the first edge node and the BFD state of the second edge node are both in the UP state, a tunnel BFD session can be established between the first edge node and the second edge node.

[0079] Through the embodiment of the present invention, for the first edge node and the second edge node that need to establish a tunnel BFD session, in the embodiment of the present invention, the first edge node can automatically generate a first tunnel BFD session establishment message and send it to the second edge node. Correspondingly, the second edge node can also automatically generate a second tunnel BFD session establishment message and send it to the first edge node, so that the first edge node and the second edge node can switch the state of the edge node itself through the BFD state field carried in the above-mentioned tunnel BFD session establishment message, and then when the BFD state of the first edge node and the second edge node itself reaches a preset state, the tunnel BFD session can be established according to the first tunnel BFD session establishment message and the second tunnel BFD session establishment message. The establishment process of the above-mentioned tunnel BFD session does not rely on manual configuration by the administrator, and the establishment of the tunnel BFD session can be achieved entirely based on the automatic interaction between the first edge node and the second edge node. Therefore, for a large number of edge nodes in the data center stacked network, the automatic establishment of a tunnel BFD session between any two edge nodes can be achieved through the embodiment of the present invention without manual participation, so the efficiency and accuracy of the establishment of the tunnel BFD session can be significantly improved, so as to solve the problems in the related technology that the tunnel BFD session relies on manual configuration to generate low processing efficiency and is prone to errors.

[0080] To further illustrate the tunnel BFD session establishment method in the embodiment of the present invention, the tunnel BFD session establishment method in the embodiment of the present invention is further described below through multiple exemplary embodiments:

[0081] Exemplary Embodiment 1

[0082] This exemplary embodiment describes the process of generating a tunnel BFD session establishment message by an edge node. Edge node 1 in a data center network has a client-side port Int11, and edge node 2 has a client-side port Int21. Ports Int11 and Int21 both use the Geneve tunnel encapsulation protocol and Ethernet frame encapsulation mode, and the VNI to which ports Int11 and Int21 belong is 10.

[0083] S1: The data center network administrator sends a command to edge node 1 to automatically establish a tunnel BFD session, specifying that a tunnel BFD session needs to be established with edge node 2.

[0084] S2, edge node 1 sends an ICMP Ping request message to edge node 2, requesting edge node 2 to send back the information required for automatically establishing a tunnel BFD session.

[0085] S3: After receiving the ICMP Ping request message, edge node 2 returns an ICMP Ping response message to edge node 1, carrying the information required for automatically establishing a tunnel BFD session, including the following information:

[0086] MAC address, IP address and VNI 10 of the client-side port Int21 of edge node 2;

[0087] The tunnel encapsulation protocol used by the client-side port Int21 of edge node 2 is Geneve, and the encapsulation mode used is Ethernet frame encapsulation mode;

[0088] The local identifier of the tunnel BFD session configured by the client-side port Int21 of the edge node 2 for the edge node 1 is Discr2.

[0089] S4, after receiving the ICMP Ping response message, edge node 1 uses the information carried in the message to construct a tunnel BFD session establishment message.

[0090] Because the tunnel encapsulation protocol used by Int21 is Geneve, the encapsulation mode used is the Ethernet frame encapsulation mode. Fig.10 FIG. 1 is a schematic diagram of a format of a BFD session establishment message provided according to an exemplary embodiment of the present invention (I). The format of the BFD session establishment message is as follows: Fig.10 As shown, the MAC address, IP address and VNI 10 of Int21 are respectively filled in the destination MAC address in the Inner Ethernet Header, the destination IP address in the Inner IPvX Header, and the virtual network identifier in the GeneveHeader; the tunnel BFD session local identifier Discr2 configured by Int21 for the edge node 1 is filled in the peer identifier in the BFD Control Packet.

[0091] Exemplary Embodiment 2

[0092] This exemplary embodiment describes the process of generating a tunnel BFD session establishment message by an edge node. Edge node 1 in a data center network has two client-side ports Int11 and Int12, and edge node 2 has two client-side ports Int21 and Int22. Ports Int11, Int12, Int21, and Int22 all use the VXLAN-GPE tunnel encapsulation protocol and IP message encapsulation mode. The VNI to which ports Int11 and Int21 belong is 10, and the VNI to which ports Int12 and Int22 belong is 20.

[0093] S1: The data center network administrator sends a command to edge node 1 to automatically establish a tunnel BFD session, specifying that a tunnel BFD session needs to be established with edge node 2.

[0094] S2, edge node 1 sends an ICMP Ping request message to edge node 2, requesting edge node 2 to send back the information required for automatically establishing a tunnel BFD session.

[0095] S3: After receiving the ICMP Ping request message, edge node 2 returns an ICMP Ping response message to edge node 1, carrying the information required for automatically establishing a tunnel BFD session, including the following information:

[0096] The MAC address, IP address, and VNI 10 of the client-side port Int21 of edge node 2, and the MAC address, IP address, and VNI 20 of the client-side port Int22 of edge node 2;

[0097] The tunnel encapsulation protocol used by the client-side ports Int21 and Int22 of edge node 2 is VXLAN-GPE, and the encapsulation mode used is IP packet encapsulation mode;

[0098] The local identifier of the tunnel BFD session configured for edge node 1 by client-side port Int21 of edge node 2 is Discr21, and the local identifier of the tunnel BFD session configured for edge node 1 by client-side port Int22 of edge node 2 is Discr22.

[0099] S4, after receiving the ICMP Ping response message, edge node 1 uses the information carried in the message to construct a tunnel BFD session establishment message.

[0100] Since the tunnel encapsulation protocol used by Int21 and Int22 is VXLAN-GPE and the encapsulation mode used is IP packet encapsulation mode, Fig.11 FIG. 2 is a schematic diagram of a format of a BFD session establishment message provided according to an exemplary embodiment of the present invention (II). The format of the BFD session establishment message is as follows: Fig.11As shown. Since Int21 and Int22 belong to different VNIs, tunnel BFD session establishment messages are constructed for VNI 10 to which Int21 belongs and VNI 20 to which Int22 belongs. Among them, in the tunnel BFD session establishment message constructed for VNI 10, the IP address of Int21 and the VNI 10 to which it belongs are respectively filled in the destination IP address in the Inner IPvX Header and the virtual network identifier in the VXLAN-GPE Header; the tunnel BFD session local identifier Discr21 configured by Int21 for edge node 1 is filled in the peer identifier in the BFD Control Packet; in the tunnel BFD session establishment message constructed for VNI20, the IP address of Int22 and the VNI 20 to which it belongs are respectively filled in the destination IP address in the Inner IPvX Header and the virtual network identifier in the VXLAN-GPE Header; the tunnel BFD session local identifier Discr22 configured by Int22 for edge node 1 is filled in the peer identifier in the BFD Control Packet.

[0101] Exemplary Embodiment 3

[0102] This exemplary embodiment describes the process of establishing a tunnel BFD session at an edge node. Edge node 1 in a data center network has one client-side port Int11, and edge node 2 has two client-side ports Int21 and Int22. Ports Int11, Int21, and Int22 all use the Geneve tunnel encapsulation protocol and Ethernet frame encapsulation mode. The VNI to which ports Int11 and Int21 belong is 10, and the VNI to which port Int22 belongs is 20.

[0103] S1: The data center network administrator sends a command to edge node 1 to automatically establish a tunnel BFD session, specifying that a tunnel BFD session needs to be established with edge node 2.

[0104] S2, edge node 1 sends an ICMP Ping request message to edge node 2, requesting edge node 2 to send back the information required for automatically establishing a tunnel BFD session.

[0105] S3: After receiving the ICMP Ping request message, edge node 2 returns an ICMP Ping response message to edge node 1, carrying the information required for automatically establishing a tunnel BFD session, including the following information:

[0106] The MAC address, IP address, and VNI 10 of the client-side port Int21 of edge node 2, and the MAC address, IP address, and VNI 20 of the client-side port Int22 of edge node 2;

[0107] The tunnel encapsulation protocol used by the client-side ports Int21 and Int22 of edge node 2 is Geneve, and the encapsulation mode used is Ethernet frame encapsulation mode;

[0108] The local identifier of the tunnel BFD session configured for edge node 1 by client-side port Int21 of edge node 2 is Discr21, and the local identifier of the tunnel BFD session configured for edge node 1 by client-side port Int22 of edge node 2 is Discr22.

[0109] S4, after receiving the ICMP Ping response message, edge node 1 uses the information carried in the message to build a tunnel BFD session establishment message for VNI 10. Since edge node 1 does not have a client-side port belonging to VNI 20, it will not build a tunnel BFD session establishment message for VNI 20.

[0110] S5 , the data center network administrator sends a command to edge node 2 to automatically establish a tunnel BFD session, specifying that a tunnel BFD session needs to be established with edge node 1 .

[0111] S6, edge node 2 sends an ICMP Ping request message to edge node 1, requesting edge node 1 to send back information required for automatically establishing a tunnel BFD session.

[0112] S7, after receiving the ICMP Ping request message, edge node 1 returns an ICMP Ping response message to edge node 2, carrying information required for automatically establishing a tunnel BFD session.

[0113] S8, after receiving the ICMP Ping response message, edge node 2 uses the information carried in the message to build a tunnel BFD session establishment message for VNI 10.

[0114] S9: For VNI 10, after edge node 1 and edge node 2 send three tunnel BFD session establishment messages to each other, a tunnel BFD session of VNI 10 can be established.

[0115] Example 4

[0116] This exemplary embodiment describes the process of establishing a tunnel BFD session at an edge node. Edge node 1 in a data center network has a client-side port Int11, and edge node 2 has a client-side port Int21. Ports Int11 and Int21 both use the Geneve tunnel encapsulation protocol and Ethernet frame encapsulation mode, and the VNI to which ports Int11 and Int21 belong is 10.

[0117] S1: The data center network administrator sends a command to edge node 1 to automatically establish a tunnel BFD session, specifying that a tunnel BFD session needs to be established with edge node 2.

[0118] S2, edge node 1 sends an ICMP Ping request message to edge node 2, requesting edge node 2 to send back the information required for automatically establishing a tunnel BFD session. At the same time, the ICMP Ping request message also carries the information required by edge node 2 for automatically establishing a tunnel BFD session, including the following information:

[0119] The MAC address, IP address, and VNI 10 of the client-side port Int11 of edge node 1;

[0120] The tunnel encapsulation protocol used by the client-side port Int11 of edge node 1 is Geneve, and the encapsulation mode used is Ethernet frame encapsulation mode;

[0121] The local identifier of the tunnel BFD session configured by the client-side port Int11 of the edge node 1 for the edge node 2 is Discr1.

[0122] S3: After receiving the ICMP Ping request message, edge node 2 returns an ICMP Ping response message to edge node 1, carrying the information required for automatically establishing a tunnel BFD session, including the following information:

[0123] MAC address, IP address and VNI 10 of the client-side port Int21 of edge node 2;

[0124] The tunnel encapsulation protocol used by the client-side port Int21 of edge node 2 is Geneve, and the encapsulation mode used is Ethernet frame encapsulation mode;

[0125] The local identifier of the tunnel BFD session configured by the client-side port Int21 of the edge node 2 for the edge node 1 is Discr2.

[0126] At the same time, edge node 2 uses the information carried in the received ICMP Ping request message to construct a tunnel BFD session establishment message. Fig.12 FIG. 3 is a schematic diagram of a format of a BFD session establishment message provided according to an exemplary embodiment of the present invention. The format of the BFD session establishment message is as follows: Fig.12As shown, the MAC address, IP address and VNI 10 of Int11 are respectively filled in the destination MAC address in the Inner Ethernet Header, the destination IP address in the Inner IPvX Header, and the virtual network identifier in the Geneve Header, and the tunnel BFD session local identifier Discr1 configured by Int11 for the edge node 2 is filled in the peer identifier in the BFD Control Packet.

[0127] S4, after edge node 1 receives the ICMP Ping response message sent back by edge node 2, it uses the information carried in the message to build a tunnel BFD session establishment message. The message format is as follows: Fig. 9 As shown. Among them, the MAC address, IP address and VNI 10 of Int21 are filled in the destination MAC address in the Inner Ethernet Header, the destination IP address in the Inner IPvX Header, and the virtual network identifier in the Geneve Header respectively; the tunnel BFD session local identifier Discr2 configured by Int21 for edge node 1 is filled in the peer identifier in the BFD Control Packet.

[0128] S5: After edge node 1 and edge node 2 send three tunnel BFD session establishment messages to each other, a tunnel BFD session can be established.

[0129] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0130] On the other hand, an embodiment of the present invention further provides a tunnel BFD session establishment device, which is arranged at a first edge node, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0131] Fig.13is a structural block diagram of a tunnel BFD session establishment device provided according to an embodiment of the present invention, such as Fig.13 As shown, the tunnel BFD session establishment device in the embodiment of the present invention includes:

[0132] The sending module 202 is used to obtain the first content information, generate a first tunnel BFD session establishment message according to the first content information, and send the first tunnel BFD session establishment message to the second edge node; wherein the first tunnel BFD session establishment message carries a first BFD state field, and the first BFD state field is used to instruct the second edge node to switch the BFD state of the second edge node according to the first BFD state field;

[0133] The receiving module 204 is used to receive a second tunnel BFD session establishment message sent by the second edge node; wherein the second tunnel BFD session establishment message is generated by the second edge node according to the second content information obtained in advance, and the second tunnel BFD session establishment message carries a second BFD state field, and the second BFD state field is used to instruct the first edge node to switch the BFD state of the first edge node according to the second BFD state field;

[0134] The establishing module 206 is configured to establish a tunnel BFD session between the first edge node and the second edge node when the BFD state of the first edge node and the BFD state of the second edge node are in a preset state.

[0135] It should be noted that the remaining optional solutions and technical effects of the tunnel BFD session establishment device in the embodiment of the present invention correspond to the above-mentioned tunnel BFD session establishment method, so they are not repeated here.

[0136] In an exemplary embodiment, the obtaining of the first content information includes:

[0137] Sending a first request message to a second edge node, so that the second edge node returns a first response message in response to the first request message; wherein the first response message carries first content information;

[0138] The first content information is acquired according to the first response message.

[0139] In an exemplary embodiment, the first content information includes at least one of the following:

[0140] The media access control layer MAC address of the client-side port connected to the second edge node, the Internet interconnection protocol IP address of the client-side port connected to the second edge node, the virtual network identifier VNI to which the client-side port connected to the second edge node belongs, the tunnel encapsulation protocol used by the client-side port connected to the second edge node, the tunnel encapsulation mode used by the client-side port connected to the second edge node, and the tunnel BFD session local identifier configured for the first edge node for the client-side port connected to the second edge node.

[0141] In an exemplary embodiment, the first BFD status field is encapsulated in a first tunnel BFD session establishment message, and the first tunnel BFD session establishment message further includes: a tunnel encapsulation message header, a data address message header, a user datagram protocol UDP header for indicating tunnel encapsulation, and a peer identifier;

[0142] Among them, the encapsulation message header is used to carry the VNI; the data address message header is used to carry the MAC address and IP address; the UDP header used to indicate the tunnel encapsulation is used to carry the tunnel encapsulation protocol; and the peer identifier is used to carry the tunnel BFD session local identifier.

[0143] In an exemplary embodiment, when the encapsulation mode is Ethernet frame encapsulation mode, the data address message header is composed of an Ethernet header and an IP header; or, when the encapsulation mode is IP message encapsulation mode, the data address message header is composed of an IP header.

[0144] In an exemplary embodiment, the first request message carries second content information, and the second content information is acquired by the second edge node according to the first request message.

[0145] In an exemplary embodiment, before receiving the second tunnel BFD session establishment message sent by the second edge node, the method further includes:

[0146] A second request message sent by the second edge node is received, and a second response message carrying the second content information is returned to the second edge node according to the second request message, so that the second edge node obtains the second content information according to the second response message.

[0147] In an exemplary embodiment, the second content information includes at least one of the following:

[0148] The MAC address of the client-side port connected to the first edge node, the IP address of the client-side port connected to the first edge node, the VNI to which the client-side port connected to the first edge node belongs, the tunnel encapsulation protocol used by the client-side port connected to the first edge node, the tunnel encapsulation mode used by the client-side port connected to the first edge node, and the tunnel BFD session local identifier configured for the first edge node for the client-side port connected to the first edge node.

[0149] In an exemplary embodiment, the second BFD status field is encapsulated in a second tunnel BFD session establishment message, and the second tunnel BFD session establishment message further includes: a tunnel encapsulation message header, a data address message header, a UDP header for indicating tunnel encapsulation, and a peer identifier;

[0150] Among them, the encapsulation message header is used to carry the VNI; the data address message header is used to carry the MAC address and IP address; the UDP header used to indicate the tunnel encapsulation is used to carry the tunnel encapsulation protocol; and the peer identifier is used to carry the tunnel BFD session local identifier.

[0151] In an exemplary embodiment, when the encapsulation mode is Ethernet frame encapsulation mode, the data address message header is composed of an Ethernet header and an IP header; or, when the encapsulation mode is IP message encapsulation mode, the data address message header is composed of an IP header.

[0152] In an example embodiment, the first request message is generated according to the Internet Control Message Protocol ICMP Ping, and the first response message is generated according to ICMP Ping; or, the first request message is generated according to the Internal Gateway Protocol IGP, and the first response message is generated according to IGP; or, the first request message is generated according to the Border Gateway Protocol BGP, and the first response message is generated according to BGP.

[0153] In an example embodiment, the second request message is generated according to the Internet Control Message Protocol ICMP Ping, and the second response message is generated according to ICMP Ping; or, the second request message is generated according to the Internal Gateway Protocol IGP, and the second response message is generated according to IGP; or, the second request message is generated according to the Border Gateway Protocol BGP, and the second response message is generated according to BGP.

[0154] In an exemplary embodiment, before obtaining the first content information, the method further includes:

[0155] A tunnel BFD session establishment request is obtained, where the tunnel BFD session establishment request is used to instruct the first edge node to establish a tunnel BFD session with the second edge node.

[0156] In an exemplary embodiment, after the first edge node switches the BFD state of the first edge node according to the second BFD state field, the method further includes:

[0157] Resending the first tunnel BFD session establishment message to the second edge node, wherein the first BFD state field in the first tunnel BFD session establishment message is the current BFD state of the first edge node;

[0158] Receive a second tunnel BFD session establishment message resent by the second edge node; wherein the second BFD state field in the second tunnel BFD session establishment message is the current BFD state of the second edge node;

[0159] The BFD state of the first edge node includes one of the following: DOWN state, INIT state, and UP state; the BFD state of the second edge node includes one of the following: DOWN state, INIT state, and UP state.

[0160] In an exemplary embodiment, when the BFD state of the first edge node and the BFD state of the second edge node are in a preset state, establishing a tunnel BFD session between the first edge node and the second edge node further includes:

[0161] In a case where the BFD state of the first edge node and the BFD state of the second edge node are both in the UP state, a tunnel BFD session is established between the first edge node and the second edge node.

[0162] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0163] On the other hand, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0164] In an example embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0165] On the other hand, an embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0166] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0167] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0168] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0169] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for establishing a tunnel BFD session, characterized in that: Applied to a first edge node, the method includes: Acquire first content information, generate a first tunnel bidirectional forwarding detection BFD session establishment message according to the first content information, and send the first tunnel BFD session establishment message to the second edge node; wherein the first tunnel BFD session establishment message carries a first BFD state field, and the first BFD state field is used to instruct the second edge node to switch the BFD state of the second edge node according to the first BFD state field; receiving a second tunnel BFD session establishment message sent by the second edge node; wherein the second tunnel BFD session establishment message is generated by the second edge node according to the second content information obtained in advance, and the second tunnel BFD session establishment message carries a second BFD state field, and the second BFD state field is used to instruct the first edge node to switch the BFD state of the first edge node according to the second BFD state field; In a case where the BFD state of the first edge node and the BFD state of the second edge node are in a preset state, a tunnel BFD session is established between the first edge node and the second edge node.

2. The method according to claim 1, characterized in that The obtaining of the first content information includes: Sending a first request message to the second edge node, so that the second edge node returns a first response message in response to the first request message; wherein the first response message carries the first content information; The first content information is acquired according to the first response message.

3. The method according to claim 2, characterized in that The first content information includes at least one of the following: The media access control layer MAC address of the client port connected to the second edge node, the Internet interconnection protocol IP address of the client port connected to the second edge node, the virtual network identifier VNI to which the client port connected to the second edge node belongs, the tunnel encapsulation protocol used by the client port connected to the second edge node, the tunnel encapsulation mode used by the client port connected to the second edge node, and the tunnel BFD session local identifier configured for the first edge node for the client port connected to the second edge node.

4. The method according to claim 3, characterized in that: The first BFD status field is encapsulated in the first tunnel BFD session establishment message, and the first tunnel BFD session establishment message further includes: a tunnel encapsulation message header, a data address message header, a user datagram protocol UDP header for indicating tunnel encapsulation, and a peer identifier; Among them, the encapsulation message header is used to carry the VNI; the data address message header is used to carry the MAC address and the IP address; the UDP header used to indicate tunnel encapsulation is used to carry the tunnel encapsulation protocol; and the peer identifier is used to carry the tunnel BFD session local identifier.

5. The method according to claim 4, characterized in that When the encapsulation mode is the Ethernet frame encapsulation mode, the data address message header is composed of an Ethernet header and an IP header; or, when the encapsulation mode is the IP message encapsulation mode, the data address message header is composed of an IP header.

6. The method according to claim 2, characterized in that The first request message carries the second content information, and the second content information is acquired by the second edge node according to the first request message.

7. The method according to claim 1, characterized in that Before receiving the second tunnel BFD session establishment message sent by the second edge node, the method further includes: Receive a second request message sent by the second edge node, and return a second response message carrying the second content information to the second edge node according to the second request message, so that the second edge node obtains the second content information according to the second response message.

8. The method according to claim 6 or 7, characterized in that: The second content information includes at least one of the following: The MAC address of the client-side port connected to the first edge node, the IP address of the client-side port connected to the first edge node, the VNI to which the client-side port connected to the first edge node belongs, the tunnel encapsulation protocol used by the client-side port connected to the first edge node, the tunnel encapsulation mode used by the client-side port connected to the first edge node, and the tunnel BFD session local identifier configured for the first edge node for the client-side port connected to the first edge node.

9. The method according to claim 8, characterized in that The second BFD status field is encapsulated in the second tunnel BFD session establishment message, and the second tunnel BFD session establishment message further includes: a tunnel encapsulation message header, a data address message header, a UDP header for indicating tunnel encapsulation, and a peer identifier; Among them, the encapsulation message header is used to carry the VNI; the data address message header is used to carry the MAC address and the IP address; the UDP header used to indicate tunnel encapsulation is used to carry the tunnel encapsulation protocol; and the peer identifier is used to carry the tunnel BFD session local identifier.

10. The method according to claim 9, characterized in that When the encapsulation mode is the Ethernet frame encapsulation mode, the data address message header is composed of an Ethernet header and an IP header; or, when the encapsulation mode is the IP message encapsulation mode, the data address message header is composed of an IP header.

11. The method according to claim 2, characterized in that The first request message is generated according to the Internet Control Message Protocol ICMP Ping, and the first response message is generated according to the ICMP Ping; or, the first request message is generated according to the Interior Gateway Protocol IGP, and the first response message is generated according to the IGP; or, the first request message is generated according to the Border Gateway Protocol BGP, and the first response message is generated according to the Border Gateway Protocol BGP.

12. The method according to claim 7, characterized in that The second request message is generated according to the Internet Control Message Protocol ICMP Ping, and the second response message is generated according to the ICMP Ping; or, the second request message is generated according to the Interior Gateway Protocol IGP, and the second response message is generated according to the IGP; or, the second request message is generated according to the Border Gateway Protocol BGP, and the second response message is generated according to the Border Gateway Protocol BGP.

13. The method according to any one of claims 1 to 7, characterized in that Before obtaining the first content information, the method further includes: A tunnel BFD session establishment request is obtained, where the tunnel BFD session establishment request is used to instruct to establish a tunnel BFD session between the first edge node and the second edge node.

14. The method according to any one of claims 1 to 7, characterized in that After the first edge node switches the BFD state of the first edge node according to the second BFD state field, the method further includes: Resending the first tunnel BFD session establishment message to the second edge node, wherein the first BFD state field in the first tunnel BFD session establishment message is the current BFD state of the first edge node; Receive a second tunnel BFD session establishment message resent by the second edge node; wherein the second BFD state field in the second tunnel BFD session establishment message is the current BFD state of the second edge node; The BFD state of the first edge node includes one of the following: DOWN state, INIT state, and UP state; the BFD state of the second edge node includes one of the following: DOWN state, INIT state, and UP state.

15. The method according to claim 14, characterized in that The establishing a tunnel BFD session between the first edge node and the second edge node when the BFD state of the first edge node and the BFD state of the second edge node are in a preset state further includes: In a case where the BFD state of the first edge node and the BFD state of the second edge node are both in an UP state, a tunnel BFD session is established between the first edge node and the second edge node.

16. A tunnel BFD session establishment device, characterized in that: Set at the first edge node, the device includes: A sending module, used to obtain first content information, generate a first tunnel bidirectional forwarding detection BFD session establishment message according to the first content information, and send the first tunnel BFD session establishment message to the second edge node; wherein the first tunnel BFD session establishment message carries a first BFD state field, and the first BFD state field is used to instruct the second edge node to switch the BFD state of the second edge node according to the first BFD state field; A receiving module, configured to receive a second tunnel BFD session establishment message sent by the second edge node; wherein the second tunnel BFD session establishment message is generated by the second edge node according to the second content information obtained in advance, and the second tunnel BFD session establishment message carries a second BFD state field, and the second BFD state field is used to instruct the first edge node to switch the BFD state of the first edge node according to the second BFD state field; An establishing module is used to establish a tunnel BFD session between the first edge node and the second edge node when the BFD state of the first edge node and the BFD state of the second edge node are in a preset state.

17. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 15 when executed.

18. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • BFD session connection establishment method and device

    CN107623607A

  • Method for detecting network link state and network equipment

    CN110875855A