Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention clearer, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
The embodiment of the 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, this method comprises the steps:
Step S201: the master session of setting up on first path between two operator edges (PE) in the autonomous system is carried out backup protection with second path;
Step S202: when utilizing detection messages to detect master session to break down, on the backup session that business convergence on the described master session is set up to second path, wherein backup session is based upon between described two operator edges based on second loopback interface, and this second loopback interface operates on second path in second process based on Interior Gateway Protocol.
Above-mentioned detection messages can be the IP forward detection report, and for example IP Ping message also can be 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 can adopting multiple different backup protection pattern to the backup protection of master session as second path between two routing devices of operator edge.For different backup protection patterns, when the master session path fails, the mode that master session is converged in second path is also different.Below describe each specific embodiment of the present invention in detail with different backup protection pattern.
Embodiment one
Still referring to the network structure of the autonomous system shown in Fig. 1.
In Fig. 1, routing device R1 and R2 also can be designated as PE1 and PE2 respectively as two routing devices of operator edge.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 provides of present embodiment comprises the steps:
Step S301: the interior zone operation IGP agreement between R1 and R2, and first process (being designated as Process1) of operation on the R1-R4-R5-R2 of path based on IGP, another second process (being designated as Process2) of operation on the R1-R3-R6-R2 of another one path based on IGP.
Here, each process is safeguarded a network topology, and that safeguard in first process is path R1-R4-R5-R2, and that safeguard in second process is R1-R3-R6-R2.And process in this path of operation maintenance all in any one routing device in each path, be not difficult to draw operation first process among routing device R4 and the R5, operation second process among R3 and the R6, operation two processes, i.e. first process and second process among routing device R1 and the R2.
Step S302: on routing device R1 and R2, all set up two local loopback interfaces and (be designated as lookback1 and lookback2 interface respectively, be called the first local loopback interface and the second local loopback interface), the first local loopback interface operates in first process, and the second local loopback interface operates in second process.
Step S303: set up a bgp session (Session) by first loopback interface on routing device R1 and the R2,, therefore be called master session (Primary Session) because this session acquiescence is used to finish the work of routing forwarding.Second loopback interface on R1 and R2 is used to set up second bgp session, and this session is used 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 session and yet do not send and receive route, do not need to set up TCP and connect this moment, saves the TCP connection resource.This state can be called Waiting (wait) state.
Step S305: whether break down in the path that regularly utilizes IP Ping message or MPLS Ping message to detect the path R1-R4-R5-R2 of master session, when detecting fault with IP Ping message, IP then takes place transmit fault, when detecting fault with MPLS Ping message, MPLS then takes place transmit fault.
The frequency that detects is set according to the reliability requirement of network, preferably is made as every 1s to detect once.The overtime judgement time that is provided with in the testing process is preferably 1s.
Still suppose the path fails between routing device R4 or R4 and the R5, master session can detect the path fails of the path R1-R4-R5-R2 of master session, then execution in 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.
Need to prove, before setting up backup session, preferably, carry out the negotiation that ability is set up in session, do not send route mutually with definite, and can handle the situation of route refresh, can be called the negotiation of Connecting ability.
Particularly, can be by when setting up backup session, in optional parameters, increase special TLV (Type-Length-Values, type lengths values), be used to carry 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 that receives is made as preferably, and as the foundation of data forwarding, thereby the convergence that has realized the master session route is switched.
At this moment, 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; when master session does not find that path failure takes place in the master session path; the backup configuration only in the path that is used for setting up backup session; temporarily do not set up backup session; thereby can temporarily need not set up TCP connects; when the TCP connection resource was nervous, this backup protection mode was more suitable.
Can realize detecting master session fault in the autonomous system by the embodiment of the invention, and and then the convergence of finishing session and route switch, thereby realize being interrupted professional fault recovery.
Embodiment two
Still referring to the network structure of the autonomous system shown in Fig. 1.
In Fig. 1, routing device R1 and R2 also can be designated as PE1 and PE2 respectively as two routing devices of operator edge.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 provides of present embodiment comprises the steps:
Step S401: the interior zone operation IGP agreement between R1 and R2, and first process (being designated as Process1) of operation on the R1-R4-R5-R2 of path based on IGP, another second process (being designated as Process2) of operation on the R1-R3-R6-R2 of another one path based on IGP.
Step S402: on routing device R1 and R2, set up two local loopback interfaces respectively, be called the first local loopback interface and the second local loopback interface, the first local loopback interface operates in first process, and the second local loopback interface operates in second process.
Step S403: set up a bgp session by first loopback interface on routing device R1 and the R2,, therefore be called master session (Primary Session) because this session acquiescence is used to finish the work of main routing forwarding.Second loopback interface on R1 and R2 is used to set up second bgp session, and this session is used 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 do not send and receive route.Can save memory source owing to temporarily do not send and receive route this moment.This state can be called the Connecting state, and the session meeting that is in this state sends survival (Keepalive) message mutually, but only after receiving route refresh (RouteRefresh) message, just issue and reception routing iinformation.
Step S405: regularly utilize IP Ping message or MPLS Ping message to detect master session and whether break down, for example detect path failure or node failure, as detect path R1-R4-R5-R2 and whether break down, when detecting fault with IP Ping message, IP then taking place transmit fault, when detecting fault with MPLS Ping message, MPLS then takes place transmit fault, not taking turns is to utilize which kind of detection mode in above-mentioned two kinds of detection modes to detect path failure, all with execution in step S406.
The frequency that detects is set according to the reliability requirement of network, preferably is made as every 1s to detect once.The overtime judgement time that is provided with in the testing process is preferably 1s.
Still suppose the path fails between routing device R4 or R4 and the R5, master session can detect the path fails of the path R1-R4-R5-R2 of master session, then execution in 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 that receives is made as preferably, and issues forwarding-table item, as the foundation of data forwarding to hardware device.Thereby the convergence that has realized the master session route is switched.
In the present embodiment; when not finding to set up the path fails of master session; though in setting up the path of backup session, set up backup session; but temporarily do not send and receive route; thereby can be temporarily committed memory resource not; when memory source was nervous, this backup protection mode was more suitable.
Can detect master session fault in the autonomous system by the embodiment of the invention, and and then the convergence of finishing session and route switch, thereby realize being interrupted professional fault recovery.
Embodiment three
Still referring to the network structure of the autonomous system shown in Fig. 1.
In Fig. 1, routing device R1 and R2 also can be designated as PE1 and PE2 respectively as two routing devices of operator edge.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 provides of present embodiment comprises the steps:
Step S501: the interior zone operation IGP agreement between R1 and R2, and first process (being designated as Process1) of operation on the R1-R4-R5-R2 of path based on IGP, another second process (being designated as Process2) of operation on the R1-R3-R6-R2 of another one path based on IGP.
Step S502: on routing device R1 and R2, all set up two local loopback interfaces, be called the first local loopback interface and the second local loopback interface, the first local loopback interface operates in first process, and the second local loopback interface operates in second process.
Step S503: set up a bgp session by first loopback interface on routing device R1 and the R2,, therefore be called master session (Primary Session) because this session acquiescence is used to finish the work of main routing forwarding.Second loopback interface on R1 and R2 is used to set up second bgp session, and this session is used 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, send and receive route simultaneously, but be not made as preferably, also do not instruct forwarding.
This state can be called the Selecting state.
S505: whether break down in the path that regularly utilizes IP Ping message or MPLS Ping message to detect the path R1-R4-R5-R2 of master session, when detecting fault with IP Ping message, IP then takes place transmit fault, when detecting fault with MPLS Ping message, MPLS then takes place transmit fault, no matter be to utilize which kind of detection mode in above-mentioned two kinds of detection modes to detect path failure, all with execution in step S506.
Step S506: the route that receives is made as preferably, and as the foundation of data forwarding.Thereby the convergence that has realized the master session route is switched.
When execution in step S504, the backup session of foundation is in the Selecting state, and this state only just can be made as route preferably after receiving trigger message, and issues routing table.
By embodiment, can detect the master session fault in the autonomous system, and and then the convergence of finishing session and route switch, thereby realize being interrupted professional fault recovery.
The embodiment of the invention is also corresponding to provide a kind of routing device, and this routing device can be deployed as the operator edge (PE) in the autonomous system, and as shown in Figure 6, this routing device 600 comprises:
Backup protection unit 601, the master session that is used for setting up on first path between this routing device 600 of autonomous system and another operator edge carries out backup protection with second path;
Whether detecting unit 602 is used to utilize detection messages to detect master session and breaks down, if break down, then notice convergence unit 603 carries out work;
Convergence unit 603, be used for after the notice that receives detecting unit 602, on the backup session that business convergence on the master session is set up to second path, described backup session is based upon between described two operator edges based on second loopback interface, and described second loopback interface operates on second path in second process based on Interior Gateway Protocol.
According to the mode difference of backup protection, backup protection unit 601 in the routing device 600 that provides in the present embodiment and convergence unit 603 have different implementations.
For instance, can comprise that at least following three kinds of modes are arbitrary:
Mode one
Referring to Fig. 7, backup protection unit 601 comprises: the first configuration backup unit 6011 is used in described second path described master session being done configuration backup.
Referring to Fig. 8, convergence unit 603 comprises: first backup session is set up unit 6031, is used for setting up backup session in second path;
First routing unit 6032 is used for receiving and send route by described backup session;
First preferably is provided with unit 6033, and the route that is used for receiving is made as preferably, and as the foundation of data forwarding.
Mode two
Referring to Fig. 9, backup protection unit 601 comprises: the second configuration backup unit 60111 is used in described second path described master session being done configuration backup;
Second backup session is set up unit 60121, is used for setting up backup session in second path.
Referring to Figure 10, convergence unit 603 comprises:
Secondary route unit 60311 is used for receiving and send route by described backup session;
Second preferably is provided with unit 60321, and the route that is used for receiving is made as preferably, and as the foundation of data forwarding.
Mode three
Referring to Figure 11, backup protection unit 601 comprises:
The 3rd configuration backup unit 60112 is used in described second path described master session being done configuration backup;
The 3rd backup session is set up unit 60122, is used for setting up backup session in second path;
Third Road is used for receiving and send route by described backup session by unit 60132.
Convergence unit 603 comprises:
The 3rd preferably is provided with unit 60312, and the route that is used for receiving is made as preferably, and as the foundation of data forwarding.
In addition, routing device in the present embodiment can also comprise: master session is set up unit 604, be used for setting up master session based on first loopback interface between described two operator edges, described first loopback interface operates on first path in first process based on Interior Gateway Protocol.
By the routing device that the embodiment of the invention provides, can detect the fault of the master session of the foundation in autonomous system, and and then the convergence of finishing session and route switch, thereby realize being interrupted professional fault recovery.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the foregoing description method is to instruct relevant hardware to finish by program; described program can be stored in the computer read/write memory medium; this program is when carrying out; comprise the steps: that the master session that will set up on first path between two operator edge PE in the autonomous system carries out backup protection with second path; when utilizing detection messages to detect described master session to break down; on the backup session that business convergence on the described master session is set up to described second path; described backup session is based upon between described two operator edges based on second loopback interface, and described second loopback interface operates on described second path in second process based on Interior Gateway Protocol.Described storage medium, as: ROM/RAM, magnetic disc, CD etc.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle 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.