In the ring-type Ethernet, realize the method and apparatus that protection is switchedTechnical field
The present invention relates to the communications field, be specifically related in the ring-type Ethernet, realize the method and apparatus that protection is switched.
Background technology
Supporting multiple spot to connect is an exclusive characteristic of Ethernet, and the multiple spot connection can be supported on a large scale effectively, numerous communication traffic; And,, can use ring-type Ethernet structure with wrap protection for the reliability of communication in the multiple spot connection is provided.
Referring to Fig. 1, Fig. 1 is the ring-type Ethernet structure chart of prior art.For convenience, abbreviate ring-type Ethernet structure as looped network below.Among Fig. 1, as the unique host node in the looped network, S1 can block the secondary port of self at the user datagram literary composition when the proper communication of looped network energy, to avoid causing broadcast storm because of producing data loopback.Usually, the non-host node of other except that host node S1 all is called as transmission node in the looped network.
When breaking down in the looped network, S1 can trigger the corresponding protection switching operation immediately, and concrete protection is switched principle as shown in Figure 2.Among Fig. 2, when breaking down in detecting looped network, the secondary port that S1 can enter the ring malfunction immediately and open self at the user data message passes through to allow the user data message; And other nodes in S1 and the looped network refresh transmitting to carry out topology learning again of self respectively.Have, S1 can routinely send polling message by its master port in looped network again.In case ring network fault is eliminated, S1 then can receive the polling message that self sent by its secondary port.In this case, S1 returns to normal condition by the ring malfunction, and blocks its secondary port at the user data message again and pass through to forbid the user data message.
In fact, Fig. 1, looped network shown in Figure 2 all are hierarchical network architectures, and each layer network structure all has corresponding protection and switches ability in the looped network; And when the bottom-layer network structure in the looped network broke down and fail in time to repair, this fault can have influence on the operate as normal on upper strata and cause the protection switching operation on upper strata.Protection switching operation described in Fig. 2 is the protection switching operation that is in data link layer.
Obviously, owing to be the protection switching operation that carries out data link layer when in looped network, ring network fault occurring immediately at present; Therefore; even lower floor's network of relative data link layer can be eliminated fault by the protection switching operation of self; this lower floor's network configuration also can't obtain time enough and carry out the corresponding protection switching operation before data link layer be protected switching operation.This might cause lower floor's network configuration and data link layer all to carry out the protection switching operation.
At this moment the protection switching operation that carries out of data link layer is exactly unnecessary.
In addition, owing to carry out the recovery operation of malfunction to normal operating conditions immediately after ring network fault disappears in looped network, if therefore link is unstable or intermittent defective generation is arranged, data link layer will be carried out frequent protection switching operation so.
The above is an example with the data link layer just; In fact, all there is the problem of carrying out unnecessary or frequent protection switching operation in each the layer network structure in the looped network.Unnecessary or protect switching operation continually, can a large amount of waste Internet resources and cause the obvious reductions of network performance.
Summary of the invention
In view of this, main purpose of the present invention is to provide a kind of method that protection is switched that realizes in the ring-type Ethernet, effectively to avoid the unnecessary protection switching operation.
Another object of the present invention is to provide the another kind of method that protection is switched that in the ring-type Ethernet, realizes, effectively to avoid the unnecessary protection switching operation.
Another purpose of the present invention is to provide a kind of device that protection is switched of realizing in the ring-type Ethernet, effectively to avoid the unnecessary protection switching operation.
A further object of the present invention is to provide the another kind of device that protection is switched of realizing in the ring-type Ethernet, effectively to avoid the unnecessary protection switching operation.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention discloses a kind of method that protection is switched that realizes in the ring-type Ethernet, this method comprises:
When in the ring-type Ethernet, detecting ring network fault, start the delay timer that sets in advance; Overtime and when detecting ring network fault once more at delay timer, carry out the protection switching operation that switches to the ring malfunction by normal operating conditions.
The timing length of the described delay timer that sets in advance is to protect the operation duration of switching needs to be provided with according to requirement and lower floor's network configuration that current layer network structure is switched speed to protection.
Overtime but when not detecting ring network fault, further detect ring network fault, and when detecting ring network fault, restart delay timer at delay timer.
Described protection switching operation comprises:
Host node refreshes transmitting of self and opens the secondary port of self at the user data message, and also the transmission node in looped network sends and refreshes announcement control message.
This method further comprises:
When ring network fault is eliminated, start the recovery that sets in advance and wait for the WTR timer; After the recovery waiting timer is overtime, carry out the operation that is used to return to normal operating conditions.
When before the startup of recovery waiting timer is back, overtime, detecting ring network fault, further restart the recovery waiting timer.
Described ring network fault is that the following method of application is detected:
Host node in the ring-type Ethernet detects ring network fault by Link State alarming mechanism or polling mechanism.
The method that detects ring network fault by the Link State alarming mechanism is:
When receiving the warning message from transmission node, host node determines to have detected ring network fault.
The method that detects ring network fault by polling mechanism is:
In the time of still can't receiving the polling message that self once sent under the situation of the failed cycle timer expiry that sets in advance, host node determines to have detected ring network fault.
The timing length of the described recovery waiting timer that sets in advance is that to stablize the lasting duration of the intermittent defective of required duration and/or link according to the link-recovery in the ring-type Ethernet set.
The operation that described execution is used to return to normal operating conditions comprises:
Host node refreshes transmitting of self and blocks the secondary port of self again at the user data message, and also the transmission node in looped network sends and refreshes announcement control message.
The invention also discloses a kind of method that protection is switched that realizes in the ring-type Ethernet, this method comprises:
When eliminating, ring network fault starts the recovery waiting timer that sets in advance; After the recovery waiting timer is overtime, carry out the operation that is used to return to normal operating conditions.
When before the startup of recovery waiting timer is back, overtime, detecting ring network fault, further restart the recovery waiting timer.
Described ring network fault is that the following method of application is detected:
Host node in the ring-type Ethernet detects ring network fault by Link State alarming mechanism or polling mechanism.
The method that detects ring network fault by the Link State alarming mechanism is:
When receiving the warning message from transmission node, host node determines to have detected ring network fault.
The method that detects ring network fault by polling mechanism is:
In the time of still can't receiving the polling message that self once sent under the situation of the failed cycle timer expiry that sets in advance, host node determines to have detected ring network fault.
The timing length of the described recovery waiting timer that sets in advance is that to stablize the lasting duration of the intermittent defective of required duration and/or link according to the link-recovery in the ring-type Ethernet set.
The operation that described execution is used to return to normal operating conditions comprises:
Host node refreshes transmitting of self and blocks the secondary port of self again at the user data message, and also the transmission node in looped network sends and refreshes announcement control message.
The invention also discloses a kind of device that protection is switched of realizing in the ring-type Ethernet, this device comprises ring network fault decision unit and coupled respectively delay timer, protection switch unit;
Wherein, the ring network fault decision unit, the control delay timer starts when being used for detecting ring network fault in normal operation; Also when receiving the overtime notice of delay timer, carry out ring network fault once more and detect, and control protection switch unit carries out the protection switching operation that switched to the ring malfunction by normal operating conditions when detecting ring network fault;
Delay timer is used for starting according to the control of ring network fault decision unit, and notifies the ring network fault decision unit when overtime;
The protection switch unit is used for the control according to the ring network fault decision unit, carries out the protection switching operation that is switched to the ring malfunction by normal operating conditions.
Described ring network fault decision unit is used at delay timer overtimely but when not detecting ring network fault, further detect ring network fault, and the control delay timer restarts when detecting ring network fault.
Further be provided with the recovery waiting timer that links to each other with ring network fault decision unit, protection switch unit respectively in this device;
Wherein, the ring network fault decision unit is further used for when ring detects ring network fault under the malfunction and eliminated control and recovers waiting timer and start, and continue to detect link failure and when detecting link failure control recover waiting timer and restart;
Recover waiting timer, be used for starting, and notice is protected switch unit when overtime according to the control of ring network fault decision unit;
The protection switch unit is further used for carrying out the operation that is used to return to normal operating conditions according to the notice of recovering waiting timer.
The invention also discloses a kind of device that protection is switched of realizing in the ring-type Ethernet, this device comprises recovery waiting timer and coupled respectively ring network fault decision unit, protection switch unit;
Wherein, the ring network fault decision unit is used for when ring detects ring network fault under the malfunction and eliminated control and recovers waiting timer and start, and continue to detect link failure and when detecting link failure control recover waiting timer and restart;
Recover waiting timer, be used for starting, and notice is protected switch unit when overtime according to the control of ring network fault decision unit;
The protection switch unit is used for carrying out the operation that is used to return to normal operating conditions according to the notice of recovering waiting timer.
Compared with prior art, a kind of method that protection is switched that realizes in the ring-type Ethernet provided by the present invention starts the delay timer that sets in advance when detecting ring network fault in the ring-type Ethernet; Overtime and when detecting ring network fault once more at delay timer, carry out the protection switching operation that switches to the ring malfunction by normal operating conditions.
Another kind provided by the present invention is realized the method that protection is switched in the ring-type Ethernet, start the recovery waiting timer that sets in advance when ring network fault is eliminated; After the recovery waiting timer is overtime, carry out the operation that is used to return to normal operating conditions.
A kind of device that protection is switched of realizing in the ring-type Ethernet provided by the present invention guarantees to control when the ring network fault decision unit detects ring network fault in normal operation delay timer and starts; Also when receiving the overtime notice of delay timer, carry out ring network fault once more and detect, and control protection switch unit carries out the protection switching operation that switched to the ring malfunction by normal operating conditions when detecting ring network fault.
Another kind provided by the present invention is realized the device that protection is switched in the ring-type Ethernet, control recovers waiting timer and starts when guaranteeing that the ring network fault decision unit can detect ring network fault and eliminated under the ring malfunction, and continue to detect link failure and when detecting link failure control recover waiting timer and restart; Also when the recovery waiting timer is overtime, carry out the operation that is used to return to normal operating conditions by the protection switch unit.
As seen, the inventive method and device all can effectively be avoided the unnecessary protection switching operation, and then can save Internet resources and can improve network performance.
Description of drawings
Fig. 1 is the ring-type Ethernet structure chart of prior art;
Fig. 2 switches schematic diagram for the ring-type Ethernet protection of prior art;
Fig. 3 switches flow chart for the protection of a preferred embodiment of the present invention;
Fig. 4 switches flow chart for the protection of another preferred embodiment of the present invention;
The structure drawing of device that Fig. 5 switches for the realization protection of a preferred embodiment of the present invention.
Embodiment
Below in conjunction with drawings and the specific embodiments to the detailed description of the invention.
A kind of method that protection is switched that realizes in the ring-type Ethernet provided by the present invention starts the delay timer that sets in advance when detecting ring network fault in the ring-type Ethernet; Overtime and when detecting ring network fault once more at delay timer, carry out the protection switching operation that switches to the ring malfunction by normal operating conditions.
Another kind provided by the present invention is realized the method that protection is switched in the ring-type Ethernet, start the recovery waiting timer that sets in advance when ring network fault is eliminated; After the recovery waiting timer is overtime, carry out the operation that is used to return to normal operating conditions.
A kind of device of realizing that in the ring-type Ethernet protection is switched provided by the present invention comprises ring network fault decision unit and coupled respectively delay timer, protection switch unit; Wherein, the ring network fault decision unit, the control delay timer starts when being used for detecting ring network fault in normal operation; Also when receiving the overtime notice of delay timer, carry out ring network fault once more and detect, and control protection switch unit carries out the protection switching operation that switched to the ring malfunction by normal operating conditions when detecting ring network fault; Delay timer is used for starting according to the control of ring network fault decision unit, and notifies the ring network fault decision unit when overtime; The protection switch unit is used for the control according to the ring network fault decision unit, carries out the protection switching operation that is switched to the ring malfunction by normal operating conditions.
Another kind provided by the present invention realizes that in the ring-type Ethernet device that protection is switched comprises recovery waiting timer and coupled respectively ring network fault decision unit, protection switch unit; Wherein, the ring network fault decision unit is used for when ring detects ring network fault under the malfunction and eliminated control and recovers waiting timer and start, and continue to detect link failure and when detecting link failure control recover waiting timer and restart; Recover waiting timer, be used for starting, and notice is protected switch unit when overtime according to the control of ring network fault decision unit; The protection switch unit is used for carrying out the operation that is used to return to normal operating conditions according to the notice of recovering waiting timer.
Referring to Fig. 3, Fig. 3 switches flow chart for the protection of a preferred embodiment of the present invention, and this flow process may further comprise the steps:
Step 310: when being in normal operating conditions, host node is used the ring network fault in the prior art detection looped network; When detecting ring network fault, enterstep 320, when not detecting ring network fault, returnstep 310.
Described ring network fault is link failure and/or node failure; Particularly, host node can detect ring network fault by Link State alarming mechanism or polling mechanism.At the Link State alarming mechanism, the transmission node in the looped network can be used prior art and detect ring network fault and send warning message to host node; When receiving the warning message from transmission node, host node determines to have detected ring network fault.
At polling mechanism, host node can routinely send polling message by its master port in looped network.When looped network was working properly, host node can be received the polling message that is sent by self master port by the secondary port of self; And when link broke down, host node still can't be received described polling message when the failed cycle timer expiry that is provided with, and host node then determines to have detected ring network fault in this case.
Step 320: host node starts the delay timer that sets in advance.
Step 330: host node judges whether delay timer is overtime, if overtime, then entersstep 340; Otherwise, returnstep 330.
Step 340: host node detects the ring network fault in the looped network, and judges whether to detect ring network fault; When detecting ring network fault, enterstep 350, when not detecting ring network fault, returnstep 310.
Step 350: host node carries out by the protection switching operation of normal operating conditions to the switching of ring malfunction.
Particularly, described protection switching operation comprises: the secondary port that host node refreshes transmitting of self and opens self at the user data message passes through to allow the user data message, also the transmission node in looped network sends and refreshes announcement control message, refreshes with the notification transmission node and transmits; Have, host node also can routinely send polling message by its master port usually in looped network again.
After this, host node enters the ring malfunction.
The timing length of described delay timer can be switched the requirement of speed to protection and the setting of action required duration is switched in lower floor's protection according to this layer, and is just overtime with delay timer after the protection switching operation result who guarantees to obtain lower floor's network configuration as far as possible.Like this, if the protection switching operation of lower floor's network configuration is finished smoothly, and the current ring network fault that do not detect again just need not have been carried out the protection switching operation of current layer network structure again; If the protection switching operation of lower floor's network configuration fails to finish smoothly, perhaps current detection has gone out ring network fault, and that just carries out the protection switching operation of current layer network structure.
As seen, by delay timer is set, lower floor's network configuration has obtained being used to protect the time of switching operation, and this makes the upper layer network structure can not carry out the unnecessary protection switching operation because of the fault that lower floor's network configuration self can solve.Obviously, the unnecessary protection switching operation that is carried out in the present looped network has obtained effectively avoiding.
In the subsequent communications process, if the ring network fault in the looped network eliminate, but the operation shown in the node execution graph 4 in the looped network so.In fact, flow process among Fig. 4 and the flow process among Fig. 3 do not have necessary relation; In actual applications, the flow process in the execution graph 3 separately, the also flow process in the execution graph 4 separately.
Referring to Fig. 4, Fig. 4 switches flow chart for the protection of another preferred embodiment of the present invention, and this flow process may further comprise the steps:
Step 410: whether the ring network fault that host node is used in the prior art detection looped network is eliminated, entersstep 420 when definite ring network fault has been eliminated, returns step 410 when definite ring network fault is not eliminated as yet.
Particularly, host node can detect ring network fault by Link State alarming mechanism or polling mechanism, and determines ring network fault elimination as yet when detecting ring network fault; Determine that when not detecting ring network fault ring network fault eliminates.
Step 420: host node starts the recovery waiting timer that sets in advance.
Step 430: host node is used the ring network fault in the prior art detection looped network; When not detecting ring network fault, enterstep 440, when detecting ring network fault, returnstep 420.
Step 440: host node judges whether the recovery waiting timer is overtime, if overtime, then entersstep 450; Otherwise, returnstep 430.
Step 450: host node is carried out the operation that is used to return to normal operating conditions.
Particularly, the described operation that host node is carried out comprises: the secondary port that host node refreshes transmitting of self and blocks self at the user data message again passes through to forbid the user data message, also the transmission node in looped network sends and refreshes announcement control message, refreshes with the notification transmission node and transmits; Have, host node also can routinely send polling message by its master port usually in looped network again.
After this, host node enters normal operating conditions.
The timing length of described recovery waiting timer can be according to the practical application scene setting, as: the duration that may continue of stablizing the intermittent defective of required duration and/or link according to link-recovery is provided with the timing length that recovers waiting timer, and to guarantee to recover waiting timer when intermittent defective in the stable or link of link-recovery has not existed just overtime as far as possible.
As seen,, can guarantee that the protection switching operation in the looped network can frequently not carry out because of the intermittent defective in link instability or the link, and then avoid the present unnecessary protection switching operation that in looped network, carries out by the recovery waiting timer is set.
In order to guarantee that Fig. 3, flow process shown in Figure 4 can carry out smoothly, need in host node, carry out setting as shown in Figure 5.Referring to Fig. 5, the structure drawing of device that Fig. 5 switches for the realization protection of a preferred embodiment of the present invention.
Among Fig. 5, ring network fault decision unit 510, timing unit 520 and protection switch unit 530 link to each other in twos, are provided with delay timer 521 in the timing unit 520 and recover waiting timer 522.Particularly, ring network fault decision unit 510 links to each other with delay timer 521, protection switch unit 530 respectively, recovers waiting timer 522 and links to each other with ring network fault decision unit 510, protection switch unit 530 respectively.
In actual applications, when detecting ring network fault in normal operation, ring network fault decision unit 510 is with mode start delay timers 521 such as transmission level signals; 521 of delay timers are notified ring network fault decision unit 510 in modes such as transmission level signals when overtime; 510 of ring network fault decision units carry out ring network fault once more and detect; and when detecting ring network fault, notify protection switch unit 530 to send modes such as signal, carry out the protection switching operation that switches to the ring malfunction by normal operating conditions by protection switch unit 530.
Certainly, if when delay timer 521 is overtime, do not detect ring network fault, ring network fault decision unit 510 can also further detect ring network fault, and when detecting ring network fault, restarting delay timer 521 in modes such as transmission level signals, 521 bases of delay timer restart from the level signal of ring network fault decision unit 510.
Have again, when ring detects ring network fault under the malfunction and has eliminated, ring network fault decision unit 510 starts recovery waiting timer 522 in modes such as transmission level signals, and do not carry out ring network fault when overtime and detect recovering waiting timer 522, if detect ring network fault then restart and recover waiting timer 522; Otherwise just return to and when recovery waiting timer 522 is not overtime, carry out the state that ring network fault detects.
Recover waiting timer 522 and when overtime, notify protection switch unit 530, carry out the operation that is used to return to normal operating conditions by protection switch unit 530 to send modes such as signal.
By the above as can be seen, method and apparatus provided by the present invention all can effectively be avoided the unnecessary protection switching operation, and then can save Internet resources and can improve network performance.