Packet forwarding address updating method, routing communication method and related device
By identifying problematic nodes in an autonomous network and updating their next-hop block addresses, the computational cost problem during path updates is solved, thus improving network performance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RUIJIE NETWORKS CO LTD
- Filing Date
- 2023-04-26
- Publication Date
- 2026-04-17
AI Technical Summary
When updating paths in an autonomous network, existing technologies require re-determining the next-hop address for all routing prefixes, resulting in high computational resource consumption and impacting network performance.
By determining the shortest path of a node during path updates and comparing it with historical paths to identify problematic nodes, the next-hop block address corresponding to the problematic node is updated, and the forwarding address is quickly updated using the pre-stored next-hop block as an index.
There is no need to make a global re-decision for the next-hop address of each routing prefix, saving computing resources and improving network performance.
Smart Images

Figure CN118869565B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, specifically to a message forwarding address update method, a routing communication method, and related apparatus. Background Technology
[0002] As networks grow in size, the application of link-state routing protocols is increasing. Link-state routing protocols are used to control nodes within an autonomous network (such as gateway devices and routers) to announce their own link-state information and, based on information from other nodes, determine the shortest path rooted at themselves using path algorithms such as Dijkstra.
[0003] Currently, most protocols determine the next-hop address for each routing prefix within the autonomous network based on the shortest path between nodes in the topology. After receiving a packet, a node can match the routing prefixes in the autonomous network according to the packet's destination address and use the next-hop address corresponding to the matched routing prefix as the forwarding address for that packet.
[0004] When an autonomous network (AfN) undergoes path updates, the shortest topological paths between nodes change, causing some routing prefixes to fail to reach their destination. A common solution is to recalculate all shortest topological paths between nodes within the AfN during path updates and then re-determine the next-hop address for each routing prefix based on the calculation results. The next-hop address corresponding to a routing prefix becomes the forwarding address for packets matching that prefix. However, larger networks have more routing prefixes, and this method of re-determining all routing prefixes during path updates consumes significant computational resources, impacting network performance. Summary of the Invention
[0005] This application provides a method for updating the forwarding address of a message, a routing communication method, and related apparatus. These are used to quickly update the forwarding address of a message during path updates.
[0006] In a first aspect, embodiments of this application provide a method for updating the forwarding address of a message, applied to a first node in an autonomous network, the method comprising:
[0007] In response to a path update instruction, determine the shortest path from the first node to each node in the autonomous network.
[0008] For any node in the autonomous network, the shortest path ending at the node is compared with the historical paths ending at the node in the pre-stored historical paths; if the shortest path is different from the historical path, then the node is a problem node; wherein, the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to the path update instruction.
[0009] If any of the nodes is a problem node, then the first next-hop block corresponding to any of the nodes is selected from the pre-stored next-hop blocks; wherein, each next-hop block in the pre-stored next-hop blocks is an index used to determine the forwarding address of the packet; each next-hop block in the pre-stored next-hop blocks is associated with a set of nodes used to indicate the address of the next-hop block and a set of prefixes used to match the packet, and the any node is in the set of nodes associated with the first next-hop block;
[0010] The address of the first next-hop block is updated based on the shortest path from the first node to any of the nodes.
[0011] In some possible embodiments, each node in the autonomous network has at least one routing prefix; the node set consists of at least one node in the autonomous network, and the prefix set consists of at least one routing prefix in the autonomous network;
[0012] The set of nodes and prefixes associated with the next-hop block are determined in the following way:
[0013] For each route prefix, a second node is selected from the nodes under the route prefix based on the multiple historical paths;
[0014] Construct a next-hop block associated with the route prefix, and associate the node set containing all second nodes with the next-hop block;
[0015] For each next-hop block, all routing prefixes associated with the next-hop block are used as the prefix set associated with the next-hop block.
[0016] In some possible embodiments, selecting the second node from the nodes under the routing prefix based on the multiple historical paths includes:
[0017] A first historical path is selected from the historical paths, with the node under the routing prefix as the path endpoint, and a second historical path is determined based on the cost value of each first historical path; the cost value of each historical path is determined based on the bandwidth of the nodes along the path.
[0018] The node located at the end of the second historical path is designated as the second node.
[0019] In some possible embodiments, the address of each next-hop block is determined by the following method:
[0020] After constructing the next-hop block associated with the routing prefix, determine the union of the next-hop addresses of each of the second historical paths;
[0021] The union is used as the address of the next hop block.
[0022] In some possible embodiments, before constructing the next-hop block associated with the routing prefix, the method further includes:
[0023] It is determined that the node set does not have an associated next-hop block;
[0024] After selecting the second node from the nodes under the routing prefix based on the historical path, the method further includes:
[0025] If the node set is already associated with a next-hop block, then the routing prefix is associated with the already associated next-hop block.
[0026] In some possible embodiments, updating the address of the first next-hop block based on the shortest path from the first node to any of the nodes includes:
[0027] For any third node, a target historical path with the third node as the path endpoint is selected from the historical paths; wherein, the third node is any node in the node set associated with the first next-hop block;
[0028] If the union of the next-hop addresses of each target historical path is different from the next-hop address of the shortest path, then the next-hop address of the shortest path is updated to the address of the first next-hop block.
[0029] Secondly, embodiments of this application provide a routing communication method applied to a first node in an autonomous network, the method comprising:
[0030] Receive messages to be processed and determine the routing prefix in the autonomous network that matches the destination address of the message;
[0031] A second next-hop block is selected from a pre-stored next-hop block based on the matching routing prefix; wherein each next-hop block in the pre-stored next-hop block is associated with a set of nodes for indicating the address of the next-hop block and a set of prefixes for matching packets; the prefix set associated with the second next-hop block contains the matching routing prefix;
[0032] The address of the second next-hop block is used as the forwarding address of the message to be processed, and a forwarding operation is performed on the message to be processed.
[0033] Thirdly, embodiments of this application provide a packet forwarding address update apparatus, the apparatus comprising:
[0034] The update instruction unit is configured to execute a path update instruction in response to determine the shortest path from the first node to each node in the autonomous network.
[0035] A node confirmation unit is configured to perform a comparison, for any node in the autonomous network, between the shortest path ending at that node and a pre-stored historical path ending at that node; if the shortest path differs from the historical path, then that node is a problem node; wherein the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to a path update instruction.
[0036] The next-hop block unit is configured to select a first next-hop block corresponding to any node from a pre-stored set of next-hop blocks if any node is a problem node; wherein each next-hop block in the pre-stored set of next-hop blocks is an index for determining the forwarding address of a packet; each next-hop block in the pre-stored set of next-hop blocks is associated with a set of nodes for indicating the address of the next-hop block and a set of prefixes for matching packets, and any node is in the set of nodes associated with the first next-hop block;
[0037] The address update unit is configured to update the address of the first next-hop block based on the shortest path from the first node to any of the nodes.
[0038] In some possible embodiments, each node in the autonomous network has at least one routing prefix; the node set consists of at least one node in the autonomous network, and the prefix set consists of at least one routing prefix in the autonomous network; the apparatus further includes:
[0039] The association unit is configured to determine the set of nodes and the set of prefixes associated with the next-hop block in the following manner:
[0040] For each route prefix, a second node is selected from the nodes under the route prefix based on the multiple historical paths;
[0041] Construct a next-hop block associated with the route prefix, and associate the node set containing all second nodes with the next-hop block;
[0042] For each next-hop block, all routing prefixes associated with the next-hop block are used as the prefix set associated with the next-hop block.
[0043] In some possible embodiments, the process of selecting a second node from the nodes under the routing prefix based on the multiple historical paths is performed, and the association unit is configured as follows:
[0044] A first historical path is selected from the historical paths, with the node under the routing prefix as the path endpoint, and a second historical path is determined based on the cost value of each first historical path; the cost value of each historical path is determined based on the bandwidth of the nodes along the path.
[0045] The node located at the end of the second historical path is designated as the second node.
[0046] In some possible embodiments, the address of each next-hop block is determined by the following method:
[0047] After constructing the next-hop block associated with the routing prefix, determine the union of the next-hop addresses of each of the second historical paths;
[0048] The union is used as the address of the next hop block.
[0049] In some possible embodiments, before executing the construction of the next-hop block associated with the routing prefix, the association unit is further configured to:
[0050] It is determined that the node set does not have an associated next-hop block;
[0051] After selecting the second node from the nodes under the routing prefix based on the historical path, the association unit is further configured as follows:
[0052] If the node set is already associated with a next-hop block, then the routing prefix is associated with the already associated next-hop block.
[0053] In some possible embodiments, the address update unit is configured to update the address of the first next-hop block based on the shortest path from the first node to any of the nodes.
[0054] For any third node, a target historical path with the third node as the path endpoint is selected from the historical paths; wherein, the third node is any node in the node set associated with the first next-hop block;
[0055] If the union of the next-hop addresses of each target historical path is different from the next-hop address of the shortest path, then the next-hop address of the shortest path is updated to the address of the first next-hop block.
[0056] Fourthly, embodiments of this application also provide a routing communication device, the device comprising:
[0057] The message receiving unit is configured to receive messages to be processed and determine the routing prefix in the autonomous network that matches the destination address of the message;
[0058] The association confirmation unit is configured to select a second next-hop block from a pre-stored next-hop block based on the matched routing prefix; wherein each next-hop block in the pre-stored next-hop block is associated with a set of nodes indicating the address of the next-hop block and a set of prefixes for matching packets; the prefix set associated with the second next-hop block contains the matched routing prefix;
[0059] The message forwarding unit is configured to perform a forwarding operation on the message to be processed by using the address of the second next-hop block as the forwarding address of the message to be processed.
[0060] Fifthly, embodiments of this application also provide a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform any of the methods provided in the first or second aspect of this application.
[0061] Sixthly, embodiments of this application also provide a computer program product, including a computer program that, when executed by a processor, implements any of the methods provided in the first or second aspect of this application.
[0062] In this embodiment, when path updates occur in the autonomous network, the shortest path from the first node to all nodes in the autonomous network is determined. The node is then compared with its historical path to determine if it is a problem node. If the node is a problem node, the address of the first next-hop block corresponding to that node is updated based on the shortest path from the first node to it. The pre-stored next-hop block in this application is an index representing the forwarding address of a packet. The above process quickly locates the problem node and updates the address of its corresponding next-hop block, thereby updating the next-hop address corresponding to the routing prefix in the associated prefix set of the next-hop block—that is, updating the packet's forwarding address. This process eliminates the need to re-determine the next-hop address of each routing prefix based on the shortest path of all nodes during path updates, saving computational power and improving network performance.
[0063] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0064] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 This is a schematic diagram of the communication links between nodes in an autonomous network as shown in an embodiment of this application;
[0066] Figure 2 This is a schematic diagram illustrating the correspondence between nodes and routing prefixes in an embodiment of this application;
[0067] Figure 3 This is a schematic diagram illustrating the shortest path from node R6 to R1 in an embodiment of this application;
[0068] Figure 4 A flowchart illustrating the construction of the routing prefix table for the first node shown in this embodiment of the application;
[0069] Figure 5 This is a schematic representation of the historical path shown in the embodiments of this application;
[0070] Figure 6 The node representation shown in the embodiments of this application is intended to illustrate the concept.
[0071] Figure 7 This is a schematic diagram illustrating how to obtain the second node under the routing prefix, as shown in an embodiment of this application.
[0072] Figure 8 This is a schematic diagram illustrating how to obtain the second node under the routing prefix, as shown in an embodiment of this application.
[0073] Figure 9 This is a schematic diagram illustrating how to obtain the second node under the routing prefix, as shown in an embodiment of this application.
[0074] Figure 10 This is a schematic representation of the next-hop block shown in the embodiments of this application;
[0075] Figure 11 This is an illustration of a routing prefix representation in an embodiment of this application;
[0076] Figure 12 This is an overall flowchart illustrating a message forwarding address update method according to an embodiment of this application;
[0077] Figure 13 This is a schematic diagram illustrating the selection of a first next-hop block from the next-hop block table, as shown in an embodiment of this application.
[0078] Figure 14The association shown in the embodiments of this application is intended to represent the intended meaning;
[0079] Figure 15 This is a schematic diagram illustrating the historical path update in an embodiment of this application;
[0080] Figure 16 This is a schematic diagram illustrating the next-hop address update of the next-hop block in an embodiment of this application;
[0081] Figure 17 This is an overall flowchart illustrating a routing communication method according to an embodiment of this application;
[0082] Figure 18 This is a structural diagram of a message forwarding address update device shown in an embodiment of this application;
[0083] Figure 19 This is a structural diagram of a routing communication device shown in an embodiment of this application;
[0084] Figure 20 This is a schematic diagram of an electronic device shown in an embodiment of this application. Detailed Implementation
[0085] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " will mean "or", for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.
[0086] In the description of the embodiments of this application, unless otherwise stated, the term "multiple" refers to two or more, and other quantifiers are similarly understood. The preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0087] To further illustrate the technical solutions provided in the embodiments of this application, a detailed description is provided below in conjunction with the accompanying drawings and specific implementation methods. Although the embodiments of this application provide method operation steps as shown in the following embodiments or drawings, more or fewer operation steps may be included in the method based on conventional or non-inventive effort. For steps that do not logically have a necessary causal relationship, the execution order of these steps is not limited to the execution order provided in the embodiments of this application. In actual processing or when the control device executes the method, it may be executed sequentially or in parallel according to the method shown in the embodiments or drawings.
[0088] Compared to traditional distance-vector routing protocols, link-state routing protocols are more suitable for large networks. In autonomous networks using link-state routing protocols, nodes no longer simply learn routes from neighboring nodes. Instead, they advertise their own link-state information and simultaneously collect link-state information from other nodes. The protocol then determines the next-hop address for each routing prefix in the autonomous network. Thus, when a node receives a packet, it can match the packet's destination address with the routing prefixes in the autonomous network and use the next-hop address corresponding to the matched prefix as the forwarding address for the packet.
[0089] In an autonomous network (ANR), the routing prefixes are determined based on the services that the ANR itself can provide, and each routing prefix in the ANR has a specified number of nodes under it. For example... Figure 1 The autonomous network shown contains 6 nodes, R1 to R6. The nodes under each route prefix in this autonomous network (i.e., the correspondence between each node and the route prefix) can be represented as follows: Figure 2 As shown.
[0090] This correspondence is used to determine the services that a node can provide; that is, each node under any given routing prefix has the capability to provide the services corresponding to that routing prefix. For example... Figure 2 The node R1 shown in the figure has the function of providing services corresponding to the eight route prefixes 100.1.1.1 / 32 to 100.1.1.5 / 32, 110.12.1.0 / 24, 110.14.1.0 / 24 and 110.15.1.0 / 24.
[0091] When path updates occur in an autonomous network, the shortest path between nodes changes, causing the next-hop address corresponding to some routing prefixes to fail to reach the path's endpoint. As mentioned earlier... Figure 1 The autonomous network shown is an example, specifically as follows: Figure 3 As shown, there are two shortest paths between nodes R6 and R1. Path 1 is a jump from R6 to R4 and then to R1, while path 2 is a jump from R6 to R5 and then to R1.
[0092] For example Figure 3 In the illustrated autonomous network, a path update disrupts the direct path between nodes R1 and R4, meaning it's no longer possible to directly jump to R1 via R4. If a request message received by node R6 has a destination address pointing to node R1, it can no longer reach node R1 via path 1. Therefore, a new forwarding address for the message needs to be determined.
[0093] Current solutions often involve recalculating the shortest topological paths between all nodes in the autonomous network during path updates, and then re-determining the next-hop address for each routing prefix based on the calculation results. However, the larger the autonomous network, the more routing prefixes it has. This method of re-determining all routing prefixes in the network during path updates consumes significant computing resources and impacts network performance.
[0094] To address the aforementioned issues, the inventive concept of this application is as follows: When path updates occur in an autonomous network, the shortest path from the first node to all nodes in the autonomous network is determined. Based on the comparison between the shortest path of any node and historical paths, it is determined whether the node is a problem node. If the node is a problem node, the address of the first next-hop block corresponding to that node is updated based on the shortest path from the first node to that node. The next-hop block pre-stored in this application is an index representing the forwarding address of a packet. Through the above process, the problem node can be quickly located and the address of the next-hop block corresponding to the problem node can be updated, thereby completing the update of the next-hop address corresponding to the routing prefix in the associated prefix set of the next-hop block, i.e., the update of the packet's forwarding address. This process eliminates the need to re-determine the next-hop address of each routing prefix based on the shortest path of all nodes during path updates, saving computational power and improving network performance.
[0095] As mentioned earlier, an autonomous network (AfN) uses routing prefixes to provide services, and each routing prefix corresponds to at least one node within that AfN. When a client sends a traffic request, the request packet is forwarded to a node to provide the client with the service corresponding to that node's routing prefix.
[0096] In this embodiment, during the deployment phase, a routing prefix table for each node is pre-determined based on the link status of each node in the autonomous network. This routing prefix table is used to match the destination address of packets and then determine the forwarding address of the packets. When a client sends a traffic request to a node, the node queries the routing prefix table based on the destination address of the packet to determine the forwarding address of the packet. The following describes how this embodiment constructs the routing prefix table for each node, specifically as follows: Figure 4 As shown:
[0097] Step 401: Determine the shortest path from the first node to each node in the autonomous network, and use the shortest path as the historical path;
[0098] The first node is the node that needs to determine its own routing prefix table. For the sake of explaining the technical solution of this application, the following examples will all refer to the aforementioned node. Figure 1 and Figure 2The example of node R6 in the autonomous network illustrates how node R6 determines its routing prefix table based on the link information of the remaining nodes R1 to R5 in the autonomous network.
[0099] In implementation, as mentioned above Figure 1 Taking the autonomous network shown as an example, the reachable paths from the first node to the remaining nodes are determined using path algorithms such as Dijkstra's algorithm. Taking R6 as the first node, as described above... Figure 1 As shown, there are two shortest paths between nodes R6 and R1. Path 1 is a jump from R6 to R4 and then to R1, while path 2 is a jump from R6 to R5 and then to R1.
[0100] Furthermore, the cost of each path can be calculated based on the bandwidth of each node along that path. This cost represents the resources required for a message to be forwarded from R6 to R1. Thus, the path with the lowest cost can be selected as the shortest path between R6 and R1. This allows us to determine the topological shortest path between nodes in the autonomous network.
[0101] To facilitate the explanation of the technical solutions of the embodiments of this application, it is assumed in the following examples that the bandwidth of each node is the same, that is, the cost required for each node is 1.
[0102] As mentioned above Figure 1 Taking the illustrated autonomous network as an example, both paths from node R6 to R1 require passing through either R4 or R5. This means both paths involve two hops. Assuming equal bandwidth for all nodes, and since the cost per node is 1, the cost of both paths is 2. Therefore, both paths are considered the shortest paths between R6 and R1.
[0103] After determining the shortest paths from the first node to the remaining nodes in the autonomous network through the above process, each shortest path can be stored as a historical path. Figure 5 The historical path table shown represents the shortest path from the first node R6 to the remaining nodes R1 to R5.
[0104] Next, a node table is constructed based on the next-hop addresses of each historical path. This node table shows the next-hop addresses of historical paths from the first node to other nodes within the autonomous network, as well as the cost values of those paths. Specifically, as follows... Figure 6 As shown, with Figure 6Taking the first row of data in the node table as an example, this row of data indicates the next-hop address (i.e., the address of node R4) of each historical path from the first node R6 to node R1.<Gi0 / 0,110.46.1.4> and the address of node R5<Gi0 / 0,110.56.1.5> ), and the cost value of each historical path.
[0105] It should be noted that the next-hop address of a historical path represents the next-hop address from the current node to the grid device at the end of the historical path. As mentioned above... Figure 5 Taking the historical path “R6→R5→R1” as an example, the next hop address of this historical path is the address of node R5.
[0106] Step 402: For each route prefix, select the second node from the nodes under the route prefix based on the historical path;
[0107] In this embodiment, a first historical path is selected from all historical paths, with the node under the routing prefix as the path endpoint. Then, a second historical path is determined based on the cost value of each first historical path.
[0108] In practice, the second historical path with the lowest cost value can be selected from the first historical paths, and the node located at the end of the second historical path can be designated as the second node. The second historical path can contain one or more paths, so the number of second nodes can also be one or more.
[0109] Taking the route prefix 100.1.1.1 / 32 as an example, the specific details are as follows: Figure 7 As shown above. Figure 2 The table showing the mapping between nodes and route prefixes indicates that node R1 is under route prefix 100.1.1.1 / 32. Therefore, from the aforementioned... Figure 5 The historical path table shown selects the first historical paths "R6→R4→R1" and "R6→R5→R1" with R1 as the path endpoint. Next, the second historical path with the lowest cost value is selected from all the first historical paths. Since both of these first historical paths have 2 hops (i.e., a cost value of 2), they are both considered second historical paths. Therefore, node R1, located at the path endpoint of the second historical path, is designated as the second node of the route prefix 100.1.1.1 / 32.
[0110] In the example above, there is only one node R1 under the route prefix. The following explanation uses the route prefix 110.14.1.0 / 24 as an example. Figure 8 As shown above. Figure 2The table showing the mapping between nodes and route prefixes indicates that the nodes under the route prefix 110.14.1.0 / 24 are R1 and R4. At this point, from the aforementioned... Figure 5 The historical paths shown are used to identify the paths from node R6 to R1 and R4: "R6→R4→R1", "R6→R5→R1", and "R6→R4". These are taken as the first historical paths. It is clear that the historical paths from node R6 to R1 all require two hops, while the historical paths to node R4 only require one hop. Therefore, "R6→R4" is selected as the second historical path, and node R4, located at the end of the second historical path, is designated as the second node of the route prefix 110.14.1.0 / 24.
[0111] For example, let's take the route prefix 110.12.1.0 / 24 as an example. Figure 9 As shown above, in the aforementioned Figure 2 The table showing the mapping between nodes and route prefixes shows that the nodes under the route prefix 110.12.1.0 / 24 are R1 and R2. At this point, from the aforementioned... Figure 5 The historical paths shown are used to identify the first historical paths from node R6 to R1 and R2, including: "R6→R4→R1", "R6→R5→R1", "R6→R5→R2", and "R6→R5→R2", totaling four first historical paths. Since the cost value of each first historical path obtained here is 2, each first historical path is considered a second historical path. Finally, nodes R1 and R2 located at the end of the second historical paths are both designated as the second nodes of the route prefix 110.12.1.0 / 24.
[0112] Therefore, the second node under each route prefix can be obtained through the above process.
[0113] Step 403: Construct the next-hop block associated with the routing prefix, and associate the node set containing all second nodes with the next-hop block; for each next-hop block, use all routing prefixes associated with the next-hop block as the prefix set associated with the next-hop block.
[0114] As mentioned above Figure 7 Taking the route prefix 100.1.1.1 / 32 as an example, let's illustrate this further. Figure 7 Following the second node R1 of the route prefix 100.1.1.1 / 32 shown, a node set {R1} containing all second nodes is constructed. Then, it is checked whether the pre-stored next-hop block table contains a next-hop block associated with this node set. That is, whether the node set {R1} has an associated next-hop block in the next-hop block table.
[0115] If not, a next-hop block Nhb_1 associated with the routing prefix (i.e., 100.1.1.1 / 32) corresponding to the node set is constructed. After constructing the next-hop block associated with the routing prefix, the union of the next-hop addresses of each second historical path is determined, and this union is used as the address indicated by the next-hop block.
[0116] Taking the aforementioned next-hop block Nhb_1 as an example, its associated node set is {R1}, as described above. Figure 4 and Figure 5 As shown, the next-hop addresses of the historical paths ending at node R1 are the addresses of nodes R4 and R5, respectively. Therefore, the union of the addresses of nodes R4 and R5 is {<Gi0 / 0,110.46.1.4> ,<Gi0 / 1,110.56.1.5>} is the address of the next hop block Nhb_1.
[0117] Accordingly, if the node set is already associated with a next-hop block, the routing prefix is associated with the already associated next-hop block. As mentioned above... Figure 2 Taking the route prefix 100.1.1.2 / 32 as an example, the second node of this route prefix is R1, that is, the node set is {R1}. Since the next-hop block Nhb_1 associated with the node set {R1} already exists in the next-hop block table, it is only necessary to associate the route prefix 100.1.1.2 / 32 with the next-hop block Nhb_1.
[0118] Therefore, by constructing each node under each routing prefix in the autonomous network through steps 402-403, we can obtain the following... Figure 10 The next-hop block table shown contains the set of nodes associated with each next-hop block, and the next-hop address of the historical path with each node in the set as the path endpoint (i.e., the address indicated by the next-hop block).
[0119] Step 404: Construct a routing prefix table to indicate the packet forwarding address based on the node set and prefix set associated with each next-hop block;
[0120] In implementation, after obtaining the node set prefix set associated with each next-hop block through step 403, the node set associated with each next-hop block, the routing prefix set, and the source node set are interconnected to construct a structure as follows: Figure 11 The routing prefix table shown is used. Among them, Figure 11 The set of source nodes associated with any next-hop block shown is determined based on the prefix set of that next-hop block, which is the union of all nodes under all routing prefixes in that prefix set.
[0121] Therefore, after receiving a packet, the first device matches the packet's destination address with each routing prefix in the routing prefix table, selecting the matching routing prefix. It then locates the next-hop block associated with the prefix set containing the matching routing prefix. Finally, it determines the packet's forwarding address based on the next-hop address of that next-hop block.
[0122] The following describes a method for updating the forwarding address of a message provided in an embodiment of this application, specifically as follows: Figure 12 As shown, it includes the following steps:
[0123] Step 121: In response to the path update instruction, determine the shortest path from the first node to each node in the autonomous network;
[0124] The technical solution of this application embodiment is applied to any node in an autonomous network, hereinafter referred to as the first node. Communication paths exist between nodes in an autonomous network. When a path is reset or fails within the autonomous network, the originally reachable communication path between nodes will be interrupted.
[0125] As mentioned above Figure 1 For example, "R6→R4→R1" is a reachable communication path between nodes R6 and R1. Suppose that the communication paths of each node in the autonomous network are reset, the original... Figure 1 When the direct communication path "R4→R1" between R4 and R1 is no longer applicable, or when this path fails, it indicates that R6 cannot communicate with R1 by hopping to R4. In this case, the autonomous network will notify all nodes in the network of a path update instruction. After receiving this instruction, the first node calculates the shortest path from the first node to each node in the autonomous network using path algorithms such as Dijkstra's algorithm mentioned earlier.
[0126] Step 122: For any node in the autonomous network, compare the shortest path ending at the node with the pre-stored historical paths ending at the node; if the shortest path is different from the historical path, then the node is a problem node; wherein, the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to the path update instruction.
[0127] During implementation, the shortest path calculated in the aforementioned steps is compared with... Figure 5 The historical paths in the historical path table are compared. If the shortest path ending at a given node is different from a historical path ending at that node, then that node is identified as a problem node.
[0128] Specifically, the historical paths from node R6 to R1 are "R6→R4→R1" and "R6→R5→R1". Assuming that the direct communication path "R4→R1" between nodes R1 and R4 is interrupted due to path updates, then the only shortest path from R6 to R1 is now "R6→R5→R1". Since this shortest path from R6 to R1 differs from the historical paths, this shortest path "R6→R5→R1" is the true shortest path, and node R1, the endpoint of this shortest path, is the problem node.
[0129] Step 123: If any node is a problem node, then select the first next-hop block corresponding to any node from the pre-stored next-hop blocks; wherein, each next-hop block in the pre-stored next-hop blocks is an index used to determine the forwarding address of the packet; each next-hop block in the pre-stored next-hop blocks is associated with a set of nodes used to indicate the address of the next-hop block and a set of prefixes used to match the packet, and any node is in the set of nodes associated with the first next-hop block;
[0130] After identifying the problem nodes in the autonomous network through the above steps, the next step is to proceed from the aforementioned... Figure 10 The first next-hop block associated with the problem node is selected from the next-hop block table shown.
[0131] Taking the aforementioned problem node R1 as an example, then from the aforementioned Figure 10 The next-hop block table shown identifies the first next-hop block associated with R1. In specific implementation, as follows... Figure 13 As shown, since the node sets associated with next-hop blocks Nhb_1 and Nhb_6 both contain the problem node R1, next-hop blocks Nhb_1 and Nhb_6 are designated as the first next-hop blocks.
[0132] In some possible embodiments, after the next-hop block table is established during the deployment phase, it can also be constructed based on the nodes in the associated node set of each next-hop block. Figure 14 The table showing the associations between nodes and next-hop blocks is presented. This table indicates the next-hop block associated with each node in the autonomous mesh. After determining the problem node as R1 during the aforementioned steps, it can be determined from the aforementioned... Figure 14 The association table shown quickly locates the first next-hop blocks Nhb_1 and Nhb_6 associated with the problem node R1.
[0133] Step 124: Update the address of the first next-hop block according to the shortest path from the first node to any of the nodes.
[0134] After identifying any node in step 122 as a problem node, the historical paths ending at that problem node are first updated using the shortest path to that problem node. (Continuing with the aforementioned...) Figure 1Taking the autonomous network shown as an example, if the problem node is R4, the historical path "R6→R4" from R6 to R4 is not a path. Therefore, the shortest path between R6 and R4 recalculated at this time is... Figure 1 The diagram shows "R6→R4→R2→R4" and "R6→R5→R2→R4". Clearly, the recalculated shortest path is different from the original historical path. Therefore, "R6→R4→R2→R4" and "R6→R5→R2→R4" are updated to reflect the historical path from R6 to R4.
[0135] For example, when the problem node is R1, specifically as follows: Figure 15 As shown. The shortest path from R6 to R1 currently includes only the path "R6→R5→R1". At this point, the aforementioned... Figure 5 The historical path "R6→R4→R1" corresponding to R1 in the historical path table shown is deleted, and the aforementioned path is also deleted simultaneously. Figure 6 The next-hop address corresponding to R1 in the node table shown is "<Gi0 / 0,110.46.1.4> ,<Gi0 / 1,110.56.1.5> "representing the R4 address"<Gi0 / 0,110.46.1.4> "Delete. This completes the update of the historical path."
[0136] Next, when executing step 123, each node in the set of associated nodes of the first next-hop block (hereinafter referred to as the third node) is determined through the routing prefix table. For any third node, the target historical path with the third node as the path endpoint is determined from each historical path table.
[0137] If the union of the next-hop addresses of each target historical path is different from the next-hop address of the shortest path, then the next-hop address of the shortest path is updated to the address of the first next-hop block.
[0138] After comparing and updating the next-hop block address, the historical path is updated to the shortest path from the first node to each node in the autonomous network. It can be understood that this update step can also be performed after step 122, that is, after comparing the shortest path from the current first node to any node with the historical path with the node as the path endpoint in the pre-stored historical path, the historical path is updated to the shortest path from the first node to any node.
[0139] Specifically, such as Figure 16 As shown, after determining the first next-hop blocks Nhb_1 and Nhb_6 associated with the problem node R1 through the aforementioned steps, from the aforementioned... Figure 10The next-hop block table shown identifies the node sets associated with the first next-hop blocks Nhb_1 and Nhb_6. Specifically, the node set associated with the first next-hop block Nhb_1 is {R1}, and the node set associated with the first next-hop block Nhb_6 is {R1, R2}.
[0140] For the first next-hop block Nhb_1, from the aforementioned Figure 6 The node table shown determines the next-hop address corresponding to R1.<Gi0 / 1,110.56.1.5> ", because the next hop address was changed from the original<Gi0 / 0,110.46.1.4> “<Gi0 / 1,110.56.1.5> "Change to the current"<Gi0 / 1,110.56.1.5> Therefore, the aforementioned Figure 10 The address indicated by the next hop block Nhb_1 shown is updated to "<Gi0 / 1,110.56.1.5> This completes the address update process for the first next-hop block Nhb_1.
[0141] For the first next-hop block Nhb_6, from the aforementioned Figure 6 The node table shown determines the next-hop addresses for R1 and R2 as follows:<Gi0 / 1,110.56.1.5> "and"<Gi0 / 0,110.46.1.4> ,<Gi0 / 1,110.56.1.5> At this point, although the next-hop address corresponding to R1 has been updated, the union of the next-hop addresses corresponding to R1 and R2 is still "".<Gi0 / 0,110.46.1.4> ,<Gi0 / 1,110.56.1.5> Since the next-hop address of the shortest path currently being calculated is the same, there is no need to update the first next-hop block Nhb_6.
[0142] Next, combine Figure 17 The routing communication method provided in this application illustrates how to determine the forwarding address of a packet through the next-hop block of this application, as shown in the following details. Figure 17 As shown, it includes:
[0143] Step 1701: Receive the message to be processed and determine the routing prefix in the autonomous network that matches the destination address of the message;
[0144] Step 1702: Select a second next-hop block from the pre-stored next-hop blocks according to the matched routing prefix; wherein, each next-hop block in the pre-stored next-hop blocks is associated with a set of nodes for indicating the address of the next-hop block and a set of prefixes for matching packets; the prefix set associated with the second next-hop block contains the matched routing prefix;
[0145] Step 1703: Use the address of the second next-hop block as the forwarding address of the message to be processed, and perform a forwarding operation on the message to be processed.
[0146] During implementation, after the first node receives the message to be processed, it will match the destination address of the message to be processed with the aforementioned... Figure 11 The routing prefix table shown is used for matching. Specifically, the destination address is matched against the prefix set of each next-hop block to select the next-hop block that matches the destination address. Then, the aforementioned... Figure 10 The next-hop block table determines the address of the next-hop block.
[0147] If there are multiple addresses for the next-hop block, a reasonable strategy can be set, such as using a hash algorithm to select a unique address from multiple addresses and using that address as the forwarding address for the message to be processed, and then forwarding the message to be processed.
[0148] The technical solution of this application can quickly locate the next-hop block affected by the problematic node during path updates, and update the address of that next-hop block according to the next-hop address indicated by the current shortest path of the problematic node. This completes the update of the packet forwarding address. The entire process does not require re-decision-making for all routing prefixes of the autonomous network, saving computing power and improving network performance.
[0149] Based on the same inventive concept, this application also provides a message forwarding address update device 180, specifically as follows: Figure 18 As shown, the device includes:
[0150] The update instruction unit 181 is configured to perform a path update instruction in response to determine the shortest path from the first node to each node in the autonomous network.
[0151] The node confirmation unit 182 is configured to perform a comparison for any node in the autonomous network, comparing the shortest path ending at the node with a pre-stored historical path ending at the node; if the shortest path is different from the historical path, then the node is a problem node; wherein the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to the path update instruction.
[0152] Next-hop block unit 183 is configured to perform the following operation: if any node is a problem node, select a first next-hop block corresponding to any node from a pre-stored next-hop block; wherein each next-hop block in the pre-stored next-hop block is an index for determining the forwarding address of a packet; each next-hop block in the pre-stored next-hop block is associated with a set of nodes for indicating the address of the next-hop block and a set of prefixes for matching packets, and the any node is in the set of nodes associated with the first next-hop block;
[0153] Address update unit 184 is configured to update the address of the first next-hop block based on the shortest path from the first node to any of the nodes.
[0154] In some possible embodiments, each node in the autonomous network has at least one routing prefix; the node set consists of at least one node in the autonomous network, and the prefix set consists of at least one routing prefix in the autonomous network; the apparatus further includes:
[0155] The association unit is configured to determine the set of nodes and the set of prefixes associated with the next-hop block in the following manner:
[0156] For each route prefix, a second node is selected from the nodes under the route prefix based on the multiple historical paths;
[0157] Construct a next-hop block associated with the route prefix, and associate the node set containing all second nodes with the next-hop block;
[0158] For each next-hop block, all routing prefixes associated with the next-hop block are used as the prefix set associated with the next-hop block.
[0159] In some possible embodiments, the process of selecting a second node from the nodes under the routing prefix based on the multiple historical paths is performed, and the association unit is configured as follows:
[0160] A first historical path is selected from the historical paths, with the node under the routing prefix as the path endpoint, and a second historical path is determined based on the cost value of each first historical path; the cost value of each historical path is determined based on the bandwidth of the nodes along the path.
[0161] The node located at the end of the second historical path is designated as the second node.
[0162] In some possible embodiments, the address of each next-hop block is determined by the following method:
[0163] After constructing the next-hop block associated with the routing prefix, determine the union of the next-hop addresses of each of the second historical paths;
[0164] The union is used as the address of the next hop block.
[0165] In some possible embodiments, before executing the construction of the next-hop block associated with the routing prefix, the association unit is further configured to:
[0166] It is determined that the node set does not have an associated next-hop block;
[0167] After selecting the second node from the nodes under the routing prefix based on the historical path, the association unit is further configured as follows:
[0168] If the node set is already associated with a next-hop block, then the routing prefix is associated with the already associated next-hop block.
[0169] In some possible embodiments, the address update unit is configured to update the address of the first next-hop block based on the shortest path from the first node to any of the nodes.
[0170] For any third node, a target historical path with the third node as the path endpoint is selected from the historical paths; wherein, the third node is any node in the node set associated with the first next-hop block;
[0171] If the union of the next-hop addresses of each target historical path is different from the next-hop address of the shortest path, then the next-hop address of the shortest path is updated to the address of the first next-hop block.
[0172] Based on the same inventive concept, this application also provides a routing communication device 190, specifically as follows: Figure 19 As shown, the device includes:
[0173] The message receiving unit 191 is configured to receive messages to be processed and determine the routing prefix in the autonomous network that matches the destination address of the message;
[0174] The association confirmation unit 192 is configured to select a second next-hop block from a pre-stored next-hop block based on the matched routing prefix; wherein each next-hop block in the pre-stored next-hop block is associated with a set of nodes indicating the address of the next-hop block and a set of prefixes for matching packets; the prefix set associated with the second next-hop block contains the matched routing prefix;
[0175] The message forwarding unit 193 is configured to perform a forwarding operation on the message to be processed by using the address of the second next-hop block as the forwarding address of the message to be processed.
[0176] The following reference Figure 20 This describes the electronic device 130 provided according to the technical solution of the embodiments of this application. It should be noted that... Figure 20 The electronic device 130 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0177] Specifically, such as Figure 20As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).
[0178] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0179] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.
[0180] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0181] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used in electronic device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0182] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 132 including instructions, which can be executed by the processor 131 of the aforementioned device to perform the aforementioned method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0183] In an exemplary embodiment, a computer program product is also provided, including a computer program / instructions that, when executed by a processor 131, implement either a message forwarding address update method or a routing communication method as provided in this application.
[0184] In an exemplary embodiment, various aspects of the message forwarding address update method and routing communication method provided in this application can also be implemented as a program product, which includes program code. When the program product is run on a computer device, the program code is used to cause the computer device to perform the steps in the message forwarding address update method or routing communication method according to the various exemplary embodiments of this application described above.
[0185] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0186] The program product for message forwarding address updates and routing communication according to embodiments of this application can be a portable compact disc read-only memory (CD-ROM) and include program code, and can run on an electronic device. However, the program product of this application is not limited thereto. In this document, the readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0187] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take many forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0188] The program code contained on the readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wired, fiber optic, RF, etc., or any suitable combination thereof.
[0189] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, and conventional procedural programming languages such as Java or similar languages. The program code can execute entirely on the user's electronic device, partially on the user's device, as a standalone software package, partially on the user's electronic device and partially on a remote electronic device, or entirely on a remote electronic device or server. In cases involving remote electronic devices, the remote electronic device can be connected to the user's electronic device via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external electronic device (e.g., via the Internet using an Internet service provider).
[0190] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0191] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0192] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0193] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable image scaling device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable image scaling device, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0194] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable image scaling device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0195] These computer program instructions can also be loaded onto a computer or other programmable image scaling device, causing a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0196] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0197] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for updating a forwarding address of a packet, characterized by, The method, applied to the first node in an autonomous network, includes: In response to a path update instruction, determine the shortest path from the first node to each node in the autonomous network. For any node in the autonomous network, the shortest path ending at that node is compared with the historical paths ending at that node in the pre-stored historical paths; if the shortest path is different from the historical path, then that node is a problem node; wherein, the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to the path update instruction. If any of the nodes is a problem node, then the first next-hop block corresponding to any of the nodes is selected from the pre-stored next-hop blocks; wherein, each next-hop block in the pre-stored next-hop blocks is an index used to determine the forwarding address of the packet; each next-hop block in the pre-stored next-hop blocks is associated with a set of nodes used to indicate the address of the next-hop block and a set of prefixes used to match the packet, and the any node is in the set of nodes associated with the first next-hop block; The address of the first next-hop block is updated based on the shortest path from the first node to any of the nodes.
2. The method of claim 1, wherein, Each node in the autonomous network has at least one routing prefix; the node set consists of at least one node in the autonomous network, and the prefix set consists of at least one routing prefix in the autonomous network; The set of nodes and prefixes associated with the next-hop block are determined in the following way: For each route prefix, a second node is selected from the nodes under the route prefix based on the multiple historical paths; Construct a next-hop block associated with the route prefix, and associate the node set containing all second nodes with the next-hop block; For each next-hop block, all routing prefixes associated with the next-hop block are used as the prefix set associated with the next-hop block.
3. The method of claim 2, wherein, The step of selecting the second node from the nodes under the routing prefix based on the multiple historical paths includes: A first historical path is selected from the historical paths, with the node under the routing prefix as the path endpoint, and a second historical path is determined based on the cost value of each first historical path; the cost value of each historical path is determined based on the bandwidth of the nodes along the path. The node located at the end of the second historical path is designated as the second node.
4. The method according to claim 3, characterized in that, The address of each next-hop block is determined by the following method: After constructing the next-hop block associated with the routing prefix, determine the union of the next-hop addresses of each of the second historical paths; The union is used as the address of the next hop block.
5. The method according to claim 2, characterized in that, Before constructing the next-hop block associated with the routing prefix, the method further includes: It is determined that the node set does not have an associated next-hop block; After selecting the second node from the nodes under the routing prefix based on the historical path, the method further includes: If the node set is already associated with a next-hop block, then the routing prefix is associated with the already associated next-hop block.
6. The method according to claim 5, characterized in that, The step of updating the address of the first next-hop block based on the shortest path from the first node to any of the nodes includes: For any third node, a target historical path with the third node as the path endpoint is selected from the historical paths; wherein, the third node is any node in the node set associated with the first next-hop block; If the union of the next-hop addresses of each target historical path is different from the next-hop address of the shortest path, then the next-hop address of the shortest path is updated to the address of the first next-hop block.
7. A routing communication method, characterized in that, The method, applied to the first node in an autonomous network, includes: Receive messages to be processed and determine the routing prefix in the autonomous network that matches the destination address of the message; A second next-hop block is selected from a pre-stored next-hop block based on the matching routing prefix; wherein each next-hop block in the pre-stored next-hop block is associated with a set of nodes for indicating the address of the next-hop block and a set of prefixes for matching packets; the prefix set associated with the second next-hop block contains the matching routing prefix; Use the address of the second next-hop block as the forwarding address of the message to be processed, and perform a forwarding operation on the message to be processed; The next-hop block is updated in the following way: In response to a path update instruction, determine the shortest path from the first node to each node in the autonomous network. For any node in the autonomous network, the shortest path ending at that node is compared with the historical paths ending at that node in the pre-stored historical paths; if the shortest path is different from the historical path, then that node is a problem node; wherein, the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to the path update instruction. If any of the nodes is a problem node, then the first next-hop block corresponding to any of the nodes is selected from the pre-stored next-hop blocks; wherein, each next-hop block in the pre-stored next-hop blocks is an index used to determine the forwarding address of the packet; each next-hop block in the pre-stored next-hop blocks is associated with a set of nodes used to indicate the address of the next-hop block and a set of prefixes used to match the packet, and the any node is in the set of nodes associated with the first next-hop block; The address of the first next-hop block is updated based on the shortest path from the first node to any of the nodes.
8. A message forwarding address update device, characterized in that, The device includes: The update instruction unit is configured to execute a path update instruction in response to determine the shortest path from the first node to each node in the autonomous network. The node confirmation unit is configured to perform a comparison for any node in the autonomous network, comparing the shortest path ending at that node with a pre-stored historical path ending at that node; if the shortest path differs from the historical path, then that node is a problem node; wherein the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to a path update instruction. The next-hop block unit is configured to select a first next-hop block corresponding to any node from a pre-stored set of next-hop blocks if any node is a problem node; wherein each next-hop block in the pre-stored set of next-hop blocks is an index for determining the forwarding address of a packet; each next-hop block in the pre-stored set of next-hop blocks is associated with a set of nodes for indicating the address of the next-hop block and a set of prefixes for matching packets, and any node is in the set of nodes associated with the first next-hop block; The address update unit is configured to update the address of the first next-hop block based on the shortest path from the first node to any of the nodes.
9. A routing communication device, characterized in that, The device includes: The message receiving unit is configured to receive messages to be processed and determine the routing prefix in the autonomous network that matches the destination address of the message; The association confirmation unit is configured to select a second next-hop block from a pre-stored next-hop block based on the matched routing prefix; wherein each next-hop block in the pre-stored next-hop block is associated with a set of nodes indicating the address of the next-hop block and a set of prefixes for matching packets; the prefix set associated with the second next-hop block contains the matched routing prefix; The message forwarding unit is configured to perform a forwarding operation on the message to be processed by using the address of the second next-hop block as the forwarding address of the message to be processed. The next-hop block is configured to be updated in the following manner: in response to a path update instruction, the shortest path from the first node to each node in the autonomous network is determined; for any node in the autonomous network, the shortest path ending at that node is compared with a pre-stored historical path ending at that node; if the shortest path differs from the historical path, then that node is a problem node; wherein the pre-stored historical path is the shortest path from the first node to each node in the autonomous network before responding to the path update instruction; if that node is a problem node, a first next-hop block corresponding to that node is selected from the pre-stored next-hop blocks; wherein each next-hop block in the pre-stored next-hop blocks is an index for determining the forwarding address of a packet; each next-hop block in the pre-stored next-hop blocks is associated with a set of nodes indicating the address of the next-hop block and a set of prefixes for matching packets, and that node is in the set of nodes associated with the first next-hop block; the address of the first next-hop block is updated according to the shortest path from the first node to that node.
10. An electronic device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the steps of the method according to any one of claims 1-6 or 7.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions that, when executed by a computer, cause the computer to perform the method as described in any one of claims 1-6 or 7.
Citation Information
Patent Citations
Data message forwarding method and device based on two-dimensional routing policy
CN105763454A