Path detection method, electronic device and storage medium
By determining the target FEC element in the Flex-algo plane and generating an echo request message, the problem that the prior art cannot accurately verify whether the forwarding path is valid, and accurate detection and verification of the forwarding path in the Flex-algo plane is achieved.
Patent Information
- Application Number
- CN202010123741.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-27
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2040-02-27
AI Technical Summary
The prior art cannot accurately verify whether the forwarding path in the Flex-algo plane is valid, which may affect data transmission and service operation.
By determining the target FEC element in the network topology plane, an echo request message is generated and sent to the target node along the forwarding path, for the target node to verify the FEC element and determine whether the forwarding path is valid based on the verification result.
It realizes accurate detection and verification of whether the forwarding path in the Flex-algo plane is effective, avoiding the impact of invalid paths on data transmission and service operation.
Smart Images

Figure CN113315701B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular to a path detection method, an electronic device and a storage medium. Background Art
[0002] draft-ietf-lsr-flex-algo-05 proposes the IGP (Interior Gateway Protocol) flexible algorithm (Flex-algorithm) technology (Flex-algo for short), which runs multiple IGP algorithm calculations in the same network topology to obtain multiple Flex-Algo planes and perform data transmission path planning in each plane. In the Flex-algo plane, each node will use the corresponding IGP algorithm to calculate the optimal forwarding path to other destination nodes with itself as the root node. According to the destination node to be reached, the node will obtain and know the next hop node to the destination node, and the next hop node will use the same IGP algorithm to calculate the optimal forwarding path to the destination node with itself as the root node, and continue to obtain the next hop node, and so on to form a hop-by-hop forwarding path. Flex-algo can be used in combination with SR-MPLS (SegmentRouting MPLS segment routing applied to MPLS forwarding plane) or SRv6 (SegmentRouting IPv6 segment routing applied to IPv6 forwarding plane).
[0003] The inventors have discovered that there are at least the following problems in the related art: current technical means cannot accurately verify whether the forwarding path obtained in the Flex-algo plane is effective. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a path detection method to accurately detect and verify whether the forwarding path related to the algorithm in the Flex-algo plane is valid, thereby avoiding the impact of the calculated forwarding path being invalid on data transmission and business operations.
[0005] To solve the above technical problems, an embodiment of the present invention provides a path detection method, comprising: determining a target FEC element of a target node to be detected according to a forwarding path related to an algorithm in a network topology plane; wherein the target FEC element includes internal gateway protocol IGP algorithm information corresponding to the network topology plane; sending an echo request message generated according to the target FEC element to the target node along the forwarding path related to the algorithm, so that the target node can verify the target FEC element; wherein the echo request message includes the target FEC element; and determining whether the forwarding path is valid according to the verification result of the target FEC element fed back by the target node.
[0006] An embodiment of the present invention also provides a path detection method, including: receiving an echo request message, the echo request message including a target FEC element of a target node to be detected; wherein the target FEC element includes internal gateway protocol IGP algorithm information corresponding to the network topology plane where the forwarding path is located; verifying the target FEC element, and generating an echo response message including the verification result of the target FEC element; and feeding back the echo response message to a root node, so that the root node can determine whether the forwarding path is valid based on the verification result of the target FEC element.
[0007] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned path detection method.
[0008] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and the computer program implements the above-mentioned path detection method when executed by a processor.
[0009] Compared with the prior art, the embodiments of the present invention, when it is necessary to detect whether the forwarding path in the Flex-algo plane is valid, determine the target node to be detected according to the IGP algorithm and forwarding path corresponding to the Flex-algo plane, call the target FEC element related to the target node and the IGP algorithm, construct an echo request message for path detection, and provide the target node with the target FEC element verification. According to the FEC element verification result fed back by the target node, accurately determine whether the forwarding path in the Flex-algo plane is valid. By extending the existing path detection protocol, pre-construct the FEC element including the IGP algorithm information. Therefore, when detecting whether the forwarding path is valid, the target FEC element containing the IGP algorithm information can be directly called according to the algorithm corresponding to the Flex-algo plane to perform path detection, thereby ensuring that the forwarding path in each Flex-algo plane can be accurately detected whether it is valid.
[0010] In addition, the IGP algorithm information is included in the extended field of the target FEC element. By including the IGP algorithm information in the extended field, when detecting the path in the Flex-algo plane, the target FEC element containing the algorithm information corresponding to the plane can be directly called, thereby ensuring that whether the path in the Flex-algo plane is valid can be accurately detected.
[0011] In addition, the IGP algorithm information in the extended field is indicated by an algorithm value, wherein the algorithm value includes a standard value assigned to the algorithm by the Internet Assigned Numbers Authority IANA and an algorithm value customized by a user. The standard value assigned to the algorithm by IANA accurately identifies the commonly used algorithms, which facilitates the detection of paths calculated by commonly used IGP algorithms. The user customizes the algorithm value for the algorithm, which ensures that the forwarding path calculated by the algorithm that the user needs to detect can be detected.
[0012] In addition, the types of FEC elements to which extension fields are added include: IPv4 IGP-Prefix Segment ID Sub-TLV, IPv6 IGP-Prefix Segment ID Sub-TLV or IGP-Adjacency Segment ID Sub-TLV, so that the implementation methods of the present application have a wide range of application scenarios.
[0013] In addition, according to the forwarding path related to the algorithm in the network topology plane, the target FEC element of the target node to be detected is determined, including: determining the path detection method of the forwarding path; if the path detection method is LSP Ping detection, the end node of the forwarding path is used as the target node to obtain the target FEC element; if the path detection method is LSP Traceroute detection, each route node in the forwarding path is used as the target node to obtain the target FEC element. By determining the target node according to the path detection method and using the FEC element of the target node as the target element, the efficiency of the detection is guaranteed while ensuring the accuracy of the path detection result. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0015] Figure 1 is a flow chart of a path detection method according to a first embodiment of the present invention;
[0016] Figure 2 is a schematic diagram of network topology according to a first embodiment of the present invention;
[0017] Figure 3 is a schematic diagram of a first FEC element structure according to a first embodiment of the present invention;
[0018] Figure 4 is a schematic diagram of a second FEC element structure according to the first embodiment of the present invention;
[0019] Figure 5 is a schematic diagram of a third FEC element structure according to the first embodiment of the present invention;
[0020] Figure 6 is a schematic diagram of network topology according to a second embodiment of the present invention;
[0021] Figure 7 is a schematic diagram of network topology according to a third embodiment of the present invention;
[0022] Figure 8 is a flow chart of a path detection method according to a fourth embodiment of the present invention;
[0023] Fig. 9 FIG. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. DETAILED DESCRIPTION
[0024] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0025] The first embodiment of the present invention relates to a path detection method, which determines a target FEC element of a target node to be detected according to a forwarding path related to an algorithm in a network topology plane; wherein the target FEC element includes an internal gateway protocol IGP algorithm information corresponding to the network topology plane; an echo request message generated according to the target FEC element is sent to the target node along the forwarding path related to the algorithm, so that the target node can verify the target FEC element; wherein the echo request message includes the target FEC element; according to the verification result of the target FEC element fed back by the target node, it is determined whether the forwarding path is valid, and by extending the existing path detection protocol, an FEC element including the IGP algorithm information is pre-constructed, so that when detecting whether the forwarding path is valid, the target FEC element containing the specific IGP algorithm information can be directly called according to the algorithm corresponding to the Flex-algo plane to perform path detection, thereby ensuring that the forwarding path in each Flex-algo plane can be accurately detected whether it is valid.
[0026] The implementation details of the path detection method of this embodiment are specifically described below. The following content is only provided for easy understanding of the implementation details and is not necessary for implementing this solution.
[0027] The specific process of the path detection method in this embodiment is as follows Figure 1 As shown, the path detection method in this embodiment can be applied to the path detection of whether multiple forwarding paths are valid, for example, the segment routing forwarding path calculated based on the strict shortest path forwarding (strict SPF) algorithm in the segment routing architecture, the segment routing forwarding path based on the IGP flexible algorithm technology, the overlay service forwarding path and the segment routing traffic engineering (SR-TE) instance, etc. In this embodiment, the segment routing forwarding path based on the IGP flexible algorithm technology is used as an example for explanation, and specifically includes the following steps;
[0028] Step 101: determine a target FEC element of a target node to be detected according to a forwarding path related to an algorithm in a network topology plane.
[0029] Specifically, when detecting whether the forwarding path is valid, the root node of the forwarding path determines the target FEC element of the target node to be detected based on the forwarding path related to the algorithm in the network topology plane; wherein the target FEC element includes the internal gateway protocol IGP algorithm information corresponding to the network topology plane.
[0030] In one example, the network topology diagram of the forwarding path related to the algorithm is as follows: Figure 2As shown in the figure, in the IPV4 network, ISIS is used as the control plane protocol of SR-MPLS, and two Flex-algo planes are created, where the Algorithm value corresponding to the Flex-algo128 plane is 128, and the Algorithm value corresponding to the Flex-algo 129 plane is 129. The Flex-algo 128 plane contains nodes S, A, B, D, and the bidirectional links between these nodes. The Flex-algo 129 plane contains nodes S, B, C, D, and the bidirectional links between these nodes. If the D node allocates Prefix-D (prefix identifier D) for its routing loopback interface, the Prefix-SIDs related to Algorithms 128 and 129 are 1280 and 1290 respectively. After learning, other nodes will establish FTN (FEC to NHLFE Map, FEC to next hop label forwarding unit mapping) and ILM (input label mapping) forwarding table entries to Prefix-D. The MPLS label information included in the table entries is generated according to the existing technology based on Prefix-SID 1280 or 1290. Assume that in the Flex-algo 128 plane and the Flex-algo 129 plane, the shortest forwarding path from the source node S to the end node D is SBD. The root node initiates LSP Ping SR-LSP Prefix-D Algorithm 128 detection to determine whether the SR-BE (Segment Routing Best Effort) path SBD to the destination node D in the Flex-algo 128 plane is valid. Then, node S will act as the Initiator (root) node, node D as the target node, and the FEC element of node D as the target FEC element, wherein the FEC element of node D includes the algorithm information corresponding to the Flex-algo128 plane.
[0031] In practical applications, when the root node determines the target FEC element of the target node to be detected based on the forwarding path related to the algorithm in the network topology plane, it determines the path detection mode of the forwarding path; if the path detection mode is LSP Ping detection, the end node of the forwarding path is used as the target node to obtain the target FEC element; if the path detection mode is LSPTraceroute detection, each route node in the forwarding path is used as the target node to obtain the target FEC element. Among them, the route node (Segment Node) is a node in the segment list (Segment List), and the target FEC element may be an IGP-Prefix Segment type or an IGP-Adjacency Segment type.
[0032] Step 102: Send the echo request message generated according to the target FEC element to the target node along the forwarding path related to the algorithm for verification by the target node.
[0033] Specifically, after obtaining the target FEC element of the target node, the root node generates an echo request message according to the target FEC element, and sends the echo request message generated according to the target FEC element to the target node along the forwarding path related to the algorithm, so that the target node can verify the target FEC element; wherein the echo request message includes the target FEC element. In addition, the IGP algorithm information is included in the extended field of the target FEC element.
[0034] In one example, after determining the target FEC element to be detected, the target FEC element including the algorithm information is added to the target FEC element stack of the echo request message, and is encapsulated in the echo request message together with the relevant label information generated according to the prefix identifier. The echo request message is then sent to the target node along the forwarding path associated with the algorithm, and the target node verifies the target FEC element, thereby detecting whether the path calculated by the specific IGP algorithm is valid.
[0035] The target FEC element is obtained by adding an extended field including algorithm information to the existing IGP Segment FEC element. The types of FEC elements to which the extended field is added include: IPv4 IGP-Prefix Segment ID Sub-TLV, IPv6 IGP-Prefix Segment ID Sub-TLV or IGP-Adjacency Segment ID Sub-TLV. After adding the extended field including IGP algorithm information on the basis of the existing IGP Segment FEC element, for the three types of FEC elements including algorithm information, namely, IPV4 IGP-Prefix, IPV6 IGP-Prefix and IGP-Adjacency, the structural schematic diagrams of IPv4 IGP-Prefix Segment ID per Algorithm Sub-TLV, IPv6 IGP-Prefix Segment ID per Algorithm Sub-TLV and IGP-Adjacency Segment ID per Algorithm Sub-TLV are shown as follows: Figure 3 , Figure 4 and Figure 5As shown. Among them, the meanings and generation methods of the remaining fields except the algorithm field can refer to RFC8287. The algorithm field can include an algorithm value that identifies the algorithm. In practical applications, the addition position and value of the extended algorithm field can be adjusted as needed, and this implementation does not limit the specific setting of the extended field.
[0036] For example, the root node S is Figure 2 In the network topology shown in the figure, the LSP Ping SR-LSP Prefix-D Algorithm 128 detection is initiated for the Flex-algo 128 plane with the algorithm value of 128. The root node S then detects the FEC element IPv4 IGP-Prefix Segment ID per Algorithm of the target node D based on the IPv4 IGP-Prefix Segment ID per Algorithm =<Prefix-D,Algorithm 128> , construct the echo request message and set the target FEC stack TLV (target FEC element stack) in the Echo request PDU (echo request message protocol data unit): {IPv4 IGP-Prefix Segment ID perAlgorithm=<Prefix-D,Algorithm 128>}, and encapsulates the IP / UDP (User Datagram Protocol) header and label stack, the top label of the stack is the label corresponding to Prefix-SID 1280, the label TTL = 255, the encapsulated label information can be generated in advance according to RFC8029 according to Prefix-SID (Prefix Segment Identifier) 1280, and the specific encapsulation method can also refer to RFC8029 for encapsulation.
[0037] After the root node S generates the echo request message, it first sends the message to the transit node B, and the echo request message is transparently transmitted to the destination node D through node B. According to the definition of RFC8029, node D verifies itself according to the preset conditions for sending the echo request message to the control plane, and performs subsequent processing according to the verification result. Among them, the preset conditions for uploading the echo request message to the control plane can be any one of the following conditions: the TTL of the top label of the MPLS label stack has timed out, the top label of the MPLS label stack is the router alert label (Router Alert Label), the destination IP in the IP header is within the range of 127 / 8, the router alert option (Router Alert Option) in the IP header is valid, and the TTL in the IP header has timed out. For example, in this example, node D sends the received echo request message to the control plane according to the destination IP of the echo request message being within the range of 127 / 8. Node D acts as a responder node, identifies the path detection type according to the destination UDP port of 3503 in the control plane, and verifies the target FEC element.
[0038] If node D verifies the FEC element on the control plane and finds that the label value of the target FEC element is valid, there is an ILM forwarding entry corresponding to Prefix-SID 1280 and the label operation is POP, the label stack of the message is consistent with the target FEC stack, that is, node D has indeed announced IPv4 IGP-Prefix SegmentID per Algorithm= through ISIS.<Prefix-D,Algorithm 128> And Prefix-SID is 1280, it is determined that the target FEC element verification is successful, and the destination node D constructs an echo reply message according to the verification result, and includes the verification success information in the echo reply message.
[0039] Among them, when the destination node verifies the FEC element, it can generally refer to the verification process of RFC8029. In order to ensure the accurate verification of the FEC element including the algorithm information, the response node determines the type of IGP protocol according to the target FEC element, and verifies the target FEC element according to the type of IGP protocol. That is, first determine the type of IGP protocol used when creating the path related to the algorithm according to the Protocol value in the target FEC element, and verify the target FEC element and the label according to the type of IGP protocol.
[0040] For example, modify step 4 of section 4.4.1 in RFC8029 to the following in advance, and perform verification according to the modified process:
[0041] Step 4.
[0042] If the incoming label bound to the FEC element to be checked is an implicit null label, set FEC-status to 2 and go to step 4.a.
[0043] Otherwise, if the incoming label bound to the FEC element to be checked is Label-L, go to step 4.a.
[0044] Otherwise, set FEC-return-code to 10, indicating that "the label mapped for this FEC element is not the current top label in the label stack (Mapping for this FEC is not the given label at stack-depth)", set FEC-status to 1, and then return.
[0045] Step 4.a SID verification
[0046] CASE 1: If Label-stack-depth is 0 and the FEC-stack-depth in the Target FEC Stack sub-TLV is the IPv4 IGP-Prefix Segment ID per Algorithm Sub-TLV, then:
[0047] First determine the IGP protocol type:
[0048] If the protocol in the IPv4 IGP-Prefix Segment ID per Algorithm sub-TLV is 0, any locally enabled IGP protocol is used;
[0049] If the protocol in the IPv4 IGP-Prefix Segment ID per Algorithm sub-TLV is 1, the IGP protocol is OSPF.
[0050] If the protocol in the IPv4 IGP-Prefix Segment ID per Algorithm sub-TLV is 2, the IGP protocol is ISIS.
[0051] If the value of protocol in the IPv4 IGP-Prefix Segment ID per Algorithm sub-TLV is unrecognizable, the value of protocol is treated as 0.
[0052] If any of the following checks fails, the Best-return-code is set to 10, indicating that the label mapped to the current FEC element is not the first label in the label stack.<Return Subcode> Layer label (Mapping for this FEC is not thegiven label at stack-depth <rsc>)”.
[0053] Verification 1: The non-PHP flag is set when node-SID is advertised: If the protocol is OSPF, the NP-Flag in SR-OSPF should be set to 0; if the protocol is ISIS, the P-Flag in SR-ISIS should be set to 0.
[0054] Verification 2: The Node-SID per Algorithm advertised for IPv4-prefix is advertised via IGP:
[0055] If it is detected that no IGP protocol on Interface-I has notified the FEC element to be checked, set Best-return-code to 12, indicating "the current element in the FEC stack is not associated with the protocol on the interface (Protocol notassociated with interface at FEC-stack-depth)", and then return.
[0056] Set FEC-Status to 1 and return.
[0057] Case 2: If Label-stack-depth is greater than 0 and the FEC-stack-depth in the Target FEC Stack sub-TLV is the IPv4 IGP-Prefix Segment ID per Algorithm Sub-TLV, then:
[0058] First, determine the IGP protocol type. The method for determining the IGP protocol type is similar to the method in CASE1 and will not be repeated here.
[0059] If the following check fails, the Best-return-code is set to 10, which means "the label mapped to the current FEC element is not the first label in the label stack."<Return Subcode> Layer label (Mapping for this FEC is not the givenlabel at stack-depth <rsc>)”.
[0060] Verification 1: The Node-SID per Algorithm advertised for IPv4-prefix is advertised via IGP:
[0061] If it is detected that no IGP protocol on Interface-I has notified the FEC element to be checked, set Best-return-code to 12, indicating "the current element in the FEC stack is not associated with the protocol on the interface (Protocol notassociated with interface at FEC-stack-depth)", and then return.
[0062] Set FEC-Status to 1 and return.
[0063] Case 3: If Label-stack-depth is 0 and the FEC-stack-depth in the Target FEC Stack sub-TLV is the IPv6 IGP-Prefix Segment ID per Algorithm Sub-TLV, the processing is similar to that of Case 1 above and is not repeated here.
[0064] Case 4: If Label-stack-depth is greater than 0 and the IPv6 IGP-Prefix Segment ID per Algorithm Sub-TLV is in the FEC-stack-depth in the Target FEC Stack sub-TLV, the processing is similar to that of Case 2 above and is not repeated here.
[0065] CASE5: If the IGP-Adjacency Segment ID per Algorithm Sub-TLV in the FEC-stack-depth of the Target FEC Stack sub-TLV is:
[0066] First determine the IGP protocol type:
[0067] If the protocol in the IGP-Adjacency Segment ID per Algorithm sub-TLV is 0, any locally enabled IGP protocol is used;
[0068] If the protocol in the IGP-Adjacency Segment ID per Algorithm sub-TLV is 1, the IGP protocol is OSPF.
[0069] If the protocol in the IGP-Adjacency Segment ID per Algorithm sub-TLV is 2, the IGP protocol is ISIS.
[0070] If the protocol value in the IGP-Adjacency Segment ID per Algorithm sub-TLV is unrecognizable, the protocol value is treated as 0.
[0071] If any of the following checks fails, the Best-return-code is set to 35, indicating "Mapping for this FEC is not associated with the incoming interface"
[0072] When Adj.Type is equal to 1 (Parallel Adjacency):
[0073] Verification 1: The ReceivingNode Identifier in the IGP-Adjacency Segment ID per Algorithm sub-TLV is the Node-ID of the local node.
[0074] Verification 2: The node indicated by the AdvertisingNode Identifier in the IGP-Adjacency Segment ID per Algorithm sub-TLV has indeed advertised the IGP-Adjacency Segment ID per Algorithm FEC. This verification only requires querying and confirming in the link state database maintained by the local node.
[0075] When Adj.Type is 4 or 6 (IGP Adjacency or LAN Adjacency):
[0076] Verification 1: The RemoteInterface ID in the IGP-Adjacency Segment ID per Algorithm sub-TLV matches Interface-I.
[0077] Verify 2: The ReceivingNode Identifier in the IGP-Adjacency Segment ID per Algorithm sub-TLV is the Node-ID of the node.
[0078] Verification 3: The node indicated by the AdvertisingNode Identifier in the IGP-Adjacency Segment ID per Algorithm sub-TLV has indeed advertised the IGP-Adjacency Segment ID per Algorithm FEC. This verification only requires querying and confirming in the link state database maintained by the local node.
[0079] Set FEC-Status to 1 and return.
[0080] After verifying the target FEC element according to the above verification process, an echo response message including the verification result of the target FEC element is generated, and then the echo response message including the verification result of the target FEC element is fed back to the root node.
[0081] Step 103: Determine whether the forwarding path is valid according to the verification result of the target FEC element fed back by the target node.
[0082] Specifically, after the destination node generates an echo response message according to the verification result of the target FEC element, it feeds back the echo response message including the verification result of the target FEC element to the root node of the path. The root node determines whether the forwarding path is valid according to the verification result of the target FEC element fed back by the destination node.
[0083] In one example, after receiving the echo response message, the root node determines the verification result of the target FEC element according to the return code value representing the target FEC element detection result in the message, and then determines whether the forwarding path is valid according to the verification result of the target FEC element.
[0084] For example, in the received echo request message, the value of the return code Best-return-code indicates the verification result of the target FEC element, and the value of Best-return-code in the received echo response message is 12. The root node determines the verification result of the target FEC element according to the corresponding meanings pre-assigned to different values of Best-return-code. After querying, it is found that the result corresponding to the value 12 is; the current element in the FEC stack is not associated with the protocol on the interface (Protocol notassociated with interface at FEC-stack-depth). Therefore, the root node can determine that the verification of the target FEC element has failed, and then the root node determines that the forwarding path is an invalid path according to the result of the failure of the verification of the target FEC element, and displays the detection result that the forwarding path is invalid.
[0085] Therefore, this embodiment provides a path detection method, by adding an extended field including IGP algorithm information to the existing FEC element, redefining the FEC element including the IGP algorithm information; when it is necessary to detect whether the forwarding path calculated by the IGP algorithm is valid, determine the target FEC element to be detected that includes the algorithm information corresponding to the network topology plane where the forwarding path is located, and determine whether the forwarding path is valid based on the verification result of the target FEC element. By extending the FEC element and the path detection protocol, it is guaranteed that the forwarding path in the Flex-algo plane can be accurately detected.
[0086] The second embodiment of the present invention relates to a path detection method. The second embodiment is substantially the same as the first embodiment. In this embodiment, the algorithm value identifying the algorithm in the algorithm field may be a standard value assigned to the algorithm by IANA (Internet Assigned Numbers Authority), or may be a user-defined algorithm value. By assigning standard values to some algorithms by IANA, it is possible to detect whether the paths calculated by some commonly used algorithms are effective; by customizing algorithm values for algorithms by users, it is possible to efficiently detect whether the paths calculated by the algorithm selected by the user are effective. The specific detection steps in the path detection process may refer to the first embodiment.
[0087] Step 101: determine a target FEC element of a target node to be detected according to a forwarding path related to an algorithm in a network topology plane.
[0088] Specifically, the root node determines the target FEC element of the target node based on the algorithm, forwarding path and detection method corresponding to the network topology plane. The target FEC element is added with an extended field including IGP algorithm information, wherein the IGP algorithm information in the extended field is indicated by an algorithm value, wherein the algorithm value includes a standard value assigned to the algorithm by the Internet Assigned Numbers Authority IANA and an algorithm value customized by the user.
[0089] In an example, the value and meaning of the algorithm in the algorithm field added to the FEC element are as follows: 0-127: standard values assigned by IANA, for example, 0 represents "SPF algorithm based on link metric", 1 represents "Strict SPF algorithm based on link metric", 128-255: used to identify IGP Flex-algo, which is user-defined. For example, a user can create a Flex-algo plane with Algorithm 128 or a Flex-algo plane with Algorithm 129. In actual applications, the range of algorithm values can be set according to actual conditions or needs. This implementation does not limit the setting of algorithm values.
[0090] For example, the root node R1 is Figure 6 In the network topology shown, the path calculated based on the strict shortest path algorithm under the segment routing architecture is detected. The algorithm standard value assigned by IANA for the strict shortest path algorithm is 1. In the IPv4 network, ISIS is used as the control plane protocol of SR-MPLS. The ingress node R1 establishes an SR LSP (segment routing label switching path) based on the Strict SPF (strict shortest path) algorithm to the egress node R3. Each node in the network floods its own Strict SPF Prefix-SID to the outside, and the Algorithm information carried when announcing the Prefix-SID has a standard value of 1. For example, the Strict SPF Prefix-SID assigned by the R3 node to its loopback route Prefix-R3 is 300. The R1 node and the R2 node learn that the FTN and ILM forwarding entries to Prefix-R3 will be established in the future. The MPLS label information included in the entry is generated according to the Prefix-SID 300 with reference to the prior art.
[0091] When the root node R1 initiates the LSP ping SR-LSP Prefix-R3 Algorithm 1 detection, it uses node R3 as the target node according to the forwarding path and the detection method of the path. It sets IPv4IGP-Prefix Segment ID per Algorithm=<Prefix-R3,Algorithm 1> As the target FEC element.
[0092] Step 102: Send the echo request message generated according to the target FEC element to the target node along the forwarding path related to the algorithm for verification by the target node.
[0093] In one example, after the root node R1 determines the target FEC element, it determines to set the Echo request PDU: target FEC stack TLV: {IPv4 IGP-Prefix Segment ID per Algorithm =<Prefix-R3,Algorithm 1>}, then encapsulates the IP / UDP header and label stack, with the top label of the stack corresponding to Prefix-SID 300 and label TTL=255, and generates an echo request message. In actual applications, in addition to the target FEC element, the target FEC stack TLV can also contain the FEC elements corresponding to the remaining labels in the label stack.
[0094] After generating the echo request message, the message is sent to the R2 node. The R2 node transparently transmits the message to the R3 node. After receiving the echo request message, R3 detects itself according to the conditions for sending the echo request message to the control plane. R3 detects that it meets the preset conditions and sends the message to the control plane. As the response node, the R3 node verifies the target FEC element. If the control plane finds that the label value is valid, there is an ILM forwarding table entry corresponding to Prefix-SID 300 and the label operation is POP; the inspection finds that the label stack of the message is consistent with the target FEC stack, that is, the R3 node has indeed announced the IPv4 IGP-Prefix Segment ID per Algorithm= through ISIS.<Prefix-R3,Algorithm 1> If the Prefix-SID is 300, the verification result of the FEC element is considered to be passed. The R3 node constructs an echo reply message according to the verification result of the target FEC element, includes verification success information in the echo reply message, and feeds the echo reply message back to the root node R1.
[0095] Step 103: Determine whether the forwarding path is valid according to the verification result of the target FEC element fed back by the target node. The root node determines whether the path is valid according to the verification result of the target FEC element and outputs the detection result.
[0096] Therefore, this embodiment provides a path detection method, in which the algorithm value in the extended field of the FEC element includes a standard value assigned by IANA for a specific algorithm or a user-defined algorithm value. By assigning standard values to some specific algorithms by IANA, when detecting the path calculated by some algorithms, the target FEC element including the specific algorithm information can be called to accurately detect whether the forwarding path is valid; by using the user-defined algorithm value, the path detection of the forwarding path calculated by the algorithm with the customized value can be directly performed in the Flex-algo plane, ensuring that it is possible to efficiently and accurately determine whether the path calculated by the algorithm selected by the user is valid.
[0097] The third embodiment of the present invention relates to a path detection method, which is roughly similar to the first embodiment. In this embodiment, adjacent links are identified according to the IGP algorithm corresponding to the Flex-algo plane, and FEC elements including algorithm information of the adjacent links are generated, so that within the IGP plane, whether the path of the service or segmented routing traffic engineering instance is valid is detected. The specific detection steps can refer to the first embodiment.
[0098] Step 101: determine a target FEC element of a target node to be detected according to a forwarding path related to an algorithm in a network topology plane.
[0099] Specifically, the root node determines the target FEC element of the target node that needs to be detected according to the forwarding path, the network topology plane where the path is located, and the path detection method.
[0100] In an example, it is necessary to perform LSP Traceroute detection on the SR-TE (Segment Routing Traffic Engineering) path in the network topology. The corresponding identification list (SID List) is determined based on the segment list (Segment List) corresponding to the SR-TE instance, and then the target FEC element is determined based on the algorithm corresponding to each segment.
[0101] For example, in Figure 7 In the network topology shown in Figure 1, the SR-TE instance path is detected. Figure 7 In the network topology shown, ISIS is used as the control plane protocol of SR-MPLS in the IPv4 network, and two Flex-algo planes are created. The Algorithm value corresponding to the Flex-algo 128 plane is 128, and the Algorithm value corresponding to the Flex-algo 129 plane is 129. The Flex-algo 128 plane contains nodes S1, A, B, D, and the bidirectional links between these nodes. The Flex-algo 129 plane contains nodes S2, B, C, D, and the bidirectional links between these nodes. Both planes use IGP metric (IGP metric value) to calculate the shortest path, and the IGP metric of link link (BD) is 100, and the IGP metric of the remaining links is 10.
[0102] Among them, the Prefix-SID associated with Algorithm 128 allocated by Node B to its loopback route Prefix-B is 1280. After learning, other nodes will establish FTN and ILM forwarding entries to Prefix-B. The MPLS label information included in the entry is generated according to the existing technology based on Prefix-SID 128. Node B allocates Adjacency-SID (adjacency segment identifier) 1281 associated with Algorithm 128 to its local link (BD). After learning, other nodes will store it in the local link state database.
[0103] On node S1, an SR-TE instance in the Flex-algo 128 plane (denoted as sr-te-100) is created. Its Segment List is {Node-B, Link(BD)}, and the corresponding SID List is {1280,1281}. After LSP traceroute sr-te-100 is initiated on node S1, node S1 acts as the root node, takes the first segment end node B in SR-TE and the second segment adjacent segment link link(BD) end node D as the target node, and sets the FEC element IPv4 IGP-PrefixSegment ID per Algorithm of node B to<Prefix-B,Algorithm 128> FEC element corresponding to link link(BD) IGP-Adjacency Segment ID per Algorithm =<link(B-D),128> As the target FEC element.
[0104] Step 102: Send the echo request message generated according to the target FEC element to the target node along the forwarding path related to the algorithm for verification by the target node.
[0105] Specifically, after the root node determines the target FEC element, it constructs an echo request message according to the FEC element to be detected, and sends the FEC element to be detected to the corresponding target node for verification.
[0106] In one example, after the root node S1 determines the target FEC element, it sets the Echo request PDU: targetFEC stack TLV: {IPv4 IGP-Prefix Segment ID per Algorithm =<Prefix-B,Algorithm128> ,IGP-Adjacency Segment ID per Algorithm=<link(B-D),128>}, includes the DDMAP TLV in it, and then encapsulates the IP / UDP header and label stack. The top label of the stack is the label corresponding to Prefix-SID 1280, and the label TTL = 1. Then, the message is transmitted to node A according to the shortest path to node B in the Flex-algo128 plane.
[0107] After receiving the echo request message, node A sends the echo request message to the control plane because the top-level label TTL is 1, and A will serve as the responder node. If the control plane checks and finds that the label value is valid, there is an ILM forwarding table entry corresponding to Prefix-SID 1280 and the label operation is SWAP; checks and finds that the next hop information in the DDMAP TLV matches the inbound interface where the message arrives; checks and finds that the label stack of the message is consistent with the target FEC stack, that is, node A is IPv4IGP-Prefix Segment ID per Algorithm =<Prefix-B,Algorithm 128> If the bound label is consistent with the top-level label of the message, the verification is successful. Node A replies an echo reply message to node S1, and the echo reply message contains the verification success information.
[0108] Root node S1 reconstructs the echo request message based on the received echo reply message, leaving the target FEC element stack unchanged, sets the top-level label TTL value to 2, and then resends it to node A. Because the top-level label is 2, A decrements the TTL value by 1 and directly forwards the message to node B.
[0109] After receiving the echo request message, node B sends the message to the control plane for inspection because the top-level label TTL is 1. If the control plane finds that the label value is valid, there is an ILM forwarding entry corresponding to Prefix-SID 1280 and the label operation is POP, the control plane finds that the label stack of the message is consistent with the target FEC stack, that is, node B has indeed announced IPv4 IGP-Prefix Segment ID per Algorithm= through ISIS.<Prefix-B,Algorithm128> If the Prefix-SID is 1280, the verification is successful.
[0110] Node B replies to node S1 with an echo reply message that contains verification success information and FEC Stack Change TLV, prompting root node S1 to pop the IPv4IGP-Prefix Segment ID per Algorithm Sub-TLV in the target FEC stack TLV.
[0111] After receiving the echo response message containing the successful FEC element verification from node B, the root node S1 adjusts part of the data in the echo request message and changes the target FEC stack TLV to: target FEC stack TLV: {IGP-AdjacencySegment ID per Algorithm =<link(B-D),128>}. The top-level label TTL is set to 3. Forward to the next hop node A.
[0112] When node A receives the echo request packet, the top-level label TTL is 3. After node A decrements the top-level label TTL by 1, it directly forwards the packet to node B. After node B receives the echo request packet, the top-level label TTL is 2. It terminates the label corresponding to Prefix-SID 1280, continues to search the ILM table according to the label corresponding to the lower-layer Adjacency-SID 1281, decrements the top-level label by 1, pops the label, copies the label TTL to the lower-layer IP header, and then forwards the packet to node D.
[0113] After receiving the echo request message, node D sends the echo request message to the control plane because the destination IP address of the echo request message is 127 / 8 and the IP TTL is 1. If the control plane checks, it finds that IGP-Adjacency Segment IDper Algorithm=<link(B-D),128> The Remote Interface ID contained in matches the incoming interface of the packet. Checking shows that IGP-Adjacency Segment ID per Algorithm =<link(B-D),128> The Receiving Node Identifier contained in is the Node-ID of this node. Checking the maintained link state database, it is found that IGP-Adjacency Segment ID per Algorithm =<link(B-D),128> The node represented by the Advertising NodeIdentifier contained in has indeed advertised the IGP-Adjacency Segment ID per Algorithm=<link(B-D),128> , then the verification is considered successful.
[0114] Node D sends an echo reply message to node S1. The echo reply message contains verification success information and FEC Stack Change TLV, prompting the head node to pop the IGP-Adjacency Segment ID per Algorithm Sub-TLV in the target FEC stack TLV.
[0115] It is worth mentioning that during the path detection process, if the target FEC element fails to be verified in the detection of any node, the response node can directly send an echo response message including feedback verification failure to the root node and terminate subsequent path detection.
[0116] Step 103: Determine whether the forwarding path is valid according to the verification result of the target FEC element fed back by the target node. The root node determines whether the path is valid according to the verification result of the FEC element and outputs the detection result.
[0117] Therefore, this embodiment provides a path detection method, which determines the target FEC element corresponding to the algorithm-related path in the SR-TE instance according to the network topology plane, path detection method and forwarding path where the created SR-TE instance is located, and detects whether the algorithm-related segmented path in the SR-TE instance is valid according to the target FEC element.
[0118] A fourth embodiment of the present invention relates to a path detection method, comprising: receiving an echo request message, the echo request message including a target FEC element of a target node to be detected; wherein the target FEC element includes an internal gateway protocol IGP algorithm information corresponding to a network topology plane where a forwarding path is located; verifying the target FEC element, and generating an echo response message including a verification result of the target FEC element; and feeding back the echo response message to a root node, so that the root node determines whether the forwarding path is valid based on the verification result of the target FEC element.
[0119] The specific process of the path detection method in this embodiment is as follows Figure 8 As shown, the specific steps include:
[0120] Step 801: Receive an echo request message.
[0121] Specifically, when detecting whether the forwarding path is valid, the response node receives an echo request message, which includes the target FEC element of the target node to be detected, wherein the target FEC element includes the internal gateway protocol IGP algorithm information corresponding to the network topology plane where the forwarding path is located, and determines the target FEC element to be verified based on the received echo request message.
[0122] In one example, the IGP algorithm information is included in an extension field of the target FEC element. In practical applications, the IGP algorithm information in the extension field is indicated by a standard value assigned to the algorithm by the Internet Assigned Numbers Authority IANA or by an algorithm value defined by a user.
[0123] In another example, the type of the FEC element to which the extension field is added includes: IPv4 IGP-Prefix SegmentID Sub-TLV, IPv6 IGP-Prefix Segment ID Sub-TLV, or IGP-Adjacency Segment ID Sub-TLV.
[0124] Step 802: Verify the target FEC element included in the echo request message, and generate an echo response message including the verification result of the target FEC element.
[0125] Specifically, after determining the target FEC element to be detected according to the received echo request message, the response node verifies the target FEC element, and generates an echo response message including the verification result of the target FEC element according to the verification result of the target FEC element.
[0126] In an example, when the response node verifies the target FEC element, it can generally refer to the verification process of RFC8029. In order to ensure that the FEC elements including the IGP algorithm can be accurately verified, when the response node verifies the target FEC element, it determines the type of IGP protocol based on the target FEC element, and verifies the target FEC element based on the type of IGP protocol. That is, first determine the type of IGP protocol used when creating the algorithm-related path based on the protocol value in the target FEC element, and determine to verify the target FEC element and label based on the type of IGP protocol. After the verification is completed, set the return code value representing the FEC element verification result based on the verification result of the target FEC element, and generate an echo response message containing the verification result of the target FEC element.
[0127] Step 803: Feedback an echo response message to the root node, so that the root node can determine whether the forwarding path is valid according to the verification result of the target FEC element.
[0128] Specifically, after the response node generates an echo response message including the verification result of the target FEC element, the echo response message is fed back to the root node of the forwarding path. The root node determines the verification result of the target FEC element based on the return code value representing the verification result of the target FEC element in the echo response message, and then determines whether the forwarding path is valid based on the verification result of the target FEC element.
[0129] Therefore, this embodiment provides a path detection method, which extends the existing path detection protocol by adding an extension field including IGP algorithm information in the existing FEC element, and introduces the FEC element including the IGP algorithm information; thereby, in the detection of whether the forwarding path calculated by the IGP algorithm is valid, the root node can call the target FEC element including the IGP algorithm information to initiate path detection, and the response node can accurately verify the target FEC element including the IGP algorithm information and provide feedback on the verification result, and the root node determines whether the forwarding path is valid according to the verification result of the target FEC element, thereby achieving accurate and efficient detection of whether the forwarding path calculated by the IGP algorithm is valid.
[0130] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0131] A fifth embodiment of the present invention relates to an electronic device, such as Fig. 9 As shown, it includes at least one processor 901; and a memory 902 that is communicatively connected to the at least one processor 901; wherein the memory 902 stores instructions that can be executed by the at least one processor 901, and the instructions are executed by the at least one processor 901 so that the at least one processor 901 can execute the above-mentioned path detection method.
[0132] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0133] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0134] The sixth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0135] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0136] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present invention, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present invention.< / rsc> < / rsc>
Claims
1. A path detection method, characterized in that: include: Determine a target FEC element of a target node to be detected according to an algorithm, a forwarding path, and a detection method corresponding to a network topology plane; wherein the target FEC element includes an internal gateway protocol IGP algorithm information corresponding to the network topology plane, and the IGP algorithm information is included in an extension field of the target FEC element, and the type of the FEC element to which the extension field is added includes: IPv4 IGP-Prefix Segment ID Sub-TLV, IPv6 IGP-Prefix Segment ID Sub-TLV, or IGP-Adjacency Segment ID Sub-TLV; sending an echo request message generated according to the target FEC element to the target node along the forwarding path associated with the algorithm, so that the target node can verify the target FEC element; wherein the echo request message includes the target FEC element; Determining whether the forwarding path is valid according to the verification result of the target FEC element fed back by the target node; The step of determining the target FEC element of the target node to be detected according to the algorithm, forwarding path and detection method corresponding to the network topology plane includes: Determining a path detection method for the forwarding path; If the path detection mode is LSP Ping detection, the end node of the forwarding path is used as the target node to obtain the target FEC element; If the path detection mode is LSP Traceroute detection, each route node in the forwarding path is used as the target node to obtain the target FEC element.
2. The path detection method according to claim 1, characterized in that: The IGP algorithm information in the extension field is indicated by an algorithm value, wherein the algorithm value includes a standard value assigned to the algorithm by the Internet Assigned Numbers Authority IANA and an algorithm value defined by a user.
3. A path detection method, characterized in that: include: Receive an echo request message, the echo request message including a target FEC element of a target node to be detected; wherein the target FEC element includes internal gateway protocol IGP algorithm information corresponding to a network topology plane where a forwarding path is located, the IGP algorithm information is included in an extension field of the target FEC element, and the types of FEC elements to which the extension field is added include: IPv4 IGP-Prefix Segment ID Sub-TLV, IPv6 IGP-Prefix Segment ID Sub-TLV or IGP-Adjacency Segment ID Sub-TLV; if the path detection mode is LSP Ping detection, the end node of the forwarding path is taken as the target node to obtain the target FEC element; if the path detection mode is LSP Traceroute detection, each route node in the forwarding path is taken as the target node to obtain the target FEC element; Verifying the target FEC element and generating an echo response message including a verification result of the target FEC element; The echo response message is fed back to the root node, so that the root node can determine whether the forwarding path is valid according to the verification result of the target FEC element.
4. The path detection method according to claim 3, characterized in that: The checking of the target FEC element includes: Determining the type of the IGP protocol according to the target FEC element; The target FEC element is verified according to the type of the IGP protocol.
5. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the path detection method as described in any one of claims 1 to 2, or can execute the path detection method as described in any one of claims 3 to 4.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the path detection method according to any one of claims 1 to 2 is implemented, or the path detection method according to any one of claims 3 to 4 is implemented.
Citation Information
Patent Citations
Method and device for switching OAM (Operations, Administration and Maintenance) between MPLS (Multiple-Protocol Label Switching) and MPLS-TP (Multiple-Protocol Label Switching-Transport Profile)
CN102136995A
Fault detection method and device
CN107147508A