Bfd session establishment method, device and system

By dynamically triggering data packets and using a two-way handshake negotiation mechanism, BFD sessions are established on demand, which solves the problem of high resource consumption in BFD sessions and achieves efficient resource utilization and reduced maintenance workload.

CN114095552BActive Publication Date: 2026-01-02HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010769432.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-03
Publication Date
2026-01-02
Estimated Expiration
2040-08-03

AI Technical Summary

Technical Problem

BFD sessions have high resource overhead, especially in complex SRv6 networks where parameter configuration is very labor-intensive, and existing technologies are unable to effectively reduce resource consumption and maintenance workload.

Method used

BFD session establishment is dynamically triggered by data packets, and an on-demand establishment and two-way handshake negotiation mechanism is adopted. BFD sessions are established only when the first data packet is received, and sessions are deleted when the tunnel is idle, reducing resource waste.

Benefits of technology

This reduces the resource overhead of BFD sessions, decreases the workload of operation and maintenance, and improves the efficiency of BFD session establishment and system maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114095552B_ABST
    Figure CN114095552B_ABST
Patent Text Reader

Abstract

The application discloses a method, system and device for establishing a bidirectional forwarding detection (BFD) session, which are used for reducing resource overhead and operation and maintenance cost of establishing the BFD session. The BFD session establishment system provided by the application comprises a first router and a second router. The first router receives a data packet, and sends a BFD packet to the second router according to the data packet, the second router being a downstream device on a forwarding path of the data packet.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a communication technology, and in particular to a Bidirectional Forwarding Detection (BFD) session establishment method, device and system. BACKGROUND

[0002] The BFD protocol is used for fast detection of communication failure. The BFD protocol can detect failure on any type of channel between communication systems, including directly connected physical links, virtual circuits, Multiprotocol Label Switching (MPLS), label switched paths (LSPs), multi-hop routing channels, and channels that can be unidirectional links, such as MPLS traffic engineering (TE) tunnels, etc.

[0003] After establishing a BFD session, the two parties running the BFD protocol periodically send BFD packets to each other. If one party does not receive the BFD packet sent by the other party within the detection time, it confirms that the forwarding path carrying the BFD session has failed, and notifies the upper layer protocol, such as the Border Gateway Protocol (BGP) protocol or other related protocols, of the detected failure. By running the BFD protocol, the upper layer protocol can quickly converge and trigger fast switching of service traffic, thereby reducing packet loss on the link and ensuring continuous and stable communication.

[0004] The BFD protocol plays a great role in maintaining network stability, but maintaining BFD sessions consumes resources. When a network device needs to maintain a large number of BFD sessions, resource overhead is high. SUMMARY

[0005] The present application provides a Bidirectional Forwarding Detection (BFD) session establishment method, device and system for reducing resource overhead of BFD sessions and improving system maintainability. The present application is defined by the claims.

[0006] In a first aspect, the present application provides a Bidirectional Forwarding Detection (BFD) session establishment system, comprising a first router and a second router; the first router is configured to receive a data packet, and send a BFD packet to the second router according to the data packet to establish a BFD session between the first router and the second router, the second router being a downstream device on a forwarding path of the data packet.

[0007] In the present application, the sending of the BFD packet between the first router and the second router is triggered after receiving the data packet. On the one hand, the on-demand establishment of the BFD session can be achieved, that is, the BFD session is established only after receiving the real service traffic, which can avoid the waste of BFD resources. On the other hand, the dynamic creation of the BFD session through the data packet avoids the parameter configuration of the BFD session and reduces the workload of operation and maintenance. For example, since the current SRv6 network does not support dynamic creation of the BFD session, the locator of the segment needs to be configured to statically create the BFD session. When the SRv6 network becomes more and more complex, the locator to be configured becomes more and more, resulting in an increasing workload of parameter configuration. The dynamic creation of the BFD session of the SRv6 network through the data packet can reduce the workload of operation and maintenance.

[0008] In an optional implementation, the BFD session between the first router and the second router is established through a two-way handshake negotiation.

[0009] In the two-way handshake negotiation, the first router and the second router each only need to send two BFD packets, and the efficiency of the establishment of the BFD session is improved through the two-way handshake negotiation mechanism between the first router and the second router.

[0010] In an optional implementation, the first router determines the second router according to one field or a combination of multiple fields in the data packet. The field can be a destination IP address, a destination MAC address, a forwarding path identifier, such as a VXLAN network identifier (VNI) of a virtual extensible local area network (VXLAN) packet, and the like.

[0011] In an optional implementation, the first router can be a user-end provider edge (UPE) or a network provider edge (NPE).

[0012] In an optional implementation, the first router is configured to send the BFD packet to the second router according to the data packet when the data packet meets a preset condition. The preset condition includes that the data packet is the first data packet between the first router and the second router or the first data packet of a tunnel carrying the forwarding path. The first router triggers establishment of a BFD session of the corresponding path or tunnel only when the first data packet is received by the path or tunnel, and the BFD session of the path or tunnel without data packet forwarding is not triggered, thereby avoiding waste of BFD resources.

[0013] In an optional implementation, the tunnel carrying the forwarding path is in an UP state before the first router receives the data packet.

[0014] In an optional implementation, the forwarding path is established by using one of a Segment Routing over IPv6 (SRv6) protocol, a Label Distribution Protocol (LDP) protocol, a Virtual Extensible Local Area Network (VXLAN) protocol, and a Resource Reservation Protocol Traffic Engineering Extension Protocol (RSVP-TE) protocol.

[0015] In an optional implementation, the first router or the second router is further configured to delete the BFD session established according to the BFD packet according to an idle state of the tunnel.

[0016] In an optional implementation, the BFD session is deleted when a duration of the idle state of the tunnel exceeds a threshold. The tunnel in the idle state for a long time does not need to maintain the BFD session, and the BFD session is deleted, thereby reducing resource overhead of the BFD.

[0017] In an optional implementation, a remote discriminator value of the BFD packet is 0, and the remote discriminator value is used to instruct the second router to establish the BFD session according to the BFD packet.

[0018] In an optional implementation, the first router is configured with a traffic-triggered BFD function. When the traffic-triggered BFD function is enabled, the first router can create the BFD session according to the technical solution of the present application after the data packet is received, and when the traffic-triggered BFD function is not enabled, the first router can create the BFD session according to the prior art. The present application can be compatible with the function of the existing device.

[0019] In a second aspect, the application discloses a method for establishing a bidirectional forwarding detection (BFD) session, which is applied to a first router and includes the following steps: receiving a data packet, and sending a BFD packet to a second router according to the data packet to establish a BFD session between the first router and the second router, wherein the second router is a downstream device on a forwarding path of the data packet.

[0020] In an optional implementation, the BFD session is established between the first router and the second router through a two-way handshake negotiation of the BFD packet.

[0021] In an optional implementation, the first router determines the second router according to a field or a combination of multiple fields in the data packet, and the field can be a destination IP address, a destination MAC address, a forwarding path identifier, such as a VXLAN packet VNI, or the like.

[0022] In an optional implementation, the first router can be a user-end provider edge (UPE) or a network provider edge (NPE).

[0023] In an optional implementation, the first router is configured to send the BFD packet to the second router according to the data packet when the data packet meets a preset condition. The preset condition includes that the data packet is the first data packet between the first router and the second router or the first data packet of a tunnel carrying the forwarding path. The first router triggers the establishment of the BFD session only when the corresponding path or tunnel receives the first data packet, and the path or tunnel without data packet forwarding will not trigger the establishment of the BFD session, thereby avoiding the waste of BFD resources.

[0024] In an optional implementation, the tunnel carrying the forwarding path is in an UP state before the first router receives the data packet.

[0025] In an optional implementation, the forwarding path is established through one of an SRv6 protocol, a label distribution protocol (LDP), a virtual extensible local area network (VXLAN) protocol, and an RSVP-TE protocol.

[0026] In an optional implementation, the first router or the second router is further configured to delete the BFD session established according to the BFD packet according to an idle state of the tunnel.

[0027] In an optional implementation, the BFD tunnel is deleted when the duration of the idle state of the tunnel exceeds a threshold. A tunnel in the idle state for a long time does not need to maintain its BFD session, and the BFD session is deleted to reduce the resources of the BFD.

[0028] In an optional implementation, the remote discriminator value of the BFD packet is 0. The remote discriminator value is used to indicate that the second router establishes a BFD session according to the BFD packet.

[0029] In an optional implementation, the first router is configured with a traffic-triggered BFD function.

[0030] In a third aspect, the present application discloses a router, which comprises functional modules capable of implementing the BFD session establishment method provided in the second aspect or any possible design of the second aspect. The present application does not limit the division of the functional modules, and the functional modules can be divided according to the flow steps of the BFD session establishment method of the second aspect or can be divided according to the specific implementation needs. The functional modules can be realized by software, hardware or a combination of software and hardware.

[0031] In a fourth aspect, the present application discloses a computer program code, which comprises instructions that can be executed by a computer to enable the computer to implement the BFD session establishment method in the second aspect or any possible implementation of the second aspect.

[0032] In a fifth aspect, the present application discloses a computer readable storage medium, which stores computer program instructions, and when the computer program instructions are executed on a computer, the computer program instructions enable the computer to execute the BFD session establishment method in the second aspect or any possible implementation of the second aspect.

[0033] The beneficial effects of the second to fifth aspects of the present application can refer to the first aspect and the embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS

[0034] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application.

[0035] Figure 1 A structural schematic diagram of a BFD session establishment system provided by an embodiment of the present application;

[0036] Figure 2 A structural schematic diagram of an edge router provided by an embodiment of the present application;

[0037] Figure 3 A flowchart of a BFD session establishment method provided in an embodiment of the present application is shown in FIG. 1.

[0038] Figure 4 A forwarding path diagram based on the SRv6-TE policy provided in an embodiment of the present application is shown in FIG. 2.

[0039] Figure 5 A diagram of a BFD session establishment process provided in an embodiment of the present application is shown in FIG. 3.

[0040] Figure 6 A diagram of another BFD session establishment process provided in an embodiment of the present application is shown in FIG. 4. DETAILED DESCRIPTION

[0041] In order to make the personnel in the art better understand the present application, the technical solutions in the embodiments of the present application will be described clearly in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments of the present application.

[0042] In the embodiments of the present application, the words such as “exemplary” or “for example” are used to mean serving as an example, instance, or illustration. Any embodiment or design presented as “exemplary” or “for example” in the embodiments of the present application should not be construed as being more preferred or advantageous than other embodiments or design solutions. In fact, the use of the words such as “exemplary” or “for example” is intended to present relevant concepts in a specific manner. In the embodiments of the present application, the meaning of “plurality” is two or more, unless otherwise specified. For example, a plurality of nodes means two or more nodes. “At least one” means any number, for example, one, two, or more. “A and / or B” can be only A, only B, or include A and B. “At least one of A, B, and C” can be only A, only B, only C, or include A and B, include B and C, include A and C, or include A, B, and C. The words “first”, “second”, and the like in the present application are only used to distinguish different objects, and are not used to indicate priority or importance of the objects.

[0043] In order to reduce the resource overhead caused by maintaining the BFD session, in one embodiment, as shown in FIG. 1, a BFD session establishment method is provided. Figure 1As shown, a BFD session establishment system 100 is provided, which comprises a first router 110 and a second router 130. The first router 110 and the second router 130 can be directly connected through a tunnel, or can be connected through one or more provider edge (PE) 120. In this application, the first router and the second router are only used to distinguish different routers, and are not used to specify the type of the router. The first router can be a user-end provider edge (UPE) or a network provider edge (NPE), and the second router can also be a UPE or a NPE, for example, when the first router is a NPE, the second router is a UPE, and when the first router is a UPE, the second router is a NPE.

[0044] In the BFD session establishment system 100, the first router can perform a BFD session establishment method as shown in FIG. 3, which comprises steps S301-S303. Figure 3

[0045] In step S301, the first router 110 receives a data packet.

[0046] The packet received by the first router 110 comprises a control packet (also referred to as a protocol packet) and a data packet (also referred to as a service packet). In this application, the first router 110 only performs subsequent operations on the received data packet. The data packet received by the first router can be an IP packet, a UDP packet or any other type of packet, which can be sent to the first router 110 by a customer edge (CE) or other provider router.

[0047] In step S302, the first router 110 determines the second router 130 according to the data packet.

[0048] In an implementation manner, the first router 110 can look up a forwarding table according to one or more fields in the data packet, such as a destination IP address, a destination MAC address, a forwarding path identifier or other fields in the data packet, and determine the second router according to the found forwarding table entry. The second router can be, for example, a router corresponding to the next hop in the forwarding table entry.

[0049] In step S303, the first router 110 sends a BFD packet to the second router 130 to establish a BFD session between the first router and the second router.

[0050] ​In this application, step S303 marks the beginning of the BFD session negotiation between the first router 110 and the second router 130. Different procedures can be used to establish a BFD session in this application.

[0051] like Figure 5 The diagram illustrates a BFD session establishment process according to an embodiment of this application. Upon startup, both the first router 110 and the second router 130 maintain their own BFD state machines. The initial state of both the first router 110 and the second router 130 is Down. During the first handshake, the first router 110 and the second router 130 send Down-state BFD messages (to notify the sender of the BFD message that its state is Down) to each other, namely BFD messages A and B. In step S303, the BFD message sent by the first router 110 to the second router is message A. The BFD message B sent by the second router 130 to the first router 110 can be sent after receiving BFD message A, or before receiving BFD message A, triggered by other means, to send BFD message B to the first router 110. For statically configured BFD sessions, the value of the remote discriminator field in the BFD message is user-specified; for dynamically created BFD sessions, the value of the remote discriminator field in the BFD message is 0. After receiving a BFD message A in the Down state, the second router 130 switches its BFD state to the Init state and no longer processes received BFD messages in the Down state. After receiving a BFD message B in the Down state, the first router 110 switches its BFD state to the Init state and no longer processes received BFD messages in the Down state. During the second handshake, the first router 110 sends a BFD message C in the Init state to the second router 130 (to notify the sender of the BFD message that its state is Init). Upon receiving the Init state BFD message C from the first router 110, the second router 130 switches its BFD state to the Up state. The second router 130 then sends an Init state BFD message D to the first router 110. Upon receiving the Init state BFD message D from the second router 130, the first router 110 switches its BFD state to the Up state. During the third handshake, the first router 110 sends an Up state BFD message E to the second router 130 (to notify the sender of the BFD message that its state is Up), and the second router 130 sends an Up state BFD message F to the second router 110. After this three-way handshake, a BFD session is established between the first router 110 and the second router 130.

[0052] As Figure 6 shown, a schematic diagram of another BFD session establishment process provided by the embodiment of the present application is shown. Before the first router 110 sends the BFD packet to the second router 130, the initial state of the BFD state machine of the first router 110 and the second router 130 is Down. When the first router 110 receives the data packet, step S601 is performed, and the BFD packet H in Down state is sent to the second router 130, and the value of the remote discriminator field of the BFD packet H is 0. After the second router 130 receives the BFD packet H in Down state, the BFD state of the second router 130 is switched from Down state to Init state, and the received BFD packet in Down state is no longer processed. After the second router 130 switches the BFD state from Down state to Init state, step S602 is performed, and the BFD packet I in Init state is sent to the first router 110. When the first router 110 receives the BFD packet I in Init state, the BFD state of the first router 110 is switched from Init state to Up state, step S603 is performed, and the BFD packet J in Up state is sent to the second router 130. After the second router 130 receives the BFD packet J in Up state, the BFD state of the second router 130 is switched from Init state to Up state, step S604 is performed, and the BFD packet K in Up state is sent to the first router 110, so as to confirm the first router 110 that the second router 130 has switched the BFD state to Up state. Through steps S601-S604, the BFD session between the first router 110 and the second router 130 is established. It should be noted that the BFD state description in the BFD negotiation process described by the embodiment of the present application is only exemplary, and those skilled in the art can replace it with another description according to the needs. Through this method, only two handshakes are needed between the first router 110 and the second router 130 to establish the BFD session, and the complexity of the BFD session negotiation is reduced.

[0053] In one implementation, when the data packet received by the first router 110 is the first data packet between the first router 110 and the second router 130, or when the data packet is the first data packet of the tunnel between the first router 110 and the second router 130, the first router 110 sends a BFD message to the second router 130. Optionally, when the first router 110 receives a data packet, it will determine whether the data packet is the first data packet sent to the second router 130 based on the fields in the data packet. If it is the first data packet sent to the second router 130, step S303 is executed. Further, when there are multiple forwarding paths between the first router 110 and the second router 130, when the first router 110 receives a data packet, it will determine the forwarding path required to forward the data packet based on the fields in the data packet, and determine whether the data packet is the first packet of the forwarding path or the tunnel carrying the forwarding path. If the data packet is the first packet of the forwarding path or the tunnel carrying the forwarding path, step S303 is executed.

[0054] The following combination Figure 4 Description of this application Figure 3 The method shown. Figure 4 This diagram illustrates a forwarding path based on the SRv6-TE policy, as provided in an embodiment of this application. Segment Routing (SR) is a source routing mechanism that provides traffic guidance capabilities to IP or MPLS networks by introducing controllable label allocation. There are two methods of SR: MPLS-based Segment Routing (SR-MPLS) and IPv6-based Segment Routing (SRv6). SRv6 uses the Routing Extension Header defined in the IPv6 standard to carry a newly defined Segment Routing Header (SRH). The SRH specifies an explicit IPv6 path and carries an IPv6 Segment List (SL). The SRH enables SR nodes to read the header, update pointers, exchange destination addresses, and forward the data. Figure 4The nodes 401-408 in the network support SRv6, and obtain their respective IPv6 addresses as their node segment identifiers (SIDs) through an Interior Gateway Protocol (IGP), which are IP1-IP8 respectively. It is assumed that the node 401 is a first router (for example, a first edge router), and the node 408 is a second router (for example, a second edge router). Based on Traffic Engineering (TE) explicit path configuration, the node 401 generates two forwarding paths P1 and P2 with the node 408 as a destination by using a Constrained Shortest Path First (CSPF) algorithm or the like, and encapsulates a message carried by the forwarding paths P1 and P2 by using a TE tunnel encapsulation technology. The forwarding path P1 includes the node 402, the node 404, the node 406, and the node 408, and the forwarding path P2 includes the node 403, the node 405, the node 407, and the node 408. In the SRv6 scenario, the forwarding paths P1 and P2 can also encapsulate a message carried by the forwarding paths by using an SRv6 Policy or other SRv6 encapsulation technology. In addition, in a non-SRv6 scenario, a message carried by the forwarding paths can also be encapsulated by using a LDP, a VXLAN, an RSVP-TE, or the like. There are many types of SRv6 SIDs, and the main types used are End SIDs and End.X SIDs. The END SID is used to identify a certain destination address prefix in the network. The End.X SID represents a three-layer cross-connection Endpoint SID, and is used to identify a certain link in the network. The entire TE explicit path can freely combine End SIDs and End.X SIDs, and can use all End SIDs or all End.X SIDs, Figure 4 Taking an example in which all End SIDs are used for data forwarding.

[0055] When node 401 receives a data packet, it parses the packet to obtain information such as the destination IP address or destination MAC address. Based on this information, node 401 looks up the routing table or forwarding information base (FIB) to determine the corresponding forwarding path, such as forwarding path P1. If node 401 determines that the data packet is the first data packet in forwarding path P1, it sends a BFD packet to node 408. For example, node 401 encapsulates the BFD packet and forwards the encapsulated BFD packet P to node 402. When the BFD packet is an IPv4 packet, node 401 adds IPv6 and SRH headers to it before sending it to forwarding path P1. When the BFD packet is an IPv6 packet, node 401 adds an SRH header to the IPv6 header of the BFD packet. Node 401 pushes the path information of P1 into the Segment List field of the SRH header, as shown in the BFD packet P. At each node encountered, such as node 402, the destination address (DA) in the BFD packet's IPv6 header is used to query the node's SID table to determine if it's an End type. Then, the next-hop outgoing interface is obtained from the FIB table. The SL value in the BFD packet's SRH header is decremented by 1, and the DA value in the IPv6 header is modified to the next-hop address. For example... Figure 4 As shown, node 402 modifies the SL value of the received BFD packet P from 3 to 2 and the DA value from IP2 to IP4, and sends the modified BFD packet Q to node 404. Similar to node 402, node 404 decrements the SL value in the received BFD packet Q by 1, updates the DA value in the IPv6 header to IP6, and sends the updated BFD packet R to node 406. Upon receiving BFD packet R, node 406 queries its local SID table based on the DA value of BFD packet R to determine if it is an End type, and then searches the IPv6 FIB table, forwarding it according to the outgoing interface found in the IPv6 FIB table. Node 406 decrements the SL value of BFD packet R to 0 and modifies the DA in the IPv6 header to IP8. At this point, the path information in BFD packet R has no practical value, so node 406 uses the penultimate segment pop of the SRH (PSP) feature to delete the SRH, resulting in the following... Figure 4The BFD packet S is shown, and the BFD packet S is forwarded to the node 408. The BFD session is established between the node 401 and the node 408. In addition, the node 401 can forward the data packet to the node 408 in a similar manner of forwarding the BFD packet. When the next data packet arrives, the node 401 continues to determine the forwarding path of the data packet. If the forwarding path is still P1, since the data packet is not the first data packet, step S303 is not performed. If the forwarding path is P2, the data packet is the first data packet of the forwarding path P2, and step S303 is performed.

[0056] In an implementation, before receiving the data packet, the tunnel between the first router 110 and the second router 130 is in an UP state. As shown in the figure, before receiving the data packet, the tunnel carrying the forwarding paths P1 and P2 is in an UP state. That is, in the present application, when the tunnel is in an UP state, the BFD session does not need to be immediately established between the edge routers at both ends of the tunnel. Figure 4

[0057] In an implementation, the first router 110 (for example, the node 401) or the second router 130 (for example, the node 408) deletes the BFD session established according to the BFD packet when the tunnel is in an idle state. For example, when the duration of the idle state of the tunnel exceeds a threshold, the BFD session is deleted.

[0058] In an implementation, in order to maintain compatibility with the original business system or device, the first router 110 is further configured with a traffic triggered BFD function, which is used to trigger the BFD protocol according to the received data packet. When the function is closed, the BFD session establishment of the first router 110 is established by the original technology through static configuration or dynamic manner. When the function is opened, the first router 110 does not start the establishment of the BFD session immediately after starting, but establishes the BFD session when receiving the data packet, that is, steps S302 and S303 are performed.

[0059] ​The above describes the BFD session establishment method and system provided by the embodiments of the present application. It can be understood that the first router or the second router in the embodiments of the present application comprises a hardware structure and / or a software module for performing the respective functions in order to achieve the above functions. Those skilled in the art should easily realize that the functions and steps of the examples described in the embodiments disclosed in the present application can be realized in the form of hardware or a combination of hardware and computer software. Whether a certain function is realized by hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to realize the described functions, but such implementation should not be considered beyond the scope of the present application.

[0060] The structure of the router of the present application is described from different angles as follows in order to realize the BFD session establishment method shown in the above embodiments. Figure 3 In order to realize the BFD session establishment method shown in the above embodiments, the embodiments of the present application provide a router 200, the structure of which is shown in the above embodiments. Figure 2 The router 200 can be the first router 110 or the second router 130 described above. The router 200 comprises a processor 210, a communication interface 220 and a memory 250, which are connected through a bus 240. The memory 250 is used to store program codes, which comprise instructions for realizing the functions of a receiving unit 251, a sending unit 252 and a processing unit 253. The memory 250 can also contain an operating system 254, and the processor 210 can directly or through the operating system 254 call the program codes in the memory 250 to realize the functions of the receiving unit 251, the sending unit 252 and the processing unit 253. The receiving unit 251 is used to perform step S301, the sending unit is used to perform step S303, and the processing unit is used to perform step S302. In another embodiment of the present application, the receiving unit 251, the sending unit 252 and the processing unit 253 of the router 200 can be deployed on a chip or the processor 210.

[0061] Further, the router 200 can also comprise a program interface 230 for writing the program codes into the memory 250. The components of the router 200 provided by the embodiments of the present application are merely exemplary, and those skilled in the art can add or reduce components according to needs, or can split the functions of a component by multiple components.

[0062] The embodiments of the present application also provide a computer readable storage medium for storing program codes for implementing the BFD session establishment method, and the program codes include instructions for executing the method processes described in any one of the method embodiments. The foregoing storage medium includes a U disk, a mobile hard disk, a magnetic disk, an optical disk, a random access memory (RAM), a solid state disk (SSD), a non-volatile memory, and various non-transitory machine readable media that can store program codes.

[0063] It should be noted that the embodiments provided in the present application are only illustrative. Those skilled in the art can clearly understand that, for the convenience and brevity of description, the description of each embodiment in the above embodiments is focused on, and the parts not described in detail in an embodiment can be referred to the related description of other embodiments. The features disclosed in the embodiments, claims and drawings of the present application can exist independently or in combination. The features described in the embodiments of the present application in the form of hardware can be executed by software, and vice versa. This is not limited here.

Claims

1. A bidirectional forwarding detection (BFD) session establishment method, applied to a first router, characterized in that, The method comprises: receiving a data packet sent to a second router, the data packet being a first data packet between the first router and the second router, or a first data packet of a tunnel carrying a forwarding path of the data packet; the second router being a downstream device on a forwarding path of the data packet; determining the second router according to a destination IP address or a destination MAC address or a forwarding path identifier of the data packet; and sending a BFD packet to the second router to establish a BFD session between the first router and the second router.

2. The method of claim 1, wherein, The BFD session is established through a two-way handshake negotiation.

3. The method according to any one of claims 1-2, characterized in that, The first router is a user-side provider edge router (UPE) or a network-side provider edge router (NPE).

4. The method according to any one of claims 1 to 3, characterized in that, Before the receiving of the data packet, the tunnel is in an UP state.

5. The method according to any one of claims 1 to 4, characterized in that, The forwarding path is established through one of an SRv6 protocol, a label distribution protocol (LDP), a virtual extensible local area network (VXLAN) protocol, and a resource reservation protocol traffic engineering (RSVP-TE) protocol.

6. The method according to any one of claims 1 to 5, characterized in that, The method further comprises: deleting the BFD session established according to the BFD packet according to an idle state of the tunnel.

7. The method of claim 6, wherein, The deleting the BFD session established according to the BFD packet according to the idle state of the tunnel comprises: deleting the BFD session when a duration of the tunnel in the idle state exceeds a threshold.

8. The method according to any one of claims 1 to 7, characterized in that, A value of a remote discriminator field of the BFD packet is 0.

9. The method according to any one of claims 1 to 8, characterized in that, The first router is configured with a traffic-triggered BFD function.

10. A router, characterized in that, The router is a first router, comprising: a receiving unit configured to receive a data packet sent to a second router, the data packet being a first data packet between the first router and the second router, or a first data packet of a tunnel carrying a forwarding path of the data packet; the second router being a downstream device on a forwarding path of the data packet; a sending unit configured to determine the second router according to a destination IP address or a destination MAC address or a forwarding path identifier of the data packet; and the sending unit is further configured to send a bidirectional forwarding detection (BFD) packet to the second router to establish a BFD session between the first router and the second router.

11. The router of claim 10, wherein, The BFD session is established through a two-way handshake negotiation.

12. The router of any of claims 10-11, wherein, The router is a user-side provider edge router (UPE) or a network-side provider edge router (NPE).

13. The router of any of claims 10 to 12, wherein, Before the receiving of the data packet by the receiving unit, the tunnel is in an UP state.

14. The router of any of claims 10 to 13, wherein, The forwarding path is established through one of an SRv6 protocol, a label distribution protocol (LDP), a virtual extensible local area network (VXLAN) protocol, and a resource reservation protocol traffic engineering (RSVP-TE) protocol.

15. The router of any of claims 10 to 14, wherein, The router further comprises a processing unit configured to delete the BFD session established according to the BFD packet when the tunnel is in an idle state.

16. The router of claim 15, wherein, The processing unit is configured to delete the BFD session when a duration of the tunnel in the idle state exceeds a threshold.

17. The router of any of claims 10 to 16, wherein, A value of a remote discriminator field of the BFD packet is 0.

18. The router of any of claims 10 to 17, wherein, The router is configured with a traffic-triggered BFD function.

19. A bidirectional forwarding detection (BFD) session establishment system, characterized in that, The system comprises a first router and a second router, the first router being the router of any one of claims 10 to 18; The second router is configured to receive the BFD packet sent by the first router and establish a BFD session with the first router according to the BFD packet.

Citation Information

Patent Citations

  • Method, device and system for establishing bidirectional forwarding detection (BFD) session

    CN107317753A