Sid routing method and apparatus, electronic device, and medium

CN120768817BActive Publication Date: 2026-08-21NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511020822.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2026-08-21
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

[0004]然而,在后续组网运行时,一旦某个网络节点故障时引起组网结构变化时,MPLS标签、或者SRv6 SID就会变化,需要人工修改Segment List中MPLS标签、或者SRv6 SID,以维持候选路径可行,这使得组网维护人工工作量大

Benefits of technology

[0018] As can be seen from the above technical solution, in this embodiment, N designated router identifiers (routerIDs) are obtained. For the first router ID, this first router ID is used as the current router ID. By looking up the SPF information and LSDB synchronization information of the current router ID, the label value or SRv6 SID corresponding to the current router ID is determined. If the current router ID is not the last router ID, the next router ID is used as the current router ID. The process of determining the label value or SRv6 SID corresponding to the current router ID by looking up the SPF information and LSDB synchronization information is returned. Thus, the label value or SRv6 SID corresponding to each router ID is obtained for packet forwarding. This method of converting router IDs into label values ​​or SRv6 SIDs allows packet forwarding to be achieved by manually specifying only the router ID. Manually specifying router IDs is more convenient than manually specifying MPLS labels or SRv6 SIDs, thereby saving manpower.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120768817B_ABST
    Figure CN120768817B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a SID routing method and device, electronic equipment and medium. In the present application, N router identifiers (router IDs) are obtained. For the first router ID, the first router ID is taken as a current router ID. The label value or SRv6 SID corresponding to the current router ID is determined by searching the SPF information and link state database (LSDB) synchronization information of the current router ID. When the current router ID is not the last router ID, the next router ID is taken as the current router ID. The step of determining the label value or SRv6 SID corresponding to the current router ID by searching the SPF information and LSDB synchronization information of the current router ID is returned. Thus, the label value or SRv6 SID corresponding to each router ID is obtained for message forwarding. This way of converting router ID into label value or SRv6 SID enables manual specification of router ID to achieve message forwarding. Manual specification of router ID is more convenient than manual specification of MPLS label or SRv6 SID, thereby saving manpower.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to SID pathfinding methods, apparatus, electronic devices and media. Background Technology

[0002] In Segment Routing Traffic Engineering (SR-TE) networking, each candidate path in the Segment Routing Traffic Engineering Policy requires manual configuration of the Segment List.

[0003] Currently, the segment list is defined by manually specifying Multiprotocol Label Switching (MPLS) labels or by using the Segment Routing over IPv6 Segment Identifier (SRv6 SID).

[0004] However, during subsequent network operation, if a network node fails and causes a change in the network structure, the MPLS label or SRv6 SID will change. It is necessary to manually modify the MPLS label or SRv6 SID in the Segment List to maintain the feasibility of candidate paths, which makes the manual workload of network maintenance large. Summary of the Invention

[0005] In view of this, embodiments of this application provide a SID routing method, apparatus, electronic device and medium to reduce the workload of manual maintenance of SR-TE networking.

[0006] This application provides a SID routing method, which is applied to the ingress node of a Segment Routing Traffic Engineering (SR-TE) network, wherein the ingress node is configured with a Segment Routing Traffic Engineering (SR-TE) Policy; the method includes:

[0007] Obtain the specified N router identifiers (routerIDs); any routerID is different from the routerID of this node; N is greater than or equal to 1; when N is greater than 1, the N routerIDs are arranged in order of hop count from this node to the nodes corresponding to the N routerIDs;

[0008] For the first router ID, use that first router ID as the current router ID;

[0009] By searching the SPF information and LSDB synchronization information of the current router ID, the label value or SRv6 SID of the segment route based on the IPv6 forwarding plane is determined; if the current router ID is not the last router ID, the next router ID is used as the current router ID, and the process of determining the label value or SRv6 SID of the current router ID by searching the SPF information and LSDB synchronization information of the current router ID is returned.

[0010] Record the label value or SRv6 SID corresponding to each router ID in sequence for packet forwarding; wherein, the label value or SRv6 SID corresponding to each router ID recorded in sequence corresponds to a transmission path starting from this node.

[0011] This application embodiment also provides a SID routing device, which is applied to the ingress node of a Segment Routing Traffic Engineering (SR-TE) network, wherein the ingress node is configured with a Segment Routing Traffic Engineering (SR-TE) Policy; the device includes:

[0012] The acquisition module is used to obtain N specified router identifiers (router IDs); any router ID is different from the router ID of this node; N is greater than or equal to 1; when N is greater than 1, the N router IDs are arranged in order of hop count from this node to the nodes corresponding to the N router IDs;

[0013] The determination module is used to select the first router ID as the current router ID.

[0014] By searching the SPF information and LSDB synchronization information of the current router ID, the label value or SRv6 SID of the segment route based on the IPv6 forwarding plane is determined; if the current router ID is not the last router ID, the next router ID is used as the current router ID, and the process of determining the label value or SRv6 SID of the current router ID by searching the SPF information and LSDB synchronization information of the current router ID is returned.

[0015] The recording module is used to record the SRv6 SID corresponding to each router ID in sequence for packet forwarding; wherein, the SRv6 SID corresponding to each router ID recorded in sequence corresponds to a transmission path starting from this node.

[0016] This application also provides an electronic device, including: a processor and a computer-readable storage medium for storing computer program instructions, wherein the computer program instructions, when executed by the computer-readable storage medium, cause the processor to perform the steps of the above method.

[0017] This application also provides a machine-readable storage medium storing computer program instructions that, when executed, enable the implementation of the steps described above.

[0018] As can be seen from the above technical solution, in this embodiment, N designated router identifiers (routerIDs) are obtained. For the first router ID, this first router ID is used as the current router ID. By looking up the SPF information and LSDB synchronization information of the current router ID, the label value or SRv6 SID corresponding to the current router ID is determined. If the current router ID is not the last router ID, the next router ID is used as the current router ID. The process of determining the label value or SRv6 SID corresponding to the current router ID by looking up the SPF information and LSDB synchronization information is returned. Thus, the label value or SRv6 SID corresponding to each router ID is obtained for packet forwarding. This method of converting router IDs into label values ​​or SRv6 SIDs allows packet forwarding to be achieved by manually specifying only the router ID. Manually specifying router IDs is more convenient than manually specifying MPLS labels or SRv6 SIDs, thereby saving manpower.

[0019] Furthermore, since the router ID on the transmission path is specified, and the router ID is a unique identifier for the node across the entire network, it will not change due to changes in the topology. Therefore, when a network node fails and causes changes in the network structure, the MPLS label or SRv6 SID that reaches each router ID can be automatically found through SPF information and LSDB synchronization information, so that there is no need to manually modify the MPLS label or SRv6 SID. This further effectively reduces the manual workload of network maintenance. Attached Figure Description

[0020] Figure 1 The architecture diagram of SR-MPLS-TE networking provided in this application embodiment;

[0021] Figure 2 A flowchart illustrating the method provided in this application embodiment;

[0022] Figure 3 Another SR-MPLS-TE networking architecture diagram provided in this application embodiment;

[0023] Figure 4 A schematic diagram of the Segmentlist provided in the embodiments of this application;

[0024] Figure 5 This is a structural diagram of the device provided in the embodiments of this application;

[0025] Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0026] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.

[0027] SR-TE networking is known to include: Segment Routing MPLS Traffic Engineering (SR-MPLS-TE) networking (based on IPv4) and Segment Routing over IPv6 Engineering (SRv6-TE) networking based on IPv6. In SR-MPLS-TE networking, the Segment Identifier (SID) is either an MPLS label or an SRv6 SID; in SRv6-TE networking, the SID is an SRv6 SID.

[0028] First combine Figure 1 The technical issues are explained using SR-MPLS-TE networking as an example:

[0029] Figure 1 The architecture diagram of the SR-MPLS-TE network provided in this application embodiment is shown, where Device A is the ingress node of the SR-TE network. The ingress node in the SR-MPLS-TE network is configured with an SR-MPLS-TE Policy.

[0030] The current SR-MPLS-TE policy is essentially composed of multiple segment lists, i.e., manually configured segment lists. These segment lists are statically specified, and their contents are defined as follows: Figure 1The label path list shown is a list of labels generated within the list. These labels are generated by Interior Gateway Protocols (IGPs) for Segment Routing Label Switched Paths (SRLSPs), also known as MPLS labels. Examples include Open Shortest Path First (OSPF) and Intermediate System to Intermediate System (ISIS) protocols. These SRLSP labels are further divided into Adjacency Segments and Node Segments. The Segment list needs to be specified, and at each hop, the received packet's top-level label header is matched against the local label forwarding table before forwarding. Therefore, SR-MPLS-TE configuration administrators need a clear understanding of the label allocation for each node in the network environment.

[0031] In another software-defined networking (SDN) controller scenario that combines Border Gateway Protocol-Link State (BGP-LS) and Path Computation Element Communication Protocol (PCEP), the BGP-LS protocol obtains the topology information of each device in the IGP and announces the topology information to the SDN controller. The controller forms the topology network, and the administrator then uses the PCEP managed protocol to manually issue the label values ​​to be issued to the devices via the PCEP SR-MPLS-TE Policy (including specifying the Segmentlist), forming SR-MPLS-TE entries managed by PCEP.

[0032] Whether in an IGP scenario or an SDN controller scenario combining BGP-LS / PCEP, the network topology needs to be obtained, and then paths need to be manually distributed based on the topology (manually configuring MPLS labels). If there are many network nodes, the workload of manual specification is too large. Furthermore, once a network node fails and the topology changes, the paths need to be manually modified and re-distributed (i.e., MPLS labels need to be re-distributed), which makes the maintenance of subsequent table entries and network maintenance a large manual workload.

[0033] The above problems only apply to SR-MPLS-TE; SRv6-TE also has the same problems (except that the SID is manually specified as SRv6 SID).

[0034] To address the aforementioned problems, this application provides the following method, which is described below:

[0035] Please refer to Figure 2 , Figure 2 This is a flowchart illustrating a method provided in an embodiment of this application. The method is applied to the ingress node of an SR-TE network, where the ingress node is configured with a Segment Routing Traffic Engineering Policy (SR-TE Policy). See also... Figure 1 As shown, Device A is the ingress node of the SR-TE network.

[0036] like Figure 2 As shown, the process includes the following steps:

[0037] S201, obtain the specified N router identifiers (router IDs); any router ID is different from the router ID of this node; N is greater than or equal to 1; when N is greater than 1, the N router IDs are arranged in order of hop count from this node to the nodes corresponding to the N router IDs.

[0038] In this embodiment, the SR-TE Policy is essentially composed of multiple Segment-lists, which are manually configured lists of Segment-lists. These Segment-lists are statically specified, assigning the router IDs of the nodes that must be traversed along each candidate path (i.e., transmission path) in each SR-TE Policy as the Segment-list. For example, the specified N router IDs are the router IDs of the N nodes along a transmission path starting from this node; N is less than or equal to the total number of nodes along that transmission path.

[0039] The router ID is node information for devices (such as routers). It is unique across the entire network and is important information that network administrators need to know when managing devices. By specifying the router ID, network administrators no longer need to know the specific MPLS label or SRv6 SID for each node. They only need to specify the router ID. Manually specifying the router ID is more convenient than manually specifying the MPLS label or SRv6 SID, thus saving manpower.

[0040] S202, for the first router ID, use the first router ID as the current router ID.

[0041] S203: By searching the SPF information and LSDB synchronization information of the current router ID, determine the label value or SRv6 SID of the segment route based on the IPv6 forwarding plane; if the current router ID is not the last router ID, take the next router ID as the current router ID, and return to the step of determining the label value or SRv6 SID of the current router ID by searching the SPF information and LSDB synchronization information of the current router ID.

[0042] Whether using SR-MPLS-TE or SRv6-TE networking, the router ID needs to be converted into a tag value or SRv6 SID that can be recognized by the protocols supported by that networking architecture. This conversion requires the use of the current router ID's SPF information and LSDB synchronization information. The reason for relying on the current router ID's SPF information and LSDB synchronization information is as follows.

[0043] The SR-TE Policy itself does not provide routing services. Both SRV6-TE and SR-MPLS-TE rely on routing paths obtained from the IGP to manually specify candidate paths for the SR-TE Policy. IGPs include ISIS / OSPF, both of which use the Shortest Path First (SPF) algorithm. The SPF algorithm is based on the Link-State Database (LSDB), which contains Link-State Advertisements (LSAs) for all routers. Using Dijkstra's algorithm, an SPF tree is formed. The SPF tree and LSDB contain shortest path information and link loading advertisements to each node. By using the SPF information of the current router ID and the LSDB synchronization information, the path information to the corresponding router ID node can be inferred; that is, the label value or SRv6 SID corresponding to the current router ID can be determined.

[0044] The specific implementation method for determining the tag value or SRv6 SID corresponding to the current router ID by looking up the SPF information and LSDB synchronization information of the current router ID in this step will be described in detail later with specific embodiments, and will not be elaborated here.

[0045] S204 Record the label value or SRv6 SID corresponding to each router ID in sequence for packet forwarding; wherein, the label value or SRv6 SID corresponding to each router ID recorded in sequence corresponds to a transmission path starting from this node.

[0046] As an example, when a message transmitted via SR-TE Policy is received, the tag value or SRv6 SID corresponding to each router ID is recorded in sequence and pushed into the message. The pushed message is then transmitted according to the transmission path corresponding to each router ID or SRv6 SID recorded in sequence.

[0047] This concludes the process. Figure 1 The process is shown below.

[0048] pass Figure 1 The process illustrated involves obtaining N designated router identifiers (routerIDs). For the first router ID, this first router ID is used as the current router ID. By looking up the SPF information and LSDB synchronization information of the current router ID, the label value or SRv6 SID corresponding to the current router ID is determined. If the current router ID is not the last router ID, the next router ID is used as the current router ID. The process then returns to the step of determining the label value or SRv6 SID corresponding to the current router ID by looking up the SPF information and LSDB synchronization information. This process yields the label value or SRv6 SID corresponding to each router ID, which is then used for packet forwarding. This method of converting router IDs into label values ​​or SRv6 SIDs allows for packet forwarding by manually specifying only the router ID. Manually specifying router IDs is more convenient than manually specifying MPLS labels or SRv6 SIDs, thus saving manpower.

[0049] Furthermore, since the router ID on the transmission path is specified, and the router ID is a unique identifier for the node across the entire network, it will not change due to changes in the topology. Therefore, when a network node fails and causes changes in the network structure, the MPLS label or SRv6 SID that reaches each router ID can be automatically found through SPF information and LSDB synchronization information, so that there is no need to manually modify the MPLS label or SRv6 SID. This further effectively reduces the manual workload of network maintenance.

[0050] The following section elaborates on how the label value or SRv6 SID corresponding to the current router ID is determined by looking up the SPF information and LSDB synchronization information of the current router ID:

[0051] As an example, the label value corresponding to the current router ID is the outgoing label value of the node that reached this router ID from the previous router ID (or the previous inbound node). Specifically, the label value corresponding to the current router ID or the segment identifier SRv6 SID based on the IPv6 forwarding plane is determined by looking up the SPF information and LSDB synchronization information of the current router ID in the following way:

[0052] First, obtain the prefix address corresponding to the current router ID from the SPF information and LSDB synchronization information of the current router ID, and obtain the index value corresponding to the prefix address and the segmented route global label segment SRGB corresponding to the current router ID.

[0053] Specifically, the prefix address corresponding to the current router ID is the loopback address of any node on the current router ID that has been assigned a label.

[0054] The SRGB corresponding to the current router ID refers to: if the current router ID is the first router ID, and if the SPF tree determines that there are no other nodes between the first router ID and the ingress node, then the current router ID is not the first router ID. If the SPF tree determines that there are no other nodes between the current router ID and the router ID preceding the current router ID, then the SRGB corresponding to the current router ID is the SRGB assigned to the node represented by the current router ID.

[0055] The current router ID is the first router ID. If there are other nodes between the current router ID and the ingress node according to the SPF tree, the current router ID is not the first router ID. If there are other nodes between the current router ID and the previous router ID according to the SPF tree, then the sRGB corresponding to the current router ID is the sRGB assigned to the first downstream node directly connected to the node (or head node) corresponding to the previous router ID.

[0056] For example, combining Figure 3 As shown, the segment lists are 3.3.3.3 and 6.6.6.6. The current router ID is 3.3.3.3. From the SPF information and LSDB synchronization information of the current router ID, we obtain that the node with router ID 3.3.3.3 has loopback interface addresses of 3.3.3.0 and 3.3.3.1. If both 3.3.3.0 and 3.3.3.1 form MPLS labels, then arbitrarily choose 3.3.3.1 as the prefix address. From the LSDB information (e.g., LSA) corresponding to the current router ID in the LSDB synchronization information, we obtain the index value index = 1 assigned to 3.3.3.1.

[0057] If the current routerID is not directly connected to the head node A, then the sRGB corresponding to the current routerID is the sRGB[1999, 4000] assigned to the first downstream node Device B directly connected to the ingress node before the current routerID.

[0058] The current routerID is 6.6.6.6. From the SPF information and LSDB synchronization information of the current routerID, we obtain that the node with router ID 6.6.6.6 has loopback interface addresses of 6.6.6.0 and 6.6.6.1. If both 6.6.6.0 and 6.6.6.1 form MPLS labels, then either 6.6.6.1 is selected as the prefix address. From the LSDB information (e.g., LSA) corresponding to the current routerID in the LSDB synchronization information, we obtain the index value index=1 assigned to 6.6.6.1.

[0059] The current routerID is directly connected to the previous routerID. The sRGB corresponding to the current routerID is the same as the sRGB of the current router ID. The sRGB assigned to Decive F of node 6.6.6.6 is [3999, 4000]. (It should be noted that the sRGB of any loopback address of node 6.6.6.6 is [3999, 4000])

[0060] Secondly, based on the index and the sRGB corresponding to the current router ID, determine the outgoing label value of the previous node of the node corresponding to the current router ID for the prefix address corresponding to the current router ID; where, if the current router ID is the first router ID, then the previous node is the incoming node; if the current router ID is not the first router ID, then the previous node is the node corresponding to the previous router ID of the current router ID.

[0061] Specifically, for example, continuing from the previous example, the outgoing label value of the node preceding the current router ID with respect to the prefix address corresponding to the current router ID is the incoming label value of the first downstream node directly connected to the incoming node corresponding to the previous router ID. The sum of the base value 1999 and index=1 of sRGB[1999, 4000] is 2000. Therefore, the outgoing label value of the incoming node before the current router ID with respect to 3.3.3.1 is 2000.

[0062] The previous router ID of the current routerID 6.6.6.6 was the node with routerID 3.3.3.3. The output tag value of the node with prefix 6.6.6.1 for the 3.3.3.3 node is sRGB[3999, 4000] + index = 1, which is 4000.

[0063] Finally, the obtained output label value is determined as the label value corresponding to the current router ID.

[0064] For example, continuing from the previous example, the label value corresponding to the current router ID 3.3.3.3 is 2000. The label value corresponding to the current router ID 6.6.6.6 is 4000.

[0065] As another embodiment, for the first routerID, the prefix address corresponding to the current routerID is obtained from the SPF information and LSDB synchronization information of the current routerID, and the index value corresponding to the prefix address and the sRGB values ​​assigned to the node corresponding to the current routerID are obtained. Based on the index and the sRGB values ​​assigned to the node corresponding to the current routerID, the ingress label value corresponding to the routerID is obtained. From the MPLS label forwarding table entries already obtained by this node, based on the obtained ingress label value and prefix address, the egress label value for the node corresponding to the routerID is found. The found egress label value is determined as the label value corresponding to the current routerID.

[0066] For the Nth router ID (N > 1), obtain the prefix address corresponding to the current router ID from the SPF information and LSDB synchronization information, and obtain the index value corresponding to the prefix address and the segmented route global label segment (SRGB) corresponding to the current router ID. Based on the index and the SRGB corresponding to the current router ID, determine the outgoing label value of the previous node corresponding to the prefix address of the current router ID; where, if the current router ID is the first router ID, the previous node is the incoming node; if the current router ID is not the first router ID, the previous node is the node corresponding to the previous router ID. The obtained outgoing label value is then used as the label value corresponding to the current router ID.

[0067] It should be noted that in the two implementation methods mentioned above, the only difference is the method of obtaining the tag value corresponding to the first router ID. For each router ID starting from the second router ID, the method of obtaining the tag value corresponding to that router ID is the same.

[0068] This example illustrates the tag value corresponding to the first router ID. For example... Figure 3 As shown, from the SPF information and LSDB synchronization information of the first router ID 3.3.33, the prefix address 3.3.3.1 corresponding to the current router ID is obtained, and the index = 1 and the sRGB [2999, 4000] assigned to the first router ID 3.3.33 node are obtained. 2999 + 1 = 3000, 3000 is the ingress label value corresponding to the first router ID 3.3.33. From the MPLS label forwarding table entries already obtained by the ingress node, based on the obtained ingress label value 3000 and prefix address 3.3.3.1, the outgress label value of the ingress node for the node corresponding to the router ID is found. It must be the label value to be used by the outgress direction of the first device (DeviceB) on the path between Device A and Device C (that is, the outgress label 2000 ultimately points to Device C, Device A to Device B). Finally, the found tag value 2000 is determined to be the tag value corresponding to the current routerID.

[0069] The following section elaborates on how the label value or SRv6 SID corresponding to the current router ID is determined by searching the SPF information of the current router ID and the LSDB synchronization information.

[0070] To illustrate the method provided in this application in more detail, the following will be combined with... Figure 3 The network architecture shown, combined with Figure 4 The Segmentlist shown below provides a more detailed description of the solution provided in this application through specific embodiments.

[0071] like Figure 4 As shown, the segment list is 3.3.3.3 and 6.6.6.6, the first router ID is 3.3.3.3, and the second router ID is 6.6.6.6.

[0072] For the first routerID 3.3.3.3, the ingress node obtains the loopback address of the first routerID 3.3.3.3 as the prefix address from the SPF information of the current routerID. From the LSDB synchronization information, obtain the index value (index=1) assigned to 3.3.3.1 in the LSDB information corresponding to the first routerID 3.3.3.3. The sRGB of the node with routerID 3.3.3.3 is [2999, 4000]. The ingress label of the node with routerID 3.3.3.3 (i.e., the ingress label of 3.3.3.1) is 3000. Obtain the local routing table information (the routing table information is MPLS label forwarding table entries, obtained from LSDB and SPF). Based on the obtained ingress label value 3000 and prefix address 3.3.3.1, find the outgress label value of the ingress node for the node corresponding to the router ID. This must be the label value to be used by the first device (Device B) on the path between Device A and Device C (i.e., ultimately pointing to Device C, Device A to Device C). The output tag 2000 of B will eventually be determined as the tag value corresponding to the first routerID.

[0073] For the second router ID 6.6.6.6, the ingress node obtains the loopback address of the node with router ID 6.6.6.1 as the prefix address from the SPF information and LSDB synchronization information of the current router ID. It also obtains the index value assigned to 6.6.6.1 from the LSDB information (such as LSA) corresponding to router ID 6.6.6.1 in the LSDB synchronization information, where index = 1 and sRGB is [3999, 4000].

[0074] Go to the previous router ID 6.6.6.6 to calculate the label. Based on the LSDBindex (which is 1) and sRGB (which is [3999, 4000]) of the second router ID 6.6.6.6, calculate the ingress label of the loopback router 6.6.6.1 as 3999 + 1 = 4000. That is, the outgress label of the router ID 3.3.3.3 to the loopback router 6.6.6.1 is 4000.

[0075] Thus, the tag values ​​corresponding to each router ID are 2000 and 4000.

[0076] During message transmission:

[0077] When the ingress node Device A receives a packet transmitted using the candidate path corresponding to the Segment list in the SR-MPLS-TE Policy, it pushes the packet header onto the tag stack of [2000, 4000].

[0078] Device A uses output 2000 to look up the local tag forwarding table entry, determines that the next hop for the tag is Device B, and then sends the packet to Device B.

[0079] Device B has an incoming tag of 2000 and an outgoing tag of 3000. Device B replaces the incoming tag 2000 with the outgoing tag 3000 (that is, Device B swaps tags to outgoing tag 3000) and sends the message to Device C.

[0080] 3000 is the incoming label for Device C. Device C pops label 3000. Device C's outgoing label is 4000. 4000 is the incoming label for Device F. The message is then transmitted to Device F.

[0081] Device F's inbound tag is 4000. After popping tag 4000, a message is obtained, and the message completes the path transmission of SR-MPLS-TEPolicy.

[0082] The methods provided in the embodiments of this application have been described above. The apparatus provided in the embodiments of this application is described below:

[0083] See Figure 5 , Figure 5 This is a structural diagram of the device provided in an embodiment of this application. The device is applied to the ingress node of an SR-TE network, and the ingress node is configured with an SR-TE Policy, such as... Figure 5 As shown, the device 500 includes: an acquisition module 501, a determination module 502, and a recording module 503.

[0084] The module 501 is used to obtain N specified router identifiers (router IDs); any router ID is different from the router ID of this node; N is greater than or equal to 1; when N is greater than 1, the N router IDs are arranged in order of the number of hops from this node to the nodes corresponding to the N router IDs.

[0085] The determination module 502 is used to determine the first router ID as the current router ID;

[0086] By looking up the SPF information and LSDB synchronization information of the current router ID, the label value or SRv6 SID of the segment route based on the IPv6 forwarding plane is determined; if the current router ID is not the last router ID, the next router ID is used as the current router ID, and the steps of determining the label value or SRv6 SID of the current router ID by looking up the SPF information and LSDB synchronization information of the current router ID are returned.

[0087] The recording module 503 is used to record the tag value or SRv6 SID corresponding to each router ID in sequence for packet forwarding; wherein, the tag value or SRv6 SID corresponding to each router ID recorded in sequence corresponds to a transmission path starting from this node.

[0088] As an example, the designated N router identifiers (router IDs) are the router identifiers of the N nodes on a transmission path starting from this node; N is less than or equal to the total number of nodes on that transmission path.

[0089] As an example, by looking up the SPF information and LSDB synchronization information of the current router ID, the label value corresponding to the current router ID or the segment identifier (SRv6 SID) based on the IPv6 forwarding plane is determined, including:

[0090] From the SPF information and LSDB synchronization information of the current routerID, obtain the prefix address corresponding to the current routerID, and obtain the index value corresponding to the prefix address and the segmented route global label segment SRGB corresponding to the current routerID;

[0091] Based on the index and the sRGB corresponding to the current router ID, determine the outgoing tag value of the previous node of the node corresponding to the current router ID for the prefix address corresponding to the current router ID; where, if the current router ID is the first router ID, the previous node is the incoming node; if the current router ID is not the first router ID, the previous node is the node corresponding to the previous router ID of the current router ID.

[0092] The obtained output tag value is determined as the tag value corresponding to the current router ID.

[0093] As an example, if the current router ID is the first router ID;

[0094] By looking up the SPF information and LSDB synchronization information of the current router ID, the label value or the segment identifier (SRv6 SID) of the segment route based on the IPv6 forwarding plane can be determined, including:

[0095] From the SPF information and LSDB synchronization information of the current routerID, obtain the prefix address corresponding to the current routerID, and obtain the index value corresponding to the prefix address and the sRGB assigned to the node corresponding to the current routerID;

[0096] Based on the index and the sRGB values ​​assigned to the node corresponding to the current router ID, obtain the infeed label value corresponding to the router ID;

[0097] From the MPLS label forwarding table entries already obtained by this node, based on the obtained ingress label value and prefix address, find the outgress label value of this node for the node corresponding to the routerID;

[0098] The found tag value is determined as the tag value corresponding to the current routerID.

[0099] As an example, the prefix address is used to find the loopback address of any node on the current router ID that has been assigned a label.

[0100] As one embodiment, the apparatus further includes:

[0101] The assembly module is used to push the tag value or SRv6 SID corresponding to each router ID into the message when it receives a message transmitted through the SR-TE Policy. The pushed message is then transmitted according to the transmission path corresponding to each router ID or SRv6 SID recorded in the order.

[0102] This concludes the process. Figure 5 Structural description of the device shown.

[0103] See Figure 6 , Figure 6 This is a structural diagram of an electronic device provided in an embodiment of this application. Figure 6 As shown, the hardware structure may include: a processor and a machine-readable storage medium, the machine-readable storage medium storing machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the method disclosed in the above example of this application.

[0104] Based on the same concept as the above method, this application also provides a machine-readable storage medium storing a plurality of computer instructions, which, when executed by a processor, can implement the method disclosed in the above examples of this application.

[0105] For example, the aforementioned machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, etc. For instance, machine-readable storage media can be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.

[0106] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A SID pathfinding method, characterized in that, This method is applied to the ingress node of a Segment Routing Traffic Engineering (SR-TE) network, wherein the ingress node is configured with a Segment Routing Traffic Engineering (SR-TE) Policy; the method includes: Obtain the specified N router identifiers (routerIDs); any routerID is different from the routerID of this node; N is greater than or equal to 1; when N is greater than 1, the N routerIDs are arranged in order of hop count from this node to the nodes corresponding to the N routerIDs; For the first router ID, use that first router ID as the current router ID; By searching the Shortest Path First (SPF) information and Link State Database (LSDB) synchronization information of the current router ID, the label value or the segment identifier (SRv6 SID) of the segment route based on the IPv6 forwarding plane is determined for the current router ID; if the current router ID is not the last router ID, the next router ID is used as the current router ID, and the process of determining the label value or SRv6 SID of the current router ID by searching the SPF information and LSDB synchronization information of the current router ID is returned. Record the label value or SRv6 SID corresponding to each router ID in sequence for packet forwarding; wherein, the label value or SRv6 SID corresponding to each router ID recorded in sequence corresponds to a transmission path starting from this node.

2. The method according to claim 1, characterized in that, The specified N router identifiers (router IDs) are the router identifiers of N nodes on a transmission path starting from this node; N is less than or equal to the total number of nodes on that transmission path.

3. The method according to claim 1, characterized in that, The step of determining the label value or the segment identifier (SRv6 SID) of the current router ID by looking up the SPF information and LSDB synchronization information of the current router ID includes: From the SPF information and LSDB synchronization information of the current router ID, obtain the prefix address corresponding to the current router ID, and obtain the index value corresponding to the prefix address and the segmented route global label segment SRGB corresponding to the current router ID; Based on the index and the sRGB corresponding to the current router ID, determine the outgoing tag value of the previous node of the node corresponding to the current router ID for the prefix address corresponding to the current router ID; wherein, if the current router ID is the first router ID, then the previous node is the incoming node; if the current router ID is not the first router ID, then the previous node is the node corresponding to the previous router ID of the current router ID; The obtained output tag value is determined as the tag value corresponding to the current router ID.

4. The method according to claim 1, characterized in that, If the current router ID is the first router ID; The step of determining the label value or the segment identifier (SRv6 SID) of the current router ID by looking up the SPF information and LSDB synchronization information of the current router ID includes: From the SPF information and LSDB synchronization information of the current router ID, obtain the prefix address corresponding to the current router ID, and obtain the index value corresponding to the prefix address and the sRGB assigned to the node corresponding to the current router ID; Based on the index and the sRGB values ​​assigned to the node corresponding to the current router ID, obtain the infeed tag value corresponding to the router ID; From the MPLS label forwarding table entries already obtained by this node, based on the obtained inbound label value and the prefix address, find the outbound label value of this node for the node corresponding to the router ID; The found tag value is determined as the tag value corresponding to the current router ID.

5. The method according to claim 3 or 4, characterized in that, The prefix address is used to find the loopback address of any node on which a label has been assigned, corresponding to the current routerID.

6. The method according to claim 1, characterized in that, The method further includes: When a message transmitted via the SR-TE Policy is received, the tag value or SRv6 SID corresponding to each router ID is recorded in sequence and pushed into the message. The pushed message is then transmitted according to the transmission path corresponding to each router ID or SRv6 SID recorded in sequence.

7. A SID pathfinding device, characterized in that, This device is applied to the ingress node of a Segment Routing Traffic Engineering (SR-TE) network, wherein the ingress node is configured with a Segment Routing Traffic Engineering (SR-TE) Policy; the device includes: The acquisition module is used to obtain N specified router identifiers (router IDs); any router ID is different from the router ID of this node; N is greater than or equal to 1; when N is greater than 1, the N router IDs are arranged in order of hop count from this node to the nodes corresponding to the N router IDs; The determination module is used to select the first router ID as the current router ID. By searching the Shortest Path First (SPF) information and Link State Database (LSDB) synchronization information of the current router ID, the label value or the segment identifier (SRv6 SID) of the segment route based on the IPv6 forwarding plane is determined for the current router ID; if the current router ID is not the last router ID, the next router ID is used as the current router ID, and the process of determining the label value or SRv6 SID of the current router ID by searching the SPF information and LSDB synchronization information of the current router ID is returned. The recording module is used to record the tag value or SRv6 SID corresponding to each router ID in sequence for packet forwarding; wherein, the tag value or SRv6 SID corresponding to each router ID recorded in sequence corresponds to a transmission path starting from this node.

8. The apparatus according to claim 7, characterized in that, The specified N router identifiers (router IDs) are the router identifiers of N nodes on a transmission path starting from this node; N is less than or equal to the total number of nodes on that transmission path. And / or, The step of determining the label value or the segment identifier (SRv6 SID) of the current router ID by looking up the SPF information and LSDB synchronization information of the current router ID includes: From the SPF information and LSDB synchronization information of the current router ID, obtain the prefix address corresponding to the current router ID, and obtain the index value corresponding to the prefix address and the segmented route global label segment SRGB corresponding to the current router ID; Based on the index and the sRGB corresponding to the current router ID, determine the outgoing tag value of the previous node of the node corresponding to the current router ID for the prefix address corresponding to the current router ID; wherein, if the current router ID is the first router ID, then the previous node is the incoming node; if the current router ID is not the first router ID, then the previous node is the node corresponding to the previous router ID of the current router ID; The obtained outgoing label value is determined as the label value corresponding to the current router ID; And / or, If the current router ID is the first router ID; The step of determining the label value or the segment identifier (SRv6 SID) of the current router ID by looking up the SPF information and LSDB synchronization information of the current router ID includes: From the SPF information and LSDB synchronization information of the current router ID, obtain the prefix address corresponding to the current router ID, and obtain the index value corresponding to the prefix address and the sRGB assigned to the node corresponding to the current router ID; Based on the index and the sRGB values ​​assigned to the node corresponding to the current router ID, obtain the infeed tag value corresponding to the router ID; From the MPLS label forwarding table entries already obtained by this node, based on the obtained inbound label value and the prefix address, find the outbound label value of this node for the node corresponding to the router ID; The found outgoing tag value is determined to be the tag value corresponding to the current router ID; And / or, The prefix address is used to find the loopback address of any node on which a label has been assigned; And / or, The device further includes: The assembly module is used to, when receiving a message transmitted through the SR-TE Policy, push the tag value or SRv6 SID corresponding to each router ID recorded in sequence into the message, and then transmit the message according to the transmission path corresponding to each router ID recorded in sequence or SRv6 SID.

9. An electronic device, characterized in that, The electronic device includes: Processor; and A computer-readable storage medium storing computer program instructions that, when executed by the processor, cause the processor to perform the steps of the method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, cause the processor to perform the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Portrait picture generation method and device and computer device

    CN110047053A

  • System and method for guiding a user to take a selfie

    CN110678875A