Embodiment
The session maintenance of most of agreement under stable state all is to accomplish alternately through the protocol stable state message of similar keep_alive.In this protocol interaction, as long as local terminal equipment can in time be responded the keep_alive response message when receiving the keep_alive request message that opposite equip. is sent, opposite equip. will think that local terminal equipment still is in normal condition.
Keep principle based on this agreement, the embodiment of the invention provides a kind of method and communication equipment of keeping protocol status.Reseting period takes place at control and management device (the control and management layer is also claimed in this area) in this communication equipment; The protocol entity of being taken over the control and management device by forwarding processing unit (processing layer is also claimed to transmit in this area) continues regularly to send the keep_alive response message toward opposite equip., and realization control and management device reseting period is kept protocol conversation state and do not interrupted.
Embodiment 1:
Fig. 1 is the communication equipment schematic diagram of the embodiment of the invention 1.As shown in Figure 1: the communication equipment of the embodiment of the invention 1 comprises: control and management device 10 and forwarding processing unit 20.Said control and management device 10 is used to generate the stable state corresponding protocols stable state message with agreement, and said protocol stable state message and corresponding forwarding information thereof (like outbound port number) are handed down to and transmit processing unit 20; Said forwarding processing unit 20; Be used for receiving and storing said protocol stable state message and said forwarding information; When said control and management device 10 operate as normal, the protocol stable state message that said control and management device 10 issues directly is transmitted to Correspondent Node according to said forwarding information; When said control and management device 10 resets, will store according to said forwarding information reset with the control and management device time protocol stabilizes state corresponding protocols stable state message regularly send to Correspondent Node.Can connect through system bus 30 between control and management device 10 and the forwarding processing unit 20.Alternatively, this communication equipment 1 also comprises: integrated circuit board control unit 40, the controlling and driving of responsible integrated circuit board provides the control and management device and transmits registers such as the operating state of processing unit, fine or not state, state on the throne.
In the communication products of reality; The control and management device 10 of the embodiment of the invention may further include: a plurality of protocol entities (as: agreement 1, agreement 2... agreement n) 101 are used to generate protocol massages and carry out dissection process to transmitting the protocol massages that processing unit 20 reports; Protocol management elements 102 is used for generating and different protocol stable state corresponding protocols stable state message, and upgrades the protocol stable state message and the corresponding forwarding information thereof of said forwarding processing unit storage according to the variation of protocol stabilizes state.This protocol management elements 102 is responsible for the maintenance management of all protocol entities 101; The protocol massages that needs when being in stable state to protocol entity 101 periodically to send edits, and is handed down to the forwarding information of protocol massages and transmission cycle etc. and transmits processing unit 20.
Alternatively; Each protocol entity 101 can return to the state before resetting in order to guarantee to reset afterwards by control and management device 10; Control and management device 10 can also comprise: protocol status memory cell 103 (like RAM); Be used for after protocol entity 101 gets into stable states, the stable state of each protocol entity 101 is backed up, this backup operation can be accomplished by protocol management elements 102; Backup information can be distinguished through the unified numbering of protocol entity 101, is eliminated at control and management device 10 Shi Buhui that resets.In addition, control and management device 10 can also comprise: database 104, be used for the configuration information of storage protocol, and promptly agreement is in some parameter configuration of software layer, like IP address etc.
In the communication products of reality; The forwarding processing unit 20 of the embodiment of the invention may further include: stable state message memory cell 201; Be used to receive and store control and management device 10 that send with the stable state corresponding protocols stable state message of agreement and the forwarding information of said protocol stable state message; And the message update instruction that receives said control and management device 10 come to the storage protocol stable state message upgrade, consistent with the protocol stabilizes state that guarantees this protocol stable state message and control and management device 10; Whether the judging unit 202 that resets is used for the operating state of control and management device 10 is kept watch on, reset to judge said control and management device 10; Forward processing unit 203 is used for when said control and management device 10 operate as normal, according to said forwarding information the protocol stable state message that said control and management device 10 issues directly being transmitted to Correspondent Node; When said control and management device 10 resets, will store according to said forwarding information reset with the control and management device time protocol stabilizes state corresponding protocols stable state message regularly send to Correspondent Node.
Stable state message in the stable state message memory cell 201 of the embodiment of the invention and corresponding forwarding information can be kept list item through an agreement and store, and forward processing unit 203 carries out the regular transmission of protocol stable state message according to the content that agreement is kept list item.
A kind of optional agreement is kept the content of list item can be as shown in table 1, and following table only is used for the embodiment of the invention is described, and the protection range that is not used in claim limits.In actual product, this list item can also comprise other content, as long as can realize the purpose of the embodiment of the invention.
Table 1: agreement is kept list item
?Index |
Effectively identify |
Send at interval |
Outbound port |
Message length |
Message format (elongated) |
|
|
|
|
|
|
(1) Index (index): table item index, corresponding with the protocol number of control and management device 10 unified distributions, be used to retrieve corresponding protocols and keep list item.
(2) whether effective sign: it is effective to be used for the identity protocol list item, and when the agreement of closing certain agreement when control and management device 10 was kept function, this sign put 0, otherwise puts 1.
(3) send at interval: when agreement is in stable state, the transmission of protocol stable state message interval, control and management device 10 can dispose according to actual conditions.
(4) outbound port: protocol stable state message transfer port, generate automatically by the protocol management elements 102 of control and management device 10 protocol configuration information according to database storage.
(5) message length: the actual effective length of the message format that sign begins after message length, by issuing after protocol management elements 102 calculating.
(6) message format: the stable state message form that need send when identity protocol is in stable state comprises check information; Being responsible for editor by the protocol management elements 102 of control and management device 10 generates and issues.
Alternatively, this agreement is kept list item and can also be comprised following extend information:
(7) distinguish the dispatching priority and the loss priority of protocol massages if desired, can expand two fields of CoS and the DIS dispatching priority and the loss priority of identity protocol message respectively.
(8) send toward a plurality of outbound ports if desired, then can dispose different outbound ports through issuing a plurality of list items.
The judging unit 202 that resets of the embodiment of the invention can be WatchDog Timer, is responsible for clear dog by protocol management elements 102, when control and management device 10 operate as normal and arrival count value, said house dog counter is carried out clear operation; , control and management device 10 will cause house dog to be overflowed when resetting; Trigger the forward processing unit 203 entering agreements of transmitting processing unit 20 this moment at once and keep pattern; 203 of forward processing units are kept from agreement and are extracted message information the list item, and regularly send protocol stable state message according to forwarding information to corresponding ports.
Alternatively; The forwarding processing unit 20 of the embodiment of the invention also comprises: timer 2 04; Be used to set a scheduled duration; When said control and management device 10 does not recover operate as normal within a scheduled time, trigger said forward processing unit 203 and stop the stable state message of storage is regularly sent to Correspondent Node.Show that fault has appearred in equipment this moment, needs maintenance in time.
Alternatively; The forwarding processing unit 20 of the embodiment of the invention also comprises: professional forwarding-table item memory cell 205; Be used for the storage service forwarding-table item; Each list item has comprised the forwarding information of service message, transmits processing unit 20 and directly transmits service message according to this business forwarding-table item, and need not pass through the processing of control and treatment device 10.
Fig. 2 is to the communication device works principle flow chart of present embodiment.Flow process when wherein step S201~step S204 is control and management device 10 operate as normal, step S205~step S208 is the flow process after control and management device 10 resets.As shown in Figure 2:
Step S201: the user has disposed after the agreement; Control and management device 10 generates corresponding protocol entity 101; After agreement starts; Protocol entity 101 sends to protocol management elements 102 to the good mutual message (keep_alive message or unstable state message) of structure through the inside story interface, and protocol management elements 102 is according to the configuration information of the agreement of from database 104, obtaining, and adds corresponding forwarding information (like outbound port etc.); Be handed down to the forward processing unit 203 of transmitting processing unit 20 through bus, the forwarding information that 203 bases of forward processing unit are carried directly forwards.
Step S202: after forward processing unit 203 is received the protocol massages that Correspondent Node sends; Stamp inside story head (mainly being ingress port information, protocol type etc.); Send the protocol management elements 102 of control and management device 10 directly, handle according to message header message transport corresponding protocol entity 101 by protocol management elements 102.
Step S203: the current state that protocol management elements 102 is responsible for keeping watch on protocol entity 101; After protocol interaction gets into stable state; Protocol management elements 102 these agreement current states of backup are to protocol status memory cell 103; And keep_alive response message form when protocol management elements 102 also need be in stable state to protocol entity 101 and corresponding forwarding information thereof are kept in the list item through the agreement that bus 30 is issued to stable state message memory cell 201; When agreement withdrawed from stable state, the agreement of the stable state message memory cell 201 that then need upgrade in time was kept the protocol status information of list item information and protocol status memory cell 103.
Step S204: as long as protocol management elements 102 is in normal condition; Just need regularly (duration is configurable) to transmit the clear dog operation of house dog of processing unit 20; When the house dog state just often, do not trigger and transmit processing unit 20 and get into agreements and keep pattern, at this moment; 203 of forward processing units carry out business according to professional forwarding-table item to be transmitted, and does not carry out agreement and keeps reading of list item.
Step S205: after agreement gets into stable state, when control and management device 20 resets, will cause protocol management elements 102 can't be regularly dog clearly, house dog is overflowed.Trigger forward processing unit 203 entering agreements after house dog is overflowed immediately and keep pattern, and stop the house dog counting, start timer 2 04 timing.
Step S206: after forward processing unit 203 entering agreements are kept pattern; Except continuing to carry out the business forwarding according to professional forwarding-table item; Also need begin to read agreement and keep list item information, and carry out the regular transmission of agreement maintenance stage protocol stable state message according to transmission cycle, forwarding information, protocol massages form etc.At this moment, the protocol massages that forward processing unit 203 is sent for Correspondent Node directly abandons, and send on no longer control and management device 10 to handle.
Step S207: if transmit the timer 2 04 of processing unit 20 overtime after; Control and management device 10 does not also normally reset; Transmit 20 of processing unit and think that control and management device 10 breaks down; Trigger forward processing unit 203 exit protocols and keep pattern, interrupt current agreement and keep behavior; If transmit the timer 2 04 of processing unit 20 overtime before; Control and management device 10 has normally resetted; State information before then protocol management elements 102 reads each protocol entity and resets from protocol status memory cell 103 earlier, and announcement carries out recovering state for each protocol entity; Then stop timer 2 04, activate the house dog of transmitting processing unit 20 once more, the normal clear dog operation of beginning.
Step S208: the house dog of transmitting processing unit 20 recover normal after, trigger forward processing unit 203 exit protocols at once and keep pattern, undertaken when continuing by normal state protocol massages on send processing.
The embodiment of the invention when the control and management device resets, is kept message through transmitting the regular agreement of sending of processing unit continuation under veneer card situation, keep current protocol conversation state not interrupt.
Embodiment 2:
Fig. 3 is the communication equipment schematic diagram of the embodiment of the invention 2.As shown in Figure 3, this communication equipment comprises two integrated circuit boards, comprises the control and management device on each integrated circuit board and transmits processing unit, and two control and management devices are in main and backup status respectively with the forwarding processing unit.
In an optional execution mode; The two boards card is respectively mainboard card and main/standby board cards; Comprise master control management devices 10, the main processing unit 20 of transmitting on the mainboard card; Comprise fully control and management device 50 on the main/standby board cards and transmit processing unit 60 fully, integrated circuit board is inner to be connected through Lanswitch, and it is mutual that the information between the different integrated circuit boards is passed through bus.In the course of work of actual product; Carrying out along with masterslave switchover; The activestandby state of control and management device on mainboard card and the main/standby board cards and forwarding processing unit all possibly change; Fig. 3 only is used to explain a kind of possible situation, and the protection range that is not used in claim limits.
As shown in Figure 3: master control management devices 10 is an activated state, and being equipped with control and management device 50 is non-activated state.When master control management devices 10 resets; The role exchange of active and standby control and management device; That is, be equipped with control and management device 50 and convert master control management devices 10 into, master control management devices 10 converts control and management device 50 fully into; The switching but the forwarding processing unit of two boards card can not link is still transmitted processing by the main processing unit 20 of transmitting.Various forwarding informations then only are handed down to the main processing unit 20 of transmitting, and are not handed down to and transmit processing unit 60 fully, are responsible for the main clear dog operation of house dog of transmitting processing unit 20 by master control management devices 10.When master control management devices 10 when being equipped with control and management device 50 and all resetting, mainly transmit processing unit 20 and keep pattern because house dog is overflowed the entering agreement.
The processing unit 60 of transmitting fully of the embodiment of the invention is after mainboard (comprising master control management devices and the main processing unit of transmitting) all breaks down or pulled out, and all is switched to fully device (be equipped with the control and management device and transmit processing unit fully) time to come into force.Iff is that master control management devices 10 resets and active and standby switching takes place, and then transmits the processing unit switching that need not link.
Comprise many synchronous signal lines between the active and standby integrated circuit board of the communication equipment of Fig. 3, need synchronous signal to comprise: on the throne, fine or not, forwarding processing unit activestandby state, control and management device activestandby state, control and management device reset mode.In addition, also comprise synchronous data line between the active and standby integrated circuit board, need carry out data in synchronization and comprise protocol status information and protocol configuration information etc.
When the embodiment of the invention resets at master control management devices 10, replace 10 work of master control management devices, transmit processing unit 20 switching that can not link by being equipped with control and management device 50.The embodiment of the invention is only carried out the active and standby switching of control and management device when the control and management device resets, remain unchanged and transmit processing unit, thereby neither influence agreement, does not influence professional the forwarding again.When master control management devices 10 when being equipped with control and management device 50 and resetting in succession, regularly send protocol stable state message by the main processing unit 20 of transmitting to Correspondent Node, keep protocol conversation state and do not interrupt to realize control and management device reseting period.
Wherein: master control management devices 10, be used to generate the stable state corresponding protocols stable state message with agreement, said protocol stable state message and corresponding forwarding information thereof are handed down to the main processing unit 20 of transmitting.Be equipped with control and management device 50, be used for obtaining synchronously the protocol stabilizes state and the work state information of master control management devices 10, when original master control management devices resets, take over original master control management devices work according to the information of obtaining synchronously.
The main processing unit 20 of transmitting is used to receive and store protocol stable state message and the forwarding information that master control management devices 10 issues; When original master control management devices resets and when causing active and standby the switching of control and management device, keeps the main and backup status of self constant, and receive protocol stable state message and forwarding information that the master control management devices after switching issues; When two control and management devices all reset, will store according to forwarding information reset with the master control management devices time protocol stabilizes state corresponding protocols stable state message regularly send to Correspondent Node.Transmit processing unit 60 fully, be used for when the master transmits the processing unit cisco unity malfunction, take over original main work of transmitting processing unit.
Fig. 4 is the schematic diagram of embodiment of the invention mainboard card.Different with Fig. 1 is; The master control management devices 10 of Fig. 4 also comprises a lock unit 105; Be responsible for master control management devices 10 specially and be equipped with the information synchronization between the control and management device 50,102 needs of protocol management elements are treating that synchronizing information gives lock unit 105 and get final product.
Alternatively; The communication equipment of the embodiment of the invention also comprises integrated circuit board control device 40; Comprise a plurality of registers in the integrated circuit board control device 40 of Fig. 4; Store respectively on the throne, fine or not, transmit processing unit activestandby state, control and management device activestandby state, control and management device reset mode information, and the driving of carrying out integrated circuit board.The principle of main/standby board cards and mainboard card are similar, here description of drawings no longer.
Fig. 5 is to one of communication device works principle flow chart of present embodiment; The figure illustrates the overall flow that the mainboard card of active and standby integrated circuit board resets; Wherein step S501~step S504 is the flow process of master control management devices 10 operate as normal, and step S505~step S508 is the flow process after master control management devices 10 resets.As shown in Figure 5:
Step S501: the control and management device 10 that is in major state obtains the activestandby state of the forwarding processing unit on this integrated circuit board through integrated circuit board control device 40; Be in major state if transmit processing unit, then protocol management elements 102 directly issues protocol stable state message the forward processing unit processing of this integrated circuit board; Be in state fully if transmit processing unit, then protocol management elements 102 is handled through the main processing unit of transmitting that the bus between the integrated circuit board is handed down on the main/standby board cards.In addition, the lock unit of control and management device is configured synchronization of data through synchronous bus on the active and standby integrated circuit board, and the Synchronous Processing of protocol status information, and the data sync verification scheme is arranged.About the synchronous detail of master/slave data, current communication equipment has had a lot of implementations, is not described in detail here.
Step S502: after the main forward processing unit 203 of transmitting processing unit is received the protocol massages of sending the opposite end; Stamp inside story head (mainly being ingress port information, protocol type etc.); Through in Lanswitch, broadcasting or multicast; On deliver to the consultative management module of active and standby integrated circuit board control and management layer, then directly abandon after main/standby board cards consultative management module is received, do not handle.
Step S503: the protocol management elements 102 of master control management devices 10 is obtained the activestandby state of the forwarding processing unit on this integrated circuit board equally according to integrated circuit board control device 40, and keep_alive response message form when being in stable state to protocol entity and forwarding information only are issued to the main agreement of transmitting processing unit through bus and keep in the list item.
Step S504: 102 house dogs to main forwarding processing unit of the protocol management elements of master control management devices 10 carry out dog operation clearly, transmit processing unit fully owing to do not start house dog, need not dog operation clearly.
Step S505: after the master control management devices resetted, integrated circuit board control device 40 to the reset mode register set of the control and management device 10 of this integrated circuit board, identified this integrated circuit board control and management device and resets at once.The integrated circuit board control device of main/standby board cards then carries out active and standby arbitration according to the condition line that send mutually between active and standby, and rising is main fully, becomes activated state, and the mainboard card is then led to fall and is equipped with; Still keep original activestandby state constant and transmit processing unit 20.
Step S506: after new master control management devices activated, the protocol data that its protocol management elements then obtains according to past data synchronously carried out the recovery of this integrated circuit board protocol entity state, and the protocol status of taking over original master control management devices is kept work.And this protocol management elements also need be obtained the activestandby state information of transmitting processing unit through the integrated circuit board control device, continues main forwarding processing unit 20 is carried out the clear dog operation of house dog.
Step S507: after the control and management device of former mainboard card resetted, the synchronization module of its control and management device then triggered with current master control management devices and carries out data sync.After accomplishing synchronously, then active and standby control and management device keeps current activestandby state, waits for the generation of next time switching trigger condition.
Step S508; Optional mode: after accomplishing synchronously; Current master control management devices send condition line mutually according to active and standby integrated circuit board, finds that master control management devices and the main processing unit of transmitting be not when same integrated circuit board, then through issuing Manual Switch automatically again one time; Again switch back former control and management device, keep master control management devices and the main processing unit of transmitting to be in same integrated circuit board.
Second kind of situation of the embodiment of the invention 2 is that main/standby board cards resets and mainboard card operate as normal.Because main/standby board cards itself is exactly to be in state fully, does not trigger switching of active and standby control and management layer, does not influence yet and transmit layer.All current states are responsible for by the mainboard card.After the control and management layer of main/standby board cards normally resetted, it was synchronous then still to trigger master/slave data, keeps current state then.
The third situation of the embodiment of the invention 2 is that active and standby integrated circuit board resets in succession.No matter be that mainboard card control management level reset earlier; Reset behind the main/standby board cards control and management layer, or main/standby board cards control and management layer resets earlier, resets after the mainboard card control management level; Its processing is basic identical; To trigger a control and management layer separation when just mainboard card control management level reset earlier and switch, this part processing can be with reference to the description of front, and processing thereafter then dual mode is all identical; When the control and management layer of below only describing an integrated circuit board has resetted, the situation that the control and management layer of another piece integrated circuit board resets again.
After wherein the control and management device of an integrated circuit board resets; Still have the protocol management elements of the control and management device of another piece integrated circuit board to do dog operation clearly to main house dog of transmitting processing unit; After the control and management device of another piece integrated circuit board also resets in succession, then main house dog of transmitting processing unit will be operated owing to no clear dog, and cause dog to be overflowed; Trigger the main forward processing unit entering agreement of transmitting processing unit and keep pattern; And keep the regular transmission that list item carries out protocol stable state message through reading agreement, thus continue to keep current protocol status, wait for the completion that resets of control and management device.Detail is the same with the veneer card processing of embodiment 1, is not described in detail here.
After the control and management layer that resets at first resets (the control and management layer that afterwards resets also be in and reset in), then this control and management layer can according to active and standby integrated circuit board send condition line mutually, be equipped with and rise main operation; After being upgraded to the master control management level; Then proceed the recovering state of protocol entity, proceed to transmit the clear dog operation of layer, the entire process process returns to normal condition; Protocol conversation continues by the upper-layer protocol entity maintaining, and agreement still keeps stable state.
The embodiment of the invention is under active and standby integrated circuit board situation, and resetting of control and management device only triggered the active and standby switching of control and management device, transmits processing unit and keeps current activestandby state constant, thereby guarantee that professional forwarding is unaffected.In addition, when the control and management device of active and standby integrated circuit board all resets, still keep message, keep current protocol conversation state not interrupt through the main regular agreement of sending of processing unit continuation of transmitting.
The embodiment of the invention is a kind of method in common, is not subject to the concrete network technology that is adopted, so also can be suitable for other new tranmission techniques field, for example adopts the network of particular technologys such as SDH, OTN, T-MPLS, ETN.For agreement, no matter be emerging agreement, still protocols having as long as its stable state meets keep_alive message support mechanism, also can both be suitable for.
Above embodiment only is used to explain the present invention, but not is used to limit the present invention.