CN104836739A - Flow forwarding method and device - Google Patents

Flow forwarding method and device Download PDF

Info

Publication number
CN104836739A
CN104836739A CN201510179041.6A CN201510179041A CN104836739A CN 104836739 A CN104836739 A CN 104836739A CN 201510179041 A CN201510179041 A CN 201510179041A CN 104836739 A CN104836739 A CN 104836739A
Authority
CN
China
Prior art keywords
route
outgoing interface
forwarding table
table items
routing protocol
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
Application number
CN201510179041.6A
Other languages
Chinese (zh)
Other versions
CN104836739B (en
Inventor
幺双超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201510179041.6A priority Critical patent/CN104836739B/en
Publication of CN104836739A publication Critical patent/CN104836739A/en
Application granted granted Critical
Publication of CN104836739B publication Critical patent/CN104836739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a flow forwarding method and device. The method comprises: acquiring routes corresponding to various route protocols, each route comprises a target address and an out interface; if the route protocol with the highest priority corresponds to multiple routes, selecting the out interface of one of the multiple routes as a main out interface of a route forwarding table item corresponding to the target address and selecting another one of the multiple routes as a standby out interface of the route forwarding table item; if the route protocol with the highest priority just corresponds to one route, selecting the out interface of one route as the main out interface of the route forwarding table item and selecting the out interface, different from the main out interface, of one route of another route protocol as the standby out interface of the route forwarding table item; forwarding the flow with the route forwarding table item. The method and the device achieve fast flow switching between different route protocols, expands an application scope, and is well suitable for a case with a large number of routes or dynamic routes.

Description

A kind of flow forwarding method and equipment
Technical field
The embodiment of the present invention relates to communication technical field, particularly a kind of flow forwarding method and equipment.
Background technology
In network as shown in Figure 1, when flow needs to be forwarded to device A 2 from equipment B 1, there are two paths, be respectively path (B1-A1-A2) and path (B1-B2-A3-A2).Under this networking, equipment B 1 can learn a route based on Routing Protocol, the destination address of this route is the IP address of device A 2, down hop is IP (the Internet Protocol of device A 1, the agreement interconnected between network) address, outgoing interface is outgoing interface 1, and is the flow of the IP address of device A 2 based on this route sending destination location.During link failure when between device A 1 and equipment B 1, equipment B 1 is through the link failure between device A 1 and equipment B 1 just being detected after a period of time, and relearn another route based on Routing Protocol, the destination address of this route is the IP address of device A 2, down hop is the IP address of equipment B 2, outgoing interface is outgoing interface 2, and is the flow of the IP address of device A 2 based on this route sending destination location.In above process, during link failure when between device A 1 and equipment B 1, equipment B 1 detects this fault and relearns time of another route longer, can stop, affect the business of user in this time.
To this, FRR (Fast-ReRoute is proposed in prior art, Quickly regroup) technology, two routes are learnt by Routing Protocol, be respectively route 1 and route 2, wherein the destination address of route 1 is the IP address of device A 2, down hop is the IP address of device A 1, outgoing interface is outgoing interface 1, the destination address of route 2 is the IP address of device A 2, down hop is the IP address of equipment B 2, outgoing interface is outgoing interface 2, because study is to two routes, as shown in Figure 1, when the path fails of route 1 correspondence, can directly by outgoing interface 2 transmitted traffic of route 2, and after there occurs fault, need not go to learn another new route again, thus make the time decreased of cutout, also can reduce the impact of customer service.
But FRR technological learning arrive two is based on same Routing Protocol, if the Routing Protocol of two route (such as route 1 and route 2) correspondences is different, then cannot realize FRR technology, also the route (such as route 1 and route 2) of two different routing protocols namely cannot be learnt from a Routing Protocol, flow still can stop, and the business of user also can be affected.
Summary of the invention
The present invention proposes a kind of flow forwarding method, be applied to the routing device of enable two or more Routing Protocol simultaneously, described two or more Routing Protocol has different priorities, and described method comprises:
Obtain the route that each Routing Protocol is corresponding, described route comprises destination address and outgoing interface;
If the highest Routing Protocol of priority is to there being multiple route, from described multiple route, select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to described destination address, and from described multiple route, select the outgoing interface of another route as the standby outgoing interface of described route forwarding table items;
If the highest Routing Protocol of described priority is only to there being a route, select the main outgoing interface of outgoing interface as described route forwarding table items of a described route, and select the standby outgoing interface of the outgoing interface different from described main outgoing interface as described route forwarding table items of other Routing Protocols route;
By described route forwarding table items, the flow received is forwarded.
Preferably, from described multiple route, select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to described destination address, and from described multiple route, select the outgoing interface of another route as the standby outgoing interface of described route forwarding table items, specifically comprise:
If the route that in described multiple route, only existence one is optimum, selects the outgoing interface of the route of described optimum as the main outgoing interface of described route forwarding table items, and selects the outgoing interface of the route of another non-optimal as the standby outgoing interface of described route forwarding table items;
If there is the route of multiple optimum in described multiple route, from the route of described multiple optimum, select the outgoing interface of two routes respectively as the main outgoing interface of described route forwarding table items and standby outgoing interface.
Preferably, the outgoing interface different from described main outgoing interface of a route of described other Routing Protocols of selection, as the standby outgoing interface of described route forwarding table items, specifically comprises:
If there is the outgoing interface different from described main outgoing interface in the route of the Routing Protocol that priority second is high; From the route of the high Routing Protocol of described priority second, select an outgoing interface different from described main outgoing interface to be the standby outgoing interface of described route forwarding table items;
If there is not the outgoing interface different from described main outgoing interface in the route of the Routing Protocol that described priority second is high, and there is the outgoing interface different from described main outgoing interface in the route of the Routing Protocol of priority third high, the outgoing interface that selection one is different from described main outgoing interface from the route of the Routing Protocol of described priority third high is the standby outgoing interface of described route forwarding table items; By that analogy, until determine the standby outgoing interface of described route forwarding table items.
Preferably, describedly by described route forwarding table items, the flow received to be forwarded, specifically comprises:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, and whether the main outgoing interface in judging the route forwarding table items that described destination address is corresponding can forward described flow;
If the determination result is YES, then described flow is forwarded by described main outgoing interface;
If judged result is no, then forward described flow by the standby outgoing interface in route forwarding table items corresponding to described destination address.
Preferably, describedly by described route forwarding table items, the flow received to be forwarded, specifically comprises:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, if the main outgoing interface in the route forwarding table items that the receiving interface of described flow is corresponding with described destination address is same interface, forward described flow by the standby outgoing interface in the route forwarding table items that described destination address is corresponding.
The invention allows for a kind of routing device, described routing device is enable two or more Routing Protocol simultaneously, and described two or more Routing Protocol has different priorities, and described routing device comprises:
Acquisition module, for obtaining route corresponding to each Routing Protocol, described route comprises destination address and outgoing interface;
First selects module, for when the highest Routing Protocol of priority is to when should have multiple route, from described multiple route, select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to described destination address, and from described multiple route, select the outgoing interface of another route as the standby outgoing interface of described route forwarding table items;
Second selects module, for when the highest Routing Protocol of described priority is only to when should have a route, select the main outgoing interface of outgoing interface as described route forwarding table items of a described route, and select the standby outgoing interface of the outgoing interface different from described main outgoing interface as described route forwarding table items of other Routing Protocols route;
Forwarding module, for forwarding the flow received by described route forwarding table items.
Preferably, described first selects module, specifically for:
When the route that in described multiple route, only existence one is optimum, select the outgoing interface of the route of described optimum as the main outgoing interface of described route forwarding table items, and select the outgoing interface of the route of another non-optimal as the standby outgoing interface of described route forwarding table items; Or
When there is the route of multiple optimum in described multiple route, from the route of described multiple optimum, select the outgoing interface of two routes respectively as the main outgoing interface of described route forwarding table items and standby outgoing interface.
Preferably, described second selects the outgoing interface different from described main outgoing interface of a route of other Routing Protocols of model choice as the standby outgoing interface of described route forwarding table items, specifically comprises:
When there is the outgoing interface different from described main outgoing interface in the route of the high Routing Protocol of priority second; From the route of the high Routing Protocol of described priority second, select an outgoing interface different from described main outgoing interface to be the standby outgoing interface of described route forwarding table items;
The outgoing interface different from described main outgoing interface is there is not in the route of the high Routing Protocol of described priority second, and when there is the outgoing interface different from described main outgoing interface in the route of the Routing Protocol of priority third high, the outgoing interface that selection one is different from described main outgoing interface from the route of the Routing Protocol of described priority third high is the standby outgoing interface of described route forwarding table items; By that analogy, until determine the standby outgoing interface of described route forwarding table items.
Preferably, described forwarding module, specifically for:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, and whether the main outgoing interface in judging the route forwarding table items that described destination address is corresponding can forward described flow;
If the determination result is YES, then described flow is forwarded by described main outgoing interface;
If judged result is no, then forward described flow by the standby outgoing interface in route forwarding table items corresponding to described destination address.
Preferably, described forwarding module, specifically for:
Second forwarding module, for upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, if the main outgoing interface in the route forwarding table items that the receiving interface of described flow is corresponding with described destination address is same interface, forward described flow by the standby outgoing interface in the route forwarding table items that described destination address is corresponding.
Compared with prior art, the embodiment of the invention discloses a kind of flow forwarding method and equipment, by obtaining route corresponding to each Routing Protocol, and two of two different routing protocols different outgoing interfaces are set to main outgoing interface in route forwarding table items and standby outgoing interface respectively, route forwarding table items converting flow described in later use, achieve the quick switching carrying out flow between different Routing Protocols, extend accommodation simultaneously, and the scene of a large amount of route or dynamic routing can be tackled very well.
Accompanying drawing explanation
Fig. 1 is application scenarios schematic diagram of the prior art;
Fig. 2 is the structural representation of a kind of traffic forwarding network that the embodiment of the present invention proposes;
Fig. 3 is the schematic flow sheet of a kind of flow forwarding method that the embodiment of the present invention proposes;
Fig. 4 is the structural representation of a kind of routing device that the embodiment of the present invention proposes.
Embodiment
For the above-mentioned problems in the prior art, the embodiment of the present invention one provides a kind of flow forwarding method, be applied to the routing device of enable two or more Routing Protocol simultaneously, two or more Routing Protocol has different priorities, wherein, Routing Protocol can have OSPF (Open Shortest Path First, ospf), ISIS (Intermediate System to Intermediate System, linking status Routing Protocol), RIP (Routing Information Protocol, routing information protocol), BGP (BorderGateway Protocol, Border Gateway Protocol) etc., and each Routing Protocol has priority, this priority can be that user is arranged based on needs or the scope of application etc., the priority that such as can arrange OSPF Routing Protocol is the highest, the priority of ISIS Routing Protocol is the second height, the priority of rip routing protocol is third high, the priority of BGP Routing Protocol is the 4th height.
As shown in Figure 2,7 routing devices, i.e. device A are had, equipment B, equipment C, equipment D, equipment E, equipment F, equipment G, wherein for the flow finally reaching equipment E (i.e. object equipment) from device A, owing to all needing finally to be forwarded to object equipment E through equipment B, being therefore described with equipment B, there are three paths in pass traffic, Article 1, path is (B-E), enable OSPF Routing Protocol and the ISIS Routing Protocol simultaneously of each equipment on this path; Article 2 path is (B-C-D-E), each devices enable ISIS Routing Protocol on this path, and Article 3 path is (B-F-G-E), each devices enable OSPF Routing Protocol on this path.
As shown in Figure 3, the method comprises the following steps:
Step 301, routing device obtain route corresponding to each Routing Protocol, and route comprises destination address and outgoing interface.
Each Routing Protocol calculates the route of this Routing Protocol, as shown in Figure 2, be described for routing device B, on routing device B, the route calculating OSPF Routing Protocol acquisition OSPF Routing Protocol has route 1 and route 2, wherein the destination address of route 1 is the IP address of equipment E, and down hop is the IP address of equipment E, and outgoing interface is outgoing interface 1; The destination address of route 2 is the IP address of equipment E, and down hop is the IP address of equipment F, and outgoing interface is outgoing interface 3; The route calculating the ISIS Routing Protocol that ISIS Routing Protocol obtains has route 3 and route 4, wherein the destination address of route 3 is the IP address of equipment E, down hop is the IP address of equipment E, outgoing interface is outgoing interface 1, the destination address of route 4 is the IP address of equipment E, down hop is the IP address of equipment C, and outgoing interface is outgoing interface 2, and the outgoing interface of visible route 3 is identical with the outgoing interface of route 1.
And after obtaining route corresponding to each Routing Protocol, can also the route of same Routing Protocol be sorted; Wherein, as shown in Figure 2, the cost of the route 1 of OSPF Routing Protocol is 1, and the cost of route 3 is 3 (i.e. 1+1+1), visible route 1 is better than in the route of route 2, ISIS Routing Protocol, and route 3 (cost=10) is better than route 4 (cost=30).
Step 302, routing device judge that whether Routing Protocol that priority is the highest is to there being multiple route.
If the determination result is YES (there is multiple route), then perform step 303; If judged result is no (there is a route), then perform step 304.
Step 303, routing device select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to destination address from multiple route, and from multiple route, select the outgoing interface of another route as the standby outgoing interface of route forwarding table items.
Concrete, at the highest Routing Protocol of priority to when should have multiple route, select the process of main outgoing interface and standby outgoing interface can include but not limited to following two kinds of situations:
If the route that in the multiple route of situation one, only existence one is optimum, routing device selects the main outgoing interface of outgoing interface as route forwarding table items of optimum route, and selects the outgoing interface of the route of another non-optimal as the standby outgoing interface of route forwarding table items.Such as, the Routing Protocol that priority is the highest is OSPF Routing Protocol, and the route of OSPF Routing Protocol is route 1 and route 2, wherein because route 1 (cost is 1) is better than route 2 (cost is 3), therefore route 1 is optimum, in the case, select the outgoing interface 1 of route 1 as destination address (as shown in Figure 2, IP address for equipment E) the main outgoing interface of corresponding route forwarding table items, then can select the standby outgoing interface of outgoing interface 3 as this route forwarding table items of route 2.
If there is the route of multiple optimum in the multiple route of situation two, routing device selects the outgoing interface of two routes respectively as the main outgoing interface of route forwarding table items and standby outgoing interface from the route of multiple optimum; Still be described with above-mentioned example, what such as priority was the highest is OSPF Routing Protocol, and the route 1 of OSPF Routing Protocol and route 2 are all of equal value, and be all optimum route, in the case, the main outgoing interface of outgoing interface 1 as route forwarding table items of route 1 can be selected, and select the outgoing interface 3 of route 2 as standby outgoing interface, or also can select the main outgoing interface of interface 3 as route forwarding table items, and select the standby outgoing interface of interface 1 as route forwarding table items.
Step 304, routing device select the outgoing interface of a route as the main outgoing interface of route forwarding table items, and select the standby outgoing interface of the outgoing interface different from main outgoing interface as route forwarding table items of other Routing Protocols route.
Concrete, when the highest Routing Protocol of priority is only to when should have a route, such as OSPF Routing Protocol only has a route 1, then select the outgoing interface 1 of this route 1 to be the main outgoing interface of route forwarding table items; As for the standby outgoing interface of this route forwarding table items, its selection course can be as follows:
(1) if there is the outgoing interface different from main outgoing interface in the route of the high Routing Protocol of priority second; From the route of the high Routing Protocol of priority second, select an outgoing interface different from main outgoing interface to be the standby outgoing interface of route forwarding table items; The Routing Protocol that such as priority second is high is ISIS Routing Protocol, the route 3 of ISIS Routing Protocol and route 4, wherein the outgoing interface (outgoing interface 1) of route 3 is identical with main outgoing interface (outgoing interface 1), and the outgoing interface of route 4 is outgoing interface 2, not identical with main outgoing interface, therefore, the standby outgoing interface of outgoing interface 2 as route forwarding table items of route 4 can be selected.
(2) if there is not the outgoing interface different from main outgoing interface in the route of the high Routing Protocol of priority second, and there is the outgoing interface different from main outgoing interface in the route of the Routing Protocol of priority third high, the outgoing interface that selection one is different from main outgoing interface from the route of the Routing Protocol of priority third high is the standby outgoing interface of route forwarding table items; By that analogy, until determine the standby outgoing interface of route forwarding table items.
Still be described with above-mentioned example, main outgoing interface is outgoing interface 1, if and the high ISIS Routing Protocol of priority second only has a route 3, also be there is not the outgoing interface different from main outgoing interface in the route of the ISIS Routing Protocol that priority second is high, in the case, if the outgoing interface of the route 5 of the rip routing protocol of priority third high (being such as outgoing interface 6) is different from main outgoing interface (outgoing interface 1), the standby outgoing interface of interface 6 as route forwarding table items just can be selected; If there is not the route outgoing interface different from main outgoing interface in the route of the rip routing protocol of priority third high yet, then continue to judge the BGP Routing Protocol that priority the 4th is high, detailed process is similar to the above, no longer carries out superfluous chatting at this, and by that analogy, until determine standby outgoing interface.
And concrete, judge that whether interface is identical, its process can be as follows:
(1) if the outgoing interface of the main outgoing interface in route forwarding table items and standby outgoing interface and each route is physics outgoing interface, then only need to judge that whether multiple physics outgoing interface name is identical, if identical, (outgoing interface of such as route 1 is outgoing interface 1, be outgoing interface 1 with the outgoing interface of route 3), then can determine that the plurality of physics outgoing interface is identical;
(2), if the outgoing interface of the main outgoing interface in route forwarding table items and standby outgoing interface and each route is logic outgoing interface, and logic outgoing interface comprises multiple physics outgoing interface, such as logic outgoing interface 1 comprises physics outgoing interface 1 and physics outgoing interface 2, the IP address of the down hop of physics outgoing interface 1 is IP1, the IP address of the down hop of physics outgoing interface 2 is IP2, in the case, first judge that whether the logic outgoing interface name of multiple logic outgoing interface is identical, if identical, also need the IP address of the down hop judging multiple logic outgoing interface whether identical, when judging that the IP address of down hop is identical, could confirm that the plurality of logic outgoing interface is identical.
By above-mentioned steps, after the main outgoing interface determining route forwarding table items and standby outgoing interface (i.e. step 303 or step 304), perform step 305.
Step 305, forwarded the flow received by route forwarding table items.
Its concrete process can be as follows:
Routing device upon receiving the traffic, utilizes the route forwarding table items that the inquiry of the destination address of flow is corresponding, and whether main outgoing interface in judging the route forwarding table items that destination address is corresponding can converting flow; If the determination result is YES, then by main outgoing interface converting flow; If judged result is no, then pass through the standby outgoing interface converting flow in route forwarding table items corresponding to destination address.
Under normal conditions, flow prioritizing selection is forwarded by main outgoing interface, such as shown in Figure 2, flow needs to be forwarded to object equipment E from equipment B, in the case, by the route forwarding table items that the IP address search of object equipment E is corresponding, the main outgoing interface (i.e. outgoing interface 1) of prioritizing selection route forwarding table items by pass traffic to object equipment E, if and main outgoing interface can not converting flow (link failure such as between equipment B and equipment E or main outgoing interface fault), just directly can forward this flow by the standby outgoing interface (being such as outgoing interface 3) of route forwarding table items, owing to not needing to delete through Routing Protocol convergence and this Routing Protocol the route issued, the complex process of flow switch could be realized, improve the efficiency of switching, avoid flow interrupt.
Routing device upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of flow is corresponding, if the main outgoing interface in the route forwarding table items that the receiving interface of flow is corresponding with destination address is same outgoing interface, by the standby outgoing interface converting flow in the route forwarding table items that destination address is corresponding.
In the case, such as the equipment C in Fig. 2, the receiving interface of flow is outgoing interface 4, and the main outgoing interface in the route forwarding table items that now destination address (the IP address of equipment E) is corresponding is also outgoing interface 4, in the case, just need to forward this flow by standby outgoing interface (such as outgoing interface 5).
In addition, the present invention can also arrange a switching mechanism, for determining whether perform above-mentioned steps, when the state that switching mechanism is in out, performs above-mentioned steps; When switching mechanism is in the state of pass, do not perform above-mentioned steps; With this can make user can as required or concrete scene utilize this switching mechanism determine whether perform above-mentioned steps of the present invention.
In order to be further detailed the present invention, the embodiment of the present invention two also proposed a kind of routing device, and described routing device is enable two or more Routing Protocol simultaneously, and described two or more Routing Protocol has different priorities, and as shown in Figure 4, this equipment comprises:
Acquisition module 401, for obtaining route corresponding to each Routing Protocol, described route comprises destination address and outgoing interface;
First selects module 402, for when the highest Routing Protocol of priority is to when should have multiple route, from described multiple route, select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to described destination address, and from described multiple route, select the outgoing interface of another route as the standby outgoing interface of described route forwarding table items;
Second selects module 403, for when the highest Routing Protocol of described priority is only to when should have a route, select the main outgoing interface of outgoing interface as described route forwarding table items of a described route, and select the standby outgoing interface of the outgoing interface different from described main outgoing interface as described route forwarding table items of other Routing Protocols route;
Forwarding module 404, for forwarding the flow received by described route forwarding table items.
Concrete, described first selects module 402, specifically for:
When the route that in described multiple route, only existence one is optimum, select the outgoing interface of the route of described optimum as the main outgoing interface of described route forwarding table items, and select the outgoing interface of the route of another non-optimal as the standby outgoing interface of described route forwarding table items; Or
When there is the route of multiple optimum in described multiple route, from the route of described multiple optimum, select the outgoing interface of two routes respectively as the main outgoing interface of described route forwarding table items and standby outgoing interface.
Described second selects module 403 to select the outgoing interface different from described main outgoing interface of other Routing Protocols route as the standby outgoing interface of described route forwarding table items, specifically comprises:
When there is the outgoing interface different from described main outgoing interface in the route of the high Routing Protocol of priority second; From the route of the high Routing Protocol of described priority second, select an outgoing interface different from described main outgoing interface to be the standby outgoing interface of described route forwarding table items;
The outgoing interface different from described main outgoing interface is there is not in the route of the high Routing Protocol of described priority second, and when there is the outgoing interface different from described main outgoing interface in the route of the Routing Protocol of priority third high, the outgoing interface that selection one is different from described main outgoing interface from the route of the Routing Protocol of described priority third high is the standby outgoing interface of described route forwarding table items; By that analogy, until determine the standby outgoing interface of described route forwarding table items.
Described forwarding module 404 specifically for:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, and whether the main outgoing interface in judging the route forwarding table items that described destination address is corresponding can forward described flow;
If the determination result is YES, then described flow is forwarded by described main outgoing interface;
If judged result is no, then forward described flow by the standby outgoing interface in route forwarding table items corresponding to described destination address;
Described forwarding module 404 specifically for: upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, if the main outgoing interface in the route forwarding table items that the receiving interface of described flow is corresponding with described destination address is same interface, forward described flow by the standby outgoing interface in the route forwarding table items that described destination address is corresponding.
Compared with prior art, the embodiment of the invention discloses a kind of traffic forwarding and generate method and apparatus, by obtaining route corresponding to each Routing Protocol, and two of two different routing protocols different outgoing interfaces are set to main outgoing interface in route forwarding table items and standby outgoing interface respectively, route forwarding table items converting flow described in later use, achieve the quick switching carrying out flow between different Routing Protocols, extend accommodation simultaneously, and the scene of a large amount of route or dynamic routing can be tackled very well.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention can by hardware implementing, and the mode that also can add necessary general hardware platform by software realizes.Based on such understanding, technical scheme of the present invention can embody with the form of software product, it (can be CD-ROM that this software product can be stored in a non-volatile memory medium, USB flash disk, portable hard drive etc.) in, comprise some instructions and perform each method implementing described in scene of the present invention in order to make a computer equipment (can be personal computer, server, or the network equipment etc.).
It will be appreciated by those skilled in the art that accompanying drawing is a schematic diagram preferably implementing scene, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
It will be appreciated by those skilled in the art that the module in the device implemented in scene can carry out being distributed in the device of enforcement scene according to implementing scene description, also can carry out respective change and being arranged in the one or more devices being different from this enforcement scene.The module of above-mentioned enforcement scene can merge into a module, also can split into multiple submodule further.
The invention described above sequence number, just to describing, does not represent the quality implementing scene.
Be only several concrete enforcement scene of the present invention above, but the present invention is not limited thereto, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.

Claims (10)

1. a flow forwarding method, be applied to the routing device of enable two or more Routing Protocol simultaneously, described two or more Routing Protocol has different priorities, it is characterized in that, described method comprises:
Obtain the route that each Routing Protocol is corresponding, described route comprises destination address and outgoing interface;
If the highest Routing Protocol of priority is to there being multiple route, from described multiple route, select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to described destination address, and from described multiple route, select the outgoing interface of another route as the standby outgoing interface of described route forwarding table items;
If the highest Routing Protocol of described priority is only to there being a route, select the main outgoing interface of outgoing interface as described route forwarding table items of a described route, and select the standby outgoing interface of the outgoing interface different from described main outgoing interface as described route forwarding table items of other Routing Protocols route;
By described route forwarding table items, the flow received is forwarded.
2. the method for claim 1, it is characterized in that, from described multiple route, select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to described destination address, and from described multiple route, select the outgoing interface of another route as the standby outgoing interface of described route forwarding table items, specifically comprise:
If the route that in described multiple route, only existence one is optimum, selects the outgoing interface of the route of described optimum as the main outgoing interface of described route forwarding table items, and selects the outgoing interface of the route of another non-optimal as the standby outgoing interface of described route forwarding table items;
If there is the route of multiple optimum in described multiple route, from the route of described multiple optimum, select the outgoing interface of two routes respectively as the main outgoing interface of described route forwarding table items and standby outgoing interface.
3. the method for claim 1, is characterized in that, the outgoing interface different from described main outgoing interface of a route of described other Routing Protocols of selection, as the standby outgoing interface of described route forwarding table items, specifically comprises:
If there is the outgoing interface different from described main outgoing interface in the route of the Routing Protocol that priority second is high; From the route of the high Routing Protocol of described priority second, select an outgoing interface different from described main outgoing interface to be the standby outgoing interface of described route forwarding table items;
If there is not the outgoing interface different from described main outgoing interface in the route of the Routing Protocol that described priority second is high, and there is the outgoing interface different from described main outgoing interface in the route of the Routing Protocol of priority third high, the outgoing interface that selection one is different from described main outgoing interface from the route of the Routing Protocol of described priority third high is the standby outgoing interface of described route forwarding table items; By that analogy, until determine the standby outgoing interface of described route forwarding table items.
4. the method for claim 1, is characterized in that, is describedly forwarded the flow received by described route forwarding table items, specifically comprises:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, and whether the main outgoing interface in judging the route forwarding table items that described destination address is corresponding can forward described flow;
If the determination result is YES, then described flow is forwarded by described main outgoing interface;
If judged result is no, then forward described flow by the standby outgoing interface in route forwarding table items corresponding to described destination address.
5. the method for claim 1, is characterized in that, is describedly forwarded the flow received by described route forwarding table items, specifically comprises:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, if the main outgoing interface in the route forwarding table items that the receiving interface of described flow is corresponding with described destination address is same interface, forward described flow by the standby outgoing interface in the route forwarding table items that described destination address is corresponding.
6. a routing device, described routing device is enable two or more Routing Protocol simultaneously, and described two or more Routing Protocol has different priorities, it is characterized in that, described routing device comprises:
Acquisition module, for obtaining route corresponding to each Routing Protocol, described route comprises destination address and outgoing interface;
First selects module, for when the highest Routing Protocol of priority is to when should have multiple route, from described multiple route, select the outgoing interface of a route as the main outgoing interface of route forwarding table items corresponding to described destination address, and from described multiple route, select the outgoing interface of another route as the standby outgoing interface of described route forwarding table items;
Second selects module, for when the highest Routing Protocol of described priority is only to when should have a route, select the main outgoing interface of outgoing interface as described route forwarding table items of a described route, and select the standby outgoing interface of the outgoing interface different from described main outgoing interface as described route forwarding table items of other Routing Protocols route;
Forwarding module, for forwarding the flow received by described route forwarding table items.
7. equipment as claimed in claim 6, is characterized in that, described first selects module, specifically for:
When the route that in described multiple route, only existence one is optimum, select the outgoing interface of the route of described optimum as the main outgoing interface of described route forwarding table items, and select the outgoing interface of the route of another non-optimal as the standby outgoing interface of described route forwarding table items; Or
When there is the route of multiple optimum in described multiple route, from the route of described multiple optimum, select the outgoing interface of two routes respectively as the main outgoing interface of described route forwarding table items and standby outgoing interface.
8. equipment as claimed in claim 6, is characterized in that, described second selects the outgoing interface different from described main outgoing interface of a route of other Routing Protocols of model choice as the standby outgoing interface of described route forwarding table items, specifically comprises:
When there is the outgoing interface different from described main outgoing interface in the route of the high Routing Protocol of priority second; From the route of the high Routing Protocol of described priority second, select an outgoing interface different from described main outgoing interface to be the standby outgoing interface of described route forwarding table items;
The outgoing interface different from described main outgoing interface is there is not in the route of the high Routing Protocol of described priority second, and when there is the outgoing interface different from described main outgoing interface in the route of the Routing Protocol of priority third high, the outgoing interface that selection one is different from described main outgoing interface from the route of the Routing Protocol of described priority third high is the standby outgoing interface of described route forwarding table items; By that analogy, until determine the standby outgoing interface of described route forwarding table items.
9. equipment as claimed in claim 6, is characterized in that, described forwarding module, specifically for:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, and whether the main outgoing interface in judging the route forwarding table items that described destination address is corresponding can forward described flow;
If the determination result is YES, then described flow is forwarded by described main outgoing interface;
If judged result is no, then forward described flow by the standby outgoing interface in route forwarding table items corresponding to described destination address.
10. equipment as claimed in claim 6, is characterized in that, described forwarding module, specifically for:
Upon receiving the traffic, utilize the route forwarding table items that the destination address inquiry of described flow is corresponding, if the main outgoing interface in the route forwarding table items that the receiving interface of described flow is corresponding with described destination address is same interface, forward described flow by the standby outgoing interface in the route forwarding table items that described destination address is corresponding.
CN201510179041.6A 2015-04-15 2015-04-15 A kind of flow forwarding method and equipment Active CN104836739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510179041.6A CN104836739B (en) 2015-04-15 2015-04-15 A kind of flow forwarding method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510179041.6A CN104836739B (en) 2015-04-15 2015-04-15 A kind of flow forwarding method and equipment

Publications (2)

Publication Number Publication Date
CN104836739A true CN104836739A (en) 2015-08-12
CN104836739B CN104836739B (en) 2018-08-24

Family

ID=53814384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510179041.6A Active CN104836739B (en) 2015-04-15 2015-04-15 A kind of flow forwarding method and equipment

Country Status (1)

Country Link
CN (1) CN104836739B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019076047A1 (en) * 2017-10-20 2019-04-25 华为技术有限公司 Traffic forwarding method and traffic forwarding apparatus

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859276A (en) * 2005-07-27 2006-11-08 华为技术有限公司 Multiple port path selecting method for network equipment
US20140334286A1 (en) * 2013-05-10 2014-11-13 Telefonaktiebolaget L M Ericsson (Publ) Inter-domain fast reroute methods and network devices
CN104301245A (en) * 2014-10-22 2015-01-21 杭州华三通信技术有限公司 Method and device for forwarding traffic in hybrid protocol network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1859276A (en) * 2005-07-27 2006-11-08 华为技术有限公司 Multiple port path selecting method for network equipment
US20140334286A1 (en) * 2013-05-10 2014-11-13 Telefonaktiebolaget L M Ericsson (Publ) Inter-domain fast reroute methods and network devices
CN104301245A (en) * 2014-10-22 2015-01-21 杭州华三通信技术有限公司 Method and device for forwarding traffic in hybrid protocol network

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019076047A1 (en) * 2017-10-20 2019-04-25 华为技术有限公司 Traffic forwarding method and traffic forwarding apparatus
CN109698788A (en) * 2017-10-20 2019-04-30 华为技术有限公司 Flow forwarding method and flow forwarding device
CN109698788B (en) * 2017-10-20 2021-06-15 华为技术有限公司 Flow forwarding method and device and computer readable medium
US11582141B2 (en) 2017-10-20 2023-02-14 Huawei Technologies Co., Ltd. Traffic forwarding method and traffic forwarding apparatus

Also Published As

Publication number Publication date
CN104836739B (en) 2018-08-24

Similar Documents

Publication Publication Date Title
US9502111B2 (en) Weighted equal cost multipath routing
CN102739518B (en) A kind of flow load sharing method and apparatus
CN103139075B (en) A kind of message transmitting method and equipment
CN102447639B (en) A kind of policy routing method and device
US9590890B2 (en) Transfer apparatus, server, and route changing method
CN104486224A (en) Routing learning method and equipment
US20170201466A1 (en) Data packet processing apparatus and method
CN106161246A (en) The implementation method of alternate routing and device
CN103201987A (en) Prioritization of routing information updates
GB2578415A (en) Methods and systems for transmitting information packets through tunnel groups at a network node
CN103023773A (en) Method, device and system for forwarding message in multi-topology network
CN102904825A (en) Hash based message transmission method and device
CN104579966A (en) Method for generating forwarding table, forwarding nodes and controller
CN104253711A (en) Management method for Openflow group tables in SDN (software defined network) and equipment
EP2830267A1 (en) Control apparatus, communication system, node control method and program
CN103220217B (en) A kind of route generating method and equipment
CN103259720B (en) A kind of data transmission method and equipment based on MTR
CN103179032B (en) A kind of route backup method and device
CN103152265A (en) Message forwarding method and equipment in SPB (Shortest Path Bridge) network
US20120051364A1 (en) Distributed routing according to longest match principle
CN104836739A (en) Flow forwarding method and device
CN103595649A (en) Method and system for achieving load balance
CN104852848A (en) Data transmission method and device
CN104270310A (en) Message processing method and device based on RIP
CN102857424B (en) Method and equipment for establishing LSP (label switched path) in MPLS (multi-protocol label switching) network

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant