Summary of the invention
The object of the present invention is to provide chip implementing method and the system switched fast in a kind of Ethernet looped network protection.
The chip implementing method that switches fast in a kind of Ethernet looped network protection of the present invention said method comprising the steps of:
S1, message transmit in looped network, and each looped network node is set up protection group 1 and protection group 2, are used for looped network and work in the stable state use; Described each looped network node has also been set up protection group 3 and protection group 4, is used for relearning use when looped network is in the protection switching, wherein, three information is arranged in protection group: protection group state information W/P Flag, service aisle outbound port and protection channel outbound port;
S2, judge whether looped network breaks down, and protects switching, if, execution in step S3;
W/P Flag in S3, protection group 1 changes to guard mode, and message is selected protection channel and transmitted from protection port and working port simultaneously; Whether judgement protection switching front and back MAC transmits middle port and changes; If port changes; the chip reporting MAC relearns; protection group 3 or protection group 4 can be used according to the port judgement of coming in the software upper strata; and the working port of protection group and the information of protection port in upgrade using; in use, the W/P Flag of protection group changes to operating state; be the W state, make addresses forwarding table be operated in service aisle.
As a further improvement on the present invention, described step S3 also comprises:
If port does not change, software upper strata automatic regular polling and delete protection group 1 and protection group 2 in W/P Flag be the information that the MAC of P state transmits, wherein, the P state is guard mode.
Correspondingly, the chip that switches fast in a kind of Ethernet looped network protection is realized system, and described system comprises:
Be used for message in the unit that looped network transmits, each looped network node is set up protection group 1 and protection group 2, is used for looped network and works in the stable state use; Described each looped network node has also been set up protection group 3 and protection group 4, is used for relearning use when looped network is in the protection switching, wherein, three information is arranged in protection group: protection group state information W/P Flag, service aisle outbound port and protection channel outbound port;
Be used for judging that whether looped network breaks down, and protects the unit of switching;
Change to guard mode for the protection of the W/P Flag in group 1, message selects protection channel also simultaneously from protecting the unit of port and working port transmission;
And be used for judging that protection switching front and back MAC transmits middle port and whether changes; If port changes; the chip reporting MAC relearns; protection group 3 or protection group 4 can be used according to the port judgement of coming in the software upper strata; and the working port of protection group and the information of protection port in upgrade using; in use, the W/P Flag of protection group changes to operating state, makes addresses forwarding table be operated in the unit of service aisle.
As a further improvement on the present invention, described system also is used for:
If port does not change,
Software upper strata automatic regular polling and delete protection group 1 and protection group 2 in W/P Flag be the information that the MAC of P state transmits, wherein, the P state is guard mode.
The invention has the beneficial effects as follows: after the looped network protection that the present invention realizes does not need to wait for that first-class all MAC to be deleted of the node that switches transmit information when switching; message just can be done normal forwarding; but when node receives the protection handover information; related protection group can be revised the W/P Flag sign in associated AP S group immediately; make it to be in the P state; can switch to data flow on protection channel this moment, greatly accelerated the speed that looped network protection switches.
Embodiment
Describe the present invention below with reference to each execution mode shown in the drawings.But these execution modes do not limit the present invention, and the conversion on the structure that those of ordinary skill in the art makes according to these execution modes, method or function all is included in protection scope of the present invention.
Ginseng Figure 1 shows that the flow chart of the chip implementing method that switches fast in the protection of Ethernet looped network in an embodiment of the present invention, and the method comprises the following steps:
S1, message transmit in looped network; each looped network node is set up protection group 1 (APS Group 1) and protection group 2 (APS Group 2); be used for looped network and work in the stable state use, APS Group 1 and APS Group 2 correspond respectively to two links in looped network.In addition; each looped network node is set up protection group 3 (APS Group 3) and protection group 4 (APS Group 4); be used for relearning use when looped network is in the protection switching, APS Group 3 and APS Group 4 correspond respectively to two links in looped network.
Three information are arranged: protection group state information W/P Flag, service aisle outbound port Working Port and protection channel outbound port Protection Port in protection group.Figure 2 shows that in an embodiment of the present invention, looped network protection switches front stable state schematic diagram, under the looped network stable state, APS Group 1 and APS Group 2 are in running order, and APS Group 3 and APS Group 4 are in idle condition, preferably, message uses APS Group 1, transmits from service aisle at last;
S2, judge whether looped network breaks down, and protects switching, if, execution in step S3.
MAC transmits information such as comprising APS_En, APS Group ID, NexthopPtr and PktSrcPort; wherein; APS_En represents whether the protection switching enables; NexthopPtr is that message is gone out from port message is edited down hop editor table index; APS Group ID is the protection group numbering, comprises in the present embodiment APS Group ID1, APS Group ID2, APS Group ID3 and APS Group ID4.Judge whether looped network breaks down, thereby determine whether to protect switching by the value of APS_En;
W/P Flag in S3, protection group 1 changes to guard mode, and message is selected protection channel and transmitted from protection port and working port simultaneously.ginseng Fig. 3, shown in Figure 4, under the stable state of looped network, message is gone out from working port Working Port, each protection node is owing to not knowing that outbound port is at working port Working Port or protection port Protection is Port when the protection switching occurs looped network, so in the present embodiment, comprise working port Working Port and protection port Protection Port in service aisle Protection Path, when the protection switching occurs, W/P Flag in protection group 1 changes to the P state, it is guard mode, message is selected Protection Path and is gone out from working port Working Port and protection port Protection Port simultaneously.
Change because fault causes the looped network state, in looped network, the path of some data message is corresponding also changes, and switching front and back MAC transmits middle port and also may change, and in corresponding looped network, MAC may need to re-start MAC address learning, at this moment in two kinds of situation:
If change if switching front and back MAC transmits middle port, the chip reporting MAC relearns, protection group 3 or protection group 4 can be used according to the port judgement of coming in the software upper strata, and upgrade the information that Working Port and Protection Port in protection group are set, and the state of protection group W/P Flag is set to the W state, be operating state, mean that the FDB of new study is operated in Working Path state;
If do not change if looped network switching front and back MAC transmits middle port; this moment, message can not relearn; in order to prevent this situation; the software upper strata need automatic regular polling and delete protection group 1 and protection group 2 in W/P Flag be the information that the MAC of P state transmits; so that learning new MAC transmits; the purpose of deletion is in order to prevent that message from doing broadcasting, data in user network to be produced impact always.
After the fault recovery state of looped network, because before FDB is newly learnt, be protection group 3 and protection group 4 so protection group is used, this moment, protection group 1 and protection group 2 were in idle condition.When link broke down again and recovers, working group switched to again protection group 1 and protection group 2.So use four protection groups just can realize the fast quick-recovery of ring network fault.
Correspondingly, the chip that switches fast in the protection of Ethernet looped network in an embodiment of the present invention realizes that system comprises:
Be used for message in unit that looped network transmits.Each looped network node is set up protection group 1 (APS Group 1) and protection group 2 (APS Group 2), is used for looped network and works in the stable state use, and APS Group 1 and APS Group 2 correspond respectively to two links in looped network.In addition, each looped network node is set up protection group 3 (APS Group 3) and protection group 4 (APS Group 4), be used for relearning use when looped network is in the protection switching, APS Group 3 and APS Group 4 correspond respectively to two links in looped network;
Three information are arranged: protection group state information W/P Flag, service aisle outbound port Working Port and protection channel outbound port Protection Port in protection group.Under the looped network stable state, APS Group 1 and APS Group 2 are in running order, and APS Group 3 and APS Group 4 are in idle condition, and preferably, message uses APS Group 1, transmits from service aisle at last;
Be used for judging that whether looped network breaks down, and protects the unit of switching.
MAC transmits information such as comprising APS_En, APS Group ID, NexthopPtr and PktSrcPort; wherein; APS_En represents whether the protection switching enables; NexthopPtr is that message is gone out from port message is edited down hop editor table index; APS Group ID is the protection group numbering, comprises in the present embodiment APS Group ID1, APS Group ID2, APS Group ID3 and APS Group ID4.Judge whether looped network breaks down, thereby determine whether to protect switching by the value of APS_En;
Change to guard mode for the protection of the W/P Flag in group 1, message selects protection channel also simultaneously from protecting the unit of port and working port transmission.under the stable state of looped network, message is gone out from working port Working Port, each protection node is owing to not knowing that outbound port is at working port Working Port or protection port Protection is Port when the protection switching occurs looped network, so in the present embodiment, comprise working port Working Port and protection port Protection Port in service aisle Protection Path, when the protection switching occurs, W/P Flag in protection group 1 changes to the P state, it is guard mode, message is selected Protection Path and is gone out from working port Working Port and protection port Protection Port simultaneously.
Change because fault causes the looped network state, in looped network, the path of some data message is corresponding also changes, and switching front and back MAC transmits middle port and also may change, and in corresponding looped network, MAC may need to re-start MAC address learning, at this moment in two kinds of situation:
If change if switching front and back MAC transmits middle port, the chip reporting MAC relearns, protection group 3 or protection group 4 can be used according to the port judgement of coming in the software upper strata, and upgrade the information that Working Port and Protection Port in protection group are set, and the state of protection group W/P Flag is set to the W state, be operating state, mean that the FDB of new study is operated in Working Path state;
If do not change if looped network switching front and back MAC transmits middle port; this moment, message can not relearn; in order to prevent this situation; the software upper strata need automatic regular polling and delete protection group 1 and protection group 2 in W/P Flag be the information that the MAC of P state transmits; so that learning new MAC transmits; the purpose of deletion is in order to prevent that message from doing broadcasting, data in user network to be produced impact always.
The looped network protection handover scheme that the present invention realizes contrasts other looped network protection schemes with regard to following technical advantage:
When 1, looped network broke down, the mode bit of W/P Flag that only needs to revise in protection group just can make business recovery normal, and all FDB to be deleted such as did not need;
2, during looped network is switched, the same vlan data business in looped network only in looped network node broadcast, and can not broadcast the user port in same VLAN, greatly reduce data in user network are produced and impact.
In sum; after the looped network protection that the present invention realizes does not need to wait for that first-class all MAC to be deleted of the node that switches transmit information when switching; message just can be done normal forwarding; but when node receives protection handover information (R-APS message); related protection group can be revised the W/P Flag sign in associated AP S group immediately; make it to be in P state (operating state), can switch to data flow on protection channel this moment, greatly accelerated the speed that looped network protection switches.
For the convenience of describing, be divided into various unit with function when describing above device and describe respectively.Certainly, can realize the function of each unit in same or a plurality of softwares and/or hardware when implementing the application.
As seen through the above description of the embodiments, those skilled in the art can be well understood to the application and can realize by the mode that software adds essential general hardware platform.Based on such understanding, the part that the application's technical scheme contributes to prior art in essence in other words can embody with the form of software product, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each execution mode of the application or execution mode.
Device embodiments described above is only schematic, wherein said unit as the separating component explanation can or can not be also physically to separate, the parts that show as the unit can be or can not be also physical locations, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of module to realize the purpose of present embodiment scheme.Those of ordinary skills namely can understand and implement in the situation that do not pay creative work.
The application can be used in numerous general or special purpose computingasystem environment or configuration.For example: personal computer, server computer, handheld device or portable set, plate equipment, multicomputer system, the system based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, comprise distributed computing environment (DCE) of above any system or equipment etc.
The application can describe in the general context of the computer executable instructions of being carried out by computer, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can put into practice the application in distributed computing environment (DCE), in these distributed computing environment (DCE), be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment (DCE), program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
Be to be understood that, although this specification is described according to execution mode, but be not that each execution mode only comprises an independently technical scheme, this narrating mode of specification is only for clarity sake, those skilled in the art should make specification as a whole, technical scheme in each execution mode also can through appropriate combination, form other execution modes that it will be appreciated by those skilled in the art that.
Above listed a series of detailed description is only illustrating for feasibility execution mode of the present invention; they are not to limit protection scope of the present invention, all disengaging within equivalent execution mode that skill spirit of the present invention does or change all should be included in protection scope of the present invention.