The method of the flow interrupt in preventing to pile up and stack equipment
Technical field
The present invention relates to pile up technical field, the method and the stack equipment of the flow interrupt in being specifically related to prevent to pile up.
Background technology
The technology of piling up couples together two or many distributed frame type equipments, forms a logical device.User management is piled up just as single equipment of management.The technology of piling up has the advantage of high availability, enhanced scalability, streamlining management.All frame type equipments that participation is piled up use identical configuration file.
According to the difference of the annexation of stack member apparatus, will pile up and be divided into chain and pile up with annular and pile up two kinds.From the flow that a stack member apparatus enters, may need to forward from an other stack member apparatus.The dissimilar message forwarding mechanism of piling up possibilities is different.The data forwarding schematic diagram that Fig. 1-1 piles up for chain, the data forwarding schematic diagram that Fig. 1-2 piles up for annular.In the ring topology shown in Fig. 1-2, according to the shortest forward-path priority principle, purpose is that the flow of equipment 3 is transmitted by the direct connected link between the equipment 1 and 3 on the equipment 1, purpose is that the flow of equipment 2 is also transmitted by the direct connected link between the equipment 1 and 2 on the same equipment 1, annular as can be seen link can provide effective traffic load to share, and annular in addition link can improve and piles up availability.
But, in some cases, forming annular prematurely piles up and may cause stack failures, shown in Fig. 2-1, when initial, equipment 1~4 forms chain and piles up, flow enters from GE1/0/10, flow out from GE4/0/10, afterwards, shown in Fig. 2-2, equipment 5 starts piling up shown in adding Fig. 2-1, thereby equipment 1~5 forms annular to be piled up, and at this moment, optimum forward-path is 1-5-4, but setting up, the flow forwarding-table item of equipment 5 needs a period of time, if the flow forwarding-table item of equipment 5 is not also built up the message of just having received equipment 1, then message can be dropped, thereby causes flow interrupt.
Summary of the invention
The invention provides the method and the stack equipment of the flow interrupt in preventing to pile up, pile up the flow interrupt that causes to avoid forming annular too early.
Technical scheme of the present invention is achieved in that
A kind of method of the flow interrupt in preventing to pile up comprises:
Every equipment in piling up obtains the one-tenth loop data of other each equipment;
Device discovery in piling up piles up topology and becomes physically annular by chain, then according to the one-tenth loop data of each equipment that is obtained, whether judgement has the equipment that does not satisfy the ring condition in piling up, if, in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition, select a link, from disconnecting selected link in logic, so that flow is without the equipment that does not satisfy into the ring condition.
Describedly further comprise after the selected link from disconnecting in logic: each equipment piling up is according to the up-to-date one-tenth loop data of each equipment that is obtained, when finding that the described equipment that does not satisfy into the ring condition satisfies into the ring condition, the link from recovering in logic to be disconnected then is so that flow becomes the equipment that satisfies into the ring condition through never satisfying into the ring condition.
Do not become the ring apparatus selective rule to be configured in respectively on all devices with same in advance,
Whether have the equipment that does not satisfy the ring condition further to comprise during described judgement is piled up: whether judge the equipment that does not satisfy into the ring condition in piling up more than one, if, then do not become the ring apparatus selective rule according to default, select an equipment therein,
And, describedly in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition, select one and be: link of selection in all links of selected equipment and the equipment room that satisfies into the ring condition.
In advance same annular is piled up partition principle and is configured in respectively on all devices,
Describedly in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition, select a link to be: to pile up partition principle according to default annular, link of selection in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition.
Describedly further comprise: judge the equipment that whether does not satisfy into the ring condition piling up in addition from the link that recovers in logic to be disconnected, if return a link is selected in execution in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition action; Otherwise every equipment in piling up generates the flow forwarding-table item according to ring topology.
In all devices that piles up, elect an equipment in advance as main equipment,
Describedly further comprise after the link that recovers in logic to be disconnected: the main equipment piling up sends the Topology Management message by described from the described equipment that does not satisfy into the ring condition of the chain road direction that disconnects in logic.
In all devices that piles up, elect an equipment in advance as main equipment, with miscellaneous equipment as slave unit,
The one-tenth loop data that every equipment in described the piling up obtains other each equipment is:
Every slave unit regularly reports separately one-tenth loop data to main equipment, and main equipment regularly is synchronized to the one-tenth loop data of all devices on each slave unit;
Perhaps, main equipment is regularly inquired about into loop data to each slave unit, and regularly the one-tenth loop data of all devices is synchronized on each slave unit.
A kind of stack equipment, this equipment comprises:
Become the loop data acquisition module, preserve the one-tenth loop data of this equipment, obtain and preserve the one-tenth loop data of the miscellaneous equipment in piling up;
The Topology Management module is found to pile up topology and is become physically annular by chain, then piles up to annular and cuts apart module and send and cut apart indication;
Annular is piled up and is cut apart module, cut apart when indication when receiving, one-tenth loop data according to each equipment that becomes the loop data acquisition module to be preserved, whether judgement has the equipment that does not satisfy the ring condition in piling up, if, select a link in the equipment that never satisfies into the ring condition and all links of the equipment room that satisfies into the ring condition, from disconnecting selected link in logic.
Described equipment further comprises:
Annular is piled up and is set up module, according to the up-to-date one-tenth loop data of each equipment that becomes the loop data acquisition module to preserve, when the equipment of finding not satisfy into the ring condition satisfies into the ring condition, from the link that recovers in logic to be disconnected.
Described annular is piled up and is set up module and further comprise: be used for from the link that recovers in logic to be disconnected the time, judge the equipment that whether does not satisfy into the ring condition in piling up in addition, if, in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition, select a link, from disconnecting selected link in logic; Otherwise, according to the module of ring topology generation flow forwarding-table item.
Described annular is piled up and is cut apart module and comprise:
Do not become ring apparatus to select module, cut apart when indication when receiving, one-tenth loop data according to each equipment that becomes the loop data acquisition module to be preserved, whether judgement has the equipment that does not satisfy the ring condition in piling up, if, whether judge the equipment that does not satisfy into the ring condition in piling up more than one, if more than, then do not become the ring apparatus selective rule, select an equipment therein according to default; If no more than, directly select this equipment that does not satisfy into the ring condition, selected device identification is sent to cut apart module;
Cut apart module, receiving equipment mark. know, pile up partition principle according to default annular, selection is one in the link of the equipment room from this device identification corresponding device and former chain pile up, from logic with selected link disconnection.
Described one-tenth loop data acquisition module comprises:
Become the loop data collection module, regularly the miscellaneous equipment in piling up is inquired about into loop data, perhaps, receives the one-tenth loop data that the miscellaneous equipment in piling up regularly reports to this equipment;
Become the loop data synchronization module, regularly with the one-tenth loop data of this equipment, become the one-tenth loop data of the miscellaneous equipment in the piling up that the loop data collection module inquires or receive to be synchronized to respectively on every equipment in piling up;
Perhaps, described one-tenth loop data acquisition module comprises:
Become the loop data reporting module, regularly the main equipment in piling up reports the one-tenth loop data of this equipment, perhaps, according to the query requests of main equipment, the one-tenth loop data of this equipment is reported main equipment;
Become the loop data receiver module, receive the one-tenth loop data of the miscellaneous equipment in the piling up that main equipment sends.
Compared with prior art, among the present invention when being stacked on when physically forming ring topology, whether all devices during detection is piled up all satisfies into the ring condition, if not, then with ring topology from being divided into the chain topology in logic, do not satisfy the equipment that becomes the ring condition to avoid flow to enter, thereby avoided flow interrupt;
Further, in the embodiment of the invention, when the equipment that does not satisfy into the ring condition in piling up satisfies into the ring condition, from recovering ring topology in logic, thereby make ring topology in time to set up.
Description of drawings
Fig. 1-1 piles up schematic diagram for existing chain;
Fig. 1-2 piles up schematic diagram for existing annular;
Fig. 2-1 piles up example schematic diagram for existing chain;
Fig. 2-2 causes piling up topology is become annular by chain schematic diagram for chain shown in new equipment adding Fig. 2-1 piles up;
The method flow diagram of the flow interrupt of preventing of providing of the embodiment of the invention in piling up is provided Fig. 3;
Fig. 4-1 piles up the example schematic diagram that formation annular is physically piled up for new equipment provided by the invention adds chain;
Fig. 4-2 is for piling up to cut apart and form the example schematic diagram that chain piles up again annular shown in Fig. 4-1 provided by the invention;
Fig. 4-3 sets up the example schematic diagram that annular is piled up for new equipment provided by the invention satisfies into the ring condition;
The structural representation of the stack equipment that Fig. 5 provides for the embodiment of the invention;
The annular that Fig. 6 provides for the embodiment of the invention is piled up the composition diagram of cutting apart module.
Embodiment
The present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
Core concept of the present invention is: when new equipment enters that chain piles up and makes and pile up topology when physically becoming ring topology, to judge whether earlier that all devices all satisfies into the ring condition, if not, then in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition, select a link, from disconnecting selected link in logic, and feasible piling up still logically keeps the chain topology, thereby avoided flow through not satisfying into the equipment of ring condition, promptly avoided flow interrupt; Further, after all devices all satisfies into the ring condition, recover link, in time set up ring topology so that pile up from breaking in logic.
The method flow diagram of the flow interrupt of preventing of providing of the embodiment of the invention in piling up is provided Fig. 3, and as shown in Figure 3, its concrete steps are as follows:
Step 301: pile up formation, all devices in piling up is according to default main equipment (master) election regulation, elects wherein an equipment as master.
This step is identical with the existing scheme of master of selecting in piling up.
Step 302:master collects the one-tenth loop data of all slave units in piling up, and the one-tenth loop data of all devices in regularly will piling up is synchronized to respectively on every slave unit.
Equipment in will piling up except that master is called slave unit.
Can decision be piled up the condition that form ring topology be called into the ring condition, will become the required data of ring condition to be called into loop data, become loop data at every equipment in piling up.
Every slave unit can regularly report the one-tenth loop data of self to master, perhaps, master regularly inquires about into loop data to every slave unit.
Step 303: the device discovery in piling up piles up topology and becomes physically annular by chain.
Every equipment in piling up all has topology management function, and this function can find that change has taken place the topology of piling up.
Step 304: every equipment in piling up is according to the one-tenth loop data of all devices of self preserving, and whether judgement has the equipment that does not satisfy the ring condition in piling up, if, execution in step 305; Otherwise, execution in step 309.
Become in the loop data and comprise the information that whether satisfies into the ring condition.
Step 305: every equipment in can not pile up the ring apparatus selective rule according to default, never satisfies in the equipment of ring condition to elect an equipment.
Can not become the ring apparatus selective rule to be configured in respectively on each equipment with same in advance.Do not become the ring apparatus selective rule identical on all devices that piles up, like this, all devices never satisfies into the equipment that elects in the equipment of ring condition will be identical.
Do not have only one if satisfy into the equipment of ring condition, then directly select this equipment.
Step 306: every equipment in piling up piles up partition principle according to default annular, in the link of selected equipment and the equipment room that satisfies into the ring condition, select one, from the selected link that breaks in logic, form the chain topology in logic again so that be stacked on.
Can in advance same annular be piled up partition principle is configured in respectively on each equipment.It is identical that annular on all devices that piles up is piled up partition principle, and like this, the final selected link that breaks of all devices is identical.
Because selected equipment and pile up in miscellaneous equipment between physical link formed and can't change, therefore, in this step, just from a link of break in logic selected equipment and the equipment that satisfies into the ring condition, so that message is without selected equipment, but master still can send the Topology Management message by the selected equipment of this chain road direction of breaking.
Step 307: every equipment in piling up is according to the up-to-date one-tenth loop data of selected equipment, when finding that selected equipment satisfies into the ring condition, and link then from recovering in logic to be broken.
Step 308: every equipment in piling up is judged the equipment that whether does not satisfy into the ring condition in piling up in addition according to the up-to-date one-tenth loop data of all devices of self preserving, if, execution in step 309; Otherwise, execution in step 310.
Step 309: every equipment in piling up regenerates the flow forwarding-table item according to up-to-date from the topology that forms in logic, returns step 305.
Step 310: every equipment in piling up generates the flow forwarding-table item according to ring topology.
Below provide an example of the present invention:
Shown in Fig. 4-1, equipment 1~4 forms chain and piles up, wherein, flow enters from GE1/0/10, flows out from GE4/0/10, equipment 1 is elected as master, afterwards, equipment 5 enters and piles up, and piles up to have formed ring topology physically, the one-tenth loop data of master collecting device 5, and the one-tenth loop data of current device 1~5 is broadcast to equipment 1~5, at this moment, shown in Fig. 4-2, equipment 1~5 discovering device 5 does not satisfy into the ring condition, then elect equipment 5, with the link between equipment 5 and the equipment 1 from breaking in logic, like this, equipment 1~5 still keeps chain in logic to pile up, after this, shown in Fig. 4-3, the up-to-date one-tenth loop data of the equipment 5 that issues according to master when equipment 1~5 detects equipment 5 when satisfying into the ring condition, the link from breaking between restorer 5 and the equipment 1 in logic then, equipment 1~5 formal annular that forms is piled up.
The structural representation of the stack equipment that Fig. 5 provides for the embodiment of the invention, as shown in Figure 5, it mainly comprises: become loop data acquisition module 51, Topology Management module 52, annular to pile up to cut apart module 53 and annular to pile up and set up module 54, wherein:
Become loop data acquisition module 51: preserve the one-tenth loop data of this equipment, obtain and preserve the one-tenth loop data of the miscellaneous equipment in piling up.
Topology Management module 52: when finding to pile up topology and becoming physically annular, pile up to annular and to cut apart module 53 and send and cut apart indication by chain.
Annular is piled up and is cut apart module 53: when receive that Topology Management module 52 sends cut apart indication the time, one-tenth loop data according to each equipment that becomes loop data acquisition module 51 to be preserved, whether judgement has the equipment that does not satisfy the ring condition in piling up, if, in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition, select a link, selected link from disconnecting in logic, is sent to annular with the disconnecting link sign and piles up and set up module 54.
Annular is piled up and is set up module 54: receive annular piling up and cut apart the disconnecting link sign that module 53 is sent, up-to-date one-tenth loop data according to each equipment that becomes loop data acquisition module 51 to preserve, when the equipment of finding not satisfy into the ring condition satisfies into the ring condition, link then from recovering in logic to be disconnected.
Annular is piled up and is set up module 54 and also can further comprise: be used for when the link that recovers to be disconnected piles up to form annular, judge the equipment that whether does not satisfy into the ring condition in piling up in addition, if, a link is selected in continuation in all links of the equipment that does not satisfy into the ring condition and the equipment room that satisfies into the ring condition, and from disconnecting selected link in logic, and when this equipment that does not satisfy into the ring condition of discovery satisfies into the ring condition, from the link that recovers in logic to be disconnected, and according to piling up up-to-date topology generation flow forwarding-table item from forming in logic; Otherwise, according to the module of ring topology generation flow forwarding-table item.
As shown in Figure 6, annular is piled up and is cut apart module 53 and can comprise: do not become ring apparatus to select module 531 and cut apart module 532, wherein:
Do not become ring apparatus to select module 531: when receive that Topology Management module 52 sends cut apart indication the time, one-tenth loop data according to each equipment that becomes loop data acquisition module 51 to be preserved, whether judgement has the equipment that does not satisfy the ring condition in piling up, if, whether judgement does not satisfy into the equipment of ring condition more than one in piling up, if more than, then do not become the ring apparatus selective rule according to default, select an equipment therein; If no more than, directly select this equipment that does not satisfy into the ring condition, selected device identification is sent to cut apart module 532.
Cut apart module 532: receive the device identification that does not become ring apparatus to select module 531 to send, pile up partition principle according to default annular, from all links of this device identification corresponding device and the equipment room that satisfies into the ring condition, select a link, from in logic selected link being disconnected, the disconnecting link sign is sent to annular pile up and set up module 54.
When stack equipment is master, become loop data acquisition module 51 to comprise: become the loop data collection module and become the loop data synchronization module, wherein:
Become the loop data collection module: regularly each slave unit in piling up is inquired about into loop data, perhaps, receives the one-tenth loop data that each slave unit in piling up regularly reports to this equipment.
Become the loop data synchronization module: regularly with the one-tenth loop data of this equipment, become the one-tenth loop data of all slave units in the piling up that the loop data collection module inquires or receive to be synchronized to respectively on every slave unit in piling up.
When stack equipment is slave unit, become loop data acquisition module 51 to comprise: become the loop data reporting module and become the loop data receiver module, wherein:
Become the loop data reporting module: regularly the main equipment in piling up reports the one-tenth loop data of this equipment, perhaps, according to the query requests of main equipment, the one-tenth loop data of this equipment is reported main equipment.
Become the loop data receiver module: the one-tenth loop data that receives the miscellaneous equipment in the piling up that main equipment sends.
The above only is process of the present invention and method embodiment, in order to restriction the present invention, all any modifications of being made within the spirit and principles in the present invention, is not equal to replacement, improvement etc., all should be included within protection scope of the present invention.