CN1996949A - A searching method for message forwarding path, router and network - Google Patents
A searching method for message forwarding path, router and network Download PDFInfo
- Publication number
- CN1996949A CN1996949A CNA2006101576907A CN200610157690A CN1996949A CN 1996949 A CN1996949 A CN 1996949A CN A2006101576907 A CNA2006101576907 A CN A2006101576907A CN 200610157690 A CN200610157690 A CN 200610157690A CN 1996949 A CN1996949 A CN 1996949A
- Authority
- CN
- China
- Prior art keywords
- sub
- path
- node
- spanning tree
- minimum spanning
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
This invention provides one method to index message transfer path in network, which comprises the following steps: dividing the transfer path into multiple sub paths according to the user interface and network relative information and setting the said user interface point as belonged second end punt; searching and determining each sub path initial point and end point minimum generation tree; re-tracking the minimum generation tree according to whether there is second end point to get sub path; connecting the said sub path to find out message transfer path.
Description
Technical Field
The present invention relates to network routing technologies, and in particular, to a method for searching a packet forwarding path, a router, and a network.
Background
In a multi-Protocol label switching (MPLS) traffic engineering for maximizing a network bandwidth, a Constrained Shortest Path First (CSPF) algorithm is usually used to search for a packet forwarding Path First, and then MPLS may establish a label switched Path according to a result of the packet forwarding Path search. The CSPF algorithm is extended based on a Shortest Path tree generation algorithm in a known Open Shortest Path First (OSPF) algorithm, but is different from the OSPF algorithm in that the CSPF algorithm is much more complex. In the CSPF algorithm, Link (Link) information on a network is first collected by an Interior Gateway Protocol (IGP) and then stored as a Link information base. When needed, the CSPF algorithm finds out a message forwarding path meeting the user requirement by using the information in the link information base according to a loose or strict path configured by the user. Therefore, in the search of a message forwarding path configured by a user, the CSPF algorithm may need to perform multiple searches, each search processes a segment of the path, the final search result is the connection of the path obtained by each search, and then MPLS may establish a label switched path according to the search result of the message forwarding path.
Fig. 1 shows a basic topology of a network, in which nodes A, B, C through H are routers in a network NET 1, each of which is connected to other nodes via interfaces, node a having interfaces a1, a2, node B having interfaces B1, B2, etc., as shown in fig. 1. In addition, the link Metric (Metric) value between each node is determined by the actual situation in the network as a measure of the link quality. Here, for convenience of explanation, it is assumed that the link metric value of the links between the nodes is 10 in the network NET 1 except for the link metric values of the nodes C to F being 100.
Therefore, each node in the network NET 1 stores the topology structure of the network, the interface information and the link metric value between each node and the network according to the IGP protocol, and the stored values are used as respective link information bases for the CSPF algorithm to use when needed.
The user may configure the packet forwarding path, for example, when configuring the path from the node a to the node H, the user may set that the packet forwarding path must pass through the interface F1 of the node F (here and throughout, the term passing through the specific interface of the specific node means that information enters the specific node from the specific interface of the specific node and is sent out from other interfaces of the specific node), so that, according to the existing CSPF algorithm, the whole path search needs to be performed in two stages, that is, the path from the node a to the node F corresponding to the interface F1 is searched first, and then the path from the node F to the final node H is searched. Wherein each segment of search is performed by the node according to the algorithm of the minimum spanning tree by using the information in the link information base.
Referring to fig. 2, a flow of the CSPF algorithm in the prior art is described as follows:
step 100, dividing the whole path into a plurality of sub-paths by taking the node of the interface to be passed as a boundary according to the interface to be passed set by a user and the node to be passed;
in the above case, since the user sets the interface F1 that the path needs to pass through the node F, the node a that wants to send information to the node H divides the entire path into the path from the node a to the node F and the two paths from the node F to the node H according to the user configuration of the node F corresponding to the interface F1 that the path needs to pass through.
in the case where the first sub-path is from node a to node F, the minimum spanning tree from node a to node F is obtained according to the minimum spanning tree algorithm with the link metric value of each link as a weight, as shown in fig. 3 (the solid line connection therein indicates the obtained minimum spanning tree). As can be seen from fig. 3, since the link metric value as a weight between the nodes C and F is large, the path from the node C to the node F in the minimum spanning tree selected by the algorithm is: from node C to E, then from node E to G, and then from node G to F (i.e., C → E, E → G, G → F). In addition, since the search for the node F is terminated, the node H is not included in the minimum spanning tree.
in the minimum spanning tree, one parent node may have a plurality of child nodes, and one child node may have only one parent node, so that a unique path can be obtained by tracing back from the destination node F to the start node a. As can be seen from fig. 3, the parent node of the node F is the node G, the parent node of the node G is the node E, and so on, and finally the path from the node a to the node F corresponding to the interface F1 is obtained by backtracking, that is, the sub-path (1) is: a (A2) - > C (C1) - > C (C2) - > E (E1) - > E (E2) - > G (G1) - > G (G2) - > F (F2), thereby completing the search of the first sub-path.
Since there is no other sub-path before the first sub-path, it is not necessary to determine whether the first sub-path includes a node in the previous sub-path, and the flow proceeds to step 103 directly.
103, searching a minimum spanning tree between the starting node and the destination node of the next sub-path to obtain the minimum spanning tree of the next sub-path;
when the next sub-path is from node F to node H, the minimum spanning tree is searched between node F and node H of the sub-path, where node F is the start node and node H is the destination node, and the minimum spanning tree obtained by the search is shown in fig. 4.
for the above example, it is found that the current sub path (2) includes the node G in the previous sub path (1), and therefore, it is determined that the sub path search fails.
Since the CSPF algorithm generally supports cross-domain search, when the sub-path search fails, the start node sequentially connects each start node and destination node of the previously successfully searched sub-path as a partially completed packet forwarding path, and after the label switched path is established by MPLS, the information to be sent is sent to the end node of the partially completed path, and the node then performs step 106: searching the next segment of message forwarding path and establishing a label switching path.
In the above example, the originating node a takes the sub-path (1) as a partially completed path and sends the information to be sent to the destination node F of the sub-path (1), and the node F performs a search for a new trunk forwarding path and establishment of a label switched path.
On the contrary, if step 105 determines that the search for the sub-path is successful, the following is:
Therefore, in the message forwarding path search before the label switching path is established, the CSPF algorithm in the prior art only concerns the search of the current sub-path, and cannot correlate before and after a plurality of searches. In the above sub-path search, the search of the sub-path from the node a to the node F and the search of the sub-path from the node F to the node H are independent of each other, so that it is easy to cause a case where the searched sub-path includes a node in the previously searched sub-path, that is, the sub-path search fails. This results in cross-domain computation, and when the first sub-path search is successful and the second sub-path search is failed, the corresponding information still needs to be transmitted to the F node, and the F node continues to perform the second sub-path search. And, at a certain interval, the CSPF will be forced to search the failed sub-path again, so that the node consumes a large amount of CPU resources to search the message forwarding path CSPF, which not only reduces the efficiency of searching the message forwarding path, but also reduces the performance of each node device. Therefore, the prior art CSPF algorithm has difficulty in handling complex network structures. However, for the user, if the failure of the path search is to be avoided, all nodes along the path can be configured, but this is neither operational nor practical.
Disclosure of Invention
Embodiments of the present invention provide a method for searching a packet forwarding path, a router, and a network, so as to solve the problem of failure in searching the packet forwarding path, thereby improving the efficiency of searching the packet forwarding path.
. . . . . (copy claim)
In the message forwarding path searching method, because the second end node corresponding to the interface to be passed through is arranged, in the process of searching the message forwarding path, in the process of backtracking the sub-path from the minimum spanning tree or under the condition that the second end node exists in the sub-path after obtaining the sub-path from the minimum spanning tree, the node between the second end node and the target node can be deleted, namely the second end node is directly arranged as the father node of the target node to obtain the modified sub-path, thereby preventing the condition that the subsequent sub-path search comprises the node obtained in the previous sub-path search and avoiding the failure of the sub-path search.
In addition, in the message forwarding path searching method of the present invention, since the second end node corresponding to the interface to be passed through is provided, in the message forwarding path searching process, or in the minimum spanning tree searching process, when the current node is determined to be the second end node, the current node is directly set as the parent node of the destination node, and the minimum spanning tree searching is ended. Thus, the workload and time of minimum spanning tree search can be reduced, the situation that nodes obtained in the previous sub-path search are included in the subsequent sub-path search is prevented, and the failure of sub-path search is avoided.
Furthermore, the invention improves the efficiency of searching the message forwarding path, saves network resource and CPU time and improves the performance of node equipment such as a router by avoiding the failure of searching the sub-path.
Drawings
FIG. 1 is a diagram illustrating a typical topology of a network;
FIG. 2 is a flow chart of a prior art message forwarding path searching method;
fig. 3 is a schematic diagram of a minimum spanning tree of a sub-path obtained in the existing message forwarding path search;
fig. 4 is a schematic diagram of a minimum spanning tree of another sub-path obtained in the existing message forwarding path search;
fig. 5 is a flowchart of an embodiment of a message forwarding path searching method of the present invention;
FIG. 6 is a diagram of a minimum spanning tree for a sub-path obtained by an embodiment of the method shown in FIG. 5;
fig. 7 is a schematic diagram of a packet forwarding path searched by the embodiment of the method shown in fig. 5;
fig. 8 is a flowchart of another embodiment of a message forwarding path searching method of the present invention;
fig. 9 is a schematic structural diagram of a first embodiment of a router provided in the present invention;
fig. 10 is a schematic structural diagram of a second embodiment of the router provided in the present invention;
fig. 11 is a schematic structural diagram of a third embodiment of a router provided in the present invention;
Detailed Description
In the invention, according to an interface needing to pass set by a user, a path is divided into a plurality of sub-paths by taking a node where the interface needing to pass is positioned as a boundary, and a second end node corresponding to the interface needing to pass is set corresponding to the interface needing to pass set by the user, wherein the second end node is defined as a node (router) connected with the interface needing to pass. According to the above setting, in the process of searching for the packet forwarding path, in the process of tracing back the sub-path from the minimum spanning tree or in the case that it is determined that the second end node exists in the sub-path after obtaining the sub-path from the minimum spanning tree, the node between the second end node and the destination node is deleted, and the second end node is directly set as the parent node of the destination node to obtain the modified sub-path, thereby preventing the subsequent sub-path search from including the node obtained in the previous sub-path search, and avoiding the failure of the sub-path search.
In addition, according to the above setting, in the packet forwarding path search process, when it is determined that the current node is the second end node in the minimum spanning tree search process, the current node may be directly set as the parent node of the destination node, and the minimum spanning tree search may be ended. Thus, the workload and time of minimum spanning tree search can be reduced, the situation that nodes obtained in the previous sub-path search are included in the following sub-path search is prevented, and the failure of sub-path search is avoided.
For example, for the network connection topology in fig. 1, in the process of configuring the path from node a to node H, the user sets that the path needs to pass through interface F1 of node F, and at this time, the total path is divided into two sub-paths from node a to node F and from node F to node H. At the interface F1 corresponding to the node F to be passed set by the user, the node C connected to the interface F1 is set as the second end node of the sub-path of the nodes a to F based on the connection information in the link information base.
Then, for the sub-path of the nodes a to F, since the second end node C is set, the search of the sub-path can be performed according to the set second end node (a specific search method will be described later), so that the search of the sub-path of the following nodes F to H can be associated with the search of the sub-path of the preceding nodes a to F, and the problem that the sub-path of the following nodes F to H contains the node in the sub-path of the nodes a to F which the search has been performed before is avoided.
As shown in fig. 5, a flowchart of a first embodiment of the message forwarding path searching method of the present invention is specifically as follows:
step 200, dividing the whole path into a plurality of sub-paths according to the interface which needs to pass and is set by the user, and setting a second end node according to the interface which needs to pass and is set by the user.
Here, the path division is performed according to the node of the interface to be passed set by the user, for example, if the interface F1 of the node F is used as the interface to be passed on the path from the node a to the node H, the path from the node a to the node H is divided into two segments, one segment is the path from the node a to the node F, and the other segment is the path from the node F to the node H. The second end node is defined relative to the first end node (destination node) of the divided sub-path, and when the whole path is divided into a plurality of sub-paths, the last sub-path is located at the downstream of the node of the last set interface to be passed, so that the second end node is not provided. In the above example from node a to node H, the upstream node C connected to the interface F1 of the node F to be passed through, which is set by the user, is set as the second end node.
It can be understood that, when N (N is greater than or equal to 1) interfaces to be passed are set, the path is divided into (N +1) sub-paths by using the node of the interface to be passed as a boundary, and a corresponding second end node is set for each sub-path in the first N sub-paths, where the second end node is connected to the corresponding interface to be passed.
For simplicity of explanation, a case where two sub paths are provided will be described below as an example. Assuming that the user has the interface F1 of the node F as an interface to be passed through on the path from the node a to the node H, the path from the node a to the node H is divided into a sub-path from the node a to the node F and a sub-path from the node F to the node H, and the node C connected to the interface F1 is taken as a second end node of the sub-path (first sub-path) from the node a to the node F.
Step 201, according to the network related information, such as the topology structure of the network, the interface information, and the link metric value between them, a minimum spanning tree between the starting node and the destination node of the first sub-path, i.e. the sub-path from node a to node F, is searched, and the minimum spanning tree obtained by the search is shown in fig. 3.
Step 202, in the process of backtracking and deriving the sub-path from the minimum spanning tree corresponding to the first sub-path, checking whether a second end node exists in the current sub-path, when the second end node is determined to exist, setting the second end node as the parent node of the destination node, and continuing backtracking to derive the sub-path.
For the minimum spanning tree shown in fig. 3, in step 202, during the process of back deriving the sub-path from the destination node F to the start node a, a partial sub-path of F (F2) - > G (G2) - > G (G1) - > E (E2) - > E (E1) - > C (C2) is obtained first, and since there is a second end node C in the partial sub-path, node C is directly set as the parent node of node F, a partial sub-path F (F1) - > C (C3) is obtained (as shown by the dashed line in fig. 3), and back tracing is continued, and finally a sub-path of nodes a to F is obtained: a (A2) - > C (C1) - > C (C3) - > F (F1) is named as sub-pathway (3).
Then, after the search of the sub-paths from the node a to the node F is completed, since the first sub-path does not include the node obtained in the previous sub-path search, the first sub-path does not need to judge whether the search is successful, and the step 203 is performed;
step 203, searching the minimum spanning tree between the starting node and the destination node of the next sub-path, i.e. the sub-path from node F to node H, and the minimum spanning tree obtained by searching is shown in fig. 4.
And 204, in the process of backtracking and deriving the sub-path from the minimum spanning tree corresponding to the next sub-path, checking whether a second end node exists in the current sub-path, and when determining that the second end node exists, directly setting the second end node as a parent node of the destination node, and continuing backtracking and deriving the sub-path.
For the minimum spanning tree shown in fig. 4, in step 204, a sub-path is derived from the destination node H to the start node F back to obtain F (F2) - > G (G2) - > G (G3) - > H (H1), which is named as sub-path (4). Since the sub-path from the node F to the node H is the last sub-path, in which no second end node is set, the second end node is not included in the sub-path obtained by backtracking, and the obtained sub-path (4) is the final sub-path.
Step 205, determine whether the current sub-path (4) includes the node in the previous sub-path (3). If yes, indicating that the current sub-path (4) search fails, executing step 206; if not, step 207 is performed. Here, since the previous sub-path is the sub-path (3), i.e., the node a (a2) - > C (C1) - > C (C3) — > F (F1), the current sub-path (4) does not include the node in the sub-path (3), so that the sub-path search of the node F to H succeeds.
Step 206, under the condition that the sub-path search is unsuccessful, connecting the completed sub-paths, and establishing a label switched path by MPLS as a path for the node a to send information. In the above example, the information may be sent to the node F through the label switched path established by the searched sub-path (3), and the node F performs the search of the new packet forwarding path and the establishment of the label switched path.
Step 207, judging whether the search of all the sub paths is finished, if so, executing step 208, otherwise, returning to step 203 to search the next sub path. In the above example, the search of all sub paths has been completed.
Step 208, connecting the searched sub-paths, thereby searching and obtaining a message forwarding path;
for the above example, the searched sub-path (3) is connected to the sub-path (4), so that the total path from A to H is A (A2) - > C (C1) - > C (C3) - > F (F1) - > F (F2) - > G (G2) - > G (G3) — > H (H1). Then, MPLS may establish the packet forwarding path as a label switched path, and then information may be sent.
It can be seen that, in the first embodiment of the method of the present invention, while dividing the sub-path according to the interface to be passed set by the user, the node connected to the interface to be passed set by the user is set as the second end node, and in the process of deriving the sub-path by backtracking the minimum spanning tree, for the sub-path in which the second end node is set, the current sub-path is corrected in time according to the second end node, so that the current sub-path does not include the node in the previously obtained sub-path, thereby avoiding the failure of sub-path search.
As a second embodiment of the present invention, in step 202, after obtaining a sub-path from the minimum spanning tree, it may be determined whether a second end node exists in the sub-path obtained by the backtracking, and when a second end node exists in the sub-path, the second end node may be directly set as a parent node of the destination node to obtain a modified sub-path.
For example, the sub-paths of nodes A to F are first traced back from the minimum spanning tree shown in FIG. 3: a (a2) - > C (C1) - > C (C2) - > E (E1) - > E (E2) - > G (G1) - > G (G2) - > F (F2), this sub-path is modified to a (a2) - > C (C1) - > C (C3) - > F (F1) because of the presence of the second end node C therein. Thus, the same result can be obtained. That is, the sub-path obtained by backtracking is corrected according to the second end node, so that nodes in the sub-path obtained by previous search are prevented from appearing in the sub-path obtained by current search.
The above embodiment describes the message forwarding path searching method of the present invention, taking the example that the sub-path is modified during the process of backtracking the sub-path from the minimum spanning tree after the minimum spanning tree is obtained or after the sub-path is backtracked.
The third embodiment of the message forwarding path searching method of the present invention is described in detail below, and as shown in fig. 8, the following specifically:
then, step 308, determining whether the searching of the minimum spanning tree of the current sub-path completes all node processing; if not, proceed to step 309; if the search is complete, go to step 304;
in step 309, the next node is read in, the node processing of the minimum spanning tree search is performed on the next node, and then the process returns to step 302 to perform the judgment again.
For better illustration of the present embodiment, the following is described in detail by way of example with reference to the network structure in fig. 1; for the network structure of fig. 1, node a has two child nodes, node B and node C. According to the setting in step 300, the total path of the nodes a to H is divided into two sub-paths from the nodes a to F and from the nodes F to H, and the node C connected to the interface F1 of the node F is set as the second end node of the sub-path of the nodes a to F.
When the determination result in step 302 is "yes", the flow proceeds to step 303, where the current node C, i.e., the second end node, is set as the parent node of the destination node F, and the search of the current minimum spanning tree is ended, and the obtained minimum spanning tree is shown in fig. 6. It can be seen that the minimum spanning tree in fig. 6 contains only A, C and F nodes. The method greatly saves the workload and time of minimum spanning tree search.
Next, at step 304, a sub-path is traced back from the minimum spanning tree obtained as shown in FIG. 6. Thus, the sub-path resulting from the minimal spanning tree backtracking of fig. 6 is a (a2) - > C (C1) - > C (C3) - > F (F1).
In step 305, it is determined whether the search of all sub paths is completed.
Since there is still a sub-path from node F to node H that is not searched, the flow proceeds to step 301 to start a minimum spanning tree search for the sub-path from node F to node H. Since the second end node is not set for the sub-path from F to H, go to the existing conventional minimum spanning tree search of steps 307 to 309 until all nodes are completed, the resulting minimum spanning tree is as shown in fig. 4, and then go to the trace back of step 304, the resulting sub-path is F (F2) - > G (G2) - > G (G3) - > H (H1).
It can be seen that, in the embodiment, by determining whether the currently searched node is the second end node in the search of the minimum spanning tree, and performing corresponding processing, the workload and time of the minimum spanning tree search can be reduced, and a situation that a subsequent sub-path search includes a node obtained in the previous sub-path search is prevented, thereby avoiding a failure of the sub-path search.
In summary, the above specific example is described by taking an example that a user sets an interface to be passed through on a packet forwarding path, and it should be understood that the method of the present invention may still be applied when the user sets a plurality of interfaces to be passed through on the packet forwarding path.
Also, it should be understood that software implementing the method of the present invention may be stored on a computer readable storage medium, which when executed, includes the steps of:
dividing a message forwarding path to be searched into a plurality of sub-paths according to an interface which needs to pass and related information of a network, wherein the interface needs to pass is set by a user, and a node which is connected with the interface which needs to pass and is set by the user is set as a second end node of the sub-path;
searching and determining a minimum spanning tree between a starting node and a destination node of each sub-path;
according to whether a second end node is set in each sub-path or not, backtracking is carried out in the corresponding minimum spanning tree obtained by searching to obtain sub-paths;
connecting the sub-paths obtained by backtracking so as to search and obtain a message forwarding path;
alternatively, the software, when executed, comprises the steps of:
dividing a to-be-searched reporting forwarding path into a plurality of sub-paths according to an interface which needs to pass and network related information set by a user, and setting a node connected with the interface which needs to pass and set by the user as a second end node of the sub-path to which the node belongs;
searching a minimum spanning tree between a starting node and a destination node of the sub-path according to the network related information and whether a second end node is set in the current sub-path;
backtracking the minimum spanning tree obtained by searching to obtain a sub-path;
connecting the sub-paths obtained by backtracking so as to search and obtain a message forwarding path;
the storage medium, such as: ROM/RAM, magnetic disk, optical disk, etc.
Correspondingly, the invention provides a router, which can be used as a node device in a network; the first embodiment of the router of the present invention is described below, and as shown in fig. 9, the first embodiment of the router includes:
a link information base 10 for storing the topology structure of the network, the interface information and the link metric values between each other;
a sub-path dividing module 20, which divides the forwarding path to be searched into a plurality of sub-paths according to the interface to be passed through set by the user and the information in the link information base, and sets the node connected to the interface to be passed through set by the user as the second end node of the sub-path to which the node belongs;
the minimum spanning tree searching module 30 determines a minimum spanning tree between the start node and the destination node of each sub-path according to the information in the link information base;
a sub-path backtracking module 40, configured to backtrack the corresponding minimum spanning tree determined by the minimum spanning tree searching module 30 according to whether a second end node is set in the current sub-path, so as to obtain a sub-path;
and a sub-path connection module 50, configured to connect the sub-path obtained by backtracking, as the message forwarding path obtained by searching.
As shown in fig. 9, the sub-path backtracking module 40 may specifically include: a check and backtracking submodule 401 and a setting submodule 402; wherein,
the checking and backtracking sub-module 401 is configured to check whether a second end node is set in the current sub-path, and when it is determined that the second end node is set in the sub-path and the second end node is backtracked in the minimum spanning tree corresponding to the sub-path determined by the minimum spanning tree search module 30, notify the setting sub-module 402;
the setting submodule 402 is configured to set the second end node as a parent node of the destination node after receiving the notification, and notify the checking and backtracking submodule 401;
the checking and backtracking sub-module 401 is configured to continue backtracking to obtain a sub-path after receiving the notification.
Alternatively, as shown in fig. 10, as a second embodiment of the router provided in the present invention, the sub-path backtracking module 40a may further specifically include: a trace back sub-module 401a and a check and set sub-module 402a, wherein,
the backtracking sub-module 401a is configured to perform backtracking in the minimum spanning tree determined by the minimum spanning tree search module 30 to obtain a sub-path;
the checking and setting sub-module 402a is configured to check whether the sub-path obtained by the backtracking includes a second end node, and when it is determined that the sub-path includes the second end node, set the second end node in the sub-path as a parent node of the destination node, obtain a modified sub-path, and output the modified sub-path to the sub-path connection module 50.
The third embodiment of the router of the present invention is described in detail below, and as shown in fig. 11, the third embodiment of the router of the present invention includes:
a link information base 10 for storing the topology structure of the network, the interface information and the link metric values between each other;
a sub-path dividing module 20, which divides the packet forwarding path to be searched into a plurality of sub-paths according to the information in the link information base 10 and the interface to be passed through set by the user, and sets the node connected to the interface to be passed through set by the user as a second end node of the sub-path to which the node belongs;
the minimum spanning tree searching module 30a searches for a minimum spanning tree between the start node and the destination node of the sub-path according to the information in the link information base 10 and whether a second end node is set in the current sub-path;
a sub-path backtracking module 40b, backtracking the minimum spanning tree obtained by the search to obtain a sub-path;
a sub-path connection module 50, configured to connect the sub-path obtained by backtracking, as the message forwarding path obtained by searching
As shown in fig. 10, the minimum spanning tree search module 30a may specifically include: a search and check sub-module 301 and a setting sub-module 302;
the searching and checking sub-module 301 is configured to check whether a currently searched node is a second end node in the search of the minimum spanning tree corresponding to each sub-path, and notify the setting sub-module 302 when the currently searched node is the second end node;
the setting submodule 302 is configured to set the current node as a parent node of the destination node after receiving the notification, and notify the searching and checking submodule 301;
the searching and checking sub-module 301 is configured to end the search and output the obtained minimum spanning tree after receiving the notification.
The router provided in the above embodiment prevents the situation that the subsequent sub-path search includes the node obtained in the previous sub-path search by setting the second end node, so as to avoid resource waste caused by a failure in the sub-path search, thereby improving the performance of the router.
Finally, correspondingly, the invention also provides a network, which comprises a plurality of nodes, wherein at least one node is the router.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (11)
1. A method for searching message forwarding path in network is characterized by comprising the following steps:
dividing a message forwarding path to be searched into a plurality of sub-paths according to an interface which needs to pass and related information of a network, wherein the interface needs to pass is set by a user, and a node which is connected with the interface which needs to pass and is set by the user is set as a second end node of the sub-path;
searching and determining a minimum spanning tree between a starting node and a destination node of each sub-path;
according to whether a second end node is set in each sub-path or not, backtracking is carried out in the corresponding minimum spanning tree obtained by searching to obtain sub-paths;
and connecting the sub paths obtained by backtracking so as to search and obtain a message forwarding path.
2. The method according to claim 1, wherein the step of obtaining the sub-paths by backtracking in the corresponding minimum spanning tree obtained by the search according to whether a second end node is set in each sub-path specifically comprises:
and when a second end node is arranged in a sub-path and the second end node is traced back in the minimum spanning tree corresponding to the searched sub-path, setting the second end node as the parent node of the destination node, and continuing to trace back to obtain the sub-path.
3. The method according to claim 1, wherein the step of obtaining the sub-paths by backtracking in the corresponding minimum spanning tree obtained by the search according to whether the second end node is set in each sub-path specifically comprises:
backtracking in the minimum spanning tree corresponding to each sub-path obtained by searching to obtain a sub-path;
and checking whether the sub-path obtained by backtracking contains a second end node or not, and setting the second end node in the sub-path as a parent node of a destination node when the sub-path contains the second end node, so as to obtain a modified sub-path.
4. A router, comprising:
the link information base is used for storing the topological structure of the network, the interface information and the link metric values among the network and the interface information;
the sub-path dividing module is used for dividing a message forwarding path to be searched into a plurality of sub-paths according to an interface which needs to pass and information in the link information base, wherein the interface is set by a user, and a node connected with the interface which needs to pass and is set by the user is set as a second end node of the sub-path;
the minimum spanning tree searching module is used for determining a minimum spanning tree between the starting node and the destination node of each sub-path according to the information in the link information base;
the sub-path backtracking module backtracks the corresponding minimum spanning tree determined by the minimum spanning tree searching module according to whether a second end node is set in the current sub-path or not to obtain a sub-path;
and the sub-path connecting module is used for connecting the sub-paths obtained by backtracking and taking the sub-paths as the message forwarding paths obtained by searching.
5. The router of claim 4, wherein the sub-path backtracking module comprises: the checking and backtracking submodule and the setting submodule; wherein,
the checking and backtracking submodule is used for checking whether a second end node is set in the current sub-path or not, and when the second end node is set in the sub-path and the second end node is backtracked in the minimum spanning tree corresponding to the sub-path determined by the minimum spanning tree searching module, the setting submodule is informed;
the setting submodule is used for setting the second end node as a father node of the destination node after receiving the notification, and notifying the checking and backtracking submodule;
and the checking and backtracking submodule is used for continuously backtracking to obtain the sub-path after receiving the notification.
6. The router of claim 4, wherein the sub-path backtracking module comprises: a backtracking sub-module and a check and set sub-module, wherein,
the backtracking submodule is used for backtracking in the minimum spanning tree determined by the minimum spanning tree searching module to obtain a sub-path;
and the checking and setting submodule is used for checking whether the sub-path obtained by backtracking contains a second end node or not, and when the sub-path is determined to contain the second end node, setting the second end node in the sub-path as a parent node of the destination node to obtain the modified sub-path.
7. A method for searching message forwarding path in network is characterized by comprising the following steps:
dividing a message forwarding path to be searched into a plurality of sub-paths according to an interface which needs to pass and network related information set by a user, and setting a node which is connected with the interface which needs to pass and set by the user as a second end node of the sub-path;
searching a minimum spanning tree between a starting node and a destination node of the sub-path according to the network related information and whether a second end node is set in the current sub-path;
backtracking the minimum spanning tree obtained by searching to obtain a sub-path;
and connecting the sub paths obtained by backtracking so as to search and obtain a message forwarding path.
8. The method according to claim 7, wherein the step of searching the minimum spanning tree between the start node and the destination node of the sub-path according to the network related information and whether the current sub-path sets the second end node specifically comprises:
in the searching of the minimum spanning tree corresponding to the current sub-path, checking whether the node searched currently is a second end node;
and when the currently searched node is a second end node, setting the current node as a father node of the destination node, and ending the search to obtain the minimum spanning tree.
9. A router, comprising:
the link information base is used for storing the topological structure of the network, the interface information and the link metric values among the network and the interface information;
the sub-path dividing module is used for dividing the message forwarding path to be searched into a plurality of sub-paths according to the information in the link information base and the interface which needs to pass and is set by the user, and setting the node which is connected with the interface which needs to pass and is set by the user as a second end node of the sub-path;
the minimum spanning tree searching module is used for searching the minimum spanning tree between the starting node and the target node of the sub-path according to the information in the link information base and whether a second ending node is set in the current sub-path;
a sub-path backtracking module for backtracking the minimum spanning tree obtained by the search to obtain a sub-path;
and the sub-path connecting module is used for connecting the sub-paths obtained by backtracking and taking the sub-paths as the message forwarding paths obtained by searching.
10. The router of claim 9, the minimum spanning tree search module comprising a search and check submodule and a settings submodule, wherein,
the searching and checking submodule is used for checking whether the currently searched node is a second end node or not in the searching of the minimum spanning tree corresponding to the current sub-path, and informing the setting submodule when the current node is the second end node;
the setting submodule is used for setting the current node as a father node of the destination node after receiving the notification, and notifying the searching and checking submodule;
and the searching and checking submodule is used for ending the search and outputting the obtained minimum spanning tree after receiving the notice.
11. A network comprising a plurality of nodes, wherein at least one node device is a router according to any one of claims 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101576907A CN100525252C (en) | 2006-12-19 | 2006-12-19 | A searching method for message forwarding path, router and network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CNB2006101576907A CN100525252C (en) | 2006-12-19 | 2006-12-19 | A searching method for message forwarding path, router and network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1996949A true CN1996949A (en) | 2007-07-11 |
CN100525252C CN100525252C (en) | 2009-08-05 |
Family
ID=38251890
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CNB2006101576907A Expired - Fee Related CN100525252C (en) | 2006-12-19 | 2006-12-19 | A searching method for message forwarding path, router and network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN100525252C (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101827414A (en) * | 2010-03-26 | 2010-09-08 | 中兴通讯股份有限公司 | Method and device for finding mesh network loop path |
CN108667659A (en) * | 2018-04-28 | 2018-10-16 | 烽火通信科技股份有限公司 | The searching method and system of network topology middle ring circuit node |
-
2006
- 2006-12-19 CN CNB2006101576907A patent/CN100525252C/en not_active Expired - Fee Related
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101827414A (en) * | 2010-03-26 | 2010-09-08 | 中兴通讯股份有限公司 | Method and device for finding mesh network loop path |
WO2011116600A1 (en) * | 2010-03-26 | 2011-09-29 | 中兴通讯股份有限公司 | Method and apparatus for loop path search in mesh network |
CN101827414B (en) * | 2010-03-26 | 2014-10-29 | 中兴通讯股份有限公司 | Method and device for finding mesh network loop path |
CN108667659A (en) * | 2018-04-28 | 2018-10-16 | 烽火通信科技股份有限公司 | The searching method and system of network topology middle ring circuit node |
CN108667659B (en) * | 2018-04-28 | 2021-03-16 | 烽火通信科技股份有限公司 | Method and system for searching loop node in network topological graph |
Also Published As
Publication number | Publication date |
---|---|
CN100525252C (en) | 2009-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100450407B1 (en) | A Multi QoS Path Computation Method | |
CN102197625B (en) | Provider link state bridging (PLSB) computation method | |
US7099286B1 (en) | Method and system for finding shared risk diverse paths | |
EP2453607B1 (en) | Method and device for calculating k-shortest paths | |
EP2880826B1 (en) | Label distribution and route installation in a loop-free routing topology using routing arcs | |
EP2173069A1 (en) | Path selection method and network system, path computation element | |
US8898335B2 (en) | Apparatus and method for calculating communication paths | |
CN110535763B (en) | Route backup method, device, server and readable storage medium | |
EP3238387A1 (en) | Path computation in a segment routing network | |
JP2011514792A (en) | Method and apparatus for providing full logical connectivity in an MPLS network | |
US9674072B1 (en) | Route topology discovery in data networks | |
CN104521192A (en) | Techniques for flooding optimization for link state protocols in a network topology | |
EP2541847B1 (en) | Method and system for establishing an associated bidirectional label-switched path | |
WO2014099316A1 (en) | System, method and apparatus to resolve rpf-vector attribute conflicts | |
US8009677B2 (en) | Path setting method and communication device in network segmented into plurality of areas | |
CN113316918A (en) | System and method for reducing the size of a flooding topology | |
CN112054958A (en) | Path calculation method, storage medium and electronic device | |
US7639607B2 (en) | Signaling system for simultaneously and autonomously setting a spare path | |
US8750166B2 (en) | Route topology discovery in data networks | |
CN100525252C (en) | A searching method for message forwarding path, router and network | |
CN113542120A (en) | Path selection method and device and computer readable storage medium | |
CN106230717A (en) | Route obtaining method in group system and device | |
US20220337504A1 (en) | Modified graceful restart | |
CN108259343B (en) | Routing strategy matching method and device | |
JP2021044684A (en) | Network connectibility confirmation system and network connectibility confirmation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20090805 Termination date: 20171219 |
|
CF01 | Termination of patent right due to non-payment of annual fee |