CN110535761A - Message forwarding method and device - Google Patents
Message forwarding method and device Download PDFInfo
- Publication number
- CN110535761A CN110535761A CN201910944253.7A CN201910944253A CN110535761A CN 110535761 A CN110535761 A CN 110535761A CN 201910944253 A CN201910944253 A CN 201910944253A CN 110535761 A CN110535761 A CN 110535761A
- Authority
- CN
- China
- Prior art keywords
- hop
- spare
- main
- candidate
- forwarding
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/22—Alternate routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/28—Routing or path finding of packets in data switching networks using route fault recovery
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present invention provides a kind of message forwarding method and device, this method comprises: determine the routing node to destination node main next-hop and spare next-hop;Next-hop group of equal value is generated according to the main next-hop and spare next-hop, and safeguards the corresponding forwarding-table item of each next-hop in the next-hop group of equal value;Wherein, the original state of the spare next-hop be can not forwarding state;When detecting the main next-hop failure in the next-hop group of equal value, judge in the next-hop group of equal value with the presence or absence of other available main next-hops;If it exists, then it sets unavailable for the main next-hop of failure, and carries out message forwarding by other available main next-hops;If it does not exist, then set unavailable for the main next-hop of failure, by the spare next-hop be set as can forwarding state, and pass through the spare next-hop and carry out message forwarding.The speed of routing convergence when can be improved forward-path failure using the embodiment of the present invention.
Description
Technical field
The present invention relates to network communication technology field more particularly to a kind of message forwarding methods and device.
Background technique
When the link or nodes break down in network, need to get to by faulty link or malfunctioning node transmission
The message of destination will abandon, and message forwarding will be interrupted, after creating the new available path arrived at the destination, message
It could restore normally to forward.
Currently, in order to improve the reliability of message forwarding, a kind of networking deployment scheme of mainstream is between routing node
Configure a plurality of optimal forward-path, a plurality of optimal forward-path equative route each other, when a wherein optimal forward-path therefore
When barrier, quickly flow can be switched on other equative routes, forward and interrupt to avoid message.
However practice discovery, in above-mentioned message forwarding scheme, when the equal failure of each optimal forward-path, need to create arrival
After the new available path of destination, message could restore normally to forward, and during being somebody's turn to do, message forwarding will be interrupted.
Summary of the invention
In view of this, the present invention provides a kind of message forwarding method and device, with solve in existing message forwarding scheme when
Message normally forwards the problem for restoring slower when path failure occurs.
In a first aspect, the present invention provides a kind of message forwarding method, it is applied to routing node, which comprises
Determine the routing node to destination node main next-hop and spare next-hop;Wherein, the main next-hop
For the corresponding next-hop of optimal forward-path of the routing node to the destination node, the spare next-hop is the road
By the corresponding next-hop of non-optimal forward-path of node to the destination node;
Next-hop group of equal value is generated according to the main next-hop and spare next-hop, and safeguards the next-hop group of equal value
In the corresponding forwarding-table item of each next-hop;Wherein, the original state of the spare next-hop be can not forwarding state;
When detecting the main next-hop failure in the next-hop group of equal value, judge in the equivalence next-hop group whether
There are other available main next-hops;
If it exists, then it sets unavailable for the main next-hop of failure, and is reported by other available main next-hops
Text forwarding;
If it does not exist, then it sets unavailable for the main next-hop of failure, the spare next-hop is set as to forward
State, and message forwarding is carried out by the spare next-hop.
Second aspect, the present invention provide a kind of apparatus for forwarding message, are applied to routing node, and described device includes:
Determination unit, main next-hop and spare next-hop for determining the routing node to destination node;Wherein,
The main next-hop be the routing node to the destination node the corresponding next-hop of optimal forward-path, it is described it is spare under
One jumps the corresponding next-hop of non-optimal forward-path for being the routing node to the destination node;
Generation unit, for generating next-hop group of equal value according to the main next-hop and spare next-hop;Wherein, described
The original state of spare next-hop is can not forwarding state;
Maintenance unit, for safeguarding the corresponding forwarding-table item of each next-hop in the next-hop group of equal value;
Detection unit, for detecting next-hop failure;
Judging unit, when for detecting the main next-hop failure in the next-hop group of equal value when the detection unit,
Judge in the next-hop group of equal value with the presence or absence of other available main next-hops;
Setting unit then sets unavailable for the main next-hop of failure for other available main next-hops if it exists;
Retransmission unit, for carrying out message forwarding by other available main next-hops;
The setting unit is also used to other available main next-hops if it does not exist, then the main next-hop of failure is arranged
To be unavailable, setting the spare next-hop to can forwarding state;
The retransmission unit, for carrying out message forwarding by the spare next-hop.
Using technical solution disclosed by the invention, by determining routing node to the main next-hop of destination node and spare
Next-hop generates next-hop group of equal value according to main next-hop and spare next-hop, and safeguards each next in next-hop group of equal value
Jump corresponding forwarding-table item, when detecting the main next-hop failure in next-hop group of equal value, judge in next-hop group of equal value whether
There are other available main next-hops;If it exists, then set unavailable for the main next-hop of failure, and available by other
Main next-hop carries out message forwarding;If it does not exist, then set unavailable for the main next-hop of failure, by the spare next-hop
Be set as can forwarding state, and pass through the spare next-hop and carry out message forwarding, on the one hand, ensure that in the presence of can be next with master
When jump, message is forwarded by main next-hop, improves message forward efficiency;On the other hand, when there is no main next-hop can be used when,
Message can be quickly switched into spare next-hop, the speed of routing convergence when improving forward-path failure.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of message forwarding method provided in an embodiment of the present invention;
Fig. 2 is a kind of configuration diagram of concrete application scene provided in an embodiment of the present invention;
Fig. 3 is a kind of flow diagram of router-level topology provided in an embodiment of the present invention;
Fig. 4 is a kind of flow diagram of failover provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of apparatus for forwarding message provided in an embodiment of the present invention;
Fig. 6 is the structural schematic diagram of another apparatus for forwarding message provided in an embodiment of the present invention;
Fig. 7 is the structural schematic diagram of another apparatus for forwarding message provided in an embodiment of the present invention;
Fig. 8 is the structural schematic diagram of another apparatus for forwarding message provided in an embodiment of the present invention;
Fig. 9 is a kind of hardware structural diagram of apparatus for forwarding message provided in an embodiment of the present invention.
Specific embodiment
Technical solution in embodiment in order to enable those skilled in the art to better understand the present invention, and make of the invention real
The above objects, features, and advantages for applying example can be more obvious and easy to understand, with reference to the accompanying drawing to technical side in the embodiment of the present invention
Case is described in further detail.
It referring to Figure 1, is a kind of flow diagram of message forwarding method provided in an embodiment of the present invention, wherein the report
Literary retransmission method can be applied to any routing node (such as switch or router), as shown in Figure 1, the message forwarding method can
With the following steps are included:
Step 101, determine routing node to destination node main next-hop and spare next-hop;Wherein, the master is next
The corresponding next-hop of optimal forward-path for being routing node to destination node is jumped, spare next-hop is routing node to purpose section
The corresponding next-hop of non-optimal forward-path of point.
In the embodiment of the present invention, when routing node is calculated to when the routing of destination node, on the one hand, routing section can be calculated
Point is to the optimal forward-path between destination node, such as based on shortest path first (English: Shortest Path First, letter
Claiming SPF) principle calculates routing node to the optimal forward-path between destination node;On the other hand, routing node can be calculated
To one or more non-optimal forward-path between destination node, it is such as based on FRR (Fast Reroute, quick heavy-route) machine
System calculates routing node to the non-optimal forward-path between destination node.
Illustratively, above-mentioned routing node can have one or more to the optimal forward-path between destination node;When
There are when a plurality of optimal forward-path, a plurality of optimal forward-path equative route each other.
It, can be using above-mentioned non-optimal forward-path as road in order to improve the reliability of message forwarding in the embodiment of the present invention
By node to the spare forward-path of the optimal forward-path destination node.
Correspondingly, the corresponding next-hop of above-mentioned non-optimal forward-path is as routing node to optimal between destination node
The spare next-hop of forward-path (referred to herein as main next-hop).
It should be noted that in embodiments of the present invention, when determining the spare forward-path of optimal forward-path, needing
Spare forward-path determined by guaranteeing will not generate loop, and the embodiment of the present invention is subsequent no longer to be repeated.
Step 102 generates next-hop group of equal value according to main next-hop and spare next-hop, and safeguards next-hop group of equal value
In the corresponding forwarding-table item of each next-hop;Wherein, the original state of spare next-hop be can not forwarding state.
In the embodiment of the present invention, the speed of routing convergence when in order to improve optimal forward-path failure, according under above-mentioned master
One jump and spare next-hop generate next-hop group of equal value, and are by the original state of the spare next-hop in the equivalence next-hop group
Can not forwarding state, to guarantee that routing node selects optimal forward-path to carry out message forwarding.
When routing node generates next-hop group of equal value according to main next-hop and spare next-hop, it can safeguard under the equivalence
The corresponding forwarding-table item of each next-hop (including next-hop and spare next-hop) in one jump group includes each next in the forwarding-table item
Corresponding exit port and packaging information are jumped, such as IP forwarding-table item.
Wherein, which may include virtual LAN (English: Virtual Local Area Network, letter
Claim: VLAN) information, source media access control (English: Media Access Control, abbreviation: MAC) address and purpose MAC
The information such as address.
It illustratively, may include one or more main next-hops in the equivalence next-hop group, and one or more standby
Next-hop.
It preferably, include multiple main next-hops and a slave next-hop in the equivalence next-hop group.
Step 103, when detecting the main next-hop failure in next-hop group of equal value, judge in next-hop group of equal value whether
There are other available main next-hops.If so, going to step 104;Otherwise, step 105 is gone to.
Step 104 sets unavailable for the main next-hop of failure, and carries out message by other available main next-hops
Forwarding.
Step 105 sets unavailable for the main next-hop of failure, by spare next-hop be set as can forwarding state, and
Message forwarding is carried out by spare next-hop.
In the embodiment of the present invention, for next-hop group of equal value, when there are available main next-hop, jumped by the way that master is next
The forwarding of row message;When main next-hop is unavailable, message forwarding is carried out by spare next-hop, to guarantee preferentially by optimal
Forward-path carries out message forwarding, improves message forward efficiency.
It should be noted that in embodiments of the present invention, next-hop (main next-hop or slave next-hop) is available refer to it is next
Without failure (including link failure or node failure) is jumped, can be used for message forwarding;Next-hop is unavailable to refer to next-hop
It breaks down, is not used to message forwarding;The state of next-hop be can not forwarding state refer to next-hop it is without failure (
With), but do not E-Packeted by the next-hop forward-path.
Correspondingly, when routing node detects the main next-hop failure of the appearance in next-hop group of equal value, judge the equivalence
It whether there is other available main next-hops in next-hop group.
If there are other available main next-hops in the equivalence next-hop group, routing node is by the main next-hop of the failure
It is set as unavailable, and carries out message forwarding by other available main next-hops;Wherein, in the situation, (there are other can
Main next-hop) under, keeping spare next-hop to be can not forwarding state.
If other available main next-hops are not present in the equivalence next-hop group, routing node is on the one hand by the failure
Main next-hop is set as unavailable, on the other hand, by spare next-hop be set as can forwarding state, at this point, routing node passes through
Spare next-hop carries out message forwarding.
As it can be seen that in method flow shown in Fig. 1, by by routing node to the non-optimal forward-path between destination node
Corresponding next-hop, as the spare next-hop of the corresponding main next-hop of optimal forward-path, and by main next-hop and for next
Jump is added to next-hop group of equal value, safeguards corresponding forwarding-table item;When there are available main next-hop, pass through main next-hop
Carry out message forwarding;It when main next-hop is unavailable, is forwarded by spare next-hop, on the one hand, with any main next-hop event
Message is just triggered when barrier forwards the implementation for switching to spare next-hop to compare, and ensure that message can be preferentially by optimal turn
Path forwarding is sent out, ensure that message forward efficiency;On the other hand, standby compared with the implementation of traditional active and standby forward-path
It regenerates after no longer waiting until main forward-path failure with the forwarding-table item of forward-path, but turns using spare forward-path as main
The forward-path of equal value for sending out path, safeguards forwarding-table item together, in turn, can be quickly by report when the equal failure of main forward-path
Text forwarding switches to spare forward-path, the speed of routing convergence when improving forward-path failure.
Optionally, the present invention in one embodiment, the main next-hop of above-mentioned determining routing node to destination node
And spare next-hop, may include:
Determine routing node to destination node main next-hop;
When there are multiple main next-hops, for any main next-hop, the spare next-hop of the main next-hop is determined;
When the spare next-hop of the main next-hop is non-master next-hop, using the spare next-hop of the main next-hop as time
Spare next-hop is selected to be added to candidate spare next-hop list;
When each main next-hop determined spare next-hop, one candidate of selection is standby from candidate spare next-hop list
Use next-hop as spare next-hop.
In this embodiment, by SPF principle determined routing node to destination node optimal forward-path, in turn,
When main next-hop of the routing node to destination node has been determined, it may be determined whether multiple main next-hops.
Multiple main next-hops if it exists can then determine the spare next-hop of each main next-hop respectively.
For any main next-hop, can be determined by calculating the spare forwarding of the corresponding forward-path of the main next-hop
The spare next-hop of the main next-hop.
For any main next-hop, when the spare next-hop of the main next-hop has been determined, it can determine that this is spare next
It jumps and whether is repeated with other spare next-hops, that is, determine whether the spare next-hop is main next-hop.
If the spare next-hop is non-master next-hop, using the spare next-hop of the main next-hop as candidate spare next
Jump is added to candidate spare next-hop list.
When each main next-hop determined spare next-hop, one candidate of selection is standby from candidate spare next-hop list
Use next-hop as spare next-hop.
It should be noted that in embodiments of the present invention, when routing node is to optimal there is only one between destination node
When forward-path, the spare forward-path of the optimal forward-path can be calculated, and the spare forward-path is corresponding next
Jump the spare next-hop as main next-hop.
It is spare when the identified main next-hop for any main next-hop in addition, when there are multiple main next-hops
When next-hop and other main next-hops repeat, spare next-hop calculating no longer can be carried out to the main next-hop, alternatively, can weigh
Newly determine the spare next-hop of the main next-hop, until the spare next-hop of the identified main next-hop is non-master next-hop,
Or, reaching preset maximum redefines number, specific implementation does not repeat them here herein.
In one example, above-mentioned to select the spare next-hop of candidate as spare from candidate spare next-hop list
Next-hop, comprising:
For any spare next-hop of candidate, counted under the corresponding forward-path of the spare next-hop of the candidate and each master respectively
One jumps the first quantity of the same node point that corresponding forward-path passes through, and the maximum value in each first quantity is determined as the time
Select corresponding second quantity of spare next-hop;
Select the corresponding the smallest spare next-hop of candidate of second quantity as spare next-hop.
In this example, when needs select the spare next-hop of candidate as spare from candidate spare next-hop list
When next-hop, for any spare next-hop of candidate, the section that can be passed through according to the corresponding forward-path of the spare next-hop of candidate
The node that point and the corresponding forward-path of each main next-hop pass through, counts the corresponding forwarding of the spare next-hop of the candidate respectively
The quantity (referred to herein as the first quantity) for the same node point that path forward-path corresponding with each main next-hop passes through, and will be each
Maximum value in first quantity determines corresponding second quantity of the spare next-hop of the candidate.
For example, it is assumed that the corresponding forward-path of the spare next-hop a of candidate, forward-path warp corresponding with main next-hop A~C
The quantity for the same node point crossed is respectively 1,2 and 3 (not including first node and tail node), then candidate spare next-hop a is corresponding
Second quantity is 3.
In this example, it can choose the corresponding the smallest spare next-hop of candidate of second quantity as spare next-hop
(being properly termed as Node Protection principle), when reducing main next-hop failure, the probability of spare next-hop also failure.
Select the spare next-hop of candidate as spare next-hop from each spare next-hop of candidate.
For example, the node that can be passed through according to the corresponding forward-path of the spare next-hop of candidate, according to Node Protection
Principle, selects spare next-hop, i.e., preferential selection is optimal turn corresponding with each main next-hop other than first node and tail node
The different corresponding spare next-hop of candidate of spare forward-path of the node of path process is sent out, is led to avoid due to node failure
Cause optimal forward-path and the equal failure of spare forward-path.
In one example, above-mentioned to select the spare next-hop of candidate as spare from candidate spare next-hop list
Next-hop, comprising:
The hop count of the corresponding forward-path of each spare next-hop of candidate is counted respectively;
Select the least spare next-hop of candidate of the hop count of corresponding forward-path as spare next-hop.
It in this example, can be least according to hop count according to the hop count of the corresponding forward-path of the spare next-hop of candidate
Principle, selects spare next-hop, i.e., preferentially select the corresponding spare next-hop of candidate of the least spare forward-path of hop count as
Spare next-hop.
It should be noted that if above-mentioned Node Protection principle is not satisfied for each spare next-hop of candidate or hop count is at least former
Then, it alternatively, there are multiple spare next-hops of candidate to meet above-mentioned Node Protection principle or/and the minimum principle of hop count, can choose
The big spare next-hop of candidate of next hop address is as spare next-hop.
Optionally, the present invention in one embodiment, it is above-mentioned to be generated according to main next-hop and spare next-hop etc.
After valence next-hop group, can also include:
When routing node operation has LDP agreement, main next-hop and the corresponding label of spare next-hop are activated respectively.
In this embodiment, when routing node operation has tag distribution protocol (English: Label Distribution
Protocol, referred to as: LDP) agreement when, it is such as (English: Multi-Protocol Label for multiprotocol label switching
Switching, referred to as: MPLS) networking, routing node according to main next-hop and spare next-hop generate next-hop group of equal value it
Afterwards, it can activate respectively as main next-hop and the corresponding label of spare next-hop, even if main next-hop and spare next-hop
Corresponding label comes into force.
Wherein, when the corresponding label of each next-hop can be built by LDP networking, the corresponding neighbor node notice of each next-hop
Give the routing node, the corresponding label of each next-hop is unactivated state (not coming into force) when initial.
It should be noted that in this embodiment, when routing node operation has LDP agreement, under routing node maintenance is each
When the one corresponding forwarding-table item of jump, it is also necessary to safeguard Label Forwarding Information Base, Label Forwarding Information Base record has each next-hop corresponding out
Label and destination node enter label.
Optionally, the present invention in one embodiment, it is above-mentioned to be generated according to main next-hop and spare next-hop etc.
After valence next-hop group, can also include:
When routing node between destination node there are when VPN traffics, it is corresponding in main next-hop and spare next-hop
Iteration VPN route on equivalent route.
In this embodiment, when routing node between destination node there are when VPN traffics, in order to guarantee VPN traffics
The reliability of forwarding, can by VPN route iteration in the main next-hop and the corresponding equivalent route of spare next-hop, from
And when routing node is to, there are when optimal forward-path, VPN traffics can preferentially pass through optimal forward-path between destination node
Forwarding;When routing node is to when being not present optimal forward-path between destination node, VPN traffics can be rapidly switched to spare
Non-optimal forward-path.
In order to make those skilled in the art more fully understand technical solution provided in an embodiment of the present invention, below with reference to specific
Application scenarios are illustrated technical solution provided in an embodiment of the present invention.
Fig. 2 is referred to, is a kind of configuration diagram of concrete application scene provided in an embodiment of the present invention, in the embodiment
In, with networking shown in Fig. 2 for MPLS networking, and there are for VPN traffics in networking, as shown in Fig. 2, being wrapped in the MPLS networking
Include server 1 and server 2 (referred to as S1 and S2) and routing node 1~8 (being successively referred to as R1~R8), server with
And the connection relationship between each routing node is as shown in Figure 2.
As shown in figure 3, in this embodiment, when carrying out router-level topology of the routing node to destination node, can be based on
SPF principle calculates routing node to the optimal forward-path of destination node, so that it is determined that under routing node to the master of destination node
One jumps.
By taking the router-level topology of R2 to R6 as an example, R2 can be based on the optimal forward-path of SPF principle calculating R2 to R6: R2 →
The main next-hop of R4 → R6 and R2 → R5 → R6, i.e. R2 to R6 include R4 and R5.
In this embodiment, after determining routing node to the main next-hop of destination node, the routing node can be traversed
Each main next-hop, carry out spare next-hop calculating.
For any main next-hop, a spare next-hop of the main next-hop is calculated, and judges the spare next-hop
It whether is main next-hop (whether being repeated with other main next-hops).
If so, calculating the spare next-hop of other main next-hops;Otherwise, which is added to candidate spare
Next-hop list.
It, can be preferably one from candidate spare next-hop list after each main next-hop calculated spare next-hop
Spare next-hop.
Illustratively, a candidate can be selected from candidate spare next-hop list preferentially according to Node Protection principle
Spare next-hop is as spare next-hop;The spare next-hop of candidate for meeting Node Protection principle if it does not exist, or, there are multiple
Meet the spare next-hop of candidate of Node Protection principle, then further the least principle of selection forward-path hop count selects a time
Select spare next-hop as spare next-hop;Wherein:
For the case where there is no the candidate spare next-hops for meeting Node Protection principle, from all candidate spare next-hops
It is middle to select the least spare next-hop of candidate of forward-path hop count as spare next-hop;
For the case where there are multiple candidate spare next-hops for meeting Node Protection principle, from multiple candidate it is spare under
Select the least spare next-hop of candidate of forward-path hop count as spare next-hop in one jump.
If there are still multiple spare next-hops of candidate for meeting condition after above-mentioned selection, then it can choose next-hop
The big spare next-hop of candidate in address is as spare next-hop.
It in this embodiment, can be according to main next-hop after routing node has determined main next-hop and spare next-hop
And spare next-hop generates next-hop group of equal value.
Still by taking the router-level topology of R2 to R6 as an example, it is assumed that the spare forward-path that R2 is calculated is R2 → R3 → R4 → R6, then
The main next-hop of R2 to R6 includes R4 and R5, and spare next-hop includes R3.
Wherein, in next-hop group of equal value spare next-hop original state be can not forwarding state.
In this embodiment, after the determining next-hop group of equal value of routing node, on the one hand, can safeguard that each next-hop is corresponding
IP forwarding table.
Still by taking the router-level topology of above-mentioned R2 to R6 as an example, R2 can safeguard IP forwarding-table item as shown in Table 1:
Table 1
Next-hop | Exit port | Packaging information | State |
R4 | Exit port 1 | Packaging information 1 | It can use |
R5 | Exit port 2 | Packaging information 2 | It can use |
R3 | Exit port 3 | Packaging information 3 | It can not forward |
On the other hand, routing node can activate the corresponding label of each next-hop in next-hop group of equal value, and safeguard label
Forwarding table.
Still by taking the router-level topology of above-mentioned R2 to R6 as an example, it is assumed that the corresponding label of each next-hop be followed successively by outgoing label 2001,
2002 and 2003, then the Label Forwarding Information Base of R2 maintenance can be as shown in table 2:
Table 2
In this embodiment, after routing node generates next-hop group of equal value, VPN route can also be iterated to this etc.
On the corresponding equivalent route of valence next-hop group, so that VPN traffics can be based on the equivalence next-hop group selection forward-path.
In this embodiment, when routing node detects the main next-hop failure in next-hop group of equal value, routing node
It may determine whether other available main next-hops.
If it exists, then the main next-hop of failure is set down state by routing node, and updates corresponding IP forwarding
List item and label forwarding list item, at this point, the main next-hop that routing node passes through available mode in next-hop group of equal value carries out message
Forwarding.
If it does not exist, then the main next-hop of failure is set down state by routing node, and spare next-hop is arranged
For can forwarding state, and corresponding IP forwarding-table item and label forwarding list item are updated, at this point, routing node passes through next-hop of equal value
Spare next-hop in group carries out message forwarding, and schematic diagram can be as shown in Figure 4.
Still by taking the router-level topology of above-mentioned R2 to R6 as an example, when R2 detects main next-hop R4 failure, R2 be can detecte
It whether there is other available main next-hops in valence next-hop group, there are other available main next-hop R5 for discovery, at this point, R2 will
R4 is updated to down state, and updates corresponding IP forwarding-table item and label forwarding list item, updated IP forwarding-table item and
Label distribution label can be as shown in Table 3 and Table 4:
Table 3
Next-hop | Exit port | Packaging information | State |
R4 | Exit port 1 | Packaging information 1 | It is unavailable |
R5 | Exit port 2 | Packaging information 2 | It can use |
R3 | Exit port 3 | Packaging information 3 | It can not forward |
Table 4
Assuming that a certain moment, R2 detects main next-hop R5 failure, and R2 can detecte whether there is in next-hop group of equal value
Other available main next-hops are not present in other available main next-hops, discovery, at this point, be updated to main next-hop R5 can not by R2
With state, and spare next-hop R3 be updated to can forwarding state, and update corresponding IP forwarding-table item and label forwarding list item, more
IP forwarding-table item and label distribution label after new can be as shown in table 5 and table 6:
Table 5
Next-hop | Exit port | Packaging information | State |
R4 | Exit port 1 | Packaging information 1 | It is unavailable |
R5 | Exit port 2 | Packaging information 2 | It is unavailable |
R3 | Exit port 3 | Packaging information 3 | It can forward |
Table 6
Outgoing label | Next-hop | State |
2001 | R4 | It is unavailable |
2002 | R5 | It is unavailable |
2003 | R3 | It can forward |
Through above description as can be seen that in technical solution provided in an embodiment of the present invention, by determining routing node
To the main next-hop and spare next-hop of destination node, next-hop of equal value is generated according to main next-hop and spare next-hop
Group, and safeguard the corresponding forwarding-table item of each next-hop in next-hop group of equal value, detect the main next-hop in next-hop group of equal value
When failure, judge in next-hop group of equal value with the presence or absence of other available main next-hops;If it exists, then by the main next-hop of failure
It is set as unavailable, and carries out message forwarding by other available main next-hops;If it does not exist, then by the main next-hop of failure
Be set as unavailable, by the spare next-hop be set as can forwarding state, and pass through the spare next-hop and carry out message and turn
Hair, on the one hand, when ensure that presence can be with main next-hop, message is forwarded by main next-hop, improves message forward efficiency;Separately
On the one hand, when there is no when main next-hop can be used, message can be quickly switched into spare next-hop, improve forward-path failure
When routing convergence speed.
Fig. 5 is referred to, provides a kind of structural schematic diagram of apparatus for forwarding message for the embodiment of the present invention, wherein the device
It can be applied to the routing node in above method embodiment, as shown in figure 5, the apparatus for forwarding message may include:
Determination unit 510, main next-hop and spare next-hop for determining the routing node to destination node;Its
In, the main next-hop is optimal forward-path corresponding next-hop of the routing node to the destination node, described standby
It is non-optimal forward-path corresponding next-hop of the routing node to the destination node with next-hop;
Generation unit 520, for generating next-hop group of equal value according to the main next-hop and spare next-hop;Wherein,
The original state of the spare next-hop is can not forwarding state;
Maintenance unit 530, for safeguarding the corresponding forwarding-table item of each next-hop in the next-hop group of equal value;
Detection unit 540, for detecting next-hop failure;
Judging unit 550, for detecting the main next-hop event in the next-hop group of equal value when the detection unit 540
When barrier, judge in the next-hop group of equal value with the presence or absence of other available main next-hops;
Setting unit 560, for other available main next-hops if it exists, then setting the main next-hop of failure to can not
With;
Retransmission unit 570, for carrying out message forwarding by other available main next-hops;
The setting unit 560 is also used to other available main next-hops if it does not exist, then sets the main next-hop of failure
It is set to unavailable, setting the spare next-hop to can forwarding state;
The retransmission unit 570, for carrying out message forwarding by the spare next-hop.
In an alternative embodiment, the determination unit 510 is specifically used for determining the routing node to the destination node
Main next-hop;
The determination unit 510, for any main next-hop, is determined also particularly useful for when there are multiple main next-hops
The spare next-hop of one main next-hop;
Such as scheme please also refer to Fig. 6 for the structural schematic diagram of another apparatus for forwarding message provided in an embodiment of the present invention
Shown in 6, on the basis of apparatus for forwarding message shown in Fig. 5, apparatus for forwarding message shown in Fig. 6 further include:
Adding unit 580, for when the spare next-hop of the main next-hop be non-master next-hop when, by the main next-hop
Spare next-hop is added to candidate spare next-hop list as candidate spare next-hop;
Selecting unit 590, for when each main next-hop determined spare next-hop, from the spare next-hop of candidate
Select the spare next-hop of candidate as spare next-hop in list.
In an alternative embodiment, the selecting unit 590 is specifically used for uniting for any spare next-hop of candidate respectively
Count the of the same node point that the corresponding forward-path of the spare next-hop of candidate forward-path corresponding with each main next-hop passes through
One quantity, and the maximum value in each first quantity is determined as corresponding second quantity of the spare next-hop of the candidate;Selection corresponds to
The smallest spare next-hop of candidate of the second quantity as spare next-hop;
Or,
The selecting unit 590, specifically for counting the hop count of the corresponding forward-path of each spare next-hop of candidate respectively;
Select the least spare next-hop of candidate of the hop count of corresponding forward-path as spare next-hop.
Such as scheme please also refer to Fig. 7 for the structural schematic diagram of another apparatus for forwarding message provided in an embodiment of the present invention
Shown in 7, on the basis of apparatus for forwarding message shown in Fig. 5, apparatus for forwarding message shown in Fig. 7 further include:
Unit 600 is activated, for activating institute respectively when routing node operation has tag distribution protocol LDP agreement
State main next-hop and the corresponding label of spare next-hop.
Such as scheme please also refer to Fig. 8 for the structural schematic diagram of another apparatus for forwarding message provided in an embodiment of the present invention
Shown in 8, on the basis of apparatus for forwarding message shown in Fig. 5, apparatus for forwarding message shown in Fig. 8 further include:
Iteration unit 610, for when the routing node between the destination node there are when VPN traffics, described
Iteration VPN route in main next-hop and the corresponding equivalent route of spare next-hop.
Fig. 9 is referred to, is a kind of hardware structural diagram of apparatus for forwarding message provided in an embodiment of the present invention.The message
Retransmission unit may include processor 901, the machine readable storage medium 902 for being stored with machine-executable instruction.Processor 901
It can be communicated via system bus 903 with machine readable storage medium 902.Also, by reading and executing machine readable storage Jie
Above-described message forwarding side can be performed in machine-executable instruction corresponding with message forwarding logic in matter 902, processor 901
Method.
Machine readable storage medium 902 referred to herein can be any electronics, magnetism, optics or other physical stores
Device may include or store information, such as executable instruction, data, etc..For example, machine readable storage medium can be easily
Lose memory, nonvolatile memory or similar storage medium.Specifically, machine readable storage medium 902 can be RAM
(Radom Access Memory, random access memory), flash memory, memory driver (such as hard disk drive), solid state hard disk,
Any kind of storage dish (such as CD, DVD) perhaps similar storage medium or their combination.
The embodiment of the invention also provides a kind of machine readable storage mediums including machine-executable instruction, such as Fig. 9
In machine readable storage medium 902, the machine-executable instruction can by the processor 901 in apparatus for forwarding message execute with
Realize message forwarding method described above.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize the present invention program.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
As seen from the above-described embodiment, by the way that the priority of main PW is set above the corresponding standby PW of main PW, i.e., when PE is set
The value of the preferential forwarding flag bit of the value and corresponding standby PW of main PW of the preferential forwarding flag bit of standby upper main PW is first
When value, which determines that main PW is active state, and standby PW is armed state, in turn, when needing to carry out PW switchback, initiates PW
The PE equipment of switchback can notify far-end PE equipment to update the value of the preferential forwarding flag bit of main PW by LDP notification message
For the first value, and when receiving far-end PE equipment and requesting to carry out the LDP notification message of certainty response to switchback, by local terminal
The value of the preferential forwarding flag bit of main PW is updated to the first value, without being indicated by LDP message to the preferential forwarding of standby PW
The value of position is updated, and is reduced the quantity of the LDP notification message of interaction in PW switchback process, is improved the efficiency of PW switchback.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to of the invention its
Its embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Person's adaptive change follows general principle of the invention and including the undocumented common knowledge in the art of the present invention
Or conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by following
Claim is pointed out.
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and changes may be made without departing from the scope thereof.The scope of the present invention is limited only by the attached claims.
Claims (10)
1. a kind of message forwarding method is applied to routing node, which is characterized in that the described method includes:
Determine the routing node to destination node main next-hop and spare next-hop;Wherein, the main next-hop is institute
Routing node is stated to the corresponding next-hop of optimal forward-path of the destination node, the spare next-hop is routing section
Point arrives the corresponding next-hop of non-optimal forward-path of the destination node;
Next-hop group of equal value is generated according to the main next-hop and spare next-hop, and is safeguarded each in the next-hop group of equal value
The corresponding forwarding-table item of next-hop;Wherein, the original state of the spare next-hop be can not forwarding state;
When detecting the main next-hop failure in the next-hop group of equal value, judge to whether there is in the next-hop group of equal value
Other available main next-hops;
If it exists, then it sets unavailable for the main next-hop of failure, and carries out message by other available main next-hops and turn
Hair;
If it does not exist, then set unavailable for the main next-hop of failure, by the spare next-hop be set as can forwarding state,
And message forwarding is carried out by the spare next-hop.
2. the method according to claim 1, wherein under the determination routing node to the master of destination node
One jump and spare next-hop, comprising:
Determine the routing node to the destination node main next-hop;
When there are multiple main next-hops, for any main next-hop, the spare next-hop of the main next-hop is determined;
When the spare next-hop of the main next-hop is non-master next-hop, using the spare next-hop of the main next-hop as candidate standby
It is added to candidate spare next-hop list with next-hop;
When each main next-hop determined spare next-hop, select a candidate standby from the spare next-hop list of the candidate
Use next-hop as spare next-hop.
3. according to the method described in claim 2, it is characterized in that, described select one from the spare next-hop list of the candidate
A spare next-hop of candidate is as spare next-hop, comprising:
For any spare next-hop of candidate, the corresponding forward-path of the spare next-hop of the candidate and each main next-hop are counted respectively
First quantity of the same node point that corresponding forward-path passes through, and it is standby that the maximum value in each first quantity is determined as the candidate
With corresponding second quantity of next-hop;
Select the corresponding the smallest spare next-hop of candidate of second quantity as spare next-hop;
Or,
The hop count of the corresponding forward-path of each spare next-hop of candidate is counted respectively;
Select the least spare next-hop of candidate of the hop count of corresponding forward-path as spare next-hop.
4. the method according to claim 1, wherein described raw according to the main next-hop and spare next-hop
After next-hop group of equal value, further includes:
When the routing node operation have tag distribution protocol LDP agreement when, activate respectively the main next-hop and it is spare under
One jumps corresponding label.
5. the method according to claim 1, wherein described raw according to the main next-hop and spare next-hop
After next-hop group of equal value, further includes:
When the routing node between the destination node there are when VPN traffics, in the main next-hop and spare next
Jump iteration VPN route on corresponding equivalent route.
6. a kind of apparatus for forwarding message, it is applied to routing node, which is characterized in that described device includes:
Determination unit, main next-hop and spare next-hop for determining the routing node to destination node;Wherein, described
Main next-hop is optimal forward-path corresponding next-hop of the routing node to the destination node, the spare next-hop
For the corresponding next-hop of non-optimal forward-path of the routing node to the destination node;
Generation unit, for generating next-hop group of equal value according to the main next-hop and spare next-hop;Wherein, described spare
The original state of next-hop is can not forwarding state;
Maintenance unit, for safeguarding the corresponding forwarding-table item of each next-hop in the next-hop group of equal value;
Detection unit, for detecting next-hop failure;
Judging unit, when for detecting the main next-hop failure in the next-hop group of equal value when the detection unit, judgement
It whether there is other available main next-hops in the equivalence next-hop group;
Setting unit then sets unavailable for the main next-hop of failure for other available main next-hops if it exists;
Retransmission unit, for carrying out message forwarding by other available main next-hops;
The setting unit is also used to other available main next-hops if it does not exist, then sets the main next-hop of failure to not
It can use, setting the spare next-hop to can forwarding state;
The retransmission unit, for carrying out message forwarding by the spare next-hop.
7. device according to claim 6, which is characterized in that
The determination unit, specifically for the main next-hop of the determination routing node to the destination node;
The determination unit, for any main next-hop, determines the master also particularly useful for when there are multiple main next-hops
The spare next-hop of next-hop;
Described device further include:
Adding unit, for when the spare next-hop of the main next-hop be non-master next-hop when, by the main next-hop it is spare under
One jump is added to candidate spare next-hop list as candidate spare next-hop;
Selecting unit, for when each main next-hop determined spare next-hop, from the spare next-hop list of the candidate
Select the spare next-hop of candidate as spare next-hop.
8. device according to claim 7, which is characterized in that
The selecting unit is specifically used for that it is corresponding to count the spare next-hop of the candidate respectively for any spare next-hop of candidate
The first quantity of same node point for passing through of forward-path forward-path corresponding with each main next-hop, and will be in each first quantity
Maximum value be determined as corresponding second quantity of the spare next-hop of the candidate;Select the corresponding the smallest candidate of second quantity spare
Next-hop is as spare next-hop;
Or,
The selecting unit, specifically for counting the hop count of the corresponding forward-path of each spare next-hop of candidate respectively;Selection pair
The least spare next-hop of candidate of the hop count for the forward-path answered is as spare next-hop.
9. device according to claim 6, which is characterized in that described device further include:
Unit is activated, for activating the master next respectively when routing node operation has tag distribution protocol LDP agreement
Jump and the corresponding label of spare next-hop.
10. device according to claim 6, which is characterized in that described device further include:
Iteration unit, for when the routing node between the destination node there are when VPN traffics, it is next in the master
Iteration VPN route in jump and the corresponding equivalent route of spare next-hop.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910944253.7A CN110535761A (en) | 2019-09-30 | 2019-09-30 | Message forwarding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910944253.7A CN110535761A (en) | 2019-09-30 | 2019-09-30 | Message forwarding method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110535761A true CN110535761A (en) | 2019-12-03 |
Family
ID=68671159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910944253.7A Pending CN110535761A (en) | 2019-09-30 | 2019-09-30 | Message forwarding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110535761A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111628930A (en) * | 2020-05-25 | 2020-09-04 | 河南群智信息技术有限公司 | Label-based Chinese medicinal material planting monitoring information rerouting method |
CN111953592A (en) * | 2020-07-31 | 2020-11-17 | 新华三技术有限公司 | Equivalent link convergence method and device |
CN112398730A (en) * | 2020-10-28 | 2021-02-23 | 上海欣诺通信技术股份有限公司 | Message forwarding method, device, equipment and storage medium in data center network |
CN113132222A (en) * | 2019-12-31 | 2021-07-16 | 华为技术有限公司 | Message forwarding method, message forwarding equipment and computer readable storage medium |
CN114143254A (en) * | 2021-11-30 | 2022-03-04 | 锐捷网络股份有限公司 | Message forwarding method and device, electronic equipment and computer readable storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050025058A1 (en) * | 2003-07-30 | 2005-02-03 | Siddheswar Chaudhuri | Method for stochastic selection of improved cost metric backup paths in shared-mesh protection networks |
CN102201964A (en) * | 2010-03-22 | 2011-09-28 | 杭州华三通信技术有限公司 | Method for realizing rapid path switching and apparatus thereof |
CN102281200A (en) * | 2011-08-24 | 2011-12-14 | 华为技术有限公司 | Method for selecting current backup route and router |
CN102347885A (en) * | 2010-07-29 | 2012-02-08 | 杭州华三通信技术有限公司 | Route switching method and device |
CN102404234A (en) * | 2011-12-26 | 2012-04-04 | 杭州华三通信技术有限公司 | Flow transfer method and equipment |
CN106034072A (en) * | 2015-03-20 | 2016-10-19 | 中兴通讯股份有限公司 | Packet forwarding method and device and service provider network edge PE equipment |
CN107005469A (en) * | 2015-06-30 | 2017-08-01 | 华为技术有限公司 | A kind of method of route, relevant device and system |
CN108809759A (en) * | 2018-05-29 | 2018-11-13 | 新华三技术有限公司 | Detect the method, apparatus and router of link state |
CN110086722A (en) * | 2019-04-28 | 2019-08-02 | 新华三技术有限公司 | A kind of routed path determines method and device, routing device |
-
2019
- 2019-09-30 CN CN201910944253.7A patent/CN110535761A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050025058A1 (en) * | 2003-07-30 | 2005-02-03 | Siddheswar Chaudhuri | Method for stochastic selection of improved cost metric backup paths in shared-mesh protection networks |
CN102201964A (en) * | 2010-03-22 | 2011-09-28 | 杭州华三通信技术有限公司 | Method for realizing rapid path switching and apparatus thereof |
CN102347885A (en) * | 2010-07-29 | 2012-02-08 | 杭州华三通信技术有限公司 | Route switching method and device |
CN102281200A (en) * | 2011-08-24 | 2011-12-14 | 华为技术有限公司 | Method for selecting current backup route and router |
CN102404234A (en) * | 2011-12-26 | 2012-04-04 | 杭州华三通信技术有限公司 | Flow transfer method and equipment |
CN106034072A (en) * | 2015-03-20 | 2016-10-19 | 中兴通讯股份有限公司 | Packet forwarding method and device and service provider network edge PE equipment |
CN107005469A (en) * | 2015-06-30 | 2017-08-01 | 华为技术有限公司 | A kind of method of route, relevant device and system |
CN108809759A (en) * | 2018-05-29 | 2018-11-13 | 新华三技术有限公司 | Detect the method, apparatus and router of link state |
CN110086722A (en) * | 2019-04-28 | 2019-08-02 | 新华三技术有限公司 | A kind of routed path determines method and device, routing device |
Non-Patent Citations (2)
Title |
---|
JIANHUI ZHANG,等: ""A LDP Fast Protection Switching Scheme for Concurrent Multiple Failures in MPLS Network"", 《 2009 INTERNATIONAL CONFERENCE ON MULTIMEDIA INFORMATION NETWORKING AND SECURITY》 * |
蔡桢雨: ""IP FRR在OSPF协议中应用的研究"", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113132222A (en) * | 2019-12-31 | 2021-07-16 | 华为技术有限公司 | Message forwarding method, message forwarding equipment and computer readable storage medium |
CN113132222B (en) * | 2019-12-31 | 2023-04-18 | 华为技术有限公司 | Message forwarding method, message forwarding equipment and computer readable storage medium |
CN111628930A (en) * | 2020-05-25 | 2020-09-04 | 河南群智信息技术有限公司 | Label-based Chinese medicinal material planting monitoring information rerouting method |
CN111628930B (en) * | 2020-05-25 | 2022-04-19 | 河南群智信息技术有限公司 | Label-based rerouting method |
CN111953592A (en) * | 2020-07-31 | 2020-11-17 | 新华三技术有限公司 | Equivalent link convergence method and device |
CN111953592B (en) * | 2020-07-31 | 2022-07-12 | 新华三技术有限公司 | Equivalent link convergence method and device |
CN112398730A (en) * | 2020-10-28 | 2021-02-23 | 上海欣诺通信技术股份有限公司 | Message forwarding method, device, equipment and storage medium in data center network |
CN114143254A (en) * | 2021-11-30 | 2022-03-04 | 锐捷网络股份有限公司 | Message forwarding method and device, electronic equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11336565B2 (en) | Method and node for packet transmission in network | |
CN110535761A (en) | Message forwarding method and device | |
US10148554B2 (en) | System and methods for load placement in data centers | |
US9794167B2 (en) | Bicasting using non-congruent paths in a loop-free routing topology having routing arcs | |
Shand et al. | IP fast reroute framework | |
US7848224B2 (en) | Method and apparatus for constructing a repair path for multicast data | |
US9225624B2 (en) | Systems and methods for topology discovery and application in a border gateway protocol based data center | |
US8456982B2 (en) | System and method for fast network restoration | |
US7936667B2 (en) | Building backup tunnels for fast reroute in communications networks | |
EP2883334B1 (en) | Techniques for flooding optimization for link state protocols in a network topology | |
CN107347032B (en) | Message forwarding method and device | |
CN104380671B (en) | The increase failure covering in classification, redundancy, QoS routing selection | |
US10164867B2 (en) | Generating non-congruent paths having minimal latency difference in a loop-free routing topology having routing arcs | |
KR20140015401A (en) | Mpls fast re-route using ldp (ldp-frr) | |
CN103210626A (en) | Method, apparatus and system for generating label forwarding table in ring topology | |
CN105763448B (en) | A kind of message transmitting method and device | |
CN104717143A (en) | Method and equipment for many-one reducibility scene multicast data transmission | |
WO2016177136A1 (en) | Method and device for implementing link state advertisement processing | |
CN111224870A (en) | Fault repairing method, equipment and storage medium in SR-MPLS Anycast scene | |
CN105763441A (en) | Method and device for transmitting message | |
CN103795625A (en) | Multi-protocol label switching network quick rerouting implementation method and device | |
Tomar et al. | MPLS-A Fail Safe Approach to Congestion Control | |
CN117675688A (en) | Optimization method, equipment and medium based on current SRV6 related protection technology |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20191203 |