Embodiment
For making the object of the invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, scheme according to the invention is done to specify further.
Propose a kind of load-balancing method based on PBBN in the embodiment of the invention, this PBBN comprises a plurality of BEB equipment.
Referring to Fig. 2, Fig. 2 is based on the load-balancing method schematic flow sheet of PBBN in the embodiment of the invention.Concrete steps are:
Step 201 is when the arbitrary BEB equipment among the PBBN receives message through arbitrary port.
Step 202, when said port was down going port, said BEB equipment was learnt said down going port with the source MAC of said message.
Down going port in this step is the port that said BEB connects user network; Said BEB equipment is learnt said down going port with the source MAC of said message and comprised: said source MAC and the binding of said down going port sign are added in the local mac address table as a MAC Address list item, and said down going port sign corresponding port is this MAC Address corresponding output port.When adding as a list item, for this list item is provided with ageing time, in ageing time then, when not receiving the user source MAC Address for the MAC Address in the interpolation list item, the MAC Address list item that said MAC Address is corresponding is aging.
Step 203, said BEB equipment is transmitted the message of said reception through the port outside the said down going port.
In this step, when said message was transmitted through other down going port, the source MAC of revising this message was the MAC Address of said BEB equipment, and this message is transmitted through down going port; When said message is transmitted through up going port, this message is carried out the MinM encapsulation, be forwarded among the PBBN through each up going port.
Step 204; When said port is up going port; Said BEB equipment is in each up going port that connects the BEB equipment that sends said message; Select a up going port of learning the user's MAC address minimum number, the message of said reception is carried out the source MAC of the message after the MinM decapsulation and learn the up going port of said selection.
Up going port in this step is the port that said BEB equipment connects said PBBN; The up going port that the source MAC that the message of said reception is carried out the message after the MinM decapsulation is learnt said selection comprises: said source MAC and said up going port sign are bound add in the local mac address table as a MAC Address list item, said up going port sign corresponding port is this MAC Address corresponding output port.When adding as a list item, for this list item is provided with ageing time, in ageing time then, when not receiving the user source MAC Address for the MAC Address in the interpolation list item, the MAC Address list item that said MAC Address is corresponding is aging.
Step 205, said BEB equipment through receiving message up going port and transmit with the message of port after outside other up going ports that are connected the BEB equipment that sends said message said decapsulation.
Message is not transmitted the formation of anti-loops in this step with being connected other up going ports that send said message BEB equipment through said.When said message was transmitted through down going port, the source MAC of revising this message was the MAC Address of said BEB equipment, and this message is transmitted through down going port; When the message of said decapsulation is transmitted through up going port, this message is carried out the MinM encapsulation, be forwarded among the PBBN through up going port.
Referring to Fig. 3, the handling process sketch map when Fig. 3 receives message for BEB equipment in the specific embodiment of the invention through down going port.Concrete steps are:
Step 301 is when BEB equipment receives message through down going port.
Step 302 is searched the source MAC of the message of this reception in the local mac address table.
Step 303 if find, refreshes corresponding MAC Address list item; Otherwise, the source MAC of said message is learnt said down going port.
Step 304 is searched the target MAC (Media Access Control) address of the message of this reception in the local mac address table.
Step 305 if find said target MAC (Media Access Control) address corresponding output port, is then transmitted said message through the said outbound port that finds; Otherwise, the message of said reception is transmitted through the port outside the said down going port.
Referring to Fig. 4, the handling process sketch map when Fig. 4 receives message for BEB equipment in the specific embodiment of the invention through up going port.Concrete steps are:
Step 401 when BEB equipment receives message through up going port, is carried out the MinM decapsulation with this message.
Step 402, the message source MAC Address after in the local mac address table, searching decapsulation.
Step 403 if find, refreshes corresponding MAC Address list item; Otherwise; Said BEB equipment is in each up going port that connects the BEB equipment that sends said message; Select a up going port of learning the user's MAC address minimum number, the message of said reception is carried out the source MAC of the message after the MinM decapsulation and learn the up going port of said selection.
Step 404 is searched the target MAC (Media Access Control) address of the message after the said decapsulation in the local mac address table.
Step 405 if find said purpose MCA address corresponding output port, is then transmitted said message through the said outbound port that finds; Otherwise, the up going port through receiving message and transmit with the message of port after outside other up going ports that are connected the BEB equipment that sends said message with said decapsulation.
Said BEB equipment periodic property send the continuity detection messages from each up going port, and receive the continuity detection messages that other BEB equipment sends among the PBBN; In Preset Time, receive the continuity detection messages that other BEB equipment send, confirm that then self is normal with the path between the said BEB equipment of sending the continuity detection messages; Otherwise confirm said path failure.
This kind implementation is a continuity measuring ability in the 802.1ag agreement, this function be used between the checkout equipment together with state.Preset Time can be according to concrete needs setting, 3.5 cycles that also can be set to give tacit consent in the agreement.When confirming path failure, can carry out record, in time handle problems in order to the keeper through the form of Log Report.
When receiving the continuity detection messages; When said BEB equipment when different up going ports receives the continuity detection messages that same BEB equipment sends, confirm that self is connected with the BEB equipment of said transmission continuity detection messages respectively through said different up going port.
Provided in the specific embodiment of the invention and when path failure between two the BEB equipment or newly-increased path, how to have handled the flow of transmitting between two equipment, specific as follows:
When said BEB Equipment Inspection to a paths fault that other BEB equipment are connected the time; With the flow equalization on this failure path switch on the normal link that is connected with said other BEB, and correspondingly upgrade the outbound port of corresponding MAC Address in the local mac address table.Wherein the flow equalization on the path switches and to refer to that the flow of same target MAC (Media Access Control) address is a flow, and the equilibrium here realizes that essence is the equilibrium of the MAC Address quantity learnt on the up going port.
When said BEB Equipment Inspection when the path that is connected with other BEB equipment has increased by one; Will with flow equalization on the path that said other BEB equipment normally are connected switch on this newly-increased path, and correspondingly upgrade the outbound port of corresponding MAC Address in the local mac address table.Wherein, the again description is switched in the equilibrium of flow on the path.The path of the increase here possibly be to increase a paths newly through setting, also possibly be the path of original fault, has recovered the path now.
Below in conjunction with accompanying drawing, specifying by way of example in the specific embodiment of the invention is the load balancing that how to realize among the PBBN.
Referring to Fig. 5, Fig. 5 is a PBB networking structure sketch map in the specific embodiment of the invention.Receiving the transmission message withBEB equipment 501 among Fig. 5 is example.
WhenBEB equipment 501 receives when down going port A receives message, in the local mac address table, search the source MAC of this message, confirm promptly whether this MAC Address was learnt, if exist, then refresh the corresponding MAC Address list item of this source MAC; Otherwise, the source MAC of message is learnt on the down going port A.Simultaneously in the local mac address table, search the target MAC (Media Access Control) address of this message,, confirm this address corresponding output port if find; Can know that from Fig. 1 outbound port should be assumed to be up going port F here for up going port F, up going port C or up going port E; This message is carried out the MinM encapsulation, be this message and encapsulate a layer MAC address again, the source MAC of encapsulation is the MAC Address ofBEB equipment 501; Target MAC (Media Access Control) address is the MAC Address ofBEB equipment 502, and the message after the encapsulation is sent through up going port F; If do not find, be down going port B through the port outside the down going port A then with this message, up going port F, up going port E, up going port C and up going port D broadcasting are sent.
When BEBequipment 501 receives message through up going port; Like up going port F, know that according to the outer source MAC of this message this message sends fromBEB equipment 502, carries out the MinM decapsulation with this message; Then in the MAC Address list item of this locality, search the source MAC that receives message; If exist, the study of carrying out this source MAC is described, the MAC Address list item that this source MAC is corresponding refreshes; Otherwise; This source MAC is learnt,, known through up going port F, up going port E and up going port D all can link to each other withBEB equipment 502 through the continuity detection messages; Know the MAC Address total quantity of learning on the up going port F; Learn the MAC Address total quantity on the up going port E, and the MAC Address of learning on the up going port D does total quantity, on the few up going port of the MAC Address total quantity that this source MAC is learnt to learn on each up going port.Simultaneously, the target MAC (Media Access Control) address of the message after in the MAC Address list item, searching decapsulation if exist, obtains the outbound port of this target MAC (Media Access Control) address, and through this outbound port that finds said message is transmitted; Otherwise, this message is transmitted through the up going port C outside up going port F, up going port E and the up going port D, down going port A and down going port B.
BEBequipment 501 can periodically send the continuity detection messages to BEBequipment 502 and BEBequipment 503, receives the continuity detection messages ofBEB equipment 502 and 503 transmissions of BEB equipment simultaneously.In Preset Time, receive the continuity detection messages that BEBequipment 502 sends from up going port F, it is normal with the path thatBEB equipment 502 is connected then to confirm to pass through up going port F, in like manner, confirms whether other paths are normal.
When confirming through up going port F with path failure thatBEB equipment 502 is connected; The quantity that up going port F on the failure path learns MAC Address is 3, and the quantity that up going port E goes up the MAC Address of study is 2, and the MAC Address quantity that up going port D goes up study is 3; Then will switch to through the flow equalization that up going port F sends toBEB equipment 502 and send through up going port E and up going port D; Reach balanced purpose, should 2 of 3 MAC Addresss learning be distributed to up going port E, distribute to up going port D for 1.Can distribute according to the selective sequential of the MNAC address of learning during concrete the realization, also can give unnecessary details no longer in detail here according to the order assignment that port is set.
When detecting a newly-increased paths betweenBEB equipment 501 and theBEB equipment 502; Or recover in the path of fault; To revert to example with the path failure thatBEB equipment 502 links to each other through up going port F; With the flow equalization on up going port E and the up going port D switch on the up going port F, and upgrade the outbound port of corresponding MAC Address.If the study of statistics up going port E and up going port D to the MAC Address total quantity be respectively 3, then up going port E being gone up 1 MAC Address of study and 1 MAC Address that up going port D learns, to be updated to outbound port be up going port F.
Based on same inventive concept, a kind of BEB equipment is also proposed in the specific embodiment of the invention, can be applicable among the PBBN.Referring to Fig. 6, Fig. 6 is a structural representation of in PBBN, realizing the BEB equipment of load balancing in the specific embodiment of the invention.This BEB equipment comprises: receivingelement 601,unit 602 and transmittingelement 603.
Receivingelement 601 is used for receiving message through arbitrary down going port; Receive message through arbitrary up going port; Wherein, said down going port belongs to the port that BEB connects user network for self, and said up going port belongs to the port that BEB equipment connects said PBBN for self.
Unit 602 is used for when receivingelement 601 receives message through arbitrary down going port, the source MAC of said message being learnt said down going port; When receivingelement 601 receives message through arbitrary up going port; With self belonging to BEB equipment in each up going port that connects the BEB equipment that sends said message; Select a up going port of learning the user's MAC address minimum number, the message of said reception is carried out the source MAC of the message after the MinM decapsulation and learn the up going port of said selection.
Transmittingelement 603 is used for message that receivingelement 601 is received through arbitrary down going port, through the port outside the said down going port message of said reception is transmitted; The message that receivingelement 601 is received through arbitrary up going port, the up going port through receiving message and transmit with the message of port after outside other up going ports that are connected the BEB equipment that sends said message with said decapsulation.
Preferably, this BEB equipment further comprises:search unit 604.
Search unit 604, be used for when receivingelement 601 receives message through arbitrary down going port, in the local mac address table, search according to the target MAC (Media Access Control) address of the message of said reception; Be used for when receivingelement 601 receives message through arbitrary up going port, said message being carried out the MinM decapsulation, in said mac address table, search through the target MAC (Media Access Control) address of the message after the decapsulation.
Transmittingelement 603 is used to search the purpose MCA address corresponding output port thatunit 604 finds said reception message, then through the said outbound port that finds said message is transmitted; Otherwise, the message of said reception is transmitted through the port outside the said down going port; When searchingunit 604 and finding the target MAC (Media Access Control) address corresponding output port of the message after the said decapsulation, the message after the said decapsulation is transmitted through the said outbound port that finds; Otherwise, the up going port through receiving message and transmit with the message of port after outside other up going ports that are connected the BEB equipment that sends said message with said decapsulation.
Preferably, this BEB equipment further comprises: agingunit 605;
Agingunit 605, the corresponding MAC Address list item of each MAC Address that is used in the local mac address table is provided with ageing time.
Unit 602, the ageing time that is further used for being provided with in agingunit 605 then, receivingelement 601 does not receive the user source MAC Address when being the message of the MAC Address in the local mac address table, the MAC Address list item that just said MAC Address is corresponding is aging.
Preferably,
Search unit 604; When being further used for receivingelement 601 and receiving message through arbitrary down going port; In the local mac address table, search the source MAC of said message,, trigger the operation thatunit 602 refreshes the ageing time of corresponding MAC Address list item if find; When receivingelement 601 receives message through arbitrary up going port, said message is carried out the MinM decapsulation, and in the local mac address table, search the source MAC of the message after the said decapsulation; If find, trigger the operation thatunit 602 refreshes the ageing time of corresponding MAC Address list item; Otherwise,trigger unit 602 and carry out in each up going port that connects the BEB equipment that sends said message, select an operation of learning the up going port of user's MAC address minimum number.
Preferably, this BEB equipment further comprises: confirmunit 606.
Transmittingelement 603 is further used for periodically sending the continuity detection messages from each up going port.
Receivingelement 601 is further used for receiving the continuity detection messages that other BEB equipment send.
Confirm unit 606; Be used in Preset Time, receiving the continuity detection messages that other BEB equipment send, then confirm normal with the path that the said BEB equipment of sending the continuity detection messages is connected through the up going port of said reception continuity detection messages through arbitrary up going port when receivingelement 601; Otherwise confirm said path failure.
Preferably,
Confirm unit 606; Be further used for when receivingelement 601 when different up going ports receives the continuity detection messages that same BEB equipment sends, confirm that self place BEB equipment is connected with the BEB equipment of said transmission continuity detection messages through said different up going port respectively.
Preferably, this BEB equipment further comprises: processingunit 607.
Processing unit 607 is used for when confirming thatunit 606 is confirmed self place BEB equipment with a paths fault that other BEB equipment are connected, with the flow equalization on this failure path switch to said other BEB and be connected on the normal link.
Unit 602, be further used for processingunit 607 with the flow equalization on this failure path switch to when being connected on the normal link with said other BEB, correspondingly upgrade in the local mac address table outbound port of corresponding MAC Address in the local mac address table.
Preferably,
Processing unit 607 is further used for when confirming that path thatunit 606 confirms that self place BEB equipment is connected with other BEB equipment increases one newly, will with flow equalization on the path that said other BEB equipment normally are connected switch on this newly-increased path.
Unit 602; Be further used for processingunit 607 will with flow equalization on the path that said other BEB equipment normally are connected when switching on this newly-increased path, correspondingly upgrade in the local mac address table outbound port of corresponding MAC Address in the local mac address table.
The unit of the foregoing description can be integrated in one, and also can separate deployment; A unit can be merged into, also a plurality of subelements can be further split into.
In sum; The specific embodiment of the invention receives message at BEB equipment through up going port; When carrying out the source mac learning, in each up going port that connects the BEB equipment that sends said message, on the up going port with this source MAC study source MAC minimum number; Realize the load balancing of flow between two BEB equipment, avoid excessive cause congested of port flow.
Also through send receiving the continuity detection messages, judge whether fault of path in the specific embodiment of the invention, when certain the paths fault between two the BEB equipment, with the failure path flow load sharing to normal route; When the path between two the BEB equipment increases, increase the flow load sharing on other paths newly path to being somebody's turn to do.
The above is merely preferred embodiment of the present invention, is not to be used to limit protection scope of the present invention.All within spirit of the present invention and principle, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.