Intermediate node label determination method and terminal equipment
By filtering the routing address with prefix tags and external attribute information, determining the target routing address and using its prefix tags as forwarding tags, the traffic forwarding error problem caused by improper selection of intermediate node addresses is solved, and more accurate traffic forwarding and rapid network recovery is achieved.
Patent Information
- Application Number
- CN202311138037.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-31
- Publication Date
- 2025-02-28
AI Technical Summary
In the fast rerouting mechanism, improper selection of node addresses of intermediate nodes may cause traffic to be forwarded to external areas, resulting in traffic forwarding errors.
By obtaining the internal gateway protocol IGP flooding information of the intermediate node of the alternate path, filtering the route address with prefix tags and external attribute information, determining the target route address, and using its prefix tag as a forwarding tag to guide traffic forwarding.
It effectively avoids traffic forwarding to external areas, improves the accuracy of traffic forwarding, and ensures rapid recovery of the network in the event of failure.
Smart Images

Figure CN119544607A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data communication technology, and specifically relates to a method for determining an intermediate node label and a terminal device. Background Art
[0002] Fast Reroute (FRR) is a mechanism that provides backup protection for failed nodes and links when a network failure occurs, reduces the impact of link or node failure on traffic forwarding, and quickly restores services. Topology Independent Loop Free Alternate (TI-LFA) is a solution to implement FRR. TI-LFA only requires a small number of segment identifiers (Segment Identifiers, SIDs) on the intermediate nodes to guide traffic, which requires determining the node address of the intermediate node. However, since the node address of the selected intermediate node may be an external node, when traffic is forwarded to this node, it will be forwarded to the external area according to the segment identifier, which will cause traffic forwarding errors. Summary of the invention
[0003] The present application aims to provide a method for determining an intermediate node label and a terminal device, at least to solve the problem in the related art that traffic forwarding is sometimes forwarded to an external area, resulting in traffic forwarding errors.
[0004] In a first aspect, an embodiment of the present application proposes a method for determining an intermediate node label, which is applied to a source node of a network, and the method includes:
[0005] Acquire internal gateway protocol (IGP) flooding information of an intermediate node of the backup path, wherein the IGP flooding information includes a routing address set configured on the intermediate node;
[0006] Determine, according to the IGP flooding information, a first candidate routing address corresponding to prefix information from the routing address set, wherein the prefix information includes a prefix label and external attribute information corresponding to the prefix label;
[0007] Determine a target routing address from the first candidate routing addresses based on the external attribute information of the first candidate routing addresses;
[0008] The prefix label corresponding to the target routing address is used as a forwarding label of the intermediate node in the backup path.
[0009] In a second aspect, an embodiment of the present application provides a terminal device, including a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0010] According to a third aspect, a storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0011] In a fourth aspect, a chip is provided, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the method described in the first aspect.
[0012] In a fifth aspect, a computer program / program product is provided. The computer program / program product is stored in a storage medium, and the computer program / program product is executed by at least one processor to implement the steps of the method described in the first aspect.
[0013] In an embodiment of the present application, the internal gateway protocol IGP flooding information of the intermediate node of the backup path is first obtained, and the IGP flooding information includes the routing address set configured on the intermediate node, and then the first candidate routing address corresponding to the prefix information is determined from the routing address set according to the IGP flooding information, wherein the prefix information includes a prefix label and external attribute information corresponding to the prefix label, and then based on the external attribute information of the first candidate routing address, the target routing address is determined from the first candidate routing address, and finally the prefix label corresponding to the target routing address is used as the forwarding label of the intermediate node in the backup path. By screening the routing addresses with prefix labels and external attribute information corresponding to the prefix labels, the embodiment of the present application can determine the intermediate nodes that can forward traffic through the external attribute information of the routing addresses, and use their prefix labels as forwarding labels to guide traffic forwarding, which can avoid the situation where traffic is forwarded to external areas and improve the accuracy of traffic forwarding. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is a flowchart of a method for determining an intermediate node label provided by an embodiment of the present application;
[0015] Figure 2 It is a schematic diagram of the format of the Sub-TLV of the IS-IS protocol provided by an embodiment of the present application;
[0016] Figure 3 It is a schematic diagram of the format of the Sub-TLV of the OSPF protocol provided by an embodiment of the present application;
[0017] Figure 4 is a network diagram provided by an embodiment of the present application;
[0018] Figure 5It is a structural diagram of a system for determining intermediate node labels provided by an embodiment of the present application;
[0019] Figure 6 It is a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0020] The embodiments of the present application will be described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and should not be construed as limitations on the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0021] The term "first" or "second" in the specification and claims of this application may include one or more of the features explicitly or implicitly. In the description of this application, unless otherwise specified, "plurality" means two or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means that the objects connected before and after are in an "or" relationship.
[0022] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0023] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0024] In order to ensure that the network can be used normally after a failure, it is necessary to determine the backup path before the network fails and send it to the data plane. When a link failure is detected, the network will be switched to the backup path. FRR is a mechanism that provides backup protection for failed nodes and links when a network failure occurs, reduces the impact of link or node failure on traffic forwarding, and quickly restores services. TI-LFA protection is one of the solutions to implement FRR. Compared with loop-free alternate (LFA) and remote loop-free alternate (RLFA), TI-LFA can implement traffic protection under different network designs. TI-LFA is implemented based on segment routing (SR) technology. The source computing node calculates the main path based on each destination, and calculates the shortest path as the backup path of the main path after pruning the outbound link of the main path in the topology. The backup path is encoded as a SID list (Segment Routing IDList, SR label stack). When the primary path fails, FRR is activated, and the SR label stack will be pushed into the data packet of the traffic to guide the traffic to perform label forwarding. TI-LFA only requires fewer SIDs on the intermediate nodes (P / PQ nodes) to guide the traffic. In order to use the remote node as an intermediate node on the TI-LFA backup path, the source computing node needs to determine the node address of the intermediate node and obtain the node identifier (Node-SID) based on the node address. In the related art, the node address selection steps of the intermediate node are as follows:
[0025] First, the router address (Identifier, ID) announced by the intermediate node is selected as the node address. The router ID is one of the host loopback addresses announced by the interior gateway protocol (IGP) and configured with a prefix label (Prefix-SID). When performing backup path label iteration, the host routing address can be queried based on the router ID, and the Prefix-SID carried by the host routing address can be obtained. It is encapsulated into the SR label stack as a forwarding label to guide traffic label forwarding; if the intermediate node does not announce the router ID, or the router ID does not have corresponding prefix information to match, or the matching prefix information does not carry Prefix-SID, the best reachable node prefix information announced by the intermediate node is selected as the node address, and the Prefix-SID carried by the prefix information is used; if there is no prefix information that meets the requirements, it is considered that the node has no reachable Prefix-SID, and the TI-LFA backup path calculation fails.
[0026] When selecting the reachable node prefix information as the intermediate node address, it is impossible to confirm whether the selected prefix label is the local prefix label of the notifying node. If the selected prefix label corresponds to an external route, when the traffic is forwarded to the node, it will be forwarded to the external area according to the Prefix-SID, resulting in traffic forwarding errors. In the IGP protocol link state database, the prefix information indicates the source of the prefix by carrying a redistribution tag. The redistribution direct connection, redistribution IGP, or redistribution of other protocol routes will all set the redistribution tag. The prefix information of the redistribution IGP or redistribution of other protocols cannot be used as the intermediate node address.
[0027] In order to solve the above technical problems, the embodiment of the present application provides a method for determining an intermediate node label and a terminal device. By screening the routing address with a prefix label and the external attribute information corresponding to the prefix label, the intermediate node that can forward traffic can be determined through the external attribute information of the routing address, and its prefix label is used as a forwarding label to guide traffic forwarding, which can avoid the situation where traffic is forwarded to an external area and improve the accuracy of traffic forwarding.
[0028] A method for determining an intermediate node label and a terminal device according to an embodiment of the present application are described in detail below in conjunction with the accompanying drawings.
[0029] like Figure 1 As shown, the present application embodiment provides a flow chart of a method for determining an intermediate node label. Figure 1 As shown, the method for determining the intermediate node label is applied to the source node of the network, and the method for determining the intermediate node label may include the contents shown in S101 to S104.
[0030] In S101, the internal gateway protocol IGP flooding information of the intermediate node of the backup path is obtained.
[0031] The IGP flooding information includes a routing address set configured on the intermediate node.
[0032] In S102, according to the IGP flooding information, a first candidate routing address corresponding to the prefix information is determined from the routing address set.
[0033] The prefix information includes a prefix label (Prefix-SID) and external attribute information corresponding to the prefix label.
[0034] It is worth noting that in the IGP protocol, the prefix can indicate the source of the prefix by carrying a redistribution tag, that is, the external attribute information is used to indicate the redistribution source of the prefix label, and the redistribution source can include non-redistribution, redistribution direct connection, redistribution IGP or redistribution of other protocol routing, etc., which is not limited in this embodiment and is subject to actual application. Among them, the prefix of the redistribution IGP or redistribution of other protocols cannot be used as an intermediate node address.
[0035] That is to say, not all routing addresses have corresponding prefix information. If a routing address does not have corresponding prefix information, the routing address cannot be used as a candidate address for the intermediate node address. Therefore, this embodiment determines the routing address with corresponding prefix information in the routing address set as the first candidate routing address, so as to select the node address of the intermediate node ultimately used for traffic forwarding from the first candidate routing address.
[0036] In S103, based on the external attribute information of the first candidate routing addresses, a target routing address is determined from the first candidate routing addresses.
[0037] In S104, the prefix label corresponding to the target routing address is used as a forwarding label of the intermediate node in the backup path.
[0038] In an embodiment of the present application, the internal gateway protocol IGP flooding information of the intermediate node of the backup path is first obtained, and the IGP flooding information includes the routing address set configured on the intermediate node, and then the first candidate routing address corresponding to the prefix information is determined from the routing address set according to the IGP flooding information, wherein the prefix information includes a prefix label and external attribute information corresponding to the prefix label, and then based on the external attribute information of the first candidate routing address, the target routing address is determined from the first candidate routing address, and finally the prefix label corresponding to the target routing address is used as the forwarding label of the intermediate node in the backup path. By screening the routing addresses with prefix labels and external attribute information corresponding to the prefix labels, the embodiment of the present application can determine the intermediate nodes that can forward traffic through the external attribute information of the routing addresses, and use their prefix labels as forwarding labels to guide traffic forwarding, which can avoid the situation where traffic is forwarded to external areas and improve the accuracy of traffic forwarding.
[0039] In a possible implementation of the present application, determining a target routing address from the first candidate routing address based on external attribute information of the first candidate routing address may include: determining a second candidate routing address from the first candidate routing address based on the external attribute information of the first candidate routing address, and determining the target routing address from the first candidate routing address.
[0040] That is, the second candidate routing address refers to a routing address whose external attribute information meets the forwarding requirements, that is, a routing address in the first candidate routing address that can be used as an intermediate node address to forward traffic.
[0041] In a possible implementation manner of the present application, the external attribute information corresponding to the prefix label is used to indicate a redistribution source of the prefix label.
[0042] Accordingly, determining the second candidate routing address from the first candidate routing address based on the external attribute information of the first candidate routing may include: when it is determined based on the external attribute information that the prefix information of the first candidate routing address meets the candidate condition, determining the first candidate routing address corresponding to the prefix information as the second candidate routing address; the candidate condition includes one of the following: the prefix information is non-redistribution prefix information; the prefix information is redistribution prefix information, and the redistribution source is a redistribution direct connection.
[0043] That is to say, if the routing address has non-redistributed prefix information, the routing address can be determined as the second candidate routing address. If the routing address has redistributed prefix information, it is necessary to determine its redistribution source. If the redistribution source is a redistribution direct connection, it can be used as the second candidate routing address. If it is other sources, such as redistribution IGP or other redistribution protocols, it cannot be used as the second candidate routing address.
[0044] In this embodiment, by judging the external attribute information of the routing address, the routing address that can be used as the forwarding traffic can be further determined, thereby avoiding traffic forwarding errors caused by unclear external attributes and ensuring rapid service recovery.
[0045] In a possible implementation of the present application, determining the target routing address from the second candidate routing address may include: determining the target routing address according to the size of the second candidate routing address; or determining the target routing address according to the size of the prefix label corresponding to the second candidate routing address.
[0046] In this embodiment, the target routing address for traffic forwarding can be determined according to the size of the routing address, the size of the prefix label, or whether the node address tag (N tag) is carried. The target routing address for traffic forwarding can also be determined by other methods, which are subject to actual application. This embodiment uses some optimization rules to quickly determine the target routing address.
[0047] Among them, determining according to the size of the routing address is specifically determining according to the numerical size of the routing address. It can be that the routing address with the largest address is used as the target routing address, or it can be that the routing address with the smallest address is used as the target routing address. For example, the routing address 20.20.20.20 is smaller than the routing address 21.21.21.21. If the routing address with the largest address is used as the target address, the routing address 21.21.21.21 is the target routing address. The size of the prefix label also refers to the numerical size. The prefix label index 31 is smaller than the prefix label index 32. If the largest prefix label is used, the routing address corresponding to the prefix label index 32 is the target routing address.
[0048] In a possible implementation of the present application, when the external attribute information Sub-TLV corresponding to the prefix label indicates a redistribution source of the prefix label, the prefix information of the first candidate routing address is determined to be the redistribution prefix information.
[0049] That is to say, the redistribution prefix information can be determined by whether the prefix carries the external attribute information Sub-TLV. The external attribute Sub-TLV identifies the redistribution source, which may include redistribution direct connection, redistribution IGP, or redistribution of other protocol routing, etc. This embodiment does not specifically limit this, and the actual application shall prevail. Among them, the prefix of the redistribution IGP or the redistribution of other protocols cannot be used as an intermediate node address.
[0050] In a possible implementation manner of the present application, the format of the Sub-TLV may include: a Type field, a Length field, and a Flags field.
[0051] The Type field is used to identify the type information of the Sub-TLV; the Length field is used to identify the length information of the Sub-TLV; the Flags field is used to identify the content information of the Sub-TLV; wherein the size of the Flags field is determined based on the protocol type.
[0052] like Figure 2 and Figure 3 As shown, the formats of Sub-TLVs of two protocol types provided in the embodiments of the present application.
[0053] like Figure 2As shown, it is the format of the Sub-TLV of the IS-IS protocol, where the Type field selects an unused Sub-TLV code, the Length is 2, and the Flags field can occupy 2 bytes or other bytes, which can identify the redistribution source of the prefix, including redistribution of direct connection, redistribution of IGP, or redistribution of other protocol routes, etc., and is identified by bit. When the prefix is a redistribution prefix, the Sub-TLV is carried to identify the redistribution source. If a non-redistribution prefix carries the Sub-TLV, but does not identify the prefix redistribution source, that is, the Flags field is 0, the Sub-TLV can be ignored.
[0054] like Figure 3 The following is the format of the Sub-TLV of the OSPF protocol, where the Type field selects an unused Sub-TLVcode, the Length is 2, and the Flags field can occupy 2 bytes or other bytes, which can identify the redistribution source of the prefix, including redistribution of direct connection, redistribution of IGP, or redistribution of other protocol routes, etc., and is identified by bit. When the prefix is a redistribution prefix, the Sub-TLV is carried to identify the redistribution source. If the non-redistribution prefix carries the Sub-TLV, but does not identify the redistribution source, that is, when the Flags field is 0, the Sub-TLV can be ignored.
[0055] In a possible implementation of the present application, before obtaining the internal gateway protocol IGP flooding information of the intermediate node of the backup path, the method for determining the intermediate node label may also include: enabling IGP and segment routing SR forwarding functions for each node in the network; configuring a topology-independent loop-free backup TI-LFA for each node.
[0056] In this example, each node in the network enables the IGP protocol and the Segment Routing (SR) function, and configures TI-LFA, so as to achieve rapid switching to the backup path in the event of a network failure. The IGP protocol adds a Prefix External Attribute Sub-TLV (Prefix External Attribute Sub-TLV), which carries the external attribute information of the prefix to identify the redistribution source of the prefix. The redistribution source may include redistribution direct connection, redistribution IGP, and redistribution of other protocol routes. The Prefix External Attribute Sub-TLV of each node in the network is flooded on the network together with the routing address and Prefix-SID. After receiving the above IGP flooding information, the source node of the network parses the IGP flooding information. If the routing address carries the Prefix-SID and is a non-redistribution prefix, or the redistribution prefix carries the Prefix External Attribute Sub-TLV to indicate that the redistribution source is a redistribution direct connection, the routing address can be used as a candidate routing address, and then the target routing address is determined according to the preset preferential rule, and the backup path is calculated and written to the data plane. When a link failure is detected, the pre-calculated backup path is activated to forward traffic, and the prefix label of the target routing address is used as the forwarding label of the intermediate node in the backup path.
[0057] In a possible implementation of the present application, after obtaining the internal gateway protocol IGP flooding information of the intermediate node of the backup path, the method for determining the intermediate node label may also include: parsing the IGP flooding information of the intermediate node; obtaining the routing address of the intermediate node in the IGP flooding information, and determining whether each routing address corresponds to prefix information.
[0058] That is, after receiving the above IGP flooding information, the IGP flooding information can be parsed to obtain the routing address of the intermediate node in the IGP flooding information and whether the routing address corresponds to prefix information. If so, it is used as the first candidate routing address, otherwise it is discarded.
[0059] like Figure 4 FIG. 1 is a network diagram provided by an embodiment of the present application. The network diagram is used to introduce a method for determining intermediate node labels on a network using SR TI-LFA in a specific embodiment.
[0060] exist Figure 4In the SR scenario shown, nodes PE1, P1, P2, P3, P4, and PE2 enable the IGP protocol and SR function respectively. All nodes are configured with the same segment routing global label set (SRGB), whose range is [100, 200]. All routes in the network are configured with TI-LFA. Among them, node P3 is configured with router ID 30.30.30.30; the loopback interface is configured, the routing address is 31.31.31.31 / 32, the IGP prefix label index 31, and carries the N tag. The IGP is configured to redistribute direct connection; the external reachable route 32.32.32.32 / 32 is introduced, the IGP prefix label index 32, and carries the N tag. The IGP is configured to redistribute the IGP protocol route. The IGP protocol on P3 floods the two redistributed prefix addresses, their Prefix-SIDs, and external attribute information throughout the network.
[0061] When a failure occurs between P1 and P4, P1 directly enables the TI-LFA FRR backup table entry and adds new path information (P3's node SID, the adjacency SID between P3 and P4) to the data packet to ensure that the data packet can be forwarded along the backup path. The steps for determining the target node address and node label are as follows:
[0062] The source node P1 parses the IGP flooding information. Among them, the P3 routing address is 30.30.30.30, but 30.30.30.30 has no corresponding prefix information and cannot be used as the first candidate routing address. The prefix 31.31.31.31 / 32 carries the PrefixExternal Attribute Sub-TLV marker, which indicates a redistribution direct connection, and can be used as the first candidate routing address and saved in the first candidate routing address. The externally reachable route 32.32.32.32 / 32 has the corresponding prefix information, but 32.32.32.32 / 32 carries the Prefix External Attribute Sub-TLV marker, which indicates a redistribution IGP, and therefore cannot be used as the first candidate routing address.
[0063] P1 queries the first candidate routing address and selects the routing address 31.31.31.31 / 32 as the target routing address. Its corresponding prefix label is used as the forwarding label of the intermediate node in the backup path.
[0064] The P1 encapsulated TI-LFA repair path is (131,10001), where 131 is determined by adding prefix label 31 to 100 in the SRGB, and 10001 is the adjacency SID.
[0065] The data packet can be forwarded according to the path determined above.
[0066] like Figure 5 As shown, the embodiment of the present application further provides a system for determining intermediate node labels. The system for determining intermediate node labels may include: an acquisition module 501 , a first determination module 502 , a second determination module 503 and a third determination module 504 .
[0067] Among them, the acquisition module 501 is used to obtain the internal gateway protocol IGP flooding information of the intermediate node of the backup path, and the IGP flooding information includes the routing address set configured on the intermediate node; the first determination module 502 is used to determine the first candidate routing address corresponding to the prefix information from the routing address set according to the IGP flooding information, wherein the prefix information includes the prefix label and the external attribute information corresponding to the prefix label; the second determination module 503 is used to determine the target routing address from the first candidate routing address based on the external attribute information of the first candidate routing address; the third determination module 504 is used to use the prefix label corresponding to the target routing address as the forwarding label of the intermediate node in the backup path.
[0068] In an embodiment of the present application, first, the acquisition module 501 acquires the internal gateway protocol IGP flooding information of the intermediate node of the backup path, and the IGP flooding information includes the routing address set configured on the intermediate node, and then the first determination module 502 determines the first candidate routing address corresponding to the prefix information from the routing address set according to the IGP flooding information, wherein the prefix information includes the prefix label and the external attribute information corresponding to the prefix label, and the second determination module 503 determines the target routing address from the first candidate routing address based on the external attribute information of the first candidate routing address, and finally the third determination module 504 uses the prefix label corresponding to the target routing address as the forwarding label of the intermediate node in the backup path. By screening the routing addresses with prefix labels and the external attribute information corresponding to the prefix labels, the embodiments of the present application can determine the intermediate nodes that can forward traffic through the external attribute information of the routing addresses, and use their prefix labels as forwarding labels to guide traffic forwarding, which can avoid the situation where traffic is forwarded to external areas and improve the accuracy of traffic forwarding.
[0069] In a possible implementation of the present application, the second determination module 503 is used to: determine the second candidate routing address from the first candidate routing address according to the external attribute information of the first candidate routing address, and determine the target routing address from the second candidate routing address.
[0070] In a possible implementation of the present application, external attribute information corresponding to the prefix label is used to indicate a redistribution source of the prefix label; a second determination module 503 is used to: when it is determined based on the external attribute information that the prefix information of the first candidate routing address meets the candidate condition, determine the first candidate routing address corresponding to the prefix information as the second candidate routing address; the candidate condition includes one of the following: the prefix information is non-redistribution prefix information; the prefix information is redistribution prefix information, and the redistribution source is a redistribution direct connection.
[0071] In a possible implementation of the present application, the second determination module 503 is used to: determine the target routing address according to the size of the second candidate routing address; or determine the target routing address according to the size of the prefix label corresponding to the second candidate routing address.
[0072] In a possible implementation of the present application, the second determination module 503 is used to: determine that the prefix information of the first candidate routing address is the redistributed prefix information when the external attribute information Sub-TLV corresponding to the prefix label indicates a redistributed source of the prefix label.
[0073] In a possible implementation of the present application, the format of the Sub-TLV includes: a Type field, a Length field, and a Flags field; the Type field is used to identify the type information of the Sub-TLV; the Length field is used to identify the length information of the Sub-TLV; the Flags field is used to identify the content information of the Sub-TLV; wherein the size of the Flags field is determined based on the protocol type.
[0074] In a possible implementation manner of the present application, the system for determining the intermediate node label may further include: an enabling module and a configuration module.
[0075] The enabling module is used to enable the IGP and segment routing SR forwarding functions for each node in the network respectively; the configuring module is used to configure the topology-independent loop-free backup TI-LFA for each node.
[0076] In a possible implementation manner of the present application, the system for determining the intermediate node label may further include: a parsing module and a second acquisition module.
[0077] The parsing module is used to parse the IGP flooding information of the intermediate node; the second acquisition module is used to acquire the routing address of the intermediate node in the IGP flooding information and determine whether each routing address corresponds to prefix information.
[0078] The intermediate node label determination system provided in the application embodiment can achieve Figure 1-4The various processes implemented in the method embodiment achieve the same technical effect and will not be described again here to avoid repetition.
[0079] Optional, such as Figure 6 As shown, an embodiment of the present application also provides a terminal device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned intermediate node label determination method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0080] The embodiment of the present application also provides a storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of the method for determining the intermediate node label provided in any of the above embodiments is implemented. And the same technical effect can be achieved, and it will not be repeated here to avoid repetition.
[0081] The processor is the processor in the terminal device described in the above embodiment. The storage medium includes computer storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
[0082] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned intermediate node label determination method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0083] 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.
[0084] An embodiment of the present application further provides a computer program / program product, which is stored in a storage medium. The computer program / program product is executed by at least one processor to implement the various processes of the above-mentioned intermediate node label determination method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0085] The embodiment of the present application further provides a processing device, which is configured to execute each process of the above-mentioned intermediate node label determination method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0086] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0088] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for determining an intermediate node label, applied to a source node of a network, the method comprising: Acquire internal gateway protocol (IGP) flooding information of an intermediate node of the backup path, wherein the IGP flooding information includes a routing address set configured on the intermediate node; Determine, according to the IGP flooding information, a first candidate routing address corresponding to prefix information from the routing address set, wherein the prefix information includes a prefix label and external attribute information corresponding to the prefix label; Determine a target routing address from the first candidate routing addresses based on the external attribute information of the first candidate routing addresses; The prefix label corresponding to the target routing address is used as a forwarding label of the intermediate node in the backup path.
2. The method for determining an intermediate node label according to claim 1, characterized in that: The determining a target routing address from the first candidate routing addresses based on the external attribute information of the first candidate routing addresses includes: According to the external attribute information of the first candidate routing address, a second candidate routing address is determined from the first candidate routing address, and the target routing address is determined from the second candidate routing address.
3. The method for determining an intermediate node label according to claim 2, characterized in that: The external attribute information corresponding to the prefix label is used to indicate the redistribution source of the prefix label; The determining, according to the external attribute information of the first candidate route, a second candidate route address from the first candidate route address comprises: In a case where it is determined according to the external attribute information that the prefix information of the first candidate routing address meets the candidate condition, determining the first candidate routing address corresponding to the prefix information as the second candidate routing address; The candidate conditions include one of the following: The prefix information is non-redistributed prefix information; The prefix information is redistribution prefix information, and the redistribution source is a redistribution direct connection.
4. The method for determining an intermediate node label according to claim 2, characterized in that: The determining the target routing address from the second candidate routing address comprises: Determine the target routing address according to the size of the second candidate routing address; or The target routing address is determined according to the size of the prefix label corresponding to the second candidate routing address.
5. The method for determining an intermediate node label according to claim 3, characterized in that: In a case where the external attribute information Sub-TLV corresponding to the prefix label indicates a redistribution source of the prefix label, it is determined that the prefix information of the first candidate routing address is the redistributed prefix information.
6. The method for determining an intermediate node label according to claim 5, characterized in that: The format of the Sub-TLV includes: a Type field, a Length field, and a Flags field; The Type field is used to identify the type information of the Sub-TLV; The Length field is used to identify the length information of the Sub-TLV; The Flags field is used to identify the content information of the Sub-TLV; The size of the Flags field is determined based on the protocol type.
7. The method for determining an intermediate node label according to claim 1, characterized in that: Before acquiring the internal gateway protocol IGP flooding information of the intermediate node of the backup path, the method further includes: Enabling the IGP and segment routing (SR) forwarding functions for each node in the network respectively; A topology-independent loop-free backup TI-LFA is configured for each of the nodes.
8. The method for determining an intermediate node label according to claim 1, characterized in that: After acquiring the internal gateway protocol IGP flooding information of the intermediate node of the backup path, the method further includes: Parsing the IGP flooding information of the intermediate node; The routing addresses of the intermediate nodes in the IGP flooding information are obtained, and it is determined whether each of the routing addresses corresponds to prefix information.
9. A terminal device, characterized in that: It includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein when the program or instruction is executed by the processor, the steps of the method for determining the intermediate node label as described in any one of claims 1 to 8 are implemented.
10. A storage medium, characterized in that: The storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the method for determining the intermediate node label according to any one of claims 1 to 8 are implemented.