Summary of the invention
The embodiment of the present invention provides a kind of method of communication equipment and Graceful Restart, the Graceful Restart while there is communication failure between line card and engine modules in order to realize in communication equipment.
Based on the problems referred to above, a kind of engine modules that the embodiment of the present invention provides, comprising: engine CPU, is connected by management channels and data channel between described engine CPU and line card;
Described engine CPU, for self during to the management channels access exception of line card, whether the host CPU state of identifying the current use of described line card by described data channel is normal, if normal, to line card, send the first control command, indication line card inside switches to from management channels from the main management passage of current use; If undesired, to line card, send the second control signal, indication line card inside switches to from management channels from the main management passage of current use, and the business module of line card is connected from CPU by being connected to switch to line card with the host CPU of line card.
A kind of line card that the embodiment of the present invention provides, comprising: host CPU, at least one is from CPU, logic control circuit and business module; Wherein:
Described host CPU, the access of sending by the management channels between self and line card or data channel for receiving engine modules;
Described logic control circuit, the first control signal or the second control signal that for receiving engine modules, send; And according to described the first control signal, the host CPU of controlling the current use of line card passes through being connected with described engine modules from management channels of line card inside, and closes the main management passage of line card inside; And according to described the second control signal, the business module of controlling line card switches to and is connected from CPU by being connected with host CPU, and control passing through being connected with engine modules from management channels of line card inside from CPU, close the main management passage of line card inside.
A kind of communication equipment that the embodiment of the present invention provides, comprises the above-mentioned line card that at least one embodiment of the present invention provides, and the above-mentioned engine modules that provides of at least one embodiment of the present invention being connected with this line card.
The method of the Graceful Restart that the embodiment of the present invention provides, comprising:
Engine modules is at self during to the management channels access exception of line card, whether the host CPU state of identifying the current use of described line card by described data channel is normal, if normal, to line card, send the first control command, indication line card inside switches to from management channels from the main management passage of current use; If undesired, to line card, send the second control signal, indication line card inside switches to from management channels from the main management passage of current use, and the business module of line card is switched to line card and is connected from CPU;
Line card is according to the first received control signal, and the host CPU of controlling current use passes through being connected with described engine modules from management channels of line card inside, and closes the main management passage of line card inside; And according to described the second control signal, the business module of controlling line card switches to and is connected from CPU from being connected with host CPU, and control passing through being connected with engine modules from management channels of line card inside from CPU, close the main management passage of line card inside.
The beneficial effect of the embodiment of the present invention comprises:
The engine modules that the embodiment of the present invention provides, line card, the method of communication equipment and Graceful Restart thereof, in engine modules during to the management channels access exception of line card, whether normally further by data channel, identify the host CPU state of the current use of line card, if normal, judge that the main management passage using line card inside occurs abnormal, controlling line card inside switches to from management channels, if undesired, judge that the host CPU using line card inside occurs abnormal, controlling line card inside switches to from CPU with from management channels, like this, the host CPU of line card can be used having continued and the communicating by letter of engine modules from management channels after switching, or can the using from management channels and continue and the communicating by letter of engine modules from CPU of line card, guaranteed the normal work of the business module of line card, at utmost reduced the impact of management channels access exception on business module between engine modules and line card, realized the Graceful Restart of line card, thereby avoided in prior art whole line card to reset and make the work of business module interrupt causing the problem of the interruption of whole network.
Embodiment
Below in conjunction with Figure of description, the embodiment of the method for a kind of engine modules, line card, communication equipment and the Graceful Restart thereof that the embodiment of the present invention is provided describes.
The structure of the engine modules first embodiment of the present invention being provided describes.
As shown in Figure 1, the engine modules 1 that the embodiment of the present invention provides, comprises engine CPU 101, similar to existing design, between this engine CPU 101 and line card 2, by management channels and data channel, is connected; The embodiment of the present invention for engine CPU 101 with line card 2 between the treatment mechanism of communicating by letter while breaking down improve, this engine CPU 101, for at self during to the management channels access exception of line card 2, whether the host CPU state of identifying line card 2 current uses by data channel is normal, if normal, to line card 2, send the first control command, indication line card 2 inside switch to from management channels from the main management passage of current use; If undesired, to line card 2, send the second control signal, indication line card 2 inside switch to from management channels from the main management passage of current use, and the business module of line card 2 is connected from CPU by being connected to switch to line card with the host CPU of line card.
Further, above-mentioned engine CPU 101, specifically for using the host CPU state of following manner identification line card 2 current uses whether normal: engine CPU 101 by and line card 2 between data channel to the host CPU of line card 2, send probe messages, whether judgement receives line card 2 host CPUs and returns to the corresponding message that postbacks in setting-up time, when judgment result is that while being, identification line card 2 host CPU states are normal; Otherwise identification line card 2 host CPU states are undesired.
In the embodiment of the present invention, engine modules 1 can be according to method of the prior art, regularly by the management channels between engine modules 1 and line card 2, to line card 2, send several keep-alive messages (for example alive message), in certain hour, do not receive that line card 2 returns corresponding keep-alive message time, can by data channel, to line card 2, send the probe messages of setting form in the manner described above, the message that postbacks that probe messages is corresponding is also pre-set, if the host CPU of line card 2 current uses is in normal condition, will give engine modules 1 send this probe messages corresponding postback message.
For guarantee line card 2 switch after can with engine modules 1 proper communication, further, engine CPU 101, also for after sending the first control command, by the management channels between engine modules and line card, line card inside, from management channels to line card host CPU, send keep-alive message to confirm the state of line card host CPU; And after sending the second control command, by the management channels between engine modules and line card, line card inside, from management channels to line card from CPU, send keep-alive message to confirm that line card is from the state of CPU.
Preferably, as shown in Figure 1, the engine modules 1 that the embodiment of the present invention provides, also comprises: Switch chip 102 and FABIC chip 103;
The management channels that engine CPU101 draws by the Switch chip 102 of engine modules 1 is connected with the Switch chip of line card 2, forms the management channels between engine modules 1 and line card 2;
The data channel that engine CPU101 draws by the FABIC chip of engine modules is connected with the business module of line card 2, forms the data channel between engine modules 1 and line card 2.
The concrete structure of the line card below embodiment of the present invention being provided is described in detail.
Specifically, as shown in Figure 2, the line card 2 that the embodiment of the present invention provides comprises: host CPU 201, at least one is from CPU202, logic control circuit 203 and business module 204; Wherein:
Host CPU 201, the access of sending by the management channels between self and line card 2 or data channel for receiving engine modules 1;
Logic control circuit 203, the first control signal or the second control signal that for receiving engine modules 1, send; And according to the first control signal, the host CPU 201 of controlling line card 2 current uses passes through being connected with engine modules 1 from management channels of line card 2 inside, and closes the main management passage of line card 2 inside; And according to the second control signal, the business module 204 of controlling line card 2 switches to and is connected from CPU 202 by being connected with host CPU 201, and control passing through being connected with engine modules 1 from management channels of line card 2 inside from CPU 202, close the main management passage of line card 2 inside.
Business module 204 switches to after CPU202 is connected, will be by send packet from CPU, and the normal work of business module 204 while guaranteeing management channels access exception between engine modules and line card.
The above-mentioned line card 2 that the embodiment of the present invention provides, before there is access exception, from CPU 202 with close from management channels, the first control signal or the second control signal that are receiving engine modules 1 and send over, can switch to from management channels according to corresponding indication, or switch to from CPU202 with from management channels simultaneously.
Further, host CPU 201 in the above-mentioned line card 2 that the embodiment of the present invention provides, the probe messages sending over from data channel specifically for receiving engine modules 1, if self is in normal condition, by the data channel between line card 2 and engine modules 1, to engine modules 1, returns and postback message; And complete line card 2 inside by main management passage to from the switching of management channels, from line card 2 inside from management channels, receive the keep-alive message that engine modules 1 is sent, and return to corresponding keep-alive message (for example alive message).
From CPU202, for switching at business module 204 with after self is connected, receive the keep-alive message that engine modules 1 is sent, and return to corresponding keep-alive message.
Preferably, as shown in Figure 2, the line card 2 that the embodiment of the present invention provides, also comprises: Switch chip 205;
The Switch chip of Switch chip 205 difference andlogic control circuit 203 and engine modules 1 is connected;
Between the Switch chip 205 of Switch chip 205 and engine modules 1, be connected to form the management channels between line card 2 and engine modules 1;
Switch chip 205 passes through the main management passage of line card 2 inside or is connected from management channels andlogic control circuit 203.
Preferably, in the line card 2 that the embodiment of the present invention provides, business module 204 is connected with the FABIC chip of engine modules 1, forms the data channel between line card 2 and engine modules 1.
In the internal structure of the line card providing in the embodiment of the present invention, adopt the processing mode of redundancy backup, be that line card has a plurality of CPU, one as host CPU, other can be used as from CPU (as the backup of host CPU), line card inside also has a plurality of management channels, one as main management passage, other are as from management channels, no matter host CPU and from CPU, or main management passage and from management channels, when concrete normal work, as broad as long in implementation, it is only the relation backing up mutually, only in order to distinguish, in foregoing description process, by the CPU address that does not occur the access exception normal use of line card before, it is host CPU, by the management channels address that does not occur the access exception normal use of line card before, it is main management passage, according to foregoing description, those skilled in the art can know by inference apparently, when switching to from CPU and/or after management channels, if again there is access fault, its concrete implementation process is similar to the inner switching mode of above-mentioned line card, do not repeat them here.
The embodiment of the present invention also provides a kind of communication equipment, comprises the above-mentioned line card that at least one embodiment of the present invention provides, and the above-mentioned engine modules that provides of at least one embodiment of the present invention that should be connected with this line card.
Preferably, the communication equipment that the embodiment of the present invention provides, also comprises: backboard, the line card in this communication equipment is connected by this backboard with engine modules.
The concrete structure figure of the communication equipment shown in Fig. 3 of take is below example, and the operation principle of the above-mentioned communication equipment that the embodiment of the present invention provides is described.
In Fig. 3, line card is connected with management channels by data channel on backboard with engine modules.Wherein, line card comprises master-slave cpu, logic control circuit, Switch chip, and business module (only illustrating MAC chip wherein in Fig. 3), business module, by logic control circuit, can configure with master or be connected from cpu data passage, article 2, independently management channels (main management passage and from management channels) is drawn from Switch chip mutually, by logic control circuit, can be configured respectively and is connected with host CPU or from CPU.
The flow process that this communication equipment is realized Graceful Restart is as follows:
1, after communication equipment electrifying startup, engine CPU controls the logic control circuit of line card and closes connecting wire card from the data path of CPU, and the main management passage of simultaneously controlling line card connects host CPU, close line card from being connected between management channels and master-slave cpu.Line card is realized and the communicating by letter of engine modules by host CPU and main management passage, and receives the configuration information configuring service module of engine modules.Meanwhile, engine modules sends several alive messages by main management passage to line card, and the host CPU of line card receives after alive message, by main management passage transmission alive message regularly to engine modules, to inform that line card oneself state is normal.This step message repeating passage as shown in Figure 4.
2, when engine CPU does not receive the alive message that line card sends within a certain period of time, engine CPU attempts the host CPU transmission probe messages to line card by data channel, the form of probe messages is to generate according to the form pre-setting, to guarantee can to postback message according to setting in advance of line card CPU after line card is received this probe messages.After this can turn to following step 3 or step 4.
3, if now line card is only that self-management passage occurs abnormal, do not crash, the business module of line card is also in normal work so, when the host CPU of line card is received the probe messages from engine modules, according to setting in advance, the host CPU of line card is by by returning to the message that postbacks of delivering bright own identity as the data channel of Fig. 5, engine CPU receives postbacking after message that line card host CPU returns, assert that the host CPU of line card is now still in normal operating conditions, so, the logic control circuit that engine CPU controls line card switches being connected with the host CPU of line card from management channels of line card.
After having switched, engine modules is by sending alive message from management channels to line card, and the host CPU of line card is received after alive message, by main management passage, periodically sends alive message to engine modules, to inform that line card oneself state is normal.So far, realized the redundancy backup of management channels, can guarantee that the business module of line card can not be affected simultaneously.The flow direction of alive message as shown in Figure 6.
If 4 now line card because other reasons causes host CPU, crash, the host CPU of line card cannot be replied the probe messages from engine modules so, when engine CPU does not receive the message of line card reply within a certain period of time, the host CPU of judging line card breaks down, engine CPU controls the logic control circuit of line card and closes the data channel that connects primary CPU, allow the data of business module of line card to sending from CPU, close the connection of line card host CPU and main management passage simultaneously, and open line card from CPU with from the connection of management channels.The normal work of the business module that can guarantee like this line card when host CPU fault.
Complete after configuration, engine modules is by sending alive message from management channels to line card, line card from CPU receives alive message, by periodically sending alive message to engine modules from management channels, to inform that line card oneself state is normal, alive message repeating passage as shown in Figure 7.So far, communicating by letter between engine modules and line card re-establishes, and engine modules can, by issuing configuration information from management channels, guarantee the normal work of the business module of line card.
Fig. 8 is the flow chart of describing above-mentioned flow process.
The embodiment of the present invention also provides a kind of Graceful Restart method that is applied to the above-mentioned communicator that the embodiment of the present invention provides, and as shown in 9, specifically comprises the following steps:
S901, engine modules are at self during to the management channels access exception of line card, and whether the host CPU state of identifying the current use of line card by data channel is normal, if normal, carries out following S902; If undesired, carry out following S903;
S902, to line card, send the first control command, indication line card inside switches to from management channels from the main management passage of current use; Then turn to S904;
S903, to line card, send the second control signal, indication line card inside switches to from management channels from the main management passage of current use, and the business module of line card is switched to line card and is connected from CPU; Then turn to S905;
S904, line card are according to the first received control signal, and the host CPU of controlling current use passes through being connected with engine modules from management channels of line card inside, and closes the main management passage of line card inside;
S905, line card are according to described the second control signal, and the business module of controlling line card switches to and is connected from CPU from being connected with host CPU, and control passing through being connected with engine modules from management channels of line card inside from CPU, close the main management passage of line card inside.
The method of the Graceful Restart providing due to the embodiment of the present invention, with aforementioned engine modules, line card and communication equipment based on same inventive concept, the principle of dealing with problems is similar to aforementioned engine modules, line card and communication equipment, therefore the embodiment of the method can, referring to the enforcement of aforementioned engine modules, line card and communication equipment, repeat part and repeat no more.
The engine modules that the embodiment of the present invention provides, line card, the method of communication equipment and Graceful Restart thereof, in engine modules during to the management channels access exception of line card, whether normally further by data channel, identify the host CPU state of the current use of line card, if normal, judge that the main management passage using line card inside occurs abnormal, controlling line card inside switches to from management channels, if undesired, judge that the host CPU using line card inside occurs abnormal, controlling line card inside switches to from CPU with from management channels, like this, the host CPU of line card can use after switching from management channels, or can the using from management channels and continue and the communicating by letter of engine modules from CPU of line card, guaranteed the normal work of the business module of line card, at utmost reduced the impact of management channels access exception on business module between engine modules and line card, realized the Graceful Restart of line card, thereby avoided in prior art whole line card to reset and make the work of business module interrupt causing the problem of the interruption of whole network.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Obviously, those skilled in the art can carry out various changes and modification and not depart from the spirit and scope of the present invention the present invention.Like this, if within of the present invention these are revised and modification belongs to the scope of the claims in the present invention and equivalent technologies thereof, the present invention is also intended to comprise these changes and modification interior.