Link detection method and device, and computer readable storage medium

By setting up bidirectional forwarding detection in the SRv6 service chain, the problem that bidirectional forwarding detection cannot detect service nodes is solved, ensuring accurate detection and transmission of faults, avoiding false detection and fault switching, and achieving the accuracy of link quality detection.

CN118802479APending Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311667296.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the SRv6 service chain system, bidirectional forwarding detection cannot detect the service node, causing the fault to be unable to be detected and transmitted to the head node, thereby triggering fault switching. Moreover, when the service node does not support SRv6, it cannot recognize the bidirectional forwarding detection message, resulting in false detection.

Method used

Set up bidirectional forwarding detection between the service chain head node and the forwarding node. The first forwarding node receives the detection message sent by the head node and decides whether to forward the message or notify the fault based on the communication status with the service node to ensure that the message can be delivered correctly. and a fault is detected.

Benefits of technology

This solves the problem that detection packets in the SRv6 service chain cannot detect service node faults, avoids false detection and fault switching, and ensures the accuracy of link quality detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118802479A_ABST
    Figure CN118802479A_ABST
Patent Text Reader

Abstract

The invention discloses a link detection method and device and a computer readable storage medium, and the method comprises the steps that a first forwarding node receives a first message sent by a head node, and the first message is a detection message of a service chain; the first forwarding node detects a communication state between the first forwarding node and a first service node; if the communication state between the first forwarding node and the first service node is a normal state, forwarding the first message to a downstream node of the service chain; and if the communication state between the first forwarding node and the first service node is a fault state, discarding the first message and / or sending a second message to the head node, the second message being used for notifying that the first service node has a fault. Therefore, the fault switching problem caused by the fact that the detection message in the service chain cannot detect the service node and the fault of the service node cannot be detected and transmitted to the head node is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data communication networks, and in particular to a link detection method, device, and computer-readable storage medium. Background Art

[0002] In a Segment Routing Internet Protocol Version 6 (SRV6) service chain system based on the Internet Protocol Version 6 forwarding plane, each service chain is a combination of a series of sequential service function chains (SFC), including service nodes (SF), forwarding nodes (SFF), etc.

[0003] In order to reduce the impact of link and node failures on services and improve network reliability, the bidirectional forwarding detection (BFD) technology is often used to detect the link quality of the service chain system. However, when facing the SRV6 service chain system, the bidirectional forwarding detection may fail to detect the SRV6 service chain service node. Summary of the invention

[0004] To solve the above technical problems, embodiments of the present invention provide a link detection method, device, and computer-readable storage medium.

[0005] In a first aspect, an embodiment of the present application provides a link detection method, including:

[0006] The first forwarding node receives a first message sent by the head node, where the first message is a detection message of the service chain;

[0007] The first forwarding node detects a communication status between the first forwarding node and a first service node;

[0008] If the communication state between the first forwarding node and the first service node is normal, forwarding the first message to a downstream node of the service chain;

[0009] If the communication state between the first forwarding node and the first service node is a fault state, the first message is discarded and / or a second message is sent to the head node, where the second message is used to notify the first service node that a fault occurs.

[0010] In a second aspect, an embodiment of the present application provides a link detection method, including:

[0011] The head node sends a first message to the first forwarding node, where the first message is a detection message of the service chain;

[0012] If the head node receives a second message sent by the first forwarding node, the head node determines that a failure has occurred in the service chain, and the second message is used to notify the first service node of the failure; wherein the second message is sent when the first forwarding node detects that the communication status between the first forwarding node and the first service node is a failure state.

[0013] In a third aspect, an embodiment of the present application provides a link detection device, which is applied to a first forwarding node, and the device includes:

[0014] A receiving unit, configured to receive a first message sent by a head node, wherein the first message is a detection message of a service chain;

[0015] a detection unit, configured to detect a communication state between the first forwarding node and the first service node;

[0016] A sending unit, used for forwarding the first message to the downstream node of the service chain if the communication status between the first forwarding node and the first service node is normal; if the communication status between the first forwarding node and the first service node is a faulty state, discarding the first message and / or sending a second message to the head node, wherein the second message is used to notify the first service node of a fault.

[0017] In a fourth aspect, an embodiment of the present application provides a link detection device, which is applied to a head node, and the device includes:

[0018] A sending unit, configured to send a first message to a first forwarding node, wherein the first message is a detection message of a service chain;

[0019] A receiving unit, used for determining that a service chain failure has occurred if the head node receives a second message sent by the first forwarding node, and the second message is used to notify the first service node of the failure; wherein the second message is sent by the first forwarding node when it detects that the communication status between the first forwarding node and the first service node is a failure status.

[0020] The computer-readable storage medium provided in the embodiments of the present application is used to store a computer program, and the computer program enables a computer to execute any one of the above methods.

[0021] In the technical solution of the embodiment of the present application, by setting up bidirectional forwarding detection at the head node of the service chain and between the forwarding node and the service node, the first forwarding node receives the first message sent by the head node, and the first forwarding node determines the state of the first service node according to the communication state between the first forwarding node and the first service node; if the communication state is normal, the first message continues to be forwarded to the downstream of the service chain, and if the communication state is faulty, the second message is sent to the head node or the first message is discarded, thereby completing the service chain quality detection. In this way, on the one hand, it solves the problem that the bidirectional forwarding detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger fault switching; on the other hand, it solves the problem that when the service node does not support SRv6, the service node cannot recognize the bidirectional forwarding detection message, so that the service node discards the bidirectional forwarding detection message and causes the false detection problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a schematic diagram of a service chain in an embodiment of the present application;

[0023] Figure 2 This is a schematic diagram of a data message in an embodiment of the present application. Figure 1 ;

[0024] Figure 3 This is a process of a link detection method in an embodiment of the present application Figure 1 ;

[0025] Figure 4 This is a schematic diagram of data message encapsulation in an embodiment of the present application;

[0026] Figure 5 This is a schematic diagram of a data message in an embodiment of the present application. Figure 2 ;

[0027] Figure 6 This is a schematic diagram of a data message in an embodiment of the present application. Figure 3 ;

[0028] Figure 7 This is a process of a link detection method in an embodiment of the present application Figure 2 ;

[0029] Figure 8 This is a schematic diagram of the structure of a link detection device provided in an embodiment of the present application. Figure 1 ;

[0030] Fig. 9 This is a schematic diagram of the structure of a link detection device provided in an embodiment of the present application. Figure 2 ;

[0031] Fig.10It is a schematic structural diagram of the chip of an embodiment of the present application. DETAILED DESCRIPTION

[0032] The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0033] Figure 1 Schematic diagram of a service chain in an embodiment of the present application. Figure 1 As shown, the SRV6 service chain system in the embodiment of the present application includes a service function chain SFC. SFC is a technology that provides orderly services to the application layer, which is used to connect the services on the network device at the logical level to form an orderly service combination. SFC adds service chain path information to the original message to realize that the message passes through the service device in sequence along the specified path. When data messages are transmitted in the network, they often need to pass through various service nodes to ensure that the network can provide users with safe, fast and stable services according to the pre-planned plan. These service nodes include well-known firewalls (Firewall, FW), intrusion prevention systems (Intrusion Prevention System, IPS), application accelerators, etc. Network traffic needs to pass through these service nodes in the established order required by the business logic to achieve the required business.

[0034] Specifically, refer to Figure 1In the embodiment of the present application, the SRV6 service chain system includes the following SFC function nodes: head node (SRV6 HeadEnd) or classifier (SC), forwarding node (ServiceFunctionForwarder, SFF), service node (Service Function, SF) and tail node, proxy node (SFC Proxy), network controller (Controller). Service node SF1 and service node SF2 are functional units that process data packets according to specific functional requirements. Since SF1 and SF2 may be service nodes that do not support SRv6, in order to implement the SRv6 service chain, it is necessary to configure corresponding proxy nodes SF1 Proxy and SF2 Proxy for SF1 and SF2 respectively. The forwarding node is used to forward data packets according to the address information in SRv6. The service node receives the data packet from the corresponding forwarding node, and sends the processed data packet to the corresponding forwarding node after processing the data packet. The service node and the forwarding node together constitute the data plane of the SFC. The head node is used to identify the link policy sent by the controller, associate the link policy with the service chain, and send the data packet to the service chain associated with it.

[0035] Those skilled in the art will understand that Figure 1 The business chain architecture shown in the figure does not constitute a limitation on the business chain system, and may include more or fewer components than shown in the figure, or a combination of certain components, or different component arrangements. The name of the business chain function node is not limited in this application.

[0036] It should be noted that Figure 1 It is only to illustrate the system to which the present application is applicable in the form of an example. Of course, the method shown in the embodiment of the present application can also be applied to other systems. In addition, the terms "system" and "network" are often used interchangeably in this article. The term "and / or" herein is only a kind of association relationship describing the associated objects, indicating that three kinds of relationships can exist. For example, A and / or B can be represented: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " herein generally indicates that the associated objects before and after are in an "or" relationship. It should also be understood that the "correspondence" mentioned in the embodiments of the present application can indicate a relationship of direct correspondence or indirect correspondence between the two, or can indicate an association relationship between the two, or can be a relationship such as forwarding and being forwarded.

[0037] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.

[0038] Figure 2 This is a schematic diagram of a data message in an embodiment of the present application. Figure 1 . SRv6 inserts a Segment Routing Header (SRH) into the Internet Protocol Version 6 (IPv6) message, pushes an explicit IPv6 address stack into the SRH to store the Segment List information, and the intermediate nodes continuously update the destination address and offset address stack according to the Segment List information carried in the message to complete the ordered forwarding. In SRv6, SRH is used to implement flexible programming of SRv6 network paths and various functions based on the SRv6 Segment Identifier (SRv6 SID). SRv6 SID is used to identify the ID of the SRv6 Segment. The SRv6 SID structure is shown in the following table, which consists of a locator, a function, and an argument. Locator has a positioning function and is an identifier assigned to a network node. It is used to provide IPv6 routing capabilities and forward data packets. In the SRv6 SID sequence, Locator is a variable-length part used to adapt to networks of different sizes. The routes corresponding to Locator are aggregatable. Function is used to express the forwarding action to be performed by the device instruction. Different forwarding behaviors are expressed by different Functions. Argument is an optional field that supplements Function. Argument is used to carry parameters required when executing instructions. After the SRv6 SID is the Type-Length-Value (TLV) field, which is used to carry variable-length data, providing better scalability for SRv6.

[0039] Locator Function Arguments

[0040] To facilitate understanding of the technical solutions of the embodiments of the present application, the relevant technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application.

[0041] Bidirectional forwarding detection (BFD) is a detection mechanism used to detect communication failures between forwarding nodes in a service chain system. BFD detects the connectivity of a data protocol on the same path between systems. This path can be a physical link or a logical link. The detection mechanism of BFD is to establish a BFD session path between two systems and periodically send BFD detection messages. If one party does not receive a BFD response message within a specified time, it is considered that a fault has occurred on the path. BFD messages are encapsulated in message-oriented transport layer protocol (User Datagram Protocol, UDP) messages for transmission. At the beginning of the session, the two systems negotiate through the parameters carried in the detection message (session identifier, expected minimum time interval for sending and receiving messages, local BFD session status, etc.). After the negotiation is successful, BFD messages are sent regularly on the path between the two systems. Seamless bidirectional forwarding detection (SBFD) is a simplified mechanism of BFD. SBFD is divided into an initiator and a reflector. The initiator, as the detection end, sends SBFD packets to the reflector to trigger session negotiation. The reflector only replies to the SBFD packets sent by the initiator. This shortens the negotiation time of the SBFD session and brings flexibility to network node path detection.

[0042] However, after the existing SBFD detection message is carried by SRv6, it is impossible to detect the service node in the business chain system. If the service node is a node that does not support SRv6, the corresponding forwarding node will remove the SRH header. At this time, the service node will not be able to identify the internal BFD message and discard the message. For example, the firewall can only pass Internet Protocol Version 4 (Internet Protocol Version 4, Ipv4) or IPv6 messages, etc., which will cause false detection and trigger the corresponding primary and backup path switching. Therefore, when using a bidirectional forwarding detection message to detect the SRv6 business chain system, the fault between the service node and the forwarding node cannot be detected, and the detection message cannot be passed to the head node, thereby triggering a fault switching. On the other hand, because the service node will discard the bidirectional forwarding detection message, it will cause incorrect detection of the link. To this end, the following technical solution of the embodiment of the present application is proposed.

[0043] To facilitate understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be combined arbitrarily with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application. The embodiments of the present application include at least part of the following contents.

[0044] Figure 3This is a process of a link detection method provided in an embodiment of the present application Figure 1 ,like Figure 3 As shown, the link detection method includes:

[0045] Step 301: A first forwarding node receives a first message sent by a head node, where the first message is a detection message of a service chain.

[0046] Here, the first forwarding node corresponds to the first service node, and the first service node can be a downstream node of the head node in the service chain. Specifically, there can be multiple service chains in a service chain system, and each service chain is a series of sequential service node sequences. The number, type, and order of service nodes on each service chain can be the same or different. Different network flows are associated with different service chains. There is at least one service node in each service chain, and each service node corresponds to a forwarding node, that is, the first service node corresponds to the first forwarding node. The first forwarding node receives the first message sent by the head node, and the first message is a detection message of the service chain.

[0047] In some embodiments, the service chain system establishes an SBFD bidirectional forwarding detection session channel at the head node, enables SBFD at the head node, and the head node periodically sends SBFD detection messages to the first forwarding node. The SBFD detection messages are encapsulated in the first message, and the first message is a detection message of the service chain, which is used to detect the status of the service chain.

[0048] Step 302: The first forwarding node detects a communication status between the first forwarding node and the first service node.

[0049] Here, an SBFD bidirectional forwarding detection session channel is established between the first forwarding node and the first service node. The first forwarding node obtains the response status of the first service node by sending an SBFD detection message to the first service node, thereby detecting the communication status between the first forwarding node and the first service node.

[0050] In some implementations, the response status of the first service node may be sending an SBFD response message to the first forwarding node, and the first forwarding node determines the communication status by detecting the status of the SBFD response message.

[0051] In some other implementations, the response status of the first service node may be that no SBFD response message is sent to the first forwarding node, and the first forwarding node determines the communication status by detecting whether the SBFD response message is received.

[0052] In some implementations, the first forwarding node detects the communication status between the first forwarding node and the first service node, and the detection may be started after the first forwarding node receives the first message sent by the head node.

[0053] In some other implementations, the first forwarding node detects the communication status between the first forwarding node and the first service node, and the detection may be performed before the first forwarding node receives the first message sent by the head node.

[0054] Step 303: If the communication state between the first forwarding node and the first service node is normal, forward the first message to a downstream node of the service chain.

[0055] Here, the first forwarding node detects the communication status between the first forwarding node and the first service node. If the communication status between the first forwarding node and the first service node is normal, that is, the first forwarding node receives the SBFD response message sent by the first service node and detects that the SBFD response message status is session established (Session Up), then the first message is forwarded to the downstream node of the service chain.

[0056] In some embodiments, when the SBFD link detection is enabled between the first forwarding node and the first service node, the first forwarding node actively sends an SBFD detection message. At this time, the initial state of the first forwarding node is Down, and the first service node sends an SBFD response message according to the local situation. The SBFD response message status includes Session Up and Session Down. When the BFD response message is in the Session Up state, the first forwarding node receives the response message in the Session Up state, determines that the SBFD session is successfully established, and confirms that the connectivity of the link is normal. The SBFD session will remain in the UP state until the link fails. Specifically, the first forwarding node sends an SBFD detection message to the first service node. If the first forwarding node receives the SBFD response message sent by the first service node, where the SBFD response message state is Session Up, it means that the first service node is normal, and the communication state between the first forwarding node and the first service node is normal. At this time, the first forwarding node forwards the first message to the downstream node in the service chain.

[0057] In some embodiments, if there is only a first forwarding node and a corresponding first service node in the business chain, that is, the first service node is a tail node, then when it is determined that the communication status between the first forwarding node and the first service node is normal, the first forwarding node sends a third message to the head node, and the third message is a response message to the first message, and the third message is in a Session Up state.

[0058] Step 304: If the communication state between the first forwarding node and the first service node is a fault state, discard the first message and / or send a second message to the head node, where the second message is used to notify the first service node that a fault occurs.

[0059] Here, the first forwarding node detects the communication status between the first forwarding node and the first service node. If the communication status between the first forwarding node and the first service node is a fault state, that is, the first forwarding node receives the SBFD response message sent by the first service node and detects that the SBFD response message status is Session Down, then the first message is discarded and / or a second message is sent to the head node, and the second message is used to notify the head node that the first service node has a fault.

[0060] In some embodiments, when the SBFD link detection is enabled between the first forwarding node and the first service node, the first forwarding node actively sends an SBFD detection message. At this time, the initial state of the first forwarding node is Down, and the first service node sends an SBFD response message according to the local situation. The SBFD response message status includes Session Up and Session Down. When the SBFD response message is in the Session Down state, the first forwarding node receives the response message in the Session Down state, and it is determined that the SBFD session link fails. Specifically, the first forwarding node sends an SBFD detection message to the first service node. If the first forwarding node receives the SBFD response message sent by the first service node, and the SBFD response message status is Session Down, it means that the first service node fails, and the communication status between the first forwarding node and the first service node is a failure state.

[0061] In some other embodiments, the first forwarding node detects the communication state between the first forwarding node and the first service node, and if the first forwarding node does not receive the SBFD response message sent by the first service node, it is determined that the communication state between the first forwarding node and the first service node is a fault state. Specifically, after the first forwarding node sends the SBFD detection message, if it does not receive the SBFD response message sent by the first service node after T1, it sends the SBFD detection message again. If the response message sent by the first service node is received after N consecutive SBFD detection messages are sent, it is determined that the communication state between the first forwarding node and the first service node is a fault state, and the first service node fails.

[0062] In some implementations, when the first forwarding node determines that the communication state between the first forwarding node and the first service node is a failure state, the first message sent by the head node is discarded.

[0063] In some implementations, when the first forwarding node determines that the communication state between the first forwarding node and the first service node is a fault state, the first forwarding node sends a second message to the head node, where the second message is used to notify the first service node that a fault has occurred.

[0064] From the above, it can be seen that the link detection method provided by the present application sets up bidirectional forwarding detection at the head node of the service chain and between the forwarding node and the service node, so that the first forwarding node receives the first message sent by the head node, and the first forwarding node determines the state of the first service node according to the communication state between the first forwarding node and the first service node; if the communication state is normal, the first message continues to be forwarded to the downstream of the service chain, and if the communication state fails, the second message is sent to the head node or the first message is discarded, thereby completing the service chain quality detection. In this way, on the one hand, it solves the problem that the detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger fault switching; on the other hand, it solves the problem that when the service node does not support SRv6, the service node cannot recognize the SBFD message, so that the service node discards the SBFD message and causes the false detection problem.

[0065] In some implementations, in step 303, the first message includes a first field, and the first field is used to identify that the first message is a detection message of the service link.

[0066] Here, refer to Figure 4 , Figure 4 It is a data message encapsulation schematic diagram of an embodiment of the present application. The schematic diagram is a message encapsulation format for SBFD detection of an SRv6 service chain. The SBFD detection message is encapsulated in a UDP message, and the head node enables SBFD message detection. When the SBFD message is superimposed on the SRv6 service, the SBFD message is encapsulated in a first message. The head node sets a first field in the first message so that the first field identifies the first message as a detection message of the service chain, and then sends the first message to the first forwarding node.

[0067] In some implementations, after receiving the first message sent by the head node, the first forwarding node parses the first message and determines that the first message is a detection message of the service chain according to a first field identifier in the first message.

[0068] As can be seen from the above, the link detection method provided by the present application, by setting a first field in the first message, the first field is used to identify the first message as a detection message of the service link. In this way, the problem of false detection caused by the service node being unable to identify the SBFD message and discarding the SBFD message is solved.

[0069] In some implementations, the first message includes a segment routing header SRH, the SRH includes a first field and a first segment identifier, and the first segment identifier is used to determine a first path of the service link.

[0070] Here, refer to Figure 5 , Figure 5 This is a schematic diagram of a data message in an embodiment of the present application. Figure 2 SRv6 forms the first message by inserting a routing extension header SRH into the IPv6 header message. The head node identifies the 1 bit in the Flag field of the SRH header as a detection message, for example, defining SFC detection (SD) in the Flag field, so that the first message becomes a detection message of the service chain.

[0071] Here, refer to Figure 5 The head node generates a Segment Routing Ipv6 Traffic Engineering Policy (SRv6 TE Policy) based on the path information of the service chain sent by the controller. The SRv6 TE Policy uses the source routing mechanism of SR to encapsulate the Segment List address information at the head node, thereby guiding the message to traverse the service chain system. Specifically, according to the SRv6 TE Policy, an IPv6 explicit path is specified in the SRH. The path is segmented and sorted and combined at the head node to store the Segment List information of IPv6. According to the Segment List, a forwarding path with orderly arrangement of segments and forwarding nodes is determined. In SRv6, the SRv6 SID is a 128-bit value in the form of an IPv6 address. Multiple SRv6 SID segment identifiers correspond to the Segment List address information, and the SRH carries multiple SRv6 SID segment identifiers.

[0072] In some embodiments, the first message carries a first segment identifier. When the SBFD message is superimposed on the SRv6 service, the SBFD detection message sending path follows the first segment identifier of the SRv6 for forwarding, so that the first path of the service chain can be determined according to the first segment identifier. Here, the first path refers to an ordered forwarding path determined by the SID first segment identifier.

[0073] In some implementations, forwarding the first message to a downstream node of the service chain includes:

[0074] The first message is forwarded to a downstream node of the service chain according to the first segment identifier.

[0075] Here, the first path of the service chain is determined according to the first segment identifier, the sending path of the first message can be sent in order according to the first segment identifier, and the first message is forwarded to the downstream node of the service chain according to the first segment identifier.

[0076] In some implementations, before forwarding the first message to a downstream node of the service chain, the first forwarding node performs a corresponding programming operation on the SRH according to the first segment identifier.

[0077] Here, the head node encapsulates the first path information of SRv6 in the SRH, and forwards the first message to the first forwarding node according to the first segment identifier. After receiving the first message, the first forwarding node searches for the local SRv6 SID information, hits its own SID, executes the instruction action corresponding to the SID, reduces the Segment List value by one, and copies the first segment sequence value to the DA field, and forwards the first message to the downstream node according to the segment identifier sequence.

[0078] In some embodiments, the head node encapsulates the SRv6 path information in the SRH, and forwards the first message to the first forwarding node according to the first segment sequence. After receiving the first message, the first forwarding node cannot recognize the SRH, and then searches the IPv6 routing table according to the longest match principle, replaces the destination address, and forwards it to the downstream node.

[0079] As can be seen from the above, the link detection method provided by the present application encapsulates the SBFD detection message in the SRH header and sets the first identifier and the first segment sequence in the first message, so that the first message can be forwarded in order. In this way, the problem of false detection caused by the service node discarding the SBFD message when the service node does not support SRv6 and the service node cannot recognize the SBFD message is solved.

[0080] In some implementations, in step 304, the second message includes a second field, and the second field is used to identify that the first service node fails.

[0081] Here, the first forwarding node detects that the communication status between the first forwarding node and the first service node is a faulty state, and then sends a second message to the head node to notify the first service node of a fault. The second message includes a second field, and the second field is used to identify that the first service node has a fault.

[0082] In some implementations, the second message is a response message of the first message, that is, a response message encapsulating SBFD in the second message. Figure 6 , Figure 6 This is a schematic diagram of a data message in an embodiment of the present application. Figure 3 The Diag diagnostic word is identified to indicate the reason for the most recent session state change in the local BFD system. Here, the Diag diagnostic word is defined as the second field to identify the first service node or link failure. Specifically, 0-8 in the Diag diagnostic word are represented as:

[0083] 0: No diagnostic information. 1: Detection timeout. 2: Echo function failure. 3: Neighbor session Down. 4: Forwarding plane reset. 5: Path Down. 6: Cascade path Down. 7: AdminDown. 8: Reverse cascade path Down. Among them, 9-31 in the Diag diagnostic word are reserved for subsequent use. For example, by defining the Diag diagnostic word as 30, it is indicated that the first service node or link has a fault. Here, there is no specific limitation on defining the Diag diagnostic word as 30.

[0084] From the above, it can be seen that the link detection method provided by the present application, when determining that the first service node fails, sends a second message to the head node, and defines a second field in the second message to identify that the first service node fails. In this way, the problem that the detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger the fault switching is solved.

[0085] In some implementations, the backup node of the first service node is a second service node, further comprising:

[0086] If the communication state between the first forwarding node and the first service node is a failure state, the first forwarding node switches the first service node to the second service node.

[0087] Here, if the first forwarding node is configured with a backup node of the first service node, that is, a second service node, a path switch to the second service node is automatically performed.

[0088] In some implementations, the path switching to the second service node may be that the first forwarding node directly switches to the second service node.

[0089] In some other implementations, the path switching to the second service node may be switching from the first forwarding node to the second forwarding node, and then to the second service node.

[0090] From the above, it can be seen that the link detection method provided by the present application can automatically perform path switching of the backup node if the first forwarding node configures the backup node of the first service node. In this way, the problem that the detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger the fault switching is solved.

[0091] Figure 7 This is a process of a link detection method provided in an embodiment of the present application Figure 2 ,like Figure 7 As shown, the link detection method includes:

[0092] Step 701: The head node sends a first message to a first forwarding node, where the first message is a detection message of a service chain.

[0093] Here, the first forwarding node corresponds to the first service node, and the first service node can be a downstream node of the head node in the service chain. Specifically, there can be multiple service chains in a service chain system, and each service chain is a series of sequential service node sequences. The number, type, and order of service nodes on each service chain can be the same or different. Different network flows are associated with different service chains. There is at least one service node in each service chain, and each service node corresponds to a forwarding node, that is, the first service node corresponds to the first forwarding node. The head node sends a first message to the first forwarding node, and the first message is a detection message of the service chain.

[0094] In some embodiments, the service chain system establishes an SBFD bidirectional forwarding detection session channel at the head node, enables SBFD at the head node, and the head node periodically sends SBFD detection messages to the first forwarding node. The SBFD detection messages are encapsulated in the first message, and the first message is a detection message of the service chain, which is used to detect the status of the service chain.

[0095] Step 702: If the head node receives a second message sent by the first forwarding node, the head node determines that a service chain failure has occurred, and the second message is used to notify the first service node of the failure; wherein the second message is sent by the first forwarding node when it detects that the communication status between the first forwarding node and the first service node is a failure status.

[0096] Here, if the head node receives the second message sent by the first forwarding node, the head node determines that the service chain fails, and the second message is used to notify the first service node of the failure. Specifically, the first forwarding node detects the communication state between the first forwarding node and the first service node, and if the communication state between the first forwarding node and the first service node is a failure state, the second message is sent to the head node, and the head node receives the second message sent by the first forwarding node, and determines that the first service fails.

[0097] In some implementations, SBFD link detection is enabled between the first forwarding node and the first service node, and the first forwarding node sends an SBFD detection message to the first service node. If the first forwarding node receives an SBFD response message sent by the first service node, where the SBFD response message status is Session Down, it indicates that the first service node fails, and the communication status between the first forwarding node and the first service node is a failure status. The first forwarding node sends a second message to the head node, and the head node receives the second message sent by the first forwarding node, and determines that the first service fails.

[0098] In other embodiments, the first forwarding node sends an SBFD detection message to the first service node. If the first forwarding node does not receive the SBFD response message sent by the first service node, it is determined that the communication state between the first forwarding node and the first service node is a fault state. Specifically, after the first forwarding node sends the SBFD detection message, if it does not receive the SBFD response message sent by the first service node after T1, it sends the SBFD detection message again. If the response message sent by the first service node is received after N consecutive SBFD detection messages are sent, it is determined that the communication state between the first forwarding node and the first service node is a fault state, and the first service node fails. The first forwarding node sends a second message to the head node, and the head node receives the second message sent by the first forwarding node, and determines that the first service fails.

[0099] From the above, it can be seen that the link detection method provided by the present application sets a bidirectional forwarding detection at the head node of the service chain, and sends a first message to the first forwarding node. If the second message is received, the head node confirms that the service chain has failed, thereby completing the service chain quality detection. In this way, on the one hand, it solves the problem that the detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger the fault switching; on the other hand, it solves the problem that when the service node does not support SRv6, the service node cannot recognize the SBFD message, so that the service node discards the SBFD message and causes the false detection problem.

[0100] In some implementations, before the head node sends the first message to the first forwarding node, the process further includes:

[0101] The head node encapsulates a first field in the first message, where the first field is used to identify the first message as a detection message of the service chain.

[0102] Here, refer to Figure 4 , Figure 4 It is a data message encapsulation schematic diagram of an embodiment of the present application. The schematic diagram is a message encapsulation format for SBFD detection of an SRv6 service chain. The SBFD detection message is encapsulated in a UDP message, and the head node enables SBFD message detection. When the SBFD message is superimposed on the SRv6 service, the SBFD message is encapsulated in a first message. The head node sets a first field in the first message so that the first field identifies the first message as a detection message of the service chain, and then sends the first message to the first forwarding node.

[0103] In some implementations, after receiving the first message sent by the head node, the first forwarding node parses the first message and determines that the first message is a detection message of the service chain according to a first field identifier in the first message.

[0104] As can be seen from the above, the link detection method provided by the present application, by setting a first field in the first message, the first field is used to identify the first message as a detection message of the service link. In this way, the problem of false detection caused by the service node being unable to identify the SBFD message and discarding the SBFD message is solved.

[0105] In some implementations, the head node encapsulates the first field in the first message, including:

[0106] The head node encapsulates the first field in the SRH of the first message.

[0107] The head node encapsulates a first segment identifier in the SRH of the first message, where the first segment identifier is used to determine a first path of the service chain.

[0108] Here, refer to Figure 5 , Figure 5 This is a schematic diagram of a data message in an embodiment of the present application. Figure 2 SRv6 forms the first message by inserting a routing extension header SRH into the IPv6 header message. The head node identifies 1 bit in the Flag field of the SRH header as a detection message, for example, defining SD in the Flag field, so that the first message becomes a detection message of the service chain.

[0109] Here, refer to Figure 5 The head node generates SRv6 TEPolicy based on the path information of the service chain sent by the controller. SRv6 TE Policy uses the source routing mechanism of SR to encapsulate the Segment List address information at the head node, thereby guiding the message to traverse the service chain system. Specifically, according to the SRv6 TE Policy, an IPv6 explicit path is specified in the SRH. The path is segmented and sorted and combined at the head node to store the Segment List information of IPv6. According to the Segment List, a forwarding path with orderly arrangement of segments and forwarding nodes is determined. In SRv6, SRv6 SID is a 128-bit value in the form of IPv6 address. Multiple SRv6 SID segment identifiers correspond to Segment List address information, and SRH carries multiple SRv6 SID segment identifiers.

[0110] In some embodiments, the first message carries a first segment identifier. When the SBFD message is superimposed on the SRv6 service, the SBFD detection message sending path follows the first segment identifier of the SRv6 for forwarding, so that the first path of the service chain can be determined according to the first segment identifier. Here, the first path refers to an ordered forwarding path determined by the SID first segment identifier.

[0111] As can be seen from the above, the link detection method provided by the present application encapsulates the SBFD detection message in the SRH header and sets the first identifier and the first segment sequence in the first message, so that the first message can be forwarded in order. In this way, the problem of false detection caused by the service node discarding the SBFD message when the service node does not support SRv6 and the service node cannot recognize the SBFD message is solved.

[0112] In some implementations, in step 702, the second message includes a second field, and the second field is used to identify that the first service node fails.

[0113] Here, the first forwarding node detects that the communication status between the first forwarding node and the first service node is a faulty state, and then sends a second message to the head node to notify the first service node of a fault. The second message includes a second field, and the second field is used to identify that the first service node has a fault.

[0114] In some implementations, the second message is a response message of the first message, that is, a response message encapsulating SBFD in the second message. Figure 6 , Figure 6 This is a schematic diagram of a data message in an embodiment of the present application. Figure 3 The Diag diagnostic word is identified to indicate the reason for the most recent session state change in the local BFD system. Here, the Diag diagnostic word is defined as the second field to identify the first service node or link failure. Specifically, 0-8 in the Diag diagnostic word are represented as:

[0115] 0: No diagnostic information. 1: Detection timeout. 2: Echo function failure. 3: Neighbor session Down. 4: Forwarding plane reset. 5: Path Down. 6: Cascade path Down. 7: AdminDown. 8: Reverse cascade path Down. Among them, 9-31 in the Diag diagnostic word are reserved for subsequent use. For example, by defining the Diag diagnostic word as 30, it is indicated that the first service node or link has a fault. Here, there is no specific limitation on defining the Diag diagnostic word as 30.

[0116] From the above, it can be seen that the link detection method provided by the present application, when determining that the first service node fails, sends a second message to the head node, and defines a second field in the second message to identify that the first service node fails. In this way, the problem that the detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger the fault switching is solved.

[0117] In some implementations, if the head node does not receive the third message sent by the tail node, the head node determines that a service chain failure occurs, and the third message is a response message to the first message.

[0118] If the head node receives the third message sent by the tail node, the head node determines that the service chain is normal.

[0119] Here, when SBFD link detection is enabled at the head node, the head node actively sends a first message containing an SBFD detection message to the first forwarding node according to the first segment identifier. At this time, the initial state of the head node is Down, and the first forwarding node determines whether to forward the SBFD detection message to the downstream node of the service chain according to the local situation and the first segment identifier.

[0120] In some embodiments, when the first forwarding node is in a faulty state, the first message is discarded. At this time, the tail node cannot send a response message for the first message to the head node without receiving the first message. The head node does not receive the third message sent by the tail node, and the third message is a response message to the first message. Then the head node determines that a service chain failure has occurred.

[0121] In some embodiments, when the first forwarding node confirms that the local situation is normal, it forwards the SBFD detection message to the downstream node of the service chain according to the first segment identifier, so as to detect the forwarding nodes in the first path. If the local situation of the Nth forwarding node is in a faulty state, the first message is discarded. At this time, the tail node cannot send a response message of the first message to the head node without receiving the first message. The head node does not receive the third message sent by the tail node, and the third message is a response message to the first message. Then the head node determines that a fault has occurred in the service chain.

[0122] In some implementations, if the head node does not receive an SBFD response message sent by the tail node after T2 time after sending the first message, the head node sends the first message again. If the head node receives a response message sent by the tail node after sending the first message N times in succession, the head node determines that a service chain failure has occurred.

[0123] In some embodiments, when the first forwarding node confirms that the situation on the local end is normal, it forwards the SBFD detection message to the downstream node of the service chain according to the first segment identifier, and detects the forwarding nodes in the first path until it reaches the tail node. The tail node then sends a response message, i.e., a third message, to the head node for the first message, and the response message status is Session Up. The head node receives the third message in the Session UP state, and determines that the service chain link is normal.

[0124] From the above, it can be seen that in a link detection method provided by the present application, the head node determines whether a service chain fails based on whether the third message is received. In this way, the problem that the detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger the fault switching is solved.

[0125] In some implementations, if the head node determines that a service chain fails, the head node updates the path of the service chain.

[0126] In some embodiments, the head node determines that the service chain fails based on the second message sent by the first forwarding node, and the head node determines that the first service node fails based on the second field in the second message. The head node generates a new SRv6 TE Policy based on the path information of the new service chain sent by the controller, and determines a new forwarding path in which the segments and forwarding nodes are arranged in order based on the new Segment List. At this time, the updated path includes a new first service node and a new first segment identifier.

[0127] In other implementations, the head node determines that a service chain fails based on failure to receive the third message sent by the tail node, then the head node determines that a first path fails, and the head node performs a fault switching process.

[0128] From the above, it can be seen that the link detection method provided by the present application updates the service chain path if the head node root determines that the service chain fails. In this way, on the one hand, it solves the problem that the detection message in the SRv6 service chain cannot detect the service node, so that the fault between the service node and the forwarding node cannot be detected and transmitted to the head node to trigger the fault switching; on the other hand, it solves the problem that when the service node does not support SRv6, the service node cannot recognize the SBFD message, so that the service node discards the SBFD message and causes the false detection problem.

[0129] Figure 8 The structure of the link detection device provided in the embodiment of the present application is shown in FIG. Figure 1 , applied to the first forwarding node, such as Figure 8 As shown, the link detection device 800 includes:

[0130] The receiving unit 801 is used to receive a first message sent by a head node, where the first message is a detection message of a service link.

[0131] The detection unit 802 is configured to detect a communication state between the first forwarding node and the first service node.

[0132] The sending unit 803 is used to forward the first message to the downstream node of the service chain if the communication status between the first forwarding node and the first service node is normal; if the communication status between the first forwarding node and the first service node is a faulty state, discard the first message and / or send a second message to the head node, and the second message is used to notify the first service node of a fault.

[0133] In some implementations, the link detection device 800 further includes:

[0134] The processing unit 804 is configured to determine, according to the first field, that the first message is a detection message of the service link, where the first message includes the first field.

[0135] The processing unit 804 is further configured to determine a first path of the service link according to the first segment identifier, wherein the first message includes a segment routing header SRH, and the SRH includes a first field and a first segment identifier.

[0136] In some implementations, the sending unit 803 is further configured to forward the first message to a downstream node of the service chain according to the first segment identifier.

[0137] In some implementations, the processing unit 804 is configured to perform a corresponding programming operation on the SRH according to the first segment identifier.

[0138] In some implementations, the processing unit 804 is configured to search for local SRv6 SID information, hit its own SID, execute the instruction action corresponding to the SID, reduce the SL value by one, and copy the first segment sequence value to the DA field.

[0139] In some implementations, the processing unit 804 is configured to search the IPv6 routing table according to a longest match principle and replace the destination address if the first forwarding node cannot identify the SRH after receiving the first message.

[0140] In some implementations, the processing unit 804 identifies that a failure occurs in the first service node according to a second field, wherein the second message includes the second field.

[0141] In some implementations, the processing unit 804 is further configured to, if the communication state between the first forwarding node and the first service node is a failure state, switch the first service node to the second service node by the first forwarding node.

[0142] Those skilled in the art should understand that Figure 8 The implementation functions of each unit in the link detection device shown can be understood by referring to the relevant description of the aforementioned method. Figure 8 The functions of each unit in the link detection device shown can be implemented by a program running on a processor, or by a specific logic circuit.

[0143] Fig. 9 The structure of the link detection device provided in the embodiment of the present application is shown in FIG. Figure 2 , applied to the head node, such as Fig. 9 As shown, the link detection device 900 includes:

[0144] The sending unit 901 is used to send a first message to a first forwarding node, where the first message is a detection message of a service link.

[0145] The receiving unit 902 is configured to determine that a service chain failure occurs if the head node receives a second message sent by the first forwarding node, and the second message is used to notify the first service node of the failure. The second message is sent by the first forwarding node when it detects that the communication state between the first forwarding node and the first service node is a failure state.

[0146] In some embodiments, the link detection device 900 further includes:

[0147] The processing unit 903 is configured to encapsulate a first field in the first message, where the first field is used to identify that the first message is a detection message of the service link.

[0148] The processing unit 903 is further configured to encapsulate a first field in the SRH of the first message. The first segment identifier is encapsulated in the SRH of the first message, and the first segment identifier is used to determine the first path of the service link.

[0149] In some embodiments, in the receiving unit 902, the second message includes a second field, and the second field is used to identify that a failure occurs in the first service node.

[0150] In some embodiments, if the receiving unit 902 does not receive the third message sent by the tail node, it is determined that the service chain fails, and the third message is a response message to the first message. If the third message sent by the tail node is received, the head node determines that the service chain is normal.

[0151] In some embodiments, the processing unit 903 is further configured to update the path of the service chain if the head node determines that a service chain failure occurs.

[0152] Those skilled in the art should understand that Fig. 9 The implementation functions of each unit in the link detection device shown can be understood by referring to the relevant description of the aforementioned method. Fig. 9 The functions of each unit in the link detection device shown can be implemented by a program running on a processor, or by a specific logic circuit.

[0153] Fig.10 It is a schematic structural diagram of the chip of an embodiment of the present application. Fig.10 The chip 1000 shown includes a processor 1010, which can call and run a computer program from a memory to implement the method in the embodiment of the present application.

[0154] Alternatively, if Fig.10 As shown, the chip 1000 may further include a memory 1020. The processor 1010 may call and run a computer program from the memory 1020 to implement the method in the embodiment of the present application.

[0155] The memory 1020 may be a separate device independent of the processor 1010 , or may be integrated into the processor 1010 .

[0156] Optionally, the chip 1000 may further include an input interface 1030. The processor 1010 may control the input interface 1030 to communicate with other devices or chips, and specifically, may obtain information or data sent by other devices or chips.

[0157] Optionally, the chip 1000 may further include an output interface 1040. The processor 1010 may control the output interface 1040 to communicate with other devices or chips, and specifically, may output information or data to other devices or chips.

[0158] Optionally, the chip can be applied to the network device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the network device in each method of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0159] Optionally, the chip can be applied to the mobile terminal / terminal device in the embodiments of the present application, and the chip can implement the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of the present application. For the sake of brevity, they will not be repeated here.

[0160] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0161] It should be understood that the processor of the embodiment of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The above processor can be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to perform, or the hardware and software modules in the decoding processor are combined and performed. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, and other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0162] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct RAM bus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0163] It should be understood that the above-mentioned memory is exemplary but not restrictive. For example, the memory in the embodiments of the present application may also be static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM), double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous link dynamic random access memory (synch link DRAM, SLDRAM) and direct memory bus random access memory (Direct Rambus RAM, DR RAM), etc. That is to say, the memory in the embodiments of the present application is intended to include but not limited to these and any other suitable types of memory.

[0164] An embodiment of the present application also provides a computer-readable storage medium for storing a computer program.

[0165] Optionally, the computer-readable storage medium can be applied to the network device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the network device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0166] Optionally, the computer-readable storage medium can be applied to the mobile terminal / terminal device in the embodiments of the present application, and the computer program enables the computer to execute the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0167] An embodiment of the present application also provides a computer program product, including computer program instructions.

[0168] Optionally, the computer program product can be applied to the network device in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the network device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0169] Optionally, the computer program product can be applied to the mobile terminal / terminal device in the embodiments of the present application, and the computer program instructions enable the computer to execute the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0170] The embodiment of the present application also provides a computer program.

[0171] Optionally, the computer program can be applied to the network device in the embodiments of the present application. When the computer program runs on a computer, the computer executes the corresponding processes implemented by the network device in the various methods in the embodiments of the present application. For the sake of brevity, they are not described here.

[0172] Optionally, the computer program can be applied to the mobile terminal / terminal device in the embodiments of the present application. When the computer program runs on the computer, the computer executes the corresponding processes implemented by the mobile terminal / terminal device in the various methods of the embodiments of the present application. For the sake of brevity, they are not repeated here.

[0173] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0174] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0175] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0178] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0179] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A link detection method, characterized in that: The method comprises: The first forwarding node receives a first message sent by the head node, where the first message is a detection message of the service chain; The first forwarding node detects a communication status between the first forwarding node and a first service node; If the communication state between the first forwarding node and the first service node is normal, forwarding the first message to a downstream node of the service chain; If the communication state between the first forwarding node and the first service node is a fault state, the first message is discarded and / or a second message is sent to the head node, where the second message is used to notify the first service node that a fault occurs.

2. The method according to claim 1, characterized in that The first message includes a first field, and the first field is used to identify that the first message is a detection message of the service link.

3. The method according to claim 2, characterized in that The first message includes a segment routing header SRH, the SRH includes the first field and a first segment identifier, and the first segment identifier is used to determine a first path of the service link; The forwarding the first message to the downstream node of the service chain includes: The first message is forwarded to a downstream node of the service chain according to the first segment identifier.

4. The method according to claim 1, characterized in that: The second message includes a second field, where the second field is used to identify that a failure occurs in the first service node.

5. The method according to any one of claims 1 to 4, characterized in that The backup node of the first service node is a second service node, and the method further includes: If the communication state between the first forwarding node and the first service node is a failure state, the first forwarding node switches the first service node to the second service node.

6. A link detection method, characterized in that: The method comprises: The head node sends a first message to the first forwarding node, where the first message is a detection message of the service chain; If the head node receives a second message sent by the first forwarding node, the head node determines that a failure has occurred in the service chain, and the second message is used to notify the first service node of the failure; wherein the second message is sent when the first forwarding node detects that the communication status between the first forwarding node and the first service node is a failure state.

7. The method according to claim 6, characterized in that Before the head node sends the first message to the first forwarding node, the method further includes: The head node encapsulates a first field in the first message, where the first field is used to identify that the first message is a detection message of the service chain.

8. The method according to claim 7, characterized in that The head node encapsulates a first field in the first message, including: The head node encapsulates a first field in the SRH of the first message; The method further includes: the head node encapsulating a first segment identifier in the SRH of the first message, where the first segment identifier is used to determine a first path of the service chain.

9. The method according to claim 6, characterized in that The second message includes a second field, where the second field is used to identify that a failure occurs in the first service node.

10. The method according to claim 6, characterized in that The method further comprises: If the head node does not receive the third message sent by the tail node, the head node determines that a service chain failure occurs, and the third message is a response message to the first message; If the head node receives the third message sent by the tail node, the head node determines that the service chain is normal.

11. The method according to any one of claims 6 to 10, characterized in that The method further comprises: If the head node determines that a service chain failure occurs, the head node updates the path of the service chain.

12. A link detection device, characterized in that: Applied to a first forwarding node, the device comprises: A receiving unit, configured to receive a first message sent by a head node, wherein the first message is a detection message of a service chain; a detection unit, configured to detect a communication state between the first forwarding node and the first service node; A sending unit, used for forwarding the first message to the downstream node of the service chain if the communication status between the first forwarding node and the first service node is normal; if the communication status between the first forwarding node and the first service node is a faulty state, discarding the first message and / or sending a second message to the head node, wherein the second message is used to notify the first service node of a fault.

13. A link detection device, characterized in that: Applied to a head node, the device comprises: A sending unit, configured to send a first message to a first forwarding node, wherein the first message is a detection message of a service chain; A receiving unit, used for determining that a service chain failure has occurred if the head node receives a second message sent by the first forwarding node, and the second message is used to notify the first service node of the failure; wherein the second message is sent by the first forwarding node when it detects that the communication status between the first forwarding node and the first service node is a failure status.

14. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein the computer program causes a computer to execute the method according to any one of claims 1 to 5, or the method according to any one of claims 6 to 11.

Citation Information

Cited By

  • Message detection method and network equipment

    CN119484380A