Link state routing protocol processing method and device, equipment and storage medium
By splitting the network topology graph into extremely connected subgraphs and abstracting it into virtual nodes, the problem of low routing computing performance under network topology changes and path failures is solved, and efficient routing convergence and computing requirements are achieved.
Patent Information
- Application Number
- CN202311349361.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-18
- Publication Date
- 2025-04-18
AI Technical Summary
The existing technology cannot meet the computing needs caused by network topology changes, and the routing convergence performance is low in the case of path failure.
By splitting the original topology map to be processed into extremely connected subgraphs, the abstract key subgraph is a virtual node, and the shortest path tree and node table entries are calculated in the network topology composed of real nodes and virtual nodes, reducing the number of node table entries and improving routing convergence performance.
Fully meet the computing needs caused by network topology changes, improve routing convergence performance in path failures, and save computing power.
Smart Images

Figure CN119854201A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to communication technology, and in particular to a link state routing protocol processing method, device, equipment and storage medium. Background Art
[0002] Link state routing protocols are increasingly used in large networks. As the scale of networks expands, the typical characteristics of link state routing protocols in large networks make the performance of link state routing protocols an important indicator for measuring device performance. Routers running link state routing protocols will announce their own link state information, externally introduced routing information, etc., and will also collect link state information and external routing information from other routers. Finally, based on all link state information, Dijkstra algorithm is used to calculate the topological shortest path with itself as the root, and based on this topological shortest path, the forwarding table entries of the routes to each router are calculated.
[0003] As the network scale expands, the number of routing prefixes increases. When the topology changes, the number of routes that need to be calculated will affect the overall computing performance. At present, the existing technology improves the computing performance by replacing the original Dijkstra algorithm with an incremental SPF algorithm, a partial routing calculation algorithm, or an internal gateway protocol (IGP) routing prefix and node separation method.
[0004] However, existing technologies cannot meet the computing requirements brought about by changes in network topology, and routing convergence performance is low in the event of path failures. Summary of the invention
[0005] The present application provides a link state routing protocol processing method, device, equipment and storage medium to solve the problem that the existing technology cannot meet the computing requirements brought about by network topology changes and the routing convergence performance is low in the case of path failure.
[0006] On the one hand, the present application provides a link state routing protocol processing method, comprising:
[0007] Obtaining an original topological graph to be processed, and simplifying the original topological graph to be processed to obtain an undirected topological graph without repeated edges;
[0008] Performing traversal and segmentation processing on the undirected topological graph to obtain a maximal connected subgraph set, wherein the maximal connected subgraph set includes one or more maximal connected subgraphs;
[0009] For each of the maximal connected subgraphs, all real nodes in the maximal connected subgraph are virtualized into a virtual node, and a unique virtual node index is assigned to the virtual node;
[0010] In the original topological graph to be processed, all real nodes of the maximal connected subgraph are replaced with virtual nodes corresponding to the maximal connected subgraph to obtain a first topological graph;
[0011] Based on the first topological graph, a shortest path tree is obtained by performing calculations according to a shortest path algorithm;
[0012] Generate node entries of the first topology graph according to the shortest path tree.
[0013] Here, the present application splits the original topology graph to be processed into one or more maximally connected subgraphs, and by abstracting the key subgraphs into virtual nodes, calculates the shortest path tree and node table entries in the network topology composed of other real nodes and virtual nodes, thereby reducing the number of node table entries, thereby reducing the number of next-hop hardware resources occupied by the node table entries, and can fully meet the computing requirements brought about by changes in the network topology. When a network failure occurs, different fault handling can be performed for node failures in subgraphs or non-subgraphs, without the need to recalculate the shortest path tree of the entire original topology graph to be processed, thereby improving the routing convergence performance in the event of a path failure.
[0014] Optionally, the traversing and segmenting the undirected topological graph to obtain a maximal connected subgraph set includes: traversing the undirected topological graph to obtain a cut edge set and / or a cut point set; and obtaining a maximal connected subgraph set based on the cut edge set and the cut point set.
[0015] Among them, the present application realizes accurate splitting of the original topology graph to be processed by cutting edges and / or cutting points. For different link structures, the sub-graph segmentation can be realized in different ways, thereby improving the flexibility of link state routing protocol processing.
[0016] Optionally, after generating the routing table of the first topological graph according to the shortest path tree, it also includes: for each of the maximal connected subgraphs, taking the entry node of the maximal connected subgraph as the root node, calculating the subgraph shortest path tree according to the shortest path algorithm; and determining the metric value of the entry node to each real node in the maximal connected subgraph according to the subgraph shortest path tree.
[0017] Here, after determining the shortest path tree and node table entries of the first topological graph, the present application calculates the shortest path tree and the metric value of each real node in each subgraph respectively, thereby realizing the operation of all real nodes in the link.
[0018] Optionally, after determining the metric value of the entry node to each real node in the maximal connected subgraph according to the subgraph shortest path tree, it also includes: performing routing prefix processing on the routing prefixes of all real nodes according to the first topological graph and all virtual nodes; and determining the next hop block forwarding table entry according to the routing prefix processing result.
[0019] Optionally, performing routing prefix processing on routing prefixes of all real nodes according to the first topology map and all the virtual nodes includes:
[0020] For each routing prefix, node preference processing is performed in the routing prefix associated node to determine the preferred node; based on the first topological map and all the virtual nodes, it is determined whether the source node of the preferred node is a virtual node; if the source node of the preferred node is a virtual node, the preferred node is replaced with the virtual node, and routing prefix processing is performed according to the node tuple corresponding to the virtual node.
[0021] Optionally, performing node optimization processing in the routing prefix associated node to determine the preferred node includes: determining one or more preferred nodes in the routing prefix associated node according to the metric value of the shortest path to the node under the routing prefix.
[0022] Here, the present application processes the routing prefixes of all real nodes according to the split first topology map and all virtual nodes. The location of the real nodes can be determined in different ways. There is no need to re-determine the next hop address of each routing prefix based on the shortest path of all nodes when the path is updated, which saves computing power and improves network performance.
[0023] Optionally, after generating the routing table of the first topology graph according to the shortest path tree, it also includes: if a fault occurs in the original topology graph to be processed, determining the fault location of the node or link where the fault occurs, wherein the fault location includes the first topology graph and the maximal connected subgraph; and performing fault convergence processing according to the fault location.
[0024] Here, when a fault occurs, the present application can adopt different fault convergence methods based on the location where the fault occurs, and perform targeted fault processing based on the nodes in the first topology graph and the maximally connected subgraph. In certain circumstances, there is no need to update all node data, which saves computing power and improves routing convergence performance in the event of path failure.
[0025] Optionally, the fault convergence processing is performed according to the fault location, including: if the fault location is the first topological graph, performing the shortest path calculation on the first topological graph after the fault occurs to obtain a first calculation result; updating the node table entry according to the first calculation result; judging whether the node table entry path tuple has changed according to the updated node table entry; updating the node-associated next hop block forwarding table entry according to the judgment result; and updating the routing prefixes of the multi-node belonging routing prefixes of the node sources in the real nodes in the first topological graph and all the real nodes in the maximally connected subgraphs according to the updated node table entry.
[0026] Optionally, the updating of routing prefixes of multi-node homed routing prefixes of node sources in real nodes in the first topological graph and real nodes in all the maximal connected subgraphs according to the updated node table entries respectively includes:
[0027] According to the updated node table entries, determine whether the metric value of the real node in the first topological graph has changed. If so, update the routing prefix of the multi-node belonging routing prefix of the node source in the real node in the first topological graph; according to the updated node table entries, determine whether the metric value of all virtual nodes corresponding to the maximal connected subgraph has changed; if the metric value of the virtual node has changed, calculate the metric value of the real node in the virtual node; according to the metric value of the real node in the virtual node, update the routing prefix of the multi-node belonging routing prefix of the node source in the real node in the maximal connected subgraph.
[0028] Among them, when a node or link fails, the present application first determines whether it is a fault in the maximal connected subgraph. If it is a fault in the first topology graph, that is, it is not a fault in the maximal connected subgraph, then based on the current topology information, the converged shortest path tree is recalculated based on the first topology graph after the failure, and the real node that has changed is determined based on the updated shortest path tree, and the multi-node affiliation routing prefix of the node is updated.
[0029] Optionally, the fault convergence processing is performed according to the fault location, including: if the fault location is a maximal connected subgraph, performing a shortest path calculation on the maximal connected subgraph after the fault occurs to obtain a second calculation result; judging whether the metric value of the real node in the maximal connected subgraph has changed according to the second calculation result; and based on the judgment result, updating the routing prefix of the multi-node affiliation routing prefix of the node source in the real node in the maximal connected subgraph where the metric value has changed.
[0030] Among them, when a node or link fails, the present application first determines whether it is a fault in the maximal connected subgraph. If it is a fault in the maximal connected subgraph, it is only necessary to calculate the shortest path tree in the network topology composed of other real nodes and virtual nodes, and update the corresponding node table entries, including virtual node table entries. Failures in the maximal connected subgraph will not affect the convergence of routes to other paths, but will only make some routes unreachable. There is no need to re-decide on the entire original topology graph to be processed, which further saves computing power and improves the routing convergence performance in the event of path failure.
[0031] Optionally, after generating the routing table of the first topology graph according to the shortest path tree, it also includes: if the original topology graph to be processed has a newly added link, determining the link position of the newly added link, wherein the link position includes links between nodes in the same maximal connected subgraph, links between nodes in the maximal connected subgraph and other nodes, links between newly added nodes and real nodes in the first topology graph, and the other nodes are any nodes that do not belong to the same maximal connected subgraph as the nodes in the maximal connected subgraph; and performing new link processing according to the link position.
[0032] Optionally, the processing of a new link is performed based on the link position, including: if the link position is a link between nodes in the same maximal connected subgraph, performing a shortest path calculation in the maximal connected subgraph corresponding to the newly added link to obtain a third calculation result; based on the third calculation result, determining whether the metric value of the real node in the maximal connected subgraph has changed; if it is determined that there is a real node that has changed, updating the routing prefix of the multi-node affiliation routing prefix of the node source in the real node that has changed.
[0033] Optionally, the processing of adding a new link is performed based on the link position, including: if the link position is a link between nodes in the same maximal connected subgraph or a newly added node, performing a shortest path calculation on the first topology graph and all the maximal connected subgraphs to obtain a fourth calculation result; based on the fourth calculation result, updating the routing prefix of the multi-node affiliation routing prefix of the node source in all real nodes whose metric values have changed.
[0034] Optionally, the newly added link processing is performed according to the link position, including: if the link position is a link between real nodes in the first topology map; then the shortest path calculation is performed on the first topology map after the link is added to obtain a fifth calculation result; the node table entry is updated according to the fifth calculation result; according to the updated node table entry, it is determined whether the node table entry path tuple has changed; according to the determination result, the node-associated next hop block forwarding table entry is updated; according to the updated node table entry, the routing prefix is updated for the multi-node belonging routing prefix of the node source in the real node where the metric value has changed.
[0035] Here, for the newly added links, the present application first determines the link position of the newly added links, and determines different processing schemes according to different link positions, without having to re-decide the entire original topology map to be processed, further saving computing power and improving routing convergence performance in the event of path failure.
[0036] In a second aspect, the present application provides a link state routing protocol processing device, including:
[0037] A simplification processing module is used to obtain an original topological graph to be processed, and simplify the original topological graph to be processed to obtain an undirected topological graph without repeated edges;
[0038] A segmentation processing module, used for performing traversal segmentation processing on the undirected topological graph to obtain a maximal connected subgraph set, wherein the maximal connected subgraph set includes one or more maximal connected subgraphs;
[0039] A virtual processing module, configured to virtualize all real nodes in each of the maximal connected subgraphs into one virtual node, and assign a unique virtual node index to the virtual node;
[0040] A node replacement module, used for replacing all real nodes of the maximal connected subgraph with virtual nodes corresponding to the maximal connected subgraph in the original topological graph to be processed, so as to obtain a first topological graph;
[0041] A path calculation module, configured to calculate, based on the first topology graph, according to a shortest path algorithm to obtain a shortest path tree;
[0042] A generating module is used to generate a node table entry of the first topology graph according to the shortest path tree.
[0043] In a third aspect, the present application provides a link state routing protocol processing device, including: one or more processors and a memory;
[0044] The memory stores computer-executable instructions;
[0045] The one or more processors execute the computer-executable instructions stored in the memory, so that the one or more processors perform the link state routing protocol processing method described in the first aspect and various possible designs of the first aspect.
[0046] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the link state routing protocol processing method described in the first aspect and various possible designs of the first aspect is implemented.
[0047] In a fifth aspect, the present invention provides a computer program product, including a computer program, which, when executed by a processor, implements the link state routing protocol processing method as described in the first aspect and various possible designs of the first aspect.
[0048] The link state routing protocol processing method, device, equipment and storage medium provided by the present application, wherein the method splits the original topology graph to be processed into one or more maximally connected subgraphs, abstracts the key subgraphs into virtual nodes, and calculates the shortest path tree and node table entries in the network topology composed of other real nodes and virtual nodes, thereby reducing the number of node table entries, thereby reducing the number of next-hop hardware resources occupied by the node table entries, and can fully meet the computing requirements brought about by changes in the network topology. When a network failure occurs, different fault processing can be performed for node failures in subgraphs or non-subgraphs, without the need to recalculate the shortest path tree of the entire original topology graph to be processed, thereby improving the routing convergence performance in the event of a path failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0050] Figure 1 A schematic diagram of a link state routing protocol processing system architecture provided for an embodiment of the present application;
[0051] Figure 2 A flowchart of a link state routing protocol processing method provided in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of the structure of an original topology map to be processed provided in an embodiment of the present application;
[0053] Figure 4 A schematic diagram of a simplified topology diagram provided in an embodiment of the present application;
[0054] Figure 5 A schematic diagram of the structure of a topology diagram after node replacement provided in an embodiment of the present application;
[0055] Figure 6 A flowchart of a routing prefix processing method provided in an embodiment of the present application;
[0056] Figure 7 A flowchart of a fault convergence method provided in an embodiment of the present application;
[0057] Figure 8 A flowchart of a method for processing a newly added link provided in an embodiment of the present application;
[0058] Fig. 9 A schematic diagram of link address interconnection provided in an embodiment of the present application;
[0059] Fig.10 A schematic diagram of a routing prefix address situation provided in an embodiment of the present application;
[0060] Fig.11 A schematic diagram of a calculation cutting process provided in an embodiment of the present application;
[0061] Fig.12 A schematic diagram of a global shortest path and corresponding node table entries provided in an embodiment of the present application;
[0062] Fig.13 A schematic diagram of the topological structure of a real subgraph corresponding to a virtual node provided in an embodiment of the present application;
[0063] Fig.14 A schematic diagram of the shortest path cost value of a subgraph internal node provided in an embodiment of the present application;
[0064] Fig.15 A schematic diagram of a routing next hop block table and the association between a node and a next hop block provided in an embodiment of the present application;
[0065] Fig.16 A schematic diagram of a routing prefix table entry provided for an embodiment of the present application;
[0066] Fig.17 A schematic diagram of a path failure topology within a virtual node subgraph provided in an embodiment of the present application;
[0067] Fig.18 A schematic diagram of a subgraph topology after a virtual node subgraph path failure provided in an embodiment of the present application;
[0068] Fig.19 A schematic diagram of the shortest path calculation result after the path failure convergence processing in a virtual node subgraph provided in an embodiment of the present application;
[0069] Fig. 20A schematic diagram of prefix table entry information after a path failure convergence process in a virtual node subgraph provided in an embodiment of the present application;
[0070] Fig.21 A schematic diagram of a virtual node subgraph external path failure topology provided in an embodiment of the present application;
[0071] Fig. 22 A topology diagram of a virtual node replacement after a virtual node external path failure provided in an embodiment of the present application;
[0072] Fig.23 A shortest path table and updated node schematic diagram provided in an embodiment of the present application;
[0073] Fig.24 A schematic diagram of processed prefix table entry information provided in an embodiment of the present application;
[0074] Fig.25 A schematic diagram of a processed real node cost value provided in an embodiment of the present application;
[0075] Fig.26 A schematic diagram of processed prefix table entry information provided in an embodiment of the present application;
[0076] Fig. 27 A schematic diagram of a subgraph topology after a link is added to a virtual node subgraph provided in an embodiment of the present application;
[0077] Fig.28 A schematic diagram of a subgraph topology after a link is added outside a virtual node provided in an embodiment of the present application;
[0078] Fig.29 A schematic diagram of the structure of a link state routing protocol processing device provided in an embodiment of the present application.
[0079] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0080] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0081] The terms "first", "second", "third", and "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.
[0082] First, the terms involved in this application are explained:
[0083] Connected: There is a path between two vertices in the graph.
[0084] Connected graph: There is a path between any two vertices in the graph.
[0085] Subgraph: If the vertices and edges of graph G' are subsets of graph G, then G' is a subgraph of G.
[0086] Cut edge: If after deleting an edge e from a graph, the graph will split into two unconnected subgraphs, then e is called a cut edge or bridge of the graph.
[0087] Cut point: If after deleting node x and all edges associated with x from a graph, the graph will be divided into two or more unconnected subgraphs, then x is called a cut point of the graph.
[0088] Routers running link state routing protocols will announce their own link state information, externally introduced routing information, etc., and will also collect link state information and external routing information from other routers. Finally, they will calculate the topological shortest path with themselves as the root through the Dijkstra algorithm based on all link state information, and calculate the forwarding table entries that reach each router based on the topological shortest path. As the network scale expands, the number of routing prefixes increases. When the topology changes, the number of routes that need to be calculated will affect its overall computing performance.
[0089] In order to improve network performance, the existing technology improves computing performance by replacing the original Dijkstra algorithm with an incremental SPF algorithm, a partial routing calculation algorithm, or an internal gateway protocol routing prefix and node separation method. However, all of the above methods have problems: the incremental SPF algorithm still has slow computing performance when there are many nodes affected on the shortest path tree (SPT) path and most of the nodes are occupied; the partial routing calculation algorithm is only applicable to computing optimization when the routing prefix changes, and is not applicable to situations that affect topology changes such as link failures; the IGP routing prefix and node separation method will have a large number of node table entries and next-hop resources corresponding to the node table entries when there are a large number of nodes, resulting in a waste of next-hop resources. In summary, the existing technology cannot meet the computing requirements brought about by changes in network topology, and the routing convergence performance is low in the case of path failures.
[0090] In order to solve the above problems, the embodiments of the present application provide a link state routing protocol processing method, apparatus, device and storage medium, which abstracts certain subgraphs in the network topology as virtual nodes, and finally calculates the shortest path tree in the network topology composed of other real nodes and virtual nodes, and calculates the node table items, including the node table items reaching the virtual nodes, and finally reaches the maximum connected subgraph. All node devices share the same virtual node table item, and the routing table items where all node devices of the maximum connected subgraph share the same virtual node, thereby reducing the number of node table items. By reducing the number of node table items, the number of next-hop hardware resources occupied by the node table items is reduced, and the routing convergence performance in the event of a path failure is improved.
[0091] Optional, Figure 1 A schematic diagram of a link state routing protocol processing system architecture provided in an embodiment of the present application. Figure 1 In the above architecture, the above architecture includes at least one of a data acquisition device 101, a processing device 102 and a display device 103.
[0092] It is understandable that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the architecture of the link state routing protocol processing system. In other feasible implementations of the present application, the above architecture may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange the components differently, which can be determined according to the actual application scenario and is not limited here. Figure 1 The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0093] In a specific implementation process, the data acquisition device 101 may include an input / output interface and may also include a communication interface. The data acquisition device 101 may be connected to the processing device via the input / output interface or the communication interface.
[0094] The processing device 102 can abstract certain subgraphs in the network topology as virtual nodes, and finally calculate the shortest path tree in the network topology composed of other real nodes and virtual nodes, and calculate the node table entries, including the node table entries to reach the virtual nodes, and finally all node devices of the maximally connected subgraph share the same virtual node table entry, and the routing table entries of all node devices of the maximally connected subgraph share the same virtual node.
[0095] The display device 103 may also be a touch display screen or a screen of a terminal device, which is used to receive user instructions while displaying the above content to achieve interaction with the user.
[0096] It should be understood that the above-mentioned processing device can be implemented by a processor reading instructions in a memory and executing the instructions, or it can be implemented by a chip circuit.
[0097] In addition, the network architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of network architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0098] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0099] Optionally, Figure 2 A flowchart of a link state routing protocol processing method provided in an embodiment of the present application. The execution subject of the embodiment of the present application can be Figure 1 The specific execution subject can be determined according to the actual application scenario. Figure 2 As shown, the method comprises the following steps:
[0100] S201: Obtain an original topological graph to be processed, simplify the original topological graph to be processed, and obtain an undirected topological graph without repeated edges.
[0101] Demonstratively, Figure 3 A schematic diagram of the structure of an original topology map to be processed provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the link structure of the original topology graph to be processed includes 9 nodes. The original topology graph to be processed is represented by G, and the 9 nodes are: R1, R2, R3, R4, R5, R6, R7, R8 and R9.
[0102] Demonstratively, Figure 4 A schematic diagram of a simplified topology diagram provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, Figure 4 In the example, the edge with two links between two nodes is simplified to one edge. The simplified topology graph is represented by G1. For example, there are two links between R5 and R6 in the original topology, but only one edge is retained after simplification.
[0103] S202: Perform traversal and segmentation processing on the undirected topological graph to obtain a maximal connected subgraph set.
[0104] The maximal connected subgraph set includes one or more maximal connected subgraphs.
[0105] Optionally, the undirected topological graph is traversed and partitioned to obtain a maximal connected subgraph set, including: traversing the undirected topological graph to obtain a cut edge set and / or a cut point set; and obtaining a maximal connected subgraph set based on the cut edge set and the cut point set.
[0106] Optionally, in the simplified topological graph G1, all the cut edge sets E(g) in the graph are first found. The specific search algorithm may adopt the Targin algorithm for finding the cut edges of an undirected graph.
[0107] Among them, the embodiment of the present application realizes accurate splitting of the original topology graph to be processed by cutting edges and / or cutting points. For different link structures, the sub-graph segmentation can be achieved in different ways, thereby improving the flexibility of link state routing protocol processing.
[0108] Optionally, all cut points and cut edges are solved in the simplified topological graph. After removing these cut points, the edges connected by the cut points and the cut edges, each maximal connected subgraph is obtained (for those that can be separated by both cut points and cut edges, the cut edges are used for processing).
[0109] In a possible implementation, in the simplified topological graph G1, taking the cut edge as an example, a traversal process is performed starting from the local node according to the depth-first search to find the maximal connected subgraph that can be obtained after removing the cut edge closest to the root node:
[0110] Step a1: Assuming that the processing reaches the v(i) node, traverse its adjacent node v(j). If the edge (v(i), v(j)) is a cut edge of the cut edge set E(g), jump to step b1; otherwise, continue traversing.
[0111] Step b1: Exclude the edge (v(i), v(j)), start from the v(j) node, and find the maximal connected subgraph in G1 through depth search. Mark all nodes in the maximal connected subgraph as having been traversed in the depth-first search, and mark v(j) as the entry node of this maximal connected subgraph.
[0112] The set of all maximal connected subgraphs found in this step is C = {G1(1), G1(2)...}, where G1(i) represents the i-th maximal connected subgraph in the graph G1. In addition, the node set in the subgraph G1(i) is represented by V3(i), and the entry node of the subgraph G1(i) is marked as v_in(i).
[0113] In a possible implementation, in the simplified topology graph G1, taking the cut point as an example, first find all the cut point sets V(g) in the graph in the simplified topology graph G1. The specific search algorithm may adopt the existing Targin algorithm.
[0114] In the simplified topology graph G1, traverse from the local node according to the depth-first search to find the virtual subgraph that does not include the local node after removing the cut point closest to the root node. For example, take the cut point v(g(i)) as an example:
[0115] Perform a deep search starting from the current node as the root, assuming that the currently traversed node is v(i); traverse the edge adj(v(i), v(j)) of the v(i) node; determine whether v(j) is a cut point, if it is, continue with the following process; otherwise, continue to traverse; traverse the edge adj(v(j), v(k)) of the cut point v(j); perform a deep traversal starting from v(k), and the cut point v(j) needs to be excluded during the traversal process; after the traversal is completed, determine whether the traversed node exists in this node, if not, add all the traversed nodes to the virtual subgraph node, otherwise determine whether the cut point v(j) still has untraversed edges, if not, end the process, otherwise continue to traverse the edge adj(v(j), v(k)) of the cut point v(j).
[0116] The nodes of the found virtual subgraph plus the cut points are used as the nodes of the maximal connected subgraph, where the cut points serve as the entry nodes of the subgraph.
[0117] The set of all maximal connected subgraphs found in this step is C = {G1(1), G1(2)...}, where G1(i) represents the i-th maximal connected subgraph in the graph G1. In addition, the node set in the subgraph G1(i) is represented by V3(i), and the entry node of the subgraph G1(i) is marked as v_in(i).
[0118] For all nodes in the maximal connected subgraph G1(i) of the set C of maximal connected subgraphs, they are unified as a virtual node VNote(i) and assigned a unique virtual node index. All virtual nodes are combined into a set VNote.
[0119] In the original topology graph G, the nodes belonging to the virtual node set VNote are replaced by virtual nodes, and the links related to other external nodes are converted into links between virtual nodes, and finally the topology graph G2 is obtained.
[0120] S203: For each maximal connected subgraph, all real nodes in the maximal connected subgraph are virtualized into one virtual node, and a unique virtual node index is assigned to the virtual node.
[0121] Optionally, for all nodes in the maximal connected subgraph G1(i) of the set C of maximal connected subgraphs, they are virtualized into a virtual node VNote(i) and a unique virtual node index is assigned to it. All virtual nodes are combined into a set VNote.
[0122] S204: In the original topological graph to be processed, all real nodes of the maximal connected subgraph are replaced with virtual nodes corresponding to the maximal connected subgraph to obtain a first topological graph.
[0123] Optionally, the first topology graph is represented by G2.
[0124] Optionally, in the original topology graph G, the nodes belonging to the virtual node set VNote are replaced with virtual nodes, and the links of other external nodes and the related nodes are converted into links between the virtual nodes, and finally the topology graph G2 is obtained. Figure 5 A schematic diagram of a topology diagram after node replacement provided in an embodiment of the present application is shown in FIG. Figure 5 As shown, in Figure 4 On the basis of, the embodiment of the present application replaces the maximal connected subgraph composed of nodes R5, R6, R7, R8 and R9 with the node of VNote1.
[0125] S205: Based on the first topological graph, a shortest path algorithm is used to perform calculations to obtain a shortest path tree.
[0126] Optionally, a shortest path SPF algorithm is used to calculate the shortest path in the first topology graph G2 to obtain a global shortest path tree SPT1.
[0127] S206: Generate a node table entry of the first topology graph according to the shortest path tree.
[0128] Optionally, based on the shortest path information, path information to all nodes in the first topological graph G2, including real nodes and virtual nodes, is obtained, and corresponding node table entries are generated.
[0129] Optionally, the node table entry includes the following information: 1. Arrival device node; 2. <outgoing interface, next hop address> tuple; 3. Metric (Cost) value.
[0130] Here, the embodiment of the present application splits the original topology graph to be processed into one or more maximal connected subgraphs, and abstracts the key subgraphs into virtual nodes, and calculates the shortest path tree and node table entries in the network topology composed of other real nodes and virtual nodes, thereby reducing the number of node table entries, thereby reducing the number of next-hop block resources occupied by the node table entries, and can fully meet the computing requirements brought about by changes in the network topology. When a network failure occurs, different fault processing can be performed for node failures in subgraphs or non-subgraphs, without the need to recalculate the shortest path tree of the entire original topology graph to be processed, thereby improving the routing convergence performance in the event of a path failure.
[0131] Optionally, after generating a routing table of the first topology graph according to the shortest path tree, the method further includes:
[0132] For each maximal connected subgraph, the entry node of the maximal connected subgraph is taken as the root node, and the subgraph shortest path tree is calculated according to the shortest path algorithm; based on the subgraph shortest path tree, the metric value of the entry node to each real node in the maximal connected subgraph is determined.
[0133] In one possible implementation, for all subgraphs in the maximal connected subgraph set, the shortest path is calculated using the shortest path SPF algorithm with the entry node as the root node to obtain the shortest path tree of the subgraph, and then the cost value of the node reaching the real node in the subgraph is calculated.
[0134] Step a2: Taking the G1(i) subgraph as an example, with the v_in(i) node as the root, the shortest path is calculated according to the SPF algorithm, and its shortest path tree is SPT_G1(i).
[0135] Step b2: For a node v(j) in the G1(i) subgraph, the shortest path cost value in the G1(i) subgraph is marked as cost(v_in(i), v(j)), and the cost(v(j)) value from this node to the v(j) node in the G1 graph is cost(VNote(i))+cost(v_in(i), v(j)).
[0136] Here, after determining the shortest path tree and node table entries of the first topological graph, the embodiment of the present application calculates the shortest path tree and the metric value of each real node in the subgraph for each subgraph, thereby realizing the operation of all real nodes in the link.
[0137] Optionally, after determining the metric value of the entry node to each real node in the maximal connected subgraph according to the subgraph shortest path tree, it also includes: performing routing prefix processing on the routing prefixes of all real nodes according to the first topological graph and all virtual nodes; and determining the next hop block forwarding table entry according to the routing prefix processing result.
[0138] Optionally, according to the first topology map and all virtual nodes, routing prefix processing is performed on the routing prefixes of all real nodes:
[0139] For each routing prefix, node preference processing is performed in the routing prefix associated node to determine the preferred node; based on the first topological map and all virtual nodes, it is determined whether the source node of the preferred node is a virtual node; if the source node of the preferred node is a virtual node, the preferred node is replaced with the virtual node, and routing prefix processing is performed according to the node tuple corresponding to the virtual node.
[0140] Optionally, performing node optimization processing in the routing prefix associated node to determine the preferred node includes: determining one or more preferred nodes in the routing prefix associated node according to the metric value of the shortest path to the node under the routing prefix.
[0141] Demonstratively, Figure 6 A flowchart of a routing prefix processing method provided in an embodiment of the present application is provided. The specific method is shown in the figure and will not be described in detail here.
[0142] In one possible implementation, the process of routing prefix processing is as follows:
[0143] 6.1: Among the nodes associated with the routing prefix, the node with the smallest cost value is selected based on the cost of the shortest path to the node. If there are multiple nodes with the same smallest cost value, multiple nodes are selected.
[0144] 6.2: If the preferred source node of the routing prefix belongs to a virtual node, then this virtual node is used to replace this node. If there are multiple preferred source nodes belonging to the same virtual node, only one virtual node needs to be replaced.
[0145] 6.3: According to the preferred node tuple associated with the routing prefix, search for the next hop block in the next hop block table. If the corresponding next hop block does not exist, jump to step 6.4; otherwise, jump to step 6.8.
[0146] 6.4: Create a new next hop block and assign a unique next hop block index to the new next hop block. The key field of the new next hop block is the preferred node tuple.
[0147] 6.5: Search the node entry information of the corresponding node in the next hop block in the node entry management module, and use the union of the <outgoing interface, next hop address> tuples of the node entry as the value field of the next hop block; the node entry searched here includes both real node entries and virtual node entries.
[0148] 6.6: The association relationship between the node and the next hop block is stored in the node entry management module.
[0149] 6.7: The forwarding entry setting module installs the next hop block entry (next hop block index, <outgoing interface, next hop address> tuple) into the forwarding table and jumps to step 6.9.
[0150] 6.8: (Next hop block already exists) Determine whether the routing prefix has a forwarding table installed. If not installed or installed but needs to be updated, jump to step 6.9; otherwise, exit.
[0151] 6.9: The forwarding entry setting module installs the prefix table entry into the forwarding table according to the route prefix and the index of the associated next hop block.
[0152] Here, the embodiment of the present application processes the routing prefixes of all real nodes according to the split first topology map and all virtual nodes. The positions of the real nodes can be determined in different ways. There is no need to re-determine the next-hop address of each routing prefix based on the shortest path of all nodes when the path is updated, thereby saving computing power and improving network performance.
[0153] Optionally, an embodiment of the present application provides a link state routing protocol processing method capable of improving routing convergence performance.
[0154] Optionally, after generating the routing table of the first topology graph according to the shortest path tree, it also includes: if a fault occurs in the original topology graph to be processed, determining the fault location of the node or link where the fault occurs, wherein the fault location includes the first topology graph and the maximal connected subgraph; and performing fault convergence processing according to the fault location.
[0155] Here, when a fault occurs, the embodiments of the present application can adopt different fault convergence methods based on the location where the fault occurs, and perform targeted fault processing based on the nodes in the first topology graph and the maximal connected subgraph. In certain circumstances, there is no need to update all node data, which saves computing power and improves routing convergence performance in the event of path failure.
[0156] Optionally, according to the fault location, perform fault convergence processing, including:
[0157] If the fault location is the first topological graph, the shortest path calculation is performed on the first topological graph after the fault occurs to obtain a first calculation result; the node table entry is updated according to the first calculation result; based on the updated node table entry, it is determined whether the node table entry path tuple has changed; based on the determination result, the next hop block forwarding table entry associated with the node is updated; based on the updated node table entry, the routing prefix is updated for the multi-node belonging routing prefix of the node source in the real nodes in the first topological graph and the real nodes in all maximally connected subgraphs.
[0158] Optionally, according to the updated node table entry, the multi-node homed routing prefixes of the node sources in the real nodes in the first topology graph and the real nodes in all the maximal connected subgraphs are respectively updated, including:
[0159] According to the updated node table entries, determine whether the measurement value of the real node in the first topological graph has changed. If so, update the routing prefix of the multi-node belonging routing prefix of the node source in the real node in the first topological graph; according to the updated node table entries, determine whether the measurement value of the virtual nodes corresponding to all maximal connected subgraphs has changed; if there is a virtual node with a measurement value change, calculate the measurement value of the real node in the virtual node; according to the measurement value of the real node in the virtual node, update the routing prefix of the multi-node belonging routing prefix of the node source in the real node in the maximal connected subgraph.
[0160] Among them, when a node or link fails, the embodiment of the present application first determines whether the fault is within the maximal connected subgraph. If it is a fault in the first topology graph, that is, it is not a fault within the maximal connected subgraph, then based on the current topology information, the converged shortest path tree is recalculated based on the first topology graph after the fault, and the real node that has changed is determined based on the updated shortest path tree, and the multi-node affiliation routing prefix of the node is updated.
[0161] Optionally, fault convergence processing is performed according to the fault location, including: if the fault location is a maximal connected subgraph, performing a shortest path calculation on the maximal connected subgraph after the fault occurs to obtain a second calculation result; judging whether the metric values of real nodes in the maximal connected subgraph have changed according to the second calculation result; and based on the judgment result, performing a multi-node affiliation routing prefix update on the real nodes in the maximal connected subgraph whose metric values have changed.
[0162] Among them, when a node or link fails, the embodiment of the present application first determines whether the fault is in the maximal connected subgraph. If it is a fault in the maximal connected subgraph, it is only necessary to calculate the shortest path tree in the network topology composed of other real nodes and virtual nodes, and update the corresponding node table entries, including virtual node table entries. The fault in the maximal connected subgraph will not affect the convergence of the route to other paths, but will only make some routes unreachable. There is no need to re-decide the entire original topology graph to be processed, which further saves computing power and improves the routing convergence performance in the case of path failure.
[0163] Demonstratively, Figure 7 A flowchart of a fault convergence method provided in an embodiment of the present application is shown in the figure, and detailed description is omitted here.
[0164] In one possible implementation, the process of routing prefix processing is as follows:
[0165] 7.1: Update the topology information, including the original graph G, G2 and the virtual node subgraph.
[0166] 7.2: Determine whether there is a fault in the link or node in the global topology graph G2. If so, jump to step 7.3 for processing; if there are faulty links or nodes in some virtual node subgraphs, jump to step 7.12; if none of these situations exist, end the processing.
[0167] 7.3: Use the shortest path SPF algorithm to calculate the shortest path in the updated global topology graph G2.
[0168] 7.4: Based on the calculated shortest path information, update the path tuple information of the node table entry, including the virtual node table entry.
[0169] 7.5: If the path tuple information of the node table entry has changed, jump to step 7.6; otherwise jump to step 7.7.
[0170] 7.6: Find the next hop block associated with the node and update the next hop block forwarding table entry.
[0171] 7.7: Determine whether the Cost value of any real node has changed. If so, jump to step 7.8; otherwise, jump to step 7.9.
[0172] 7.8: Re-process the routing prefix of the multi-node home routing prefix of the source node.
[0173] 7.9: Determine whether the Cost value of the virtual node has changed. If so, jump to step 7.10; otherwise, end the processing;
[0174] 7.10: Recalculate the cost value of the real node inside the virtual node. The cost value calculation formula is: cost(VNote(i))+cost(v_in(i), v(j)), that is, the cost value of the virtual node plus the cost value of the virtual node subgraph entry node to reach this node.
[0175] 7.11: Re-prefix processing is performed on the multi-node home routing prefix within the virtual node; the processing ends after completion.
[0176] 7.12: Recalculate the shortest path in the subgraph of the virtual node VNote, and recalculate and update the shortest path Cost value from this node to the nodes in the subgraph.
[0177] 7.13: Determine whether the Cost value of any node in the subgraph has changed. If so, jump to step 7.14; otherwise, end the processing.
[0178] 7.14: Re-process the routing prefix of the multi-node home routing prefix of the source node.
[0179] Optionally, it is determined whether the connected component of the original connected subgraph becomes greater than 1 after the failure. If so, it is recalculated according to the routing learning process; otherwise, no processing is required.
[0180] Optionally, an embodiment of the present application provides a method for processing newly added links that can improve routing performance.
[0181] Optionally, after generating the routing table of the first topology graph according to the shortest path tree, it also includes: if there is a newly added link in the original topology graph to be processed, determining the link position of the newly added link, wherein the link position includes links between nodes in the same maximal connected subgraph, links between nodes in the maximal connected subgraph and other nodes, links between newly added nodes and real nodes in the first topology graph, and other nodes are any nodes that do not belong to the same maximal connected subgraph as the nodes in the maximal connected subgraph; processing the newly added link according to the link position.
[0182] Optionally, new link processing is performed based on the link position, including: if the link position is a link between nodes in the same maximal connected subgraph, shortest path calculation is performed in the maximal connected subgraph corresponding to the new link to obtain a third calculation result; based on the third calculation result, it is determined whether the metric value of the real node in the maximal connected subgraph has changed; if it is determined that there is a real node that has changed, the routing prefix is updated for the multi-node affiliation routing prefix of the node source in the real node that has changed.
[0183] Optionally, new link processing is performed based on the link position, including: if the link position is a link between nodes in the same maximal connected subgraph or a new node, shortest path calculation is performed on the first topology graph and all maximal connected subgraphs to obtain a fourth calculation result; based on the fourth calculation result, the routing prefix is updated for the multi-node affiliation routing prefix of the node source in all real nodes whose metric values have changed.
[0184] Optionally, new link processing is performed based on the link position, including: if the link position is a link between real nodes in the first topology map; then the shortest path calculation is performed on the first topology map after the link is added to obtain a fifth calculation result; the node table entry is updated based on the fifth calculation result; based on the updated node table entry, it is determined whether the node table entry path tuple has changed; based on the determination result, the next hop block forwarding table entry associated with the node is updated; based on the updated node table entry, the routing prefix is updated for the multi-node affiliation routing prefix of the node source in the real node where the metric value has changed.
[0185] Here, for the newly added link, the embodiment of the present application first determines the link position of the newly added link, and determines different processing solutions according to different link positions. There is no need to re-decide the entire original topology map to be processed, which further saves computing power and improves routing convergence performance in the event of path failure.
[0186] Demonstratively, Figure 8 A flowchart of a newly added link processing method provided in an embodiment of the present application is provided. The specific method is shown in the figure and will not be described in detail here.
[0187] In a possible implementation, the process of processing a newly added link is as follows:
[0188] 8.1: Update the topology information, including the original graph G, G2 and the virtual node subgraph.
[0189] 8.2: If the newly added link is a link of a node in the virtual subgraph, it is processed as follows:
[0190] a3. Recalculate the shortest path in the subgraph of the virtual node VNote, and recalculate and update the shortest path Cost value from this node to the nodes in the subgraph.
[0191] b3. Determine whether the Cost value of any node in the subgraph has changed. If so, jump to step c3; otherwise, end the processing.
[0192] c3. Re-process the routing prefix of the multi-node home routing prefix of the node source.
[0193] 8.3: If the newly added link is a link between a node and other nodes in the virtual node subgraph or a newly added node, including links between nodes in two different virtual nodes, it may cause the original edge cutting to fail, so path calculation and routing prefix processing need to be performed according to the complete process.
[0194] 8.4: If it is other cases, that is, the newly added link is not related to the internal nodes of the virtual node, it is handled according to the following process:
[0195] a4. The shortest path SPF algorithm is used to calculate the shortest path in the updated global topology graph G2.
[0196] b4. Update the path tuple information of the node table entry according to the calculated shortest path information, including the virtual node table entry.
[0197] c4. If the path tuple information of the node entry has changed, jump to step d4; otherwise, jump to step e4.
[0198] d4. Find the next hop block associated with the node and update the next hop block forwarding table entry.
[0199] e4. Determine whether the Cost value of any real node has changed. If so, jump to step f4; otherwise, jump to step g4.
[0200] f4. Re-process the routing prefix of the multi-node home routing prefix of the node source.
[0201] g4. Determine whether the Cost value of any virtual node has changed. If so, jump to step h4; otherwise, end the processing.
[0202] h4. Recalculate the Cost value of the real node inside the virtual node. The Cost value calculation formula is: cost(VNote(i))+cost(v_in(i), v(j)), that is, the Cost value of the virtual node plus the Cost value of the virtual node subgraph entry node to reach this node.
[0203] i4. Re-process the prefix of the multi-node home routing prefix within the virtual node; end the processing after completion.
[0204] The following is a technical solution of the present application in conjunction with a specific example. Figure 3 The original topology graph G to be processed in:
[0205] The OSPF device IDs of devices R1, R2, R3, R4, R5, R6, R7, R8, and R9 are 1.1.1.1, 2.2.2.2, 3.3.3.3, 4.4.4.4, 5.5.5.5, 6.6.6.6, 7.7.7.7, 8.8.8.8, and 9.9.9.9. These addresses can uniquely identify a device, and the Cost value of each link is assumed to be 1. The following describes the calculation process from the perspective of the local device R1.
[0206] The network segment address of the link between devices is assumed to be 110.AB.1.0 / 24, where A is the smaller serial number of the connected devices and B is the larger serial number of the connected devices; the interface address of the link on device A is 110.AB.1.A, and the interface address of the link on device B is 110.AB.1.B. Fig. 9 As shown, Fig. 9 A schematic diagram of link address interconnection provided in an embodiment of the present application. Assume that the routing prefix address originating from R1, R2, R3, R4, R5, R6, R7, R8, and R9 is as follows: Fig.10 As shown, Fig.10 A schematic diagram of a routing prefix address provided in an embodiment of the present application. It can be understood that: Fig. 9 , Fig.10The schematic diagrams of other address situations in the embodiments of the present application are only used to show examples and do not constitute the protection scope of the present application.
[0207] Path calculation process:
[0208] 9.1. Simplify the original topology information G into an undirected topology graph G1 without duplicate edges. For example, if there are two links between R5 and R6 in the original topology, only one edge needs to be retained after simplification. The simplified topology graph is as shown by G1 in Figure 4 below.
[0209] 9.2. In the simplified topology graph, first find all the cut-edge sets E(g) in the graph. In this example, the existing Tarjan algorithm is used to find them. The specific search process is as follows:
[0210] Timestamp: The timestamp is used to mark the time order when each node in the graph is visited during the depth-first search, and is represented by dfn[x].
[0211] Backtracking value: The backtracking value is used to represent the minimum value of the timestamps among all the nodes that can be accessed from the current node x as the root node of the search tree without passing through its parent node - low[x].
[0212] According to the Tarjan algorithm, if dfn[i] < low[j], then the edge <i, j> is a cut edge. In the subsequent graph, dfn[x] / low[x] is used to represent it.
[0213] The following describes the process of finding cut edges by performing a depth traversal starting from the current node R1. Demonstratively, Fig.11 is a schematic diagram of the process of calculating cut edges provided by the embodiments of the present application. The specific method is as follows:
[0214] a5. Process the R1 node. dfn[R1] / low[R1] is 1 / 1, and add R1 to the stack. Traverse the edge R1 - R2 of R1, and the R2 node has not been visited yet.
[0215] b5. Process the R2 node. dfn[R2] / low[R2] is 2 / 2, and add the R2 node to the stack. Traverse the edge R2 - R4 of R2, and the R2 node has not been visited yet.
[0216] c5. Process the R4 node. dfn[R4] / low[R4] is 3 / 3, and add the R4 node to the stack. Traverse the edge R4 - R3 of R4, and the R3 node has not been visited yet.
[0217] d5. Process node R3, where dfn[R3] / low[R3] is 4 / 4, add node R3 to the stack, traverse the edge R3 - R1 of R3, node R1 is in the stack, update low[R3] = min(low[R3], dfn[R1]) = 1.
[0218] e5. Traverse the edge R3 - R5 of R3, node R5 has not been visited yet.
[0219] f5. Process node R5, where dfn[R5] / low[R5] is 5 / 5, add node R5 to the stack, traverse the edge R5 - R6 of R5, node R6 has not been visited yet.
[0220] g5. Process node R6, where dfn[R6] / low[R6] is 6 / 6, add node R6 to the stack, traverse the edge R6 - R8 of R6, node R8 has not been visited yet.
[0221] h5. Process node R8, where dfn[R8] / low[R8] is 7 / 7, add node R8 to the stack, traverse the edge R8 - R7 of R8, node R7 has not been visited yet.
[0222] i5. Process node R7, where dfn[R7] / low[R7] is 8 / 8, add node R7 to the stack, traverse the edge R7 - R5 of R7, node R5 is in the stack, update low[R7] = min(low[R7], dfn[R5]) = 5.
[0223] j5. Since all edges of R7 have been traversed, pop node R7 from the stack and update low[R8] = min(low[R8], low[R7]) = 5; since dfn[R8] > low[R7], so R8 - R7 is not a cut edge.
[0224] k5. Traverse the edge R8 - R9 of R8, node R9 has not been visited yet
[0225] l5. Process node R9, where dfn[R9] / low[R9] is 9 / 9, there are no unvisited edges for node R9, backtrack to node R8; dfn[R8] < low[R9], so R8 - R9 is a cut edge; update low[R8] = min(low[R8], low[R9]) = 5.
[0226] m5. There are no unvisited edges for node R8, pop node R8 from the stack, backtrack to node R6, dfn[R6] > low[R8], so R6 - R8 is not a cut edge; update low[R6] = min(low[R6], low[R8]) = 5.
[0227] For nodes n5 and R6, there are no unvisited edges. Pop the R6 node from the stack and backtrack to the R5 node. dfn[R5] = low[R6], so the edge R6 - R8 is not a cut edge. Update low[R5] = min(low[R5], low[R6]) = 5.
[0228] o5、For node R5, there are no unvisited edges. Pop the R5 node from the stack and backtrack to the R3 node. dfn[R3] < low[R5], so the edge R3 - R5 is a cut edge. Update low[R3] = min(low[R3], low[R5]) = 1.
[0229] p5、For node R3, there are no unvisited edges. Pop the R3 node from the stack and backtrack to the R4 node. dfn[R4] > low[R3], so the edge R4 - R3 is not a cut edge. Update low[R4] = min(low[R4], low[R3]) = 1.
[0230] q5、For node R4, there are no unvisited edges. Pop the R4 node from the stack and backtrack to the R2 node. dfn[R2] > low[R4], so the edge R2 - R4 is not a cut edge. Update low[R2] = min(low[R2], low[R4]) = 1.
[0231] r5、For node R2, there are no unvisited edges. Pop the R2 node from the stack and backtrack to the R1 node. dfn[R1] = low[R2], so the edge R1 - R2 is not a cut edge. Update low[R1] = min(low[R1], low[R2]) = 1.
[0232] The set of cut edges E(g) is found to be {R3 - R5, R8 - R9, R9 - R10} through the above steps.
[0233] 9.3. In the simplified topological graph G1, start traversing from the local node according to depth - first search and find the maximally connected subgraph after excluding the cut edges.
[0234] a6、Start traversing from node R1. The traversed edge R1 - R2 is not a cut edge, and continue to process node R2.
[0235] b6、Traverse the edge R2 - R4, which is not a cut edge, and continue to process node R4.
[0236] c6、Traverse the edge R4 - R3, which is not a cut edge, and continue to process node R3.
[0237] d6、Traverse the edge R3 - R1. Node R1 has been visited, so skip it;
[0238] e6. Traverse R3-R5, cut edges, and perform a deep search with R5 as the root node, excluding the cut edge R3-R5; obtain the node set {R5, R6, R7, R8, R9, R10} of the connected subgraph G1(1) with R5 as the root node, and mark these nodes as visited; mark R5 as the entry node of the connected subgraph G1(1).
[0239] 9.4. Create a virtual node (denoted as VNote1) for the connected subgraph G1(1) and assign it a unique node index value. Assume that the node index value assigned here is 10.
[0240] 9.5. In the original topology graph G, the nodes belonging to the virtual node set VNote are replaced with virtual nodes, and the links of other external nodes and their related links are converted into links between virtual nodes, and finally the topology graph G2 is obtained, as shown in Figure 5 shown.
[0241] 9.6. Use SPF calculation in graph G2 to obtain the global shortest path.
[0242] 9.7. Based on the shortest path information calculated in step 9.6, obtain the path information to all nodes in graph G2, including real nodes and virtual nodes, and generate corresponding node table entries.
[0243] Demonstratively, Fig.12 A schematic diagram of a global shortest path and corresponding node table entries provided in an embodiment of the present application. It can be understood that: Fig.12 As well as other global shortest paths and node table entry diagrams in the embodiments of the present application are only used to illustrate examples and are not included in the scope of protection of the present application.
[0244] 9.8. Demonstration: Fig.13 A schematic diagram of the topological structure of a real subgraph corresponding to a virtual node provided in an embodiment of the present application. In the real subgraph corresponding to the virtual node VNote1, the existing SPF algorithm is used to calculate the shortest path with the entry node R5 as the root to obtain the shortest cost value to the corresponding node in the subgraph; the shortest path cost value from the current node (R1) to VNote1 plus the shortest path cost value to the corresponding node in the VNote1 subgraph can be obtained to obtain the shortest path cost value from the current node (R1) to the internal node of the VNote1 subgraph. Exemplarily, Fig.14 A schematic diagram of the shortest path cost value of a subgraph internal node provided in an embodiment of the present application. It can be understood that: Fig.14 Other shortest path cost value diagrams in the embodiments of the present application are only used to illustrate examples and are not included in the protection scope of the present application.
[0245] Route prefix processing:
[0246] The following uses prefix 100.8.1.1 / 32 as an example to describe the processing process:
[0247] a7. The routing prefix 100.8.1.1 / 32 is associated with one node: R8.
[0248] b7. It is determined that R8 belongs to the virtual node VNote1, so the virtual node VNote1 is used to replace R8.
[0249] c7. According to <vnote1>Check the next hop block table to see if there is a corresponding next hop block, and no existing next hop block is found.
[0250] d7. Create the next hop block nhb_4 and assign it a unique index 4. The key field of nhb_4 is the corresponding node tuple. <vnote1>.
[0251] e7. According to the node in the node tuple where the next hop block nhb_4 is located, the node table entry is searched. The <outgoing interface, next hop address> tuple of the VNote1 node is {<Gi0 / 1,110.13.1.3>},Will{<Gi0 / 1,110.13.1.3>} tuple as nhb_4 table entry information.
[0252] f7. Store the association relationship between the next block nhb_4 and the node VNote1.
[0253] g7. Set the information of the next hop block nhb_4 to the forwarding table, where the key field of the content installed to the forwarding table entry is the index 4 of nhb_4, and the value field is the tuple of <outgoing interface, next hop address>, that is, {<Gi0 / 1,110.13.1.3>}.
[0254] h7. Set the route prefix table entry into the forwarding table, with the key field being the prefix address 100.8.1.1 / 32 and the value field being the index 4 of the next hop block nhb_4.
[0255] When a routing prefix is associated with multiple nodes, the situation is similar to that of a single node.
[0256] The following describes the process using the routing prefix 110.68.1.0 / 24:
[0257] a8. There are two nodes for the routing prefix 110.68.1.0 / 24: R6 and R8. Since the cost values of reaching R6 and R8 are 3 and 4 respectively, R6 is the preferred node for the routing prefix 110.68.1.0 / 24.
[0258] b8. It is determined that R6 belongs to the virtual node VNote1, so the virtual node VNote1 is used to replace R6.
[0259] c8. Preferred node tuple associated with prefix <vnote1>Check whether there is a corresponding next hop block in the next hop block table. If there is a corresponding block nhb_4.
[0260] d8. Set the route prefix table entry into the forwarding table, with the key field being the prefix address 110.68.1.0 / 24 and the value field being the index 4 of the next hop block nhb_4.
[0261] Demonstratively, Fig.15 A schematic diagram of a routing next hop block table and the association between nodes and next hop blocks provided in an embodiment of the present application. Fig.16 A schematic diagram of a routing prefix table entry provided in an embodiment of the present application. It can be understood that: Fig.15 , Fig.16 They are only used to illustrate examples and are not intended to be the scope of protection of this application.
[0262] Fault convergence process:
[0263] When a path fails, there are two cases depending on whether the failed path is a path in the virtual node subgraph:
[0264] (1) If a path fails within a virtual node subgraph, for example, Fig.17 A schematic diagram of a path failure topology in a virtual node subgraph provided in an embodiment of the present application is shown in FIG. Fig.17 As shown in the figure, the link between node R5 and node R7 fails. The fault convergence mode is as follows:
[0265] 10.1: Update the internally saved topology information, including the original topology graph G, G2 and the virtual node subgraph. Since the fault is only in the virtual node subgraph, only the original topology graph G and the virtual node VNote1 subgraph need to be updated. The subgraph of the virtual node VNote1 after the update is as follows: Fig.18 As shown, Fig.18 A schematic diagram of a subgraph topology after a virtual node subgraph path failure is provided in an embodiment of the present application.
[0266] 10.2: Perform the shortest path calculation in the updated subgraph of VNote1 according to the SPF algorithm to obtain the shortest path of the internal subgraph and the cost value in the subgraph, and update the cost value of the node in the original topology graph according to the cost value of the node in the subgraph. Fig.19 A schematic diagram of the shortest path calculation result after the path failure convergence processing in a virtual node subgraph provided by an embodiment of the present application. It can be understood that, Fig.19 It is only used to illustrate examples and is not intended to be part of the scope of protection of this application.
[0267] 10.3: After calculating the cost values of the nodes in the original topology, only the cost of the R7 node has changed.
[0268] 10.4: Re-process the node optimization for the multi-node routing prefix from R7 node. The processing process is the same as "routing prefix processing". The prefix table entry information after processing is as follows: Fig. 20 As shown, Fig. 20 A schematic diagram of prefix table entry information after a path failure convergence process in a virtual node subgraph provided by an embodiment of the present application. Fig. 20 As shown in the figure, only the routing prefix 110.78.1.0 / 24 involves multiple source nodes, so it is re-selected and the R8 node is selected. Since the R8 node also belongs to the virtual node VNote1, the node associated with the actual routing prefix is still VNote1, and there is no need to update the forwarding table. Among them, the routing prefix 110.57.1.0 / 24 will be deleted due to the path failure, so it is no longer in Fig. 20 As shown in the table. It can be understood that Fig. 20 As well as other prefix table entry information diagrams in the embodiments of the present application are only used to illustrate examples and are not intended to be the scope of protection of the present application.
[0269] (2) If a path fails within a virtual node subgraph, for example, Fig.21 A schematic diagram of a virtual node subgraph external path failure topology provided in an embodiment of the present application is shown in FIG. Fig.21 As shown in the figure, a fault occurs between nodes R1 and R3. The fault convergence is as follows:
[0270] 11.1: Update the internally saved topology information, including the original topology map G, G2 and the virtual node submap. Since the fault is only outside the virtual node submap, only the original topology map G and G2 need to be updated. The updated G2 topology map is as follows: Fig. 22 As shown, Fig. 22 A topology diagram of a virtual node replacement after a virtual node external path failure is provided in an embodiment of the present application.
[0271] 11.2: Use the shortest path SPF algorithm to calculate the shortest path in the updated global topology graph G2.
[0272] 11.3: Update the node table entry based on the calculation result of the shortest path.
[0273] Demonstratively, Fig.23 A shortest path table and updated node diagram provided in an embodiment of the present application. Fig.23 As shown, only the R3, R4, and VNote1 node entries need to be updated, and their <outgoing interface, next hop address> tuples are updated to {<Gi0 / 0,110.12.1.2>}.
[0274] 11.4: In the node-next-hop association table, find out that the next-hop blocks associated with R3, R4, and VNote1 nodes are nhb_2, nhb_3, and nhb_4, respectively, and trigger nhb_2, nhb_3, and nhb_4 to re-update the next-hop block table entries.
[0275] a9. For the next hop block nhb_2, its associated preferred node tuple is <r3>, search the node table entry according to the R3 node, and its <outgoing interface, next hop address> tuple is the updated {<Gi0 / 0,110.12.1.2>}; Update the next hop block nhb_2 forwarding table entry in the forwarding direction, its key field index is 2, and its value field is {<Gi0 / 0,110.12.1.2>}.
[0276] b9. For the next hop block nhb_3, its associated preferred node tuple is <r4>, search the node table entry according to the R4 node, and its <outgoing interface, next hop address> tuple is the updated {<Gi0 / 0,110.12.1.2>}; Update the next hop block nhb_3 forwarding table entry in the forwarding direction, its key field index is 3, its value field is {<Gi0 / 0,110.12.1.2>}.
[0277] c9. For the next hop block nhb_4, its associated preferred node tuple is <vnote1>, find the node table entry based on the VNote1 node, and its <outgoing interface, next hop address> tuple is the updated {<Gi0 / 0,110.12.1.2>}; Update the next hop block nhb_4 forwarding table entry in the forwarding direction, its key field index is 4, and its value field is {<Gi0 / 0,110.12.1.2>}.
[0278] When nhb_4 is updated, the service traffic on the R1 device accessing the nodes in the VNote1 virtual node (R5, R6, R7, R8, R9) will be switched from the original R1-R3-VNote1 to the R1-R2-R4-VNote1 path. The routing convergence only requires changing one next-hop block nhb table entry.
[0279] 11.5: Determine whether the Cost value of the real node R3 has changed.
[0280] 11.6: Re-process the node optimization for the multi-node home routing prefix from R3. The processing process is the same as "routing prefix processing". The prefix table entry information after processing is as follows: Fig.24 As shown, Fig.24 A schematic diagram of a processed prefix table entry information provided in an embodiment of the present application. Fig.24 As shown, only 110.34.1.0 / 24, 110.34.2.0 / 24, and 110.35.1.0 / 24 belong to the multi-node homed routing prefix of node R3, among which the node preference result of 110.35.1.0 / 24 remains unchanged, so there is no need to update the routing prefix. For 110.34.1.0 / 24 and 110.34.2.0 / 24, the original preferred node R3 is updated to the preferred node R4, so its associated next hop block is the corresponding nhb_3. The forwarding table entries of the routing prefixes 110.34.1.0 / 24 and 110.34.2.0 / 24 are updated, and their value field is the next hop block index 3 of the next hop block nhb_3.
[0281] 11.7: Determine whether the Cost value of the virtual node VNote1 has changed.
[0282] 11.8: Based on the updated Cost value of the virtual node VNote1, recalculate the Cost value of the real node inside the VNote1 node. The calculated value is as follows: Fig.25 As shown, Fig.25 A schematic diagram of a processed real node cost value provided in an embodiment of the present application.
[0283] 11.9: Re-process the node selection for the multi-node homed routing prefix from VNote1. The processing process is the same as "routing prefix processing". The prefix table entry information after processing is as follows: Fig.26 As shown, Fig.26 A schematic diagram of a processed prefix table entry information provided in an embodiment of the present application. Fig.26 As shown, the node optimization result of the above-mentioned related routing prefixes has not changed, so the routing prefix table entry does not need to be updated.
[0284] Add a link
[0285] (1) If a new link is added to the virtual node subgraph, for example, a new link is added between R5 and R8, the network segment of the new link is 110.58.1.0 / 24, the interface name and address are R5: interface Gi0 / 4, 110.58.1.5, R8: interface Gi0 / 3, 110.58.1.8, and the Cost value is 1. The processing method for the new link is as follows:
[0286] 12.1: Update the internally saved topology information, including the original topology graph G, G2 and the virtual node subgraph. Since the newly added links are only in the virtual node subgraph, only the original topology graph G and the virtual node VNote1 subgraph need to be updated. The subgraph of the virtual node VNote1 after the update is as follows: Fig. 27 As shown, Fig. 27 A schematic diagram of a subgraph topology after a link is added to a virtual node subgraph provided in an embodiment of the present application.
[0287] 12.2: In the updated subgraph of VNote1, the shortest path calculation is performed according to the SPF algorithm to obtain the shortest path of the internal subgraph and the cost value within the subgraph, and the cost value of the node in the original topology graph is updated according to the cost value of the node in the subgraph.
[0288] 12.3: According to the calculated cost values of the nodes in the original topology, only the cost of nodes R8 and R9 has changed.
[0289] 12.4: The routing prefixes with multiple nodes from R8 and R9 are re-processed for node optimization. The processing is the same as "routing prefix processing" and is not described here. For example, after processing, only the routing prefixes 110.68.1.0 / 24, 110.78.1.0 / 24, and 110.89.1.0 / 24 involve multiple nodes, so they are re-processed for node optimization. As a result, only 110.68.1.0 / 24 and 110.78.1.0 / 24 are changed. However, due to the new preferred node<R6,R8> ,<R7,R8> They all belong to the virtual node VNote1, so the node associated with the actual routing prefix is still VNote1, and there is no need to update the forwarding table entry.
[0290] (2) If a new link is added outside the virtual node, for example, a new link is added between R1 and R4. The network segment of the new link is 110.14.1.0 / 24, the interface name and address are R1: interface Gi0 / 2, 110.14.1.1, R4: interface Gi0 / 3, 110.14.1.4, and the cost value is 1. The processing method for the new link is as follows:
[0291] 13.1: Update the internally saved topology information, including the original topology graph G, G2 and the virtual node subgraph. Since the newly added links are only outside the virtual node subgraph, only the original topology graph G and G2 need to be updated. The updated G2 topology graph is as follows: Fig.28 As shown, Fig.28 A schematic diagram of a subgraph topology after a link is added outside a virtual node provided in an embodiment of the present application.
[0292] 13.2: Use the shortest path SPF algorithm to calculate the shortest path in the updated global topology graph G2.
[0293] 13.3: Update the node table entry based on the calculation result of the shortest path. For example, only the R4 node table entry needs to be updated, and its <outgoing interface, next hop address> tuple is updated to {<Gi0 / 2,110.14.1.4>}.
[0294] 13.4: In the node-next-hop association table, find the next-hop blocks associated with R4 node, which are nhb_3, and trigger nhb_3 to re-update the next-hop block table entry. For example, for the next-hop block nhb_3, its associated preferred node tuple is <r4>, search the node table entry according to the R4 node, and its <outgoing interface, next hop address> tuple is the updated {<Gi0 / 2,110.14.1.4>}; Update the next hop block nhb_3 forwarding table entry in the forwarding direction, its key field index is 3, its value field is {<Gi0 / 2,110.14.1.4>}.
[0295] 13.5: Determine whether the Cost value of the real node R4 has changed.
[0296] 13.6: Re-perform node optimization for the multi-node home routing prefix from R4.
[0297] 13.7: If it is determined that the Cost value of the virtual node does not change, the exit process ends.
[0298] (3) Add a new node or add a link between a node in a virtual node and other nodes:
[0299] For newly added nodes or newly added links that are links between nodes within a virtual node and other nodes (including links between two virtual nodes), since this will cause the nodes of the subgraph to change, they must be recalculated according to the complete calculation process.
[0300] An embodiment of the present application provides a method for reducing the number of node table entries by abstracting key subgraphs into virtual nodes for a network topology with cut edges or cut points. By reducing the number of node table entries, the number of next-hop hardware resources occupied by the node table entries is reduced, and the routing convergence performance in the event of a path failure is improved.
[0301] The present application also provides a schematic diagram of the structure of a link state routing protocol processing device. Figure 8 As shown, the device of the embodiment of the present application includes: a simplified processing module, a split processing module, a virtual processing module, a node replacement module, a path calculation module and a generation module. The link state routing protocol processing device here can be the above-mentioned processing device, the processor itself, or a chip or integrated circuit that implements the function of the processor. It should be noted here that the division of the simplified processing module, the split processing module, the virtual processing module, the node replacement module, the path calculation module and the generation module is only a division of logical functions. Physically, the two can be integrated or independent.
[0302] Among them, the simplification processing module is used to obtain the original topology graph to be processed, simplify the original topology graph to be processed, and obtain an undirected topology graph without repeated edges; the segmentation processing module is used to traverse and segment the undirected topology graph to obtain a maximal connected subgraph set, wherein the maximal connected subgraph set includes one or more maximal connected subgraphs; the virtual processing module is used to virtualize all real nodes in the maximal connected subgraph into a virtual node for each maximal connected subgraph, and assign a unique virtual node index to the virtual node; the node replacement module is used to replace all real nodes of the maximal connected subgraph with the virtual nodes corresponding to the maximal connected subgraph in the original topology graph to obtain a first topology graph; the path calculation module is used to calculate according to the shortest path algorithm on the basis of the first topology graph to obtain a shortest path tree; the generation module is used to generate node table entries of the first topology graph according to the shortest path tree.
[0303] Optionally, the segmentation processing module is specifically used to: perform traversal processing on the undirected topological graph to obtain a cut edge set and / or a cut point set; and obtain a maximal connected subgraph set based on the cut edge set and the cut point set.
[0304] Optionally, after the generation module is used to generate a routing table of the first topological graph according to the shortest path tree, the above-mentioned device also includes a subgraph data processing module, which is used to: for each maximal connected subgraph, use the entry node of the maximal connected subgraph as the root node, and calculate the subgraph shortest path tree according to the shortest path algorithm; based on the subgraph shortest path tree, determine the metric value of the entry node to reach each real node in the maximal connected subgraph.
[0305] Optionally, after the subgraph data processing module is used to determine the metric value of the entry node to each real node in the maximal connected subgraph according to the subgraph shortest path tree, the above-mentioned device also includes a routing prefix processing module, which is used to: perform routing prefix processing on the routing prefixes of all real nodes according to the first topological graph and all virtual nodes; and determine the next hop block forwarding table entry according to the routing prefix processing result.
[0306] Optionally, the prefix processing module is specifically used to: for each routing prefix, perform node preference processing in the routing prefix associated node to determine the preferred node; determine whether the source node of the preferred node is a virtual node based on the first topological map and all virtual nodes; if the source node of the preferred node is a virtual node, replace the preferred node with the virtual node, and perform routing prefix processing according to the node tuple corresponding to the virtual node.
[0307] Optionally, the prefix processing module is further specifically configured to: determine one or more preferred nodes among nodes associated with the routing prefix according to a metric value of a shortest path to a node under the routing prefix.
[0308] Optionally, after the generation module is used to generate a routing table of the first topology graph based on the shortest path tree, the above-mentioned device also includes a fault processing module, which is used to: if a fault occurs in the original topology graph to be processed, determine the fault location of the node or link where the fault is located, wherein the fault location includes the first topology graph and the maximal connected subgraph; and perform fault convergence processing according to the fault location.
[0309] Optionally, the fault handling module is specifically used for: if the fault location is the first topological graph, performing the shortest path calculation on the first topological graph after the fault occurs to obtain a first calculation result; updating the node table entry according to the first calculation result; judging whether the node table entry path tuple has changed according to the updated node table entry; updating the node-associated next-hop block forwarding table entry according to the judgment result; and updating the routing prefix of the multi-node belonging routing prefix of the node source in the real nodes in the first topological graph and the real nodes in all maximally connected subgraphs according to the updated node table entry.
[0310] Optionally, the fault handling module is also specifically used to: determine whether the measurement value of any real node in the first topological graph has changed based on the updated node table entry; if so, update the routing prefix of the multi-node belonging routing prefix of the node source in the real node in the first topological graph; determine whether the measurement value of all virtual nodes corresponding to the maximal connected subgraphs has changed based on the updated node table entry; if there is a virtual node with a measurement value change, calculate the measurement value of the real node in the virtual node; and update the routing prefix of the multi-node belonging routing prefix of the node source in the real node in the maximal connected subgraph based on the measurement value of the real node in the virtual node.
[0311] Optionally, the fault handling module is also specifically used for: if the fault location is a maximal connected subgraph, performing a shortest path calculation on the maximal connected subgraph after the fault occurs to obtain a second calculation result; judging whether the metric value of the real node in the maximal connected subgraph has changed based on the second calculation result; and based on the judgment result, updating the routing prefix of the multi-node affiliation routing prefix of the node source in the real node in the maximal connected subgraph where the metric value has changed.
[0312] Optionally, after the generation module is used to generate a routing table of the first topology graph according to the shortest path tree, the above-mentioned device also includes a newly added node processing module, which is used to: if there is a newly added link in the original topology graph to be processed, determine the link position of the newly added link, wherein the link position includes the link between nodes in the same maximal connected subgraph, the link between the node in the maximal connected subgraph and other nodes, the link between the newly added node and the real node in the first topology graph, and the other node is any node that does not belong to the same maximal connected subgraph as the node in the maximal connected subgraph; according to the link position, the newly added link is processed.
[0313] Optionally, the newly added node processing module is specifically used for: if the link position is a link between nodes in the same maximal connected subgraph, then performing the shortest path calculation in the maximal connected subgraph corresponding to the newly added link to obtain a third calculation result; based on the third calculation result, determining whether the metric value of the real node in the maximal connected subgraph has changed; if it is determined that there is a real node that has changed, then updating the routing prefix of the multi-node affiliation routing prefix of the node source in the real node that has changed.
[0314] Optionally, the newly added node processing module is also specifically used for: if the link position is a link between nodes in the same maximal connected subgraph or a newly added node, then the shortest path calculation is performed on the first topological graph and all maximal connected subgraphs to obtain a fourth calculation result; based on the fourth calculation result, the routing prefix is updated for the multi-node affiliation routing prefix of the node source in all real nodes whose metric values have changed.
[0315] Optionally, the newly added node processing module is also specifically used for: if the link position is a link between real nodes in the first topology map; then performing the shortest path calculation on the first topology map after the link is added to obtain a fifth calculation result; updating the node table entry according to the fifth calculation result; judging whether the node table entry path tuple has changed according to the updated node table entry; updating the next hop block forwarding table entry associated with the node according to the judgment result; and updating the routing prefix of the multi-node belonging routing prefix of the node source in the real node where the metric value has changed according to the updated node table entry.
[0316] refer to Fig.29 , which shows a schematic diagram of the structure of a link state routing protocol processing device 2900 suitable for implementing the embodiment of the present disclosure, and the link state routing protocol processing device 2900 can be a terminal device or a server. The terminal device can include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.29 The link state routing protocol processing device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0317] like Fig.29 As shown, the link state routing protocol processing device 2900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 2901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 2902 or a program loaded from a storage device 2908 to a random access memory (RAM) 2903. Various programs and data required for the operation of the link state routing protocol processing device 2900 are also stored in the RAM 2903. The processing device 2901, the ROM 2902, and the RAM 2903 are connected to each other via a bus 2904. An input / output (I / O) interface 2905 is also connected to the bus 2904.
[0318] Typically, the following devices may be connected to the I / O interface 2905: input devices 2906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 2907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 2908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 2909. The communication device 2909 may allow the link state routing protocol processing device 2900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.29 The link state routing protocol processing device 2900 having various devices is shown, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.
[0319] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 2909, or installed from the storage device 2908, or installed from the ROM 2902. When the computer program is executed by the processing device 2901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0320] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0321] The computer-readable medium may be included in the link state routing protocol processing device; or may exist independently without being assembled into the link state routing protocol processing device.
[0322] The computer-readable medium carries one or more programs. When the one or more programs are executed by the link state routing protocol processing device, the link state routing protocol processing device executes the method shown in the above embodiment.
[0323] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0324] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0325] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0326] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0327] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0328] The link state routing protocol processing device of the embodiment of the present application can be used to execute the technical solutions in the above-mentioned method embodiments of the present application. Its implementation principles and technical effects are similar and will not be repeated here.
[0329] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement any of the above-mentioned link state routing protocol processing methods.
[0330] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement any of the above link state routing protocol processing methods when executed by a processor.
[0331] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0332] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0333] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0334] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A link state routing protocol processing method, characterized in that: include: Obtaining an original topological graph to be processed, and simplifying the original topological graph to be processed to obtain an undirected topological graph without repeated edges; Performing traversal and segmentation processing on the undirected topological graph to obtain a maximal connected subgraph set, wherein the maximal connected subgraph set includes one or more maximal connected subgraphs; For each of the maximal connected subgraphs, all real nodes in the maximal connected subgraph are virtualized into a virtual node, and a unique virtual node index is assigned to the virtual node; In the original topological graph to be processed, all real nodes of the maximal connected subgraph are replaced with virtual nodes corresponding to the maximal connected subgraph to obtain a first topological graph; Based on the first topological graph, a shortest path tree is obtained by performing calculations according to a shortest path algorithm; Generate node entries of the first topology graph according to the shortest path tree.
2. The method according to claim 1, characterized in that The traversal and segmentation process is performed on the undirected topological graph to obtain a maximum connected subgraph set, including: Traversing the undirected topological graph to obtain a cut edge set and / or a cut point set; A maximal connected subgraph set is obtained according to the cut edge set and the cut point set.
3. The method according to claim 1, characterized in that After generating the routing table of the first topology graph according to the shortest path tree, the method further includes: For each of the maximal connected subgraphs, taking the entry node of the maximal connected subgraph as the root node, and calculating the subgraph shortest path tree according to the shortest path algorithm; According to the subgraph shortest path tree, a metric value of the entry node reaching each real node in the maximal connected subgraph is determined.
4. The method according to claim 3, characterized in that After determining the metric value of the entry node reaching each real node in the maximal connected subgraph according to the subgraph shortest path tree, the method further includes: According to the first topology map and all the virtual nodes, performing routing prefix processing on the routing prefixes of all real nodes; According to the routing prefix processing result, the next hop block forwarding table entry is determined.
5. The method according to claim 4, characterized in that The performing routing prefix processing on the routing prefixes of all real nodes according to the first topology map and all the virtual nodes includes: For each routing prefix, perform node optimization processing in the routing prefix associated node to determine the preferred node; According to the first topology map and all the virtual nodes, determining whether the source node of the preferred node is a virtual node; If the source node of the preferred node is a virtual node, the preferred node is replaced by the virtual node, and routing prefix processing is performed according to the node tuple corresponding to the virtual node.
6. The method according to claim 5, characterized in that The performing node optimization processing in the routing prefix associated node to determine the preferred node includes: In the routing prefix associated node, one or more preferred nodes are determined according to the metric value of the shortest path to the node under the routing prefix.
7. The method according to any one of claims 4 to 6, characterized in that: After generating the routing table of the first topology graph according to the shortest path tree, the method further includes: If the original topology graph to be processed fails, the fault location of the node or link where the failure occurs is determined, wherein the fault location includes the first topology graph and the maximal connected subgraph; Perform fault convergence processing according to the fault location.
8. The method according to any one of claims 4 to 6, characterized in that: After generating the routing table of the first topology graph according to the shortest path tree, the method further includes: If the original topology graph to be processed has a newly added link, the link position of the newly added link is determined, wherein the link position includes links between nodes in the same maximal connected subgraph, links between nodes in the maximal connected subgraph and other nodes, and links between the newly added node and a real node in the first topology graph, and the other node is any node that does not belong to the same maximal connected subgraph as the node in the maximal connected subgraph; According to the link position, new link processing is performed.
9. A link state routing protocol processing device, comprising: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the link state routing protocol processing method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the link state routing protocol processing method according to any one of claims 1 to 8.
Citation Information
Cited By
Network resource optimization method, device and system, computer equipment and computer storage medium
CN120768774A