Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiment.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of session failure detection method, and wherein session failure can be path failure or node failure, and as shown in Figure 2, the method comprises the steps:
Step S201: the master session of setting up on the first path between two operator edges (PE) in autonomous system is carried out to backup protection with the second path;
Step S202: in the time utilizing detection messages to detect that master session breaks down, by the business convergence on described master session to the backup session of setting up on the second path, wherein backup session is based upon between described two operator edges based on the second loopback interface, and this second loopback interface operates on the second path in the second process based on Interior Gateway Protocol.
Above-mentioned detection messages can be IP forward detection report, and for example IP Ping message can be also MPLS forward detection report, for example MPLS Ping message.
The executive agent of above-mentioned each step can be the equipment at master session place.
In addition, above-mentioned utilization is carried out the backup protection of master session can adopt multiple different backup protection pattern as the second path between two routing devices of operator edge.For different backup protection patterns, in the time of master session path fails, master session is converged to the also difference of mode in the second path.Describe each specific embodiment of the present invention in detail with different backup protection patterns below.
Embodiment mono-
Still referring to the network structure of the autonomous system shown in Fig. 1.
In Fig. 1, routing device R1 and R2, as two routing devices of operator edge, also can be designated as respectively PE1 and PE2.Between R1 and R2, there are two paths, i.e. R1-R3-R6-R2 and R1-R4-R5-R2.As shown in Figure 3, the method that the present embodiment provides comprises the steps:
Step S301: the interior zone operation IGP agreement between R1 and R2, and on the R1-R4-R5-R2 of path, move first process (being designated as Process1) based on IGP, on the R1-R3-R6-R2 of another one path, move another the second process (being designated as Process2) based on IGP.
Here, each process is safeguarded a network topology, and that in the first process, safeguard is path R1-R4-R5-R2, and that in the second process, safeguard is R1-R3-R6-R2.And the process in this path of operation maintenance in any one routing device in each path, be not difficult to draw and in routing device R4 and R5, move the first process, in R3 and R6, move the second process, in routing device R1 and R2, move two processes, be i.e. the first process and the second process.
Step S302: all set up two local loopback interfaces and (be designated as respectively lookback1 and lookback2 interface on routing device R1 and R2, be called the first local loopback interface and the second local loopback interface), the first local loopback interface operates in the first process, and the second local loopback interface operates in the second process.
Step S303: set up a bgp session (Session) by the first loopback interface on routing device R1 and R2, because the work that has been used for routing forwarding is given tacit consent in this session, be therefore called master session (Primary Session).The second loopback interface on R1 and R2 is used for setting up second bgp session, and this session, for the backup as master session, can be called backup session.
Step S304: only do the configuration backup to master session on the R1-R3-R6-R2 of path, do not set up also sending and receiving route not of session, now do not need to set up TCP and connect, save TCP connection resource.This state can be called Waiting (wait) state.
Step S305: regularly utilize the path of the path R1-R4-R5-R2 of IP Ping message or MPLS Ping packet check master session whether to break down, in the time arriving fault with IP Ping packet check, there is IP and forward fault, in the time arriving fault with MPLS Ping packet check, there is MPLS and forward fault.
The frequency detecting is set according to the reliability requirement of network, is preferably made as every 1s and detects once.The overtime judgement time arranging in testing process is preferably 1s.
Still suppose the path fails between routing device R4 or R4 and R5, master session can detect the path fails of the path R1-R4-R5-R2 of master session, performs step S306.
Step S306: set up backup session on the R1-R3-R6-R2 of path, this backup session is to set up by the second local loopback interface of above-mentioned R1 and R2.
It should be noted that, before setting up backup session, preferably, carry out the negotiation of session establishment ability, do not send mutually route to determine, and can process the situation of route refresh, can be called the negotiation of Connecting ability.
Particularly, can be by the time setting up backup session, in optional parameters, increase special TLV (Type-Length-Values, type lengths values), for carrying routing iinformation, particularly, can be in the following way:
Parameter type:capabilities(1Byte) |
Parameter length:(1Byte) |
Capability code:(1Byte) |
Capability length:(1Byte) |
Capability Value:(2Byte) |
Step S307: send route refresh message by backup session;
Step S308: receive route by backup session.
Step S309: the route receiving is made as preferably, and as the foundation of data retransmission, thereby the convergence that has realized master session route is switched.
Now, be deployed as on the equipment of operator edge and have master session and backup session simultaneously, the executive agent of step S2308-309 is the equipment that is deployed as this operator edge.
In the present embodiment; in the time that master session does not find that path failure occurs in master session path; in only backup configuration of the path for setting up backup session; temporarily do not set up backup session; thereby can temporarily need not set up TCP connects; in the time that TCP connection resource is more nervous, this backup protection mode is more applicable.
Can realize the master session fault detecting in autonomous system by the embodiment of the present invention, and and then the convergence that completes session and route switch, be interrupted the fault recovery of business thereby realize.
Embodiment bis-
Still referring to the network structure of the autonomous system shown in Fig. 1.
In Fig. 1, routing device R1 and R2, as two routing devices of operator edge, also can be designated as respectively PE1 and PE2.Between R1 and R2, there are two paths, i.e. R1-R3-R6-R2 and R1-R4-R5-R2.
As shown in Figure 4, the session failure detection method that the present embodiment provides comprises the steps:
Step S401: the interior zone operation IGP agreement between R1 and R2, and on the R1-R4-R5-R2 of path, run first process (being designated as Process1) based on IGP, on the R1-R3-R6-R2 of another one path, move another the second process (being designated as Process2) based on IGP.
Step S402: set up respectively two local loopback interfaces on routing device R1 and R2, be called the first local loopback interface and the second local loopback interface, the first local loopback interface operates in the first process, and the second local loopback interface operates in the second process.
Step S403: set up a bgp session by the first loopback interface on routing device R1 and R2, because the work that has been used for main routing forwarding is given tacit consent in this session, be therefore called master session (Primary Session).The second loopback interface on R1 and R2 is used for setting up second bgp session, and this session, for the backup as master session, can be called backup session (Backup Session).
Step S404: on the R1-R3-R6-R2 of path, set up backup session, but sending and receiving route not.Now, due to temporary transient sending and receiving route not, can save memory source.This state can be called Connecting state, send mutually survival (Keepalive) message in the session meeting of this state, but only receiving after route refresh (RouteRefresh) message, just issuing and receiving routing iinformation.
Step S405: regularly utilize IP Ping message or MPLS Ping packet check master session whether to break down, for example detect path failure or node failure, as detect path R1-R4-R5-R2 and whether break down, in the time arriving fault with IP Ping packet check, there is IP and forward fault, in the time arriving fault with MPLS Ping packet check, MPLS occurs and forward fault, not taking turns is to utilize which kind of detection mode in above-mentioned two kinds of detection modes path failure to be detected, all will perform step S406.
The frequency detecting is set according to the reliability requirement of network, is preferably made as every 1s and detects once.The overtime judgement time arranging in testing process is preferably 1s.
Still suppose the path fails between routing device R4 or R4 and R5, master session can detect the path fails of the path R1-R4-R5-R2 of master session, performs step S406.
Step S406: send route refresh message by backup session;
Step S407: receive route by backup session;
Step S408: by backup session, the route receiving is made as preferably, and issues forwarding-table item to hardware device, as the foundation of data retransmission.Thereby the convergence that has realized master session route is switched.
In the present embodiment; in the time not finding to set up the path fails of master session; although set up backup session in the path of setting up backup session; but temporarily sending and receiving route not; thereby can be temporarily committed memory resource not; in the time that memory source is more nervous, this backup protection mode is more applicable.
The master session fault in autonomous system can be detected by the embodiment of the present invention, and and then the convergence that completes session and route switch, be interrupted the fault recovery of business thereby realize.
Embodiment tri-
Still referring to the network structure of the autonomous system shown in Fig. 1.
In Fig. 1, routing device R1 and R2, as two routing devices of operator edge, also can be designated as respectively PE1 and PE2.Between R1 and R2, there are two paths, i.e. R1-R3-R6-R2 and R1-R4-R5-R2.
As shown in Figure 5, the session failure detection method that the present embodiment provides comprises the steps:
Step S501: the interior zone operation IGP agreement between R1 and R2, and on the R1-R4-R5-R2 of path, run first process (being designated as Process1) based on IGP, on the R1-R3-R6-R2 of another one path, move another the second process (being designated as Process2) based on IGP.
Step S502: all set up two local loopback interfaces on routing device R1 and R2, be called the first local loopback interface and the second local loopback interface, the first local loopback interface operates in the first process, and the second local loopback interface operates in the second process.
Step S503: set up a bgp session by the first loopback interface on routing device R1 and R2, because the work that has been used for main routing forwarding is given tacit consent in this session, be therefore called master session (Primary Session).The second loopback interface on R1 and R2 is used for setting up second bgp session, and this session, for the backup as master session, can be called backup session (Backup Session).
Step S504: on the R1-R3-R6-R2 of path, set up backup session, sending and receiving route simultaneously, but be not made as preferably, do not instruct forwarding yet.
This state can be called Selecting state.
S505: regularly utilize the path of the path R1-R4-R5-R2 of IP Ping message or MPLS Ping packet check master session whether to break down, in the time arriving fault with IP Ping packet check, there is IP and forward fault, in the time arriving fault with MPLS Ping packet check, there is MPLS and forward fault, no matter be to utilize which kind of detection mode in above-mentioned two kinds of detection modes path failure to be detected, all will perform step S506.
Step S506: the route receiving is made as preferably, and as the foundation of data retransmission.Thereby the convergence that has realized master session route is switched.
In execution step when S504, the backup session of foundation is in Selecting state, and this state only just can be made as route preferably receiving after trigger message, and issues routing table.
By embodiment, the master session fault in autonomous system can be detected, and and then the convergence that completes session and route switch, be interrupted the fault recovery of business thereby realize.
The embodiment of the present invention is also corresponding provides a kind of routing device, and this routing device can be deployed as the operator edge (PE) in autonomous system, and as shown in Figure 6, this routing device 600 comprises:
Backup protection unit 601, for carrying out backup protection by the master session of setting up on the first path between this routing device 600 of autonomous system and another operator edge with the second path;
Whether detecting unit 602, break down for utilizing detection messages to detect master session, if broken down, notice convergence unit 603 carries out work;
Convergence unit 603, for receiving after the notice of detecting unit 602, by the business convergence on master session to the backup session of setting up on the second path, described backup session is based upon between described two operator edges based on the second loopback interface, and described the second loopback interface operates on the second path in the second process based on Interior Gateway Protocol.
According to the mode difference of backup protection, the backup protection unit 601 in the routing device 600 providing in the present embodiment and convergence unit 603 have different implementations.
For instance, at least can comprise that following three kinds of modes are arbitrary:
Mode one
Referring to Fig. 7, backup protection unit 601 comprises: the first configuration backup unit 6011, and for described master session being done to configuration backup in described the second path.
Referring to Fig. 8, convergence unit 603 comprises: the first backup session is set up unit 6031, for setting up backup session in the second path;
The first routing unit 6032, for receiving and send route by described backup session;
The first preferred setting unit 6033, for the route of reception is made as preferably, and as the foundation of data retransmission.
Mode two
Referring to Fig. 9, backup protection unit 601 comprises: the second configuration backup unit 60111, for described master session being done to configuration backup in described the second path;
The second backup session is set up unit 60121, for setting up backup session in the second path.
Referring to Figure 10, convergence unit 603 comprises:
Secondary route unit 60311, for receiving and send route by described backup session;
The second preferred setting unit 60321, for the route of reception is made as preferably, and as the foundation of data retransmission.
Mode three
Referring to Figure 11, backup protection unit 601 comprises:
The 3rd configuration backup unit 60112, for doing configuration backup in described the second path to described master session;
The 3rd backup session is set up unit 60122, for setting up backup session in the second path;
Third Road is by unit 60132, for receiving and send route by described backup session.
Convergence unit 603 comprises:
The 3rd preferred setting unit 60312, for the route of reception is made as preferably, and as the foundation of data retransmission.
In addition, routing device in the present embodiment can also comprise: master session is set up unit 604, for setting up master session based on the first loopback interface between described two operator edges, described the first loopback interface operates on the first path in the first process based on Interior Gateway Protocol.
The routing device providing by the embodiment of the present invention, can detect the fault of the master session of the foundation in autonomous system, and and then the convergence that completes session and route switch, thereby realize the fault recovery of the business that is interrupted.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method is can carry out the hardware that instruction is relevant by program to complete, described program can be stored in a computer read/write memory medium, this program is in the time carrying out, comprise the steps: the master session of setting up on the first path between two operator edge PE in autonomous system to carry out backup protection with the second path, in the time utilizing detection messages to detect that described master session breaks down, by the business convergence on described master session to the backup session of setting up on described the second path, described backup session is based upon between described two operator edges based on the second loopback interface, described the second loopback interface operates on described the second path in the second process based on Interior Gateway Protocol.Described storage medium, as: ROM/RAM, magnetic disc, CD etc.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.