CN104243334A - Method and equipment for preventing link congestion - Google Patents

Method and equipment for preventing link congestion Download PDF

Info

Publication number
CN104243334A
CN104243334A CN201410502641.7A CN201410502641A CN104243334A CN 104243334 A CN104243334 A CN 104243334A CN 201410502641 A CN201410502641 A CN 201410502641A CN 104243334 A CN104243334 A CN 104243334A
Authority
CN
China
Prior art keywords
port
equipment
message
occasional passage
root
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410502641.7A
Other languages
Chinese (zh)
Other versions
CN104243334B (en
Inventor
唐小虎
王祝勋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201410502641.7A priority Critical patent/CN104243334B/en
Publication of CN104243334A publication Critical patent/CN104243334A/en
Application granted granted Critical
Publication of CN104243334B publication Critical patent/CN104243334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and equipment for preventing link congestion. In the method, a temporary channel for temporary passage in an annular network is negotiated through leaf node equipment and root bridge equipment in an annular link, so that when link bandwidth in the annular network is insufficient, the temporary channel can be started to help links insufficient in bandwidth to share traffic, in this way, the problem of temporary link congestion which probably occurs due to insufficient link bandwidth can be solved.

Description

Prevent the method and apparatus of link congestion
Technical field
The application relates to the network communications technology, particularly prevents the method and apparatus of link congestion.
Background technology
Spanning-Tree Protocol (STP:Spanning Tree Protocol) is a kind of two layer-management agreements, and it eliminates double-layer loop by the redundant link in optionally clogging networks, also possesses the function of link backup simultaneously.STP by IEEE 802.1D standard definition, for eliminating the agreement of data link layer physics loop in a local network.The equipment running this agreement passes through interactive information each other and finds the loop in network, and selectively certain port is blocked, loop network structure is trimmed to loop-free tree network structure the most at last, thus prevent message continuous hyperplasia and Infinite Cyclic in loop network, avoid equipment owing to repeating to receive the problem generation of the message processing capability decline that identical message causes.
RSTP (RSTP:Rapid Spanning Tree Protocol), by IEEE 802.1w standard definition, it improves on STP basis, achieves the Fast Convergent of network topology.Its " fast " is embodied in, and after a port is chosen as root port and designated port, its time delay entering forwarding state will be shortened greatly, thus shortens network and finally reach time required for topological robust.
No matter be STP or RSTP, it all can not find and solve the provisional congested of link in network appearance.As shown in Figure 1, after network topology is in stable condition, if Device A connects row equipment access the Internet as root bridging, family PC main frame is used in conjunction under Device B, Device C blocks its port Port C2 connecting Device B, PC by the link-access internet of Device B to Device A, but when the link of this Device B to Device A occurs congested because data traffic is excessive, STP or RSTP be all have no idea to avoid congested.
Summary of the invention
This application provides the method and apparatus preventing link congestion, the link congestion that may occur because link bandwidth is nervous to avoid.
The technical scheme that the application provides comprises:
Prevent a method for link congestion, the method is applied to the network equipment in loop network, and the described network equipment is leaf node device or is root bridge device, and the method comprises:
When the described network equipment is leaf node device,
If there is port blocked in this equipment, in described loop network, then initiate the notice consulting occasional passage, receive that root bridge device in described loop network and other leaf node device send allow the notice setting up occasional passage time, the described port blocked that this equipment exists is added to described occasional passage, and described port blocked is allowed to forwarding data packets in occasional passage; If there is not port blocked in this equipment, then receive described notice, and judge whether this equipment allows to set up occasional passage, if, root port on this equipment is added to occasional passage together with designated port, and informs to what allow to set up occasional passage the leaf node device initiating described notice;
After completing occasional passage negotiation, message flow monitoring is carried out to the root port on this equipment, when monitoring root port and meeting port congestion condition, enable occasional passage and share the message originally forwarded via this root port together with root port, congested to avoid root port to occur;
When the described network equipment is root bridge device,
Receive the notice of the negotiation occasional passage of the leaf node device initiation that there is port blocked in described loop network, judge whether this equipment allows to set up occasional passage, if, all designated ports on this equipment are added to occasional passage, and inform to allowing to set up occasional passage the leaf node device initiating described notice;
After completing occasional passage negotiation, message flow monitoring is carried out to each designated port on this equipment; When monitoring designated port and meeting port congestion condition, enable occasional passage and share the message originally forwarded via this designated port together with this designated port, congested to avoid this designated port to occur.
Prevent an equipment for link congestion, this equipment is applied to the network equipment in loop network, when the described network equipment is leaf node device, comprising: the first negotiation element, the first monitoring unit, first share processing unit;
First negotiation element, during for there is port blocked on this equipment, the notice consulting occasional passage is initiated in described loop network, receive that root bridge device in described loop network and other leaf node device send allow the notice setting up occasional passage time, the described port blocked that this equipment exists is added to described occasional passage, and described port blocked is allowed to forwarding data packets in occasional passage; And
During for there is not port blocked on this equipment, receive described notice, and judge whether this equipment allows to set up occasional passage, if, root port on this equipment is added to occasional passage together with designated port, and informs to what allow to set up occasional passage the leaf node device initiating described notice;
First monitoring unit, for after completing occasional passage negotiation, carries out message flow monitoring to the root port on this equipment;
First shares processing unit, for monitor at described first monitoring unit root port meet port congestion condition time, enable occasional passage and share the message originally forwarded via this root port together with root port, congested to avoid root port to occur;
When the described network equipment is root bridge device, comprising: the second negotiation element, the second monitoring unit, second share processing unit;
Second negotiation element, for receiving the notice of the negotiation occasional passage of the leaf node device initiation that there is port blocked in described loop network, judge whether this equipment allows to set up occasional passage, if, all designated ports on this equipment are added to occasional passage, and inform to allowing to set up occasional passage the leaf node device initiating described notice;
Second monitoring unit, for after completing occasional passage negotiation, carries out message flow monitoring to each designated port on this equipment;
Second shares processing unit, for monitor at described second monitoring unit designated port meet port congestion condition time, enable occasional passage and share the message originally forwarded via this designated port together with this designated port, congested to avoid this designated port to occur.
As can be seen from the above technical solutions, in the present invention, an interim occasional passage current in loop network is consulted by leaf node device each in annular link and root bridge device, so that when the link bandwidth in loop network is nervous, enable the link load traffic that occasional passage helps bandwidth anxiety, this can solve the temporary link congestion that may occur because link bandwidth is nervous.
Accompanying drawing explanation
Fig. 1 is existing network networking schematic diagram;
The networking schematic diagram that Fig. 2 provides for the embodiment of the present invention;
Fig. 3 is method flow diagram provided by the invention;
Fig. 4 is other method flow chart provided by the invention;
The Hash operation schematic diagram that Fig. 5 provides for the embodiment of the present invention;
The example networking schematic diagram that Fig. 6 provides for the embodiment of the present invention;
Fig. 7 is equipment structure chart provided by the invention;
Fig. 8 is another equipment structure chart provided by the invention.
Embodiment
In order to make the object, technical solutions and advantages of the present invention clearly, describe the present invention below in conjunction with the drawings and specific embodiments.
For making the application's easy understand, first the technical term that the application relates to is described below:
Root bridge device: tree-like network configuration must have tree root, in being the introduction of the concept of root bridge device (Root Bridge).Root bridge device has and only has one in the whole network, and miscellaneous equipment is then called leaf node.Root bridge can change according to the change of network topology, and therefore root bridge is not fixing.
Root port: from the port that root bridge device is nearest in leaf node device.Root port in leaf node device is responsible for communicating with root bridge device.Root port is responsible for communicating with root bridge device, and a leaf node device has and only has a root port, root bridge device does not have root port, the port of its connecting ring l network is all decided to be designated port.
Designated port, port blocked: for leaf node device, it is after the port determining connecting ring l network is root port, can determine that another port of connecting ring l network is designated port or port blocked through some calculating, described below is and how to determine that another port of its connecting ring l network is designated port or port blocked, wouldn't repeat here.
Above the technical term that the application relates to is described.
The present invention is applied to the loop network of topology status convergence (also claiming stable).Only describe the topology status convergence process based on the loop network of STP for STP below, RSTP principle is similar.
Initial condition:
The bridge protocol data unit (BPDU:Bridge Protocol Data Unit) that on each network equipment, it is root bridge device that the port of connecting ring l network can generate and send with this equipment when initial, in this BPDU, root bridge ID is the device id of self, root path cost is 0, specify bridge ID to be the device id of self, designated port is the port.
Select root bridge:
When network is initial, each network equipment all thinks it oneself is " root bridge " equipment, afterwards by and other network equipments exchange BPDU to select the minimum equipment of root bridge ID be root bridge device.
Select root port:
Leaf node device selection is root port from the port that root bridge device is nearest.
Select designated port and port blocked:
BPDU after process, by the BPDU that on following this equipment of substitute mode process, the port (being called role's port undetermined) of connecting ring l network generates except root port, is decided to be designated port BPDU by leaf node device:
Root bridge ID replaces with the root bridge ID of the BPDU of root port;
The root path cost root path cost replaced with in root port BPDU adds the path cost that root port is corresponding;
Bridge ID is specified to replace with the ID of equipment of itself;
Designated port ID replaces with self port id.
The BPDU that the designated port BPDU that this equipment calculates by leaf node device oneself generates with role's port undetermined compares as follows: if the BPDU calculated is more excellent, then this port is confirmed as designated port, the BPDU that its BPDU is also calculated replaces, and periodically outwards sends; If the BPDU of this port oneself is more excellent, then do not upgrade the BPDU of this port and the state of this port be set to block (Discarding), the port that this state is set to block is called port blocked, will no longer forwarding data, and receives only and do not send BPDU.
After each process above-mentioned, the topology status of the whole loop network based on STP also just settles out.Fig. 2 shows the state of the port of connecting ring l network in root bridge device and each leaf node device.
Being port blocked by arranging the port of connecting ring l network in a leaf node device, the normal loop problem occurred in loop network can be solved, but this can not find and to solve loop network link congested.
In network application, link congestion is temporary transient, and based on this, the present invention, when there being link bandwidth nervous, expands bandwidth temporarily, the temporary link congestion that may occur because link bandwidth is nervous to solve.The present invention does not need additionally to increase hardware or equipment, does not need to carry out great change, so can not increase Networking Solutions & provisioned implementation cost to the software forms of existing ethernet device and Spanning-Tree Protocol itself yet.
Below method provided by the invention is described:
See the method flow diagram that Fig. 3, Fig. 3 provide for the embodiment of the present invention.The method is applied to loop network as above such as based on the loop network of STP or RSTP.When the topology status stabilization ratio of loop network as stable in the topology status of the loop network based on STP or RSTP (essence also refers to that spanning-tree state is stablized), then perform flow process as shown in Figure 3.
As shown in Figure 3, this flow process can comprise the following steps:
Step 301, the leaf node device that there is port blocked initiates to consult the notice of occasional passage in loop network.
Step 302, the leaf node device that there is not port blocked receives described notice, and judge whether this equipment allows to set up occasional passage, if, root port on this equipment is added to occasional passage together with designated port, and informs to what allow to set up occasional passage the leaf node device initiating described notice; Root bridge device receives described notice, and judge whether this equipment allows to set up occasional passage, if so, all designated ports on this equipment are added to occasional passage together, and inform to what allow to set up occasional passage the leaf node device initiating described notice.
In the present invention, root port on this equipment and designated port are added occasional passage by leaf node device, it just means when adopting occasional passage, this root port and designated port possess the function E-Packeted, but do not affect this root port and the original function ratio of designated port as message repeating original in loop network.Equally, root bridge device principle that all designated ports on this equipment are added to occasional passage is similar.
Step 303, during the notice setting up occasional passage that what the leaf node device that there is port blocked received that root bridge device and other leaf node device in described loop network send allow, is added to described occasional passage by the described port blocked that this equipment exists.
So far, the negotiation of occasional passage is just completed.Here, the occasional passage of negotiation is the link in loop network when being about to occur congested, helps this to be about to occur congested link load traffic, to avoid this link congestion, specifically sees described in step 304.
Step 304, leaf node device is after completing occasional passage negotiation, message flow monitoring is carried out to the root port on this equipment, when monitoring root port and meeting port congestion condition, enable occasional passage and share the message originally forwarded via this root port together with root port, congested to avoid root port to occur; Root bridge device, after completing occasional passage negotiation, carries out message flow monitoring to each designated port on this equipment; When monitoring designated port and meeting port congestion condition, enable occasional passage and share the message originally forwarded via this designated port together with this designated port, congested to avoid this designated port to occur.
This step 304 specific implementation can 406 to step 415 in flow process shown in Figure 4.Here wouldn't repeat.
So far, flow process shown in Fig. 3 is completed.
As can be seen from flow process shown in Fig. 3, the present invention consults an interim occasional passage current in loop network by network equipment each in annular link, so that when the link bandwidth in loop network is nervous, enable the link load traffic that occasional passage helps bandwidth anxiety, this can solve the temporary link congestion that may occur because link bandwidth is nervous.
Below by Fig. 4, flow process shown in above-mentioned Fig. 3 is described in detail.
See the embodiment flow chart that Fig. 4, Fig. 4 provide for the embodiment of the present invention.As shown in Figure 4, this flow process can comprise the following steps:
Step 401, the leaf node device that there is port blocked in loop network takes the lead in initiating to consult the notice of occasional passage in loop network.
As shown in Figure 2, leaf node device Device C, the port status of its port Port C2 is set to block, namely Port C2 is port blocked, also namely, leaf node device Device C is the leaf node device that there is port blocked, so, based on step 401, Device C can initiate the notice consulting occasional passage in the whole loop network shown in Fig. 2.Here, Device C initiates by broadcast or multicast mode the notice consulting occasional passage in the whole loop network shown in Fig. 2.
In the present invention, carrying this equipment in the notice that the Device C in leaf node device such as Fig. 2 sends is the VLAN (VLAN) mark (ID) that occasional passage generates.Preferably, the Device C in leaf node device such as Fig. 2 is by taking under type as occasional passage generation VLAN ID:
Device C in leaf node device such as Fig. 2 calculates a random number between 2 to 4094 by pseudo-random algorithm, and the random number this obtained is as VLAN ID.
It should be noted that, the mode just citing of above-mentioned generation VLAN ID, and non-limiting the present invention.
Further, for ease of understanding this port blocked in loop network, the information of port blocked in described notice, is also carried further, the configuration informations such as the mark of such as port blocked.
Step 402, the leaf node device receiving described notice in loop network judges whether this equipment allows to set up occasional passage, and when judging that this equipment allows to set up occasional passage, root port on this equipment is added to occasional passage together with designated port, and informs to allowing to set up occasional passage the leaf node device initiating described notice.
Still for Fig. 2, Device C in Fig. 2 initiates the notice consulting occasional passage, after the leaf node device Device B in Fig. 2 receives this notice, judge whether this equipment allows to set up occasional passage, here, judge whether this equipment allows the step 403 that operates in setting up occasional passage to specifically describe, and this step 402 wouldn't describe.
When Device B judges that this equipment allows to set up occasional passage, the root port on this equipment and Port B1 are added to occasional passage together with designated port and Port B2.Also namely, now occasional passage just contains root port Port B1 and the designated port Port B2 of Device B.Here, occasional passage contains root port Port B1 and the designated port Port B2 of Device B, mean when adopting occasional passage, root port Port B1 and designated port Port B2 can carry out message repeating, but this does not affect the original message repeating in loop network of root port Port B1 and designated port Port B2.Afterwards, Device B informs to allowing to set up occasional passage the leaf node device and Device C of initiating described notice.
In this step 402, when Device B judges that this equipment does not allow to set up occasional passage, then inform to not allowing to set up occasional passage the leaf node device and Device C of initiating described notice.
Step 403, the root bridge device receiving described notice in loop network judges whether this equipment allows to set up occasional passage, and when judging that this equipment allows to set up occasional passage, all designated ports on this equipment are added to occasional passage together, and inform to allowing to set up occasional passage the leaf node device initiating described notice.
Still for Fig. 2, Device C in Fig. 2 initiates the notice consulting occasional passage, after the root bridge device Device A in Fig. 2 receives this notice, judge whether this equipment allows to set up occasional passage, when Device A judges that this equipment allows to set up occasional passage, all designated ports on this equipment and Port A1 are added to occasional passage together with Port A2.Also namely, now occasional passage also contains designated port Port A1 and the Port A2 of Device A.Here, occasional passage contains designated port Port A1 and the Port A2 of Device A, mean when adopting occasional passage, designated port Port A1 and Port A2 can carry out message repeating, but this does not affect the original message repeating in loop network of designated port Port A1 and Port A2.Afterwards, Device A informs to allowing to set up occasional passage the leaf node device and Device C of initiating described notice.
In this step 403, when Device A judges that this equipment does not allow to set up occasional passage, then inform to not allowing to set up occasional passage the leaf node device and Device C of initiating described notice.
It should be noted that, above-mentioned steps 402 and step 403 there is no regular time sequencing, and the application is for ease of describing, to the numbering of its mark, and the non-limiting order that it performs.
In above-mentioned steps 402, step 403, judge whether to allow to set up occasional passage by following steps:
Judge the VLAN mark whether VLAN identification collision already present with this equipment that the notice received is carried, if so, then judge that this equipment does not allow to set up occasional passage, if not, then judge that this equipment allows to set up occasional passage.
Step 404, the leaf node device that there is port blocked receive that other leaf node device and root bridge device in described loop network send allow the notice setting up occasional passage time, the port blocked that this equipment exists is added to described occasional passage.
Also be, when performing this step 404, occasional passage also contains port blocked, when port blocked is added to described occasional passage, means that port blocked possesses data message forwarding function in occasional passage, it can allow forwarding data packets, but for the data message forwarded without occasional passage, this port blocked still blocks this data message forwarded without occasional passage, otherwise stp state can be caused repeatedly to switch, and agreement is shaken.
It should be noted that, based on the description of step 402, step 403, in the present invention, if the leaf node device that there is port blocked receives the notice not allowing to set up occasional passage that in loop network, root bridge device and/or at least one leaf node device send, then perform following steps further:
Again in described loop network, initiate the notice consulting occasional passage, this notice again initiated carries the VLAN mark for described occasional passage regenerates.Afterwards, step 402 is returned to step 404.
When port blocked is added to occasional passage by the leaf node device that there is port blocked, the leaf node device that there is port blocked will judge that the negotiation of occasional passage completes.Afterwards, it regularly can send heartbeat message (Heart Message), and to safeguard described occasional passage, here, heartbeat message sends by broadcast or multicast mode.Still for Fig. 2, then as there is the leaf node device of port blocked after completing occasional passage negotiation in Device C, and timing sends heartbeat message by broadcast or multicast mode in described loop network.
And the leaf node device that there is not port blocked in loop network is when receiving heartbeat message first, it thinks that the negotiation of occasional passage completes.Afterwards, within such as 30 seconds, can detect every setting-up time the heartbeat message whether receiving the leaf node device that there is port blocked and send, if not, then the root port and designated port that this equipment have been added to occasional passage be exited from occasional passage.Still for Fig. 2, Device C is as the leaf node device that there is port blocked, Device B is as the leaf node device that there is not port blocked, then Device B is after receiving heartbeat message first, the heartbeat message whether receiving Device C and send within such as 30 seconds, can be detected every setting-up time, if received, then return and within such as 30 seconds, detect the operation whether receiving the heartbeat message that Device C sends every setting-up time, otherwise, if do not received, then the root port Port B1 on this equipment and designated port Port B2 is exited from occasional passage, now, occasional passage no longer comprises Port B1 and Port B2, namely Port B1 and Port B2 no longer forwards the message via occasional passage, but this does not affect the original message repeating in loop network of Port B1 and Port B2.
Equally, when the root bridge device in loop network receives heartbeat message first, also can think that the negotiation of occasional passage completes.Afterwards, within such as 30 seconds, can detect every setting-up time the heartbeat message whether receiving the leaf node device that there is port blocked and send, if not, then two designated ports this equipment being added to occasional passage be exited from occasional passage.Still for Fig. 2, Device C is as the leaf node device that there is port blocked, Device A is as root bridge device, then, Device A is after receiving heartbeat message first, the heartbeat message whether receiving Device C and send within such as 30 seconds, can be detected every setting-up time, if received, then ignore this heartbeat message, otherwise, if do not received, then the designated port Port A1 on this equipment and Port A2 is exited from occasional passage, now, occasional passage no longer comprises Port A1 and Port A2, namely Port A1 and Port A2 no longer forwards the message via occasional passage, but this does not affect the original message repeating in loop network of Port A1 and Port A2.
Can find out, the negotiation of occasional passage can be completed by above-mentioned steps 401 to step 404.For Fig. 2, then the occasional passage finally negotiated by above-mentioned steps 401 to step 404 is just made up of Port A1, the Port A2 of Device A, Port B1, the Port B2 of Device B, the Port C1 of Device C, Port C2.
Step 405, after completing occasional passage negotiation, leaf node device performs following step 406 to step 410, and root bridge device performs following step 411 to step 415.
Here leaf node device can be the leaf node device that there is port blocked, also can be the leaf node device that there is not port blocked.
It should be noted that, in the present invention, step 406 is to step 410, and step 411 to step 415 is not regular time sequencing, and it is for ease of describing the numbering marked, and non-limiting the present invention.
Step 406, carries out record every the unit interval to the message flow forwarded via root port on this equipment.
Here, the unit interval can be 1 second, or is other value, and the present invention does not specifically limit.
Step 407, the speed of described root port under the message flow C1 calculating current one time that the message flow C2 utilizing current one time T2 to record an and upper unit interval T1 records.
Preferably, this step 407 is by the speed of following formulae discovery root port:
(C2-C1)/(T2-T1)。
It should be noted that, mode just a kind of citing of this computation rate, and non-limiting the present invention.
Step 408, judges whether described speed is greater than the first setting threshold, if so, then counter corresponding for root port on this equipment is added 1, if not, when described speed is less than the second setting threshold, counter corresponding for root port on this equipment is subtracted 1.
Here, described first setting threshold is more than or equal to the second setting threshold.
Step 409, the counter of the current correspondence of monitoring root port, if this counter value is greater than the first set point, then confirms that root port meets port congestion condition, enables occasional passage and share the message originally forwarded via this root port together with root port.
In the present invention, the first setting threshold, the second setting threshold can set according to real network situation.In fact, in the present invention, when the speed of root port is greater than the first setting threshold, just mean that root port bandwidth is nervous, be about to occur flow congestion, just need to enable occasional passage and share the message originally forwarded via this root port together with root port, congested to avoid root port to occur, and why the present invention does not have when the speed of root port is greater than the first setting threshold, enable occasional passage and share the message originally forwarded via this root port together with root port, but counter is processed, reason is: in real network application, network burst flow is many, rate variation is frequent, for avoiding frequently enabling occasional passage, just add counter, the span of this counter can set according to network condition in advance, such as span is [-5, 5], only when the value of counter reaches the first set point, just can enable occasional passage and share the message originally forwarded via this root port together with root port, this can be avoided occasional passage to be frequently activated.
Preferably, in this step 409, occasional passage can be enabled according to following principle and share the message originally forwarded via this root port together with root port:
1, broadcasting packet, multicast message and unknown unicast message do not allow to enter occasional passage, prevent message from occurring winding;
2, to the message of other types, perform following process:
Hash operation is carried out to the message characteristic parameter that message carries, obtain Hash result, here, described message characteristic parameter can be at least one in source MAC that message carries, target MAC (Media Access Control) address, source IP address, object IP address, transport layer protocol number, port numbers etc.;
If determine it is forwarded by occasional passage according to Hash result, on this message, then carry the device identification of this equipment and the VLAN mark of occasional passage, and forwarded by occasional passage, if determine it is forwarded by root port according to Hash result, then forward this message by this root port.
Here, determine by occasional passage according to Hash result or forward specifically by realizing with under type 1 or mode 2 by root port:
Mode 1:
Specify in advance forwarded by occasional passage be designated odd number or even number, here for even number, then the mark forwarded by root port just should be odd number mutually;
Based on this, if the Hash result calculated is even number, then just represent it is forwarded by occasional passage, and if the Hash result calculated is odd number, then just represent it is forwarded by root port.
Take Hash result as message digest be example, such as, suppose that message characteristic parameter is the source MAC that message carries, be then the message of 2C41-38A1-4D5F for source MAC, after leaf node device calculates the source MAC 2C41-38A1-4D5F repeatedly XOR carried out as shown in Figure 5 according to HASH algorithm, obtain Hash result (Hash result is message digest) 8 here, Hash result 8 is even number, then source MAC is that the message of 2C41-38A1-4D5F finally should be forwarded by occasional passage.
Mode 2:
M Hash bucket is set, for depositing Hash result, and the message amortization ratio of designated root port and occasional passage in advance.Because root port has less COST value in STP protocol convergence process before, so under the prerequisite that message is not congested, message forwards from root port, is better than forwarding from occasional passage, and then message should be greater than from the amortization ratio that root port forwards and forwards from occasional passage.
Such as, pre-set 10 Hash buckets, the Hash result that these 10 Hash buckets are deposited is followed successively by 0,1,2,3,4,5,6,7,8,9; It is 8:2 that the message of designated root port and occasional passage shares ratio, and namely front 8 Hash buckets (the 1st to the 8th Hash bucket) forward for root port, and latter two Hash bucket (the 9th to the 10th Hash bucket) forwards for occasional passage; Then suppose that message characteristic parameter is the source MAC that message carries, be the message of 2C41-38A1-4D5F for source MAC, after leaf node device calculates the source MAC 2C41-38A1-4D5F repeatedly XOR carried out as shown in Figure 5 according to HASH algorithm, obtain Hash result (Hash result is message digest) 8 here, Hash result 8 just in time leaves in the 9th Hash bucket, and the 9th Hash bucket is just in time specified for occasional passage and forwards, then source MAC is that the message of 2C41-38A1-4D5F finally should be forwarded by occasional passage.
It should be noted that, aforesaid way 1, mode 2 are just determined by occasional passage or the embodiment forwarded by root port according to Hash result, and non-limiting the present invention.
Also have, in the present invention, when enabling after occasional passage shares the message originally forwarded via this root port together with root port, also the situation of bandwidth affluence may be there is in this root port follow-up, here, the situation that the speed of root port is less than the second setting threshold by the present invention is decided to be the situation of root port bandwidth affluence.When root port bandwidth is rich, also enable occasional passage if current and help root port converting flow, then bandwidth waste can be caused, based on this, the present invention is when root port bandwidth is rich, also enable occasional passage if current and help root port converting flow, then regain occasional passage, the message forwarded is switched to this root port forward via occasional passage.As mentioned previously, network burst flow is many, rate variation is frequent, for avoiding frequently enabling, regain occasional passage, the present invention neither regain occasional passage once monitoring root port bandwidth affluence, but the counter of the current correspondence of monitoring root port, if this counter value is less than the second set point, then confirm that root port meets port idle condition; Described first set point is greater than the second set point, and such as the first set point is the 3, second set point is-3.When root port meets port idle condition, enable occasional passage if current and shared the message originally forwarded via this root port together with this root port, then the message forwarded via occasional passage has been switched to this root port and forward.
Step 410, when receiving Portable device mark and occasional passage identification message, if the device identification that this message carries is the device identification of this equipment self, then abandon the message that this receives, if the device identification that this message carries is not the device identification of this equipment self, then judge whether this learning equipment is divided by other ports outside lower port to the port of this message target MAC (Media Access Control) address: root port and designated port on this equipment, or root port and port blocked on this equipment, if, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, when this equipment receives this message by root port, this message is forwarded by the designated port on this equipment, when this equipment receives this message by designated port, this message is forwarded by the root port on this equipment.
In this step 410, leaf node device abandons this message received when the device identification that the message received carries is the device identification of this equipment self, and when the port of the target MAC (Media Access Control) address judging the message that this learning equipment receives to this is the port except root port on this equipment and designated port, peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, can prevent message repeating from occurring winding.
Step 411, root bridge device carries out record every the unit interval to the message flow forwarded via each designated port on this equipment.
Step 412, root bridge device, for each designated port, utilized the message flow of the message flow of interocclusal record during current one and record of upper unit interval to calculate the speed of this designated port under the current one time.
This step 412 is similar with above-mentioned steps 407, and only step 407 is to root port, and this step 411 is for designated port.
Step 413, root bridge device judges whether described speed is greater than the 3rd setting threshold, if so, then counter corresponding for this designated port is added 1, if not, when described speed is less than the 4th setting threshold, counter corresponding for this designated port is subtracted 1.
Here, described 3rd setting threshold is more than or equal to the 4th setting threshold.
In this step 413, the first setting threshold in the 3rd setting threshold and above-mentioned steps 408 has nothing to do.Equally, the second setting threshold in the 4th setting threshold and above-mentioned steps 408 also has nothing to do.In addition, this step 413 arrange describe in the 3rd setting threshold, the object of the 4th setting threshold and above-mentioned steps 409 arrange the first setting threshold, the second setting threshold object similar, repeat no more here.
Step 414, the counter of the current correspondence of root bridge device monitoring designated port, if this counter value is greater than the 3rd set point, confirm that designated port meets port congestion condition, enable occasional passage and share the message originally forwarded via this designated port together with this designated port.
In this step 414, the first set point in the 3rd set point and above-mentioned steps 409, the second set point have nothing to do.
Enable occasional passage in this step 414 to share the message originally forwarded via this designated port enable occasional passage in above-mentioned steps 409 to share the mode of the message originally forwarded via this root port together with root port similar together with this designated port, only the root port in step 409 is replaced with the designated port in this step 414, repeat no more here.
Also have, in the present invention, when enabling after occasional passage shares the message originally forwarded via this designated port together with designated port, also the situation of bandwidth affluence may be there is in this designated port follow-up, here, the situation that the speed of designated port is less than the 4th setting threshold by the present invention is decided to be the situation of designated port bandwidth affluence.When designated port bandwidth is rich, also enable occasional passage if current and help this designated port converting flow, then bandwidth waste can be caused, based on this, the present invention is when designated port bandwidth is rich, also enable occasional passage if current and help this designated port converting flow, then regain occasional passage, the message forwarded is switched to this designated port forward via occasional passage.As mentioned previously, network burst flow is many, rate variation is frequent, for avoiding frequently enabling, regain occasional passage, the present invention neither regain occasional passage once monitoring designated port bandwidth affluence, but the counter of the current correspondence of monitoring designated port, if this counter value is less than the 4th set point, then confirm that designated port meets port idle condition; Described 4th set point and the first above-mentioned set point, the second set point have nothing to do, but are less than the 3rd above-mentioned set point, and such as the 3rd set point is 3, and the 4th set point is-3.When designated port meets port idle condition, enable occasional passage if current and shared the message originally forwarded via this designated port together with this designated port, then the message forwarded via occasional passage has been switched to this designated port and forward.
Step 415, when root bridge device receives the message of Portable device mark and occasional passage mark by a designated port, if the device identification that this message carries is the device identification of this equipment self, then abandon the message that this receives, if the device identification that this message carries is not the device identification of this equipment self, then judge that whether this learning equipment is the port except designated port on this equipment to the port of this message target MAC (Media Access Control) address, if, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, this message is forwarded by other designated ports on this equipment.
In this step 415, root bridge device abandons this message received when the device identification that the message received carries is the device identification of this equipment self, and when the port of the target MAC (Media Access Control) address judging the message that this learning equipment receives to this is the port except two designated ports on this equipment, peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, can prevent message repeating from occurring winding.
So far, the flow process shown in Fig. 4 is completed.
Below by a specific embodiment, flow process shown in Fig. 4 is described:
See the network implementation illustration that Fig. 6, Fig. 6 provide for the embodiment of the present invention.In figure 6, 5 Ethernet switches set up a loop network as shown in Figure 6, in this loop network, through Spanning-Tree Protocol computing, obtain: Device A is root bridge device, the Port A1 of Device A, Port A2 is designated port, Device B to Device E is leaf node device, the Port B1 of Device B is root port, Port B2 is designated port, the Port C2 of Device C is port blocked, Port C1 is root port, the Port D1 of Device D is root port, Port D2 is designated port, the Port E1 of Device E is root port, Port E2 is designated port.Being connected under Device B between multiple pc (being called PC B group) and Server A has mass data to forward.
Then based on the network shown in Fig. 6, then,
Device C starts to initiate to consult the notice of occasional passage, and to carry Device C in this notice be the VLAN mark of occasional passage stochastic generation is such as 100;
After Device A receives notice, judge to allow to set up occasional passage, then add occasional passage by from two designated port Port A1, Port A2 with it, and allow to Device C transmission the notice setting up occasional passage;
After Device B receives notice, judge to allow to set up occasional passage, then add occasional passage by from root port PortB1 with it and designated port Port B2, and allow to Device C transmission the notice setting up occasional passage;
After Device D receives notice, judge to allow to set up occasional passage, then add occasional passage by from root port PortD1 with it and designated port Port D2, and allow to Device C transmission the notice setting up occasional passage;
After Device E receives notice, judge to allow to set up occasional passage, then add occasional passage by from root port PortE1 with it and designated port Port E2, and allow to Device C transmission the notice setting up occasional passage;
Device C receive Device A, Device B, Device D, Device E send allow to set up the notice of occasional passage after, port blocked Port C2 on this equipment is added occasional passage, and opens the data message forwarding function of port blocked Port C2 in occasional passage.Now, Device C thinks that occasional passage is consulted to complete, then timing can send heartbeat message in described loop network;
When Device A, Device B, Device D, Device E receive the heartbeat message of Device C transmission first, then think that occasional passage has been consulted, afterwards, the heartbeat message whether receiving the leaf node device that there is port blocked and send is detected every setting-up time, if not, then the root port and designated port that this equipment have been added to occasional passage are exited from occasional passage, if so, then ignore this heartbeat message.Meanwhile, Device B, C, D, E starts to carry out traffic monitoring to the root port on this equipment; And Device A starts to carry out traffic monitoring to each designated port on this equipment.
Between PC B group and Server A, there is mass data to forward, by traffic monitoring, Device D finds that root port Port D1 meets port congestion condition, need to enable occasional passage and share originally via the message that this root port Port D1 forwards together with root port Port D1:
The message of Device D to PC B group is classified, and makes part of message arrive Server A after root port Port D1 is forwarded to Device E, Device A, and emphasis does not describe here.
Another part message is carried the VLAN mark 100 of occasional passage and the device identification Device D of this equipment by Device D, is forwarded to Device C afterwards by occasional passage.Hereafter carry out emphasis description:
After Device C receives the message carrying VLAN mark 100, judge that message target MAC (Media Access Control) address (i.e. the MAC Address of Server A) study is at root port Port C1, only E-Packets;
The processing mode that Device B receives the message carrying VLAN mark 100 is identical with Device C;
After Device A receives the message carrying VLAN mark 100, check that message target MAC (Media Access Control) address (i.e. the MAC Address of Server A) study connects the port Port0 of Server A at this Device A, namely be other ports on this Device A beyond two designated ports, then peel VLAN mark 100 and device identification that message carries off, then message is transmitted to Server A according to normal flow;
The message that Server A responds forwards according to the MAC Address of learning equipment, gets back to PC B group from the designated port of Device A.If Device A finds that designated port is congested, similar step 411 to the mode of step 415 also can be adopted to carry out classification transmission to the message that Server A responds PC B group, repeat no more here.
So far, complete method provided by the invention to describe.
Below equipment provided by the invention is described:
Be equipment structure chart provided by the invention see Fig. 7, Fig. 7.This equipment is applied to the network equipment in loop network.
As shown in Figure 7, when this equipment is leaf node device, comprising: the first negotiation element, the first monitoring unit, first share processing unit;
First negotiation element, during for there is port blocked on this equipment, the notice consulting occasional passage is initiated in described loop network, receive that root bridge device in described loop network and other leaf node device send allow the notice setting up occasional passage time, the described port blocked that this equipment exists is added to described occasional passage, and described port blocked is allowed to forwarding data packets in occasional passage; And
During for there is not port blocked on this equipment, receive described notice, and judge whether this equipment allows to set up occasional passage, if, root port on this equipment is added to occasional passage together with designated port, and informs to what allow to set up occasional passage the leaf node device initiating described notice;
First monitoring unit, for after completing occasional passage negotiation, carries out message flow monitoring to the root port on this equipment;
First shares processing unit, for monitor at described first monitoring unit root port meet port congestion condition time, enable occasional passage and share the message originally forwarded via this root port together with root port, congested to avoid root port to occur;
When the described network equipment is root bridge device, comprising: the second negotiation element, the second monitoring unit, second share processing unit;
Second negotiation element, for receiving the notice of the negotiation occasional passage of the leaf node device initiation that there is port blocked in described loop network, judge whether this equipment allows to set up occasional passage, if, all designated ports on this equipment are added to occasional passage, and inform to allowing to set up occasional passage the leaf node device initiating described notice;
Second monitoring unit, for after completing occasional passage negotiation, carries out message flow monitoring to each designated port on this equipment;
Second shares processing unit, for monitor at described second monitoring unit designated port meet port congestion condition time, enable occasional passage and share the message originally forwarded via this designated port together with this designated port, congested to avoid this designated port to occur.
Preferably, in the present invention, when the described network equipment is leaf node device, described first share processing unit further described first monitoring unit monitor root port meet port idle condition time, enable occasional passage if current and shared the message originally forwarded via this root port together with this root port, then the message forwarded via occasional passage has been switched to this root port and forward;
When the described network equipment is root bridge device, described second share processing unit further described second monitoring unit monitor designated port meet port idle condition time, enable occasional passage if current and shared the message originally forwarded via this designated port together with this designated port, then the message forwarded via occasional passage has been switched to this designated port and forward.
Preferably, in the present invention, when the described network equipment is leaf node device, and when this equipment existing port blocked, it is the virtual LAN VLAN mark that described occasional passage generates that the notice of initiation carries this equipment;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, or, when the described network equipment is root bridge device, judge whether this equipment allows to set up occasional passage and comprise:
Judge the VLAN mark whether VLAN identification collision already present with this equipment that the notice received is carried, if so, then judge that this equipment does not allow to set up occasional passage, if not, then judge that this equipment allows to set up occasional passage.
Preferably, in the present invention, when the described network equipment is leaf node device, and when this equipment not existing port blocked, if described first negotiation element judges that this equipment does not allow to set up occasional passage, inform to not allowing to set up occasional passage the leaf node device initiating described notice further;
When the described network equipment is root bridge device, if described second negotiation element judges that this equipment does not allow to set up occasional passage, inform to not allowing to set up occasional passage the leaf node device initiating described notice further;
When the described network equipment is leaf node device, and when this equipment existing port blocked, described first negotiation element receives the notice not allowing to set up occasional passage further, again in described loop network, initiate the notice consulting occasional passage, this notice again initiated carries the VLAN mark for described occasional passage regenerates.
Preferably, in the present invention, described first monitoring unit carries out message flow monitoring to the root port on this equipment and comprises: carry out record every the unit interval to the message flow forwarded via root port on this equipment; The speed of described root port under the message flow calculating current one time utilizing the message flow of interocclusal record during current one and a upper unit interval to record; Judge whether described speed is greater than the first setting threshold, if so, then counter corresponding for root port on this equipment is added 1, if not, when described speed is less than the second setting threshold, then counter corresponding for root port on this equipment is subtracted 1; Described first setting threshold is more than or equal to the second setting threshold;
Monitor root port to meet port congestion condition and comprise: the counter of the current correspondence of monitoring root port, if this counter value is greater than the first set point, then confirm that root port meets port congestion condition;
Monitor root port to meet port idle condition and comprise: the counter of the current correspondence of monitoring root port, if this counter value is less than the second set point, then confirm that root port meets port idle condition; Described first set point is greater than the second set point;
Described second monitoring unit carries out message flow monitoring to each designated port on this equipment and comprises: for each designated port on this equipment, record the message flow forwarded via this designated port every the unit interval; When utilizing current one, the message flow forwarded via this designated port of the message flow forwarded via this designated port of interocclusal record and upper unit interval record calculates the speed of this designated port under the current one time; Judge whether described speed is greater than the 3rd setting threshold, if so, then counter corresponding for this designated port is added 1, if not, be less than the 4th setting threshold in described speed, then counter corresponding for this designated port subtracted 1; Described 3rd setting threshold is more than or equal to the 4th setting threshold;
The described designated port that monitors meets port congestion condition and comprises: the counter of the current correspondence of monitoring designated port, if this counter value is greater than the 3rd set point, confirms that designated port meets port congestion condition;
The described designated port that monitors meets port idle condition and comprises: the counter of the current correspondence of monitoring designated port, if this counter value is less than the 4th set point, then confirms that designated port meets port idle condition; Described 3rd set point is more than or equal to the 4th set point.
Preferably, in the present invention, described first shares processing unit enables occasional passage and shares the message originally forwarded via root port comprise together with root port:
To the broadcasting packet originally forwarded via root port, multicast message and unknown unicast message, forwarded by this root port; To the message of other types, perform following process: the message characteristic parameter of carrying message is carried out Hash operation and obtained Hash result, if determine it is forwarded by occasional passage according to Hash result, on this message, then carry the device identification of this equipment and the mark of occasional passage and forwarded by occasional passage, if determine it is forwarded by root port according to Hash result, then forward this message by this root port.
Described second shares processing unit enables occasional passage and shares the message originally forwarded via designated port comprise together with designated port:
To the broadcasting packet, multicast message and the unknown unicast message that originally forward via this designated port, forwarded by this designated port;
To the message of other types, perform following process: the message attribute parameter of carrying message is carried out Hash operation and obtained Hash result, described message attribute parameter is at least one in the five-tuple that carries of message; If determine it is forwarded by occasional passage according to Hash result, on this message, then carry the device identification of this equipment and the mark of occasional passage and forwarded by occasional passage, if determine it is forwarded by designated port according to Hash result, then forward this message by this designated port.
Preferably, in the present invention, as shown in Figure 7, when the described network equipment is leaf node device, comprise further: the first forward processing unit;
First forward processing unit, during for receiving Portable device mark and occasional passage identification message,
If the device identification that this message carries is the device identification of this equipment self, then abandon the message that this receives, if the device identification that this message carries not is the device identification of this equipment self, then judge whether this learning equipment is divided by other ports outside lower port to the port of this message target MAC (Media Access Control) address:
Root port and designated port on this equipment, or root port and port blocked on this equipment;
If, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, when this equipment receives this message by root port, forward this message by the designated port on this equipment, when this equipment receives this message by designated port, forward this message by the root port on this equipment;
When the described network equipment is root bridge device, comprise further: the second forward processing unit;
Second forward processing unit, for received by a designated port Portable device mark and occasional passage identify message time,
If the device identification that this message carries is the device identification of this equipment self, abandon the message received;
If the device identification that this message carries is not the device identification of this equipment self, then judge that whether this learning equipment is the port except designated port on this equipment to the port of this message target MAC (Media Access Control) address, if, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, this message is forwarded by other designated ports on this equipment.
Preferably, in the present invention, when the described network equipment is leaf node device, and when this equipment existing port blocked, the port blocked that this equipment exists is added to described occasional passage and is judged to be that occasional passage has been consulted by the first negotiation element;
When the described network equipment is leaf node device, and when this equipment existing port blocked, the first negotiation element is further after completing occasional passage negotiation, and timing sends heartbeat message, to safeguard described occasional passage in described loop network;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, the heartbeat message receiving the leaf node device transmission that there is port blocked is first judged to be that occasional passage has been consulted by the first negotiation element;
When the described network equipment is root bridge device, the heartbeat message receiving the leaf node device transmission that there is port blocked is first judged to be that occasional passage has been consulted by the second negotiation element;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, first negotiation element detects the heartbeat message whether receiving the leaf node device that there is port blocked and send further every setting-up time, if not, then the root port and designated port that this equipment have been added to occasional passage are exited from occasional passage;
When the described network equipment is root bridge device, second negotiation element detects the heartbeat message whether receiving the leaf node device that there is port blocked and send further every setting-up time, if not, then the root port and designated port that this equipment have been added to occasional passage are exited from occasional passage.
So far, complete the device structure shown in Fig. 7 to describe.
The hardware configuration that present invention also offers the network equipment shown in corresponding diagram 7 describes.
See the hardware structure diagram of the network equipment that Fig. 8, Fig. 8 provide for the embodiment of the present invention.As shown in Figure 8, this network equipment can comprise:
Memory, for when the described network equipment is leaf node device, deposits the first negotiation element, the first monitoring unit, first shares processing unit; And, for when the described network equipment is root bridge device, deposit the second negotiation element, the second monitoring unit, second shares processing unit;
CPU, for when the described network equipment is leaf node device, deposit the first negotiation element, the first monitoring unit, first share processing unit run program; And, for when the described network equipment is root bridge device, deposit the second negotiation element, the second monitoring unit, second share processing unit run program.
Wherein, the first negotiation element, the first monitoring unit, first share program that processing unit runs respectively the first negotiation element as above, the first monitoring unit, first share described in the operation that processing unit performs, repeat no more here;
Second negotiation element, the second monitoring unit, second share program that processing unit runs respectively the second negotiation element as above, the second monitoring unit, second share described in the operation that processing unit performs, repeat no more here.
So far, complete the device hardware structure shown in Fig. 8 to describe.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment made, equivalent replacement, improvement etc., all should be included within the scope of protection of the invention.

Claims (16)

1. prevent a method for link congestion, it is characterized in that, the method is applied to the network equipment in loop network, and the described network equipment is leaf node device or is root bridge device, and the method comprises:
When the described network equipment is leaf node device,
If there is port blocked in this equipment, in described loop network, then initiate the notice consulting occasional passage, receive that root bridge device in described loop network and other leaf node device send allow the notice setting up occasional passage time, the described port blocked that this equipment exists is added to described occasional passage, and described port blocked is allowed to forwarding data packets in occasional passage; If there is not port blocked in this equipment, then receive described notice, and judge whether this equipment allows to set up occasional passage, if, root port on this equipment is added to occasional passage together with designated port, and informs to what allow to set up occasional passage the leaf node device initiating described notice;
After completing occasional passage negotiation, message flow monitoring is carried out to the root port on this equipment, when monitoring root port and meeting port congestion condition, enable occasional passage and share the message originally forwarded via this root port together with root port, congested to avoid root port to occur;
When the described network equipment is root bridge device,
Receive the notice of the negotiation occasional passage of the leaf node device initiation that there is port blocked in described loop network, judge whether this equipment allows to set up occasional passage, if, all designated ports on this equipment are added to occasional passage, and inform to allowing to set up occasional passage the leaf node device initiating described notice;
After completing occasional passage negotiation, message flow monitoring is carried out to each designated port on this equipment; When monitoring designated port and meeting port congestion condition, enable occasional passage and share the message originally forwarded via this designated port together with this designated port, congested to avoid this designated port to occur.
2. method according to claim 1, is characterized in that, when the described network equipment is leaf node device, the method comprises further:
When monitoring root port and meeting port idle condition, enable occasional passage if current and shared the message originally forwarded via this root port together with this root port, then the message forwarded via occasional passage has been switched to this root port and forward;
When the described network equipment is root bridge device, the method comprises further:
When monitoring designated port and meeting port idle condition, enable occasional passage if current and shared the message originally forwarded via this designated port together with this designated port, then the message forwarded via occasional passage has been switched to this designated port and forward.
3. method according to claim 1, is characterized in that, when the described network equipment is leaf node device, and when this equipment existing port blocked, it is the virtual LAN VLAN mark that described occasional passage generates that the notice that this equipment is initiated carries this equipment;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, or, when the described network equipment is root bridge device, judge whether this equipment allows to set up occasional passage and comprise:
Judge the VLAN mark whether VLAN identification collision already present with this equipment that the notice received is carried, if so, then judge that this equipment does not allow to set up occasional passage, if not, then judge that this equipment allows to set up occasional passage.
4. method according to claim 1, it is characterized in that, when the described network equipment is leaf node device, and when this equipment not existing port blocked, or, when the described network equipment is root bridge device, if judge that this equipment does not allow to set up occasional passage, the method comprises further: inform to not allowing to set up occasional passage the leaf node device initiating described notice;
When the described network equipment is leaf node device, and when this equipment existing port blocked, the method comprises further: receive and do not allow the notice setting up occasional passage, again in described loop network, initiate the notice consulting occasional passage, this notice again initiated carries the VLAN mark for described occasional passage regenerates.
5. method according to claim 2, it is characterized in that, when the described network equipment is leaf node device, described to the root port on this equipment carry out message flow monitoring comprise: every the unit interval to via on this equipment root port forward message flow carry out record; The speed of described root port under the message flow calculating current one time utilizing the message flow of interocclusal record during current one and a upper unit interval to record; Judge whether described speed is greater than the first setting threshold, if so, then counter corresponding for root port on this equipment is added 1, if not, when described speed is less than the second setting threshold, then counter corresponding for root port on this equipment is subtracted 1; Described first setting threshold is more than or equal to the second setting threshold;
Monitor root port to meet port congestion condition and comprise: the counter of the current correspondence of monitoring root port, if this counter value is greater than the first set point, then confirm that root port meets port congestion condition;
Monitor root port to meet port idle condition and comprise: the counter of the current correspondence of monitoring root port, if this counter value is less than the second set point, then confirm that root port meets port idle condition; Described first set point is greater than the second set point;
When the described network equipment is root bridge device, described to each designated port on this equipment carry out message flow monitoring comprise: for each designated port on this equipment, record the message flow forwarded via this designated port every the unit interval; When utilizing current one, the message flow forwarded via this designated port of the message flow forwarded via this designated port of interocclusal record and upper unit interval record calculates the speed of this designated port under the current one time; Judge whether described speed is greater than the 3rd setting threshold, if so, then counter corresponding for this designated port is added 1, if not, be less than the 4th setting threshold in described speed, then counter corresponding for this designated port subtracted 1; Described 3rd setting threshold is more than or equal to the 4th setting threshold;
The described designated port that monitors meets port congestion condition and comprises: the counter of the current correspondence of monitoring designated port, if this counter value is greater than the 3rd set point, confirms that designated port meets port congestion condition;
The described designated port that monitors meets port idle condition and comprises: the counter of the current correspondence of monitoring designated port, if this counter value is less than the 4th set point, then confirms that designated port meets port idle condition; Described 3rd set point is more than or equal to the 4th set point.
6. method according to claim 1, is characterized in that, when the described network equipment is leaf node device, described in enable occasional passage and share the message originally forwarded via root port comprise together with root port:
To the broadcasting packet originally forwarded via root port, multicast message and unknown unicast message, forwarded by this root port; To the message of other types, perform following process: the message characteristic parameter of carrying message is carried out Hash operation and obtained Hash result, if determine it is forwarded by occasional passage according to Hash result, on this message, then carry the device identification of this equipment and the mark of occasional passage and forwarded by occasional passage, if determine it is forwarded by root port according to Hash result, then forward this message by this root port.
When the described network equipment is root bridge device, described in enable occasional passage and share the message originally forwarded via designated port comprise together with designated port:
To the broadcasting packet, multicast message and the unknown unicast message that originally forward via this designated port, forwarded by this designated port;
To the message of other types, perform following process: the message attribute parameter of carrying message is carried out Hash operation and obtained Hash result, described message attribute parameter is at least one in the five-tuple that carries of message; If determine it is forwarded by occasional passage according to Hash result, on this message, then carry the device identification of this equipment and the mark of occasional passage and forwarded by occasional passage, if determine it is forwarded by designated port according to Hash result, then forward this message by this designated port.
7. method according to claim 6, is characterized in that, when the described network equipment is leaf node device, the method comprises further:
When receiving Portable device mark and occasional passage identification message,
If the device identification that this message carries is the device identification of this equipment self, then abandon the message that this receives, if the device identification that this message carries not is the device identification of this equipment self, then judge whether this learning equipment is divided by other ports outside lower port to the port of this message target MAC (Media Access Control) address:
Root port and designated port on this equipment, or root port and port blocked on this equipment;
If, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, when this equipment receives this message by root port, forward this message by the designated port on this equipment, when this equipment receives this message by designated port, forward this message by the root port on this equipment;
When the described network equipment is root bridge device, the method comprises further:
When receiving the message of Portable device mark and occasional passage mark by a designated port,
If the device identification that this message carries is the device identification of this equipment self, abandon the message received;
If the device identification that this message carries is not the device identification of this equipment self, then judge that whether this learning equipment is the port except designated port on this equipment to the port of this message target MAC (Media Access Control) address, if, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, this message is forwarded by other designated ports on this equipment.
8. method according to claim 1, is characterized in that, when the described network equipment is leaf node device, and when this equipment existing port blocked, the port blocked that this equipment exists is added to described occasional passage and is judged to be that occasional passage has been consulted;
When the described network equipment is leaf node device, and when this equipment existing port blocked, the method comprises further: after completing occasional passage negotiation, timing sends heartbeat message, to safeguard described occasional passage in described loop network;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, or, when the described network equipment is root bridge device, the heartbeat message receiving the leaf node device transmission that there is port blocked is first judged to be that occasional passage has been consulted;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, or, when the described network equipment is root bridge device, the method comprises further: detect the heartbeat message whether receiving the leaf node device that there is port blocked and send every setting-up time, if not, then the root port and designated port that this equipment have been added to occasional passage are exited from occasional passage.
9. prevent an equipment for link congestion, it is characterized in that, this equipment is applied to the network equipment in loop network, when the described network equipment is leaf node device, comprising: the first negotiation element, the first monitoring unit, first share processing unit;
First negotiation element, during for there is port blocked on this equipment, the notice consulting occasional passage is initiated in described loop network, receive that root bridge device in described loop network and other leaf node device send allow the notice setting up occasional passage time, the described port blocked that this equipment exists is added to described occasional passage, and described port blocked is allowed to forwarding data packets in occasional passage; And
During for there is not port blocked on this equipment, receive described notice, and judge whether this equipment allows to set up occasional passage, if, root port on this equipment is added to occasional passage together with designated port, and informs to what allow to set up occasional passage the leaf node device initiating described notice;
First monitoring unit, for after completing occasional passage negotiation, carries out message flow monitoring to the root port on this equipment;
First shares processing unit, for monitor at described first monitoring unit root port meet port congestion condition time, enable occasional passage and share the message originally forwarded via this root port together with root port, congested to avoid root port to occur;
When the described network equipment is root bridge device, comprising: the second negotiation element, the second monitoring unit, second share processing unit;
Second negotiation element, for receiving the notice of the negotiation occasional passage of the leaf node device initiation that there is port blocked in described loop network, judge whether this equipment allows to set up occasional passage, if, all designated ports on this equipment are added to occasional passage, and inform to allowing to set up occasional passage the leaf node device initiating described notice;
Second monitoring unit, for after completing occasional passage negotiation, carries out message flow monitoring to each designated port on this equipment;
Second shares processing unit, for monitor at described second monitoring unit designated port meet port congestion condition time, enable occasional passage and share the message originally forwarded via this designated port together with this designated port, congested to avoid this designated port to occur.
10. equipment according to claim 9, it is characterized in that, when the described network equipment is leaf node device, described first share processing unit further described first monitoring unit monitor root port meet port idle condition time, enable occasional passage if current and shared the message originally forwarded via this root port together with this root port, then the message forwarded via occasional passage has been switched to this root port and forward;
When the described network equipment is root bridge device, described second share processing unit further described second monitoring unit monitor designated port meet port idle condition time, enable occasional passage if current and shared the message originally forwarded via this designated port together with this designated port, then the message forwarded via occasional passage has been switched to this designated port and forward.
11. equipment according to claim 9, is characterized in that, when the described network equipment is leaf node device, and when this equipment existing port blocked, it is the virtual LAN VLAN mark that described occasional passage generates that the notice of initiation carries this equipment;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, or, when the described network equipment is root bridge device, judge whether this equipment allows to set up occasional passage and comprise:
Judge the VLAN mark whether VLAN identification collision already present with this equipment that the notice received is carried, if so, then judge that this equipment does not allow to set up occasional passage, if not, then judge that this equipment allows to set up occasional passage.
12. equipment according to claim 9, it is characterized in that, when the described network equipment is leaf node device, and when this equipment not existing port blocked, if described first negotiation element judges that this equipment does not allow to set up occasional passage, inform to not allowing to set up occasional passage the leaf node device initiating described notice further;
When the described network equipment is root bridge device, if described second negotiation element judges that this equipment does not allow to set up occasional passage, inform to not allowing to set up occasional passage the leaf node device initiating described notice further;
When the described network equipment is leaf node device, and when this equipment existing port blocked, described first negotiation element receives the notice not allowing to set up occasional passage further, again in described loop network, initiate the notice consulting occasional passage, this notice again initiated carries the VLAN mark for described occasional passage regenerates.
13. equipment according to claim 10, is characterized in that, described first monitoring unit carries out message flow monitoring to the root port on this equipment and comprises: carry out record every the unit interval to the message flow forwarded via root port on this equipment; The speed of described root port under the message flow calculating current one time utilizing the message flow of interocclusal record during current one and a upper unit interval to record; Judge whether described speed is greater than the first setting threshold, if so, then counter corresponding for root port on this equipment is added 1, if not, when described speed is less than the second setting threshold, then counter corresponding for root port on this equipment is subtracted 1; Described first setting threshold is more than or equal to the second setting threshold;
Monitor root port to meet port congestion condition and comprise: the counter of the current correspondence of monitoring root port, if this counter value is greater than the first set point, then confirm that root port meets port congestion condition;
Monitor root port to meet port idle condition and comprise: the counter of the current correspondence of monitoring root port, if this counter value is less than the second set point, then confirm that root port meets port idle condition; Described first set point is greater than the second set point;
Described second monitoring unit carries out message flow monitoring to each designated port on this equipment and comprises: for each designated port on this equipment, record the message flow forwarded via this designated port every the unit interval; When utilizing current one, the message flow forwarded via this designated port of the message flow forwarded via this designated port of interocclusal record and upper unit interval record calculates the speed of this designated port under the current one time; Judge whether described speed is greater than the 3rd setting threshold, if so, then counter corresponding for this designated port is added 1, if not, be less than the 4th setting threshold in described speed, then counter corresponding for this designated port subtracted 1; Described 3rd setting threshold is more than or equal to the 4th setting threshold;
The described designated port that monitors meets port congestion condition and comprises: the counter of the current correspondence of monitoring designated port, if this counter value is greater than the 3rd set point, confirms that designated port meets port congestion condition;
The described designated port that monitors meets port idle condition and comprises: the counter of the current correspondence of monitoring designated port, if this counter value is less than the 4th set point, then confirms that designated port meets port idle condition; Described 3rd set point is more than or equal to the 4th set point.
14. equipment according to claim 9, is characterized in that, described first shares processing unit enables occasional passage and share the message originally forwarded via root port comprise together with root port:
To the broadcasting packet originally forwarded via root port, multicast message and unknown unicast message, forwarded by this root port; To the message of other types, perform following process: the message characteristic parameter of carrying message is carried out Hash operation and obtained Hash result, if determine it is forwarded by occasional passage according to Hash result, on this message, then carry the device identification of this equipment and the mark of occasional passage and forwarded by occasional passage, if determine it is forwarded by root port according to Hash result, then forward this message by this root port.
Described second shares processing unit enables occasional passage and shares the message originally forwarded via designated port comprise together with designated port:
To the broadcasting packet, multicast message and the unknown unicast message that originally forward via this designated port, forwarded by this designated port;
To the message of other types, perform following process: the message attribute parameter of carrying message is carried out Hash operation and obtained Hash result, described message attribute parameter is at least one in the five-tuple that carries of message; If determine it is forwarded by occasional passage according to Hash result, on this message, then carry the device identification of this equipment and the mark of occasional passage and forwarded by occasional passage, if determine it is forwarded by designated port according to Hash result, then forward this message by this designated port.
15. equipment according to claim 13, is characterized in that, when the described network equipment is leaf node device, comprise further: the first forward processing unit;
First forward processing unit, during for receiving Portable device mark and occasional passage identification message,
If the device identification that this message carries is the device identification of this equipment self, then abandon the message that this receives, if the device identification that this message carries not is the device identification of this equipment self, then judge whether this learning equipment is divided by other ports outside lower port to the port of this message target MAC (Media Access Control) address:
Root port and designated port on this equipment, or root port and port blocked on this equipment;
If, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, when this equipment receives this message by root port, forward this message by the designated port on this equipment, when this equipment receives this message by designated port, forward this message by the root port on this equipment;
When the described network equipment is root bridge device, comprise further: the second forward processing unit;
Second forward processing unit, for received by a designated port Portable device mark and occasional passage identify message time,
If the device identification that this message carries is the device identification of this equipment self, abandon the message received;
If the device identification that this message carries is not the device identification of this equipment self, then judge that whether this learning equipment is the port except designated port on this equipment to the port of this message target MAC (Media Access Control) address, if, then peel off device identification and occasional passage mark that message carries, by study this message of port repeat to this message target MAC (Media Access Control) address, if not, this message is forwarded by other designated ports on this equipment.
16. equipment according to claim 9, it is characterized in that, when the described network equipment is leaf node device, and when this equipment existing port blocked, the port blocked that this equipment exists is added to described occasional passage and is judged to be that occasional passage has been consulted by the first negotiation element;
When the described network equipment is leaf node device, and when this equipment existing port blocked, the first negotiation element is further after completing occasional passage negotiation, and timing sends heartbeat message, to safeguard described occasional passage in described loop network;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, the heartbeat message receiving the leaf node device transmission that there is port blocked is first judged to be that occasional passage has been consulted by the first negotiation element;
When the described network equipment is root bridge device, the heartbeat message receiving the leaf node device transmission that there is port blocked is first judged to be that occasional passage has been consulted by the second negotiation element;
When the described network equipment is leaf node device, and when this equipment not existing port blocked, first negotiation element detects the heartbeat message whether receiving the leaf node device that there is port blocked and send further every setting-up time, if not, then the root port and designated port that this equipment have been added to occasional passage are exited from occasional passage;
When the described network equipment is root bridge device, second negotiation element detects the heartbeat message whether receiving the leaf node device that there is port blocked and send further every setting-up time, if not, then the root port and designated port that this equipment have been added to occasional passage are exited from occasional passage.
CN201410502641.7A 2014-09-26 2014-09-26 The method and apparatus for preventing link congestion Active CN104243334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410502641.7A CN104243334B (en) 2014-09-26 2014-09-26 The method and apparatus for preventing link congestion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410502641.7A CN104243334B (en) 2014-09-26 2014-09-26 The method and apparatus for preventing link congestion

Publications (2)

Publication Number Publication Date
CN104243334A true CN104243334A (en) 2014-12-24
CN104243334B CN104243334B (en) 2017-08-11

Family

ID=52230714

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410502641.7A Active CN104243334B (en) 2014-09-26 2014-09-26 The method and apparatus for preventing link congestion

Country Status (1)

Country Link
CN (1) CN104243334B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016127910A1 (en) * 2015-02-10 2016-08-18 Hangzhou H3C Technologies Co., Ltd. Packet buffering
CN106789889A (en) * 2016-11-22 2017-05-31 广州市诚毅科技软件开发有限公司 A kind of method for monitoring network and device based on network structure
CN106850853A (en) * 2017-03-24 2017-06-13 国网江苏省电力公司电力科学研究院 A kind of information channel intelligent selecting method based on load balancing
CN109561020A (en) * 2017-09-27 2019-04-02 英特尔公司 Non-minimum path and throttle port speed are selected to increase the technology of network throughput
CN111464436A (en) * 2020-04-03 2020-07-28 中电科航空电子有限公司 Method for solving single-port loop of RSTP (remote station transfer protocol)
CN113225241A (en) * 2021-04-19 2021-08-06 中国科学院计算技术研究所 Data transmission congestion control method and system for ring-shaped data message network
WO2022089213A1 (en) * 2020-10-31 2022-05-05 华为技术有限公司 Packet sending method, device, and system
CN116248583A (en) * 2023-01-03 2023-06-09 重庆长安汽车股份有限公司 Communication redundancy configuration method and device of vehicle-mounted controller, vehicle and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434611A (en) * 2002-01-22 2003-08-06 富士通株式会社 Spanning tree detour method and device
CN1976311A (en) * 2006-11-24 2007-06-06 中兴通讯股份有限公司 Multi-loop contact Ethernet loop network loop protection switchover method
CN101309215A (en) * 2008-06-25 2008-11-19 北京星网锐捷网络技术有限公司 Ethernet ring network link restoring and detecting method and Ethernet ring network switch
CN101640644A (en) * 2009-09-01 2010-02-03 杭州华三通信技术有限公司 Method and equipment for flow equilibrium based on flexible link group
CN101986615A (en) * 2010-11-09 2011-03-16 中兴通讯股份有限公司 Multiple-ring Ethernet and protection method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1434611A (en) * 2002-01-22 2003-08-06 富士通株式会社 Spanning tree detour method and device
CN1976311A (en) * 2006-11-24 2007-06-06 中兴通讯股份有限公司 Multi-loop contact Ethernet loop network loop protection switchover method
CN101309215A (en) * 2008-06-25 2008-11-19 北京星网锐捷网络技术有限公司 Ethernet ring network link restoring and detecting method and Ethernet ring network switch
CN101640644A (en) * 2009-09-01 2010-02-03 杭州华三通信技术有限公司 Method and equipment for flow equilibrium based on flexible link group
CN101986615A (en) * 2010-11-09 2011-03-16 中兴通讯股份有限公司 Multiple-ring Ethernet and protection method thereof

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10419358B2 (en) 2015-02-10 2019-09-17 Hewlett Packard Enterprise Development Lp Packet buffering
CN105991470A (en) * 2015-02-10 2016-10-05 杭州华三通信技术有限公司 Message buffer method and device of Ethernet equipment
WO2016127910A1 (en) * 2015-02-10 2016-08-18 Hangzhou H3C Technologies Co., Ltd. Packet buffering
CN106789889A (en) * 2016-11-22 2017-05-31 广州市诚毅科技软件开发有限公司 A kind of method for monitoring network and device based on network structure
CN106789889B (en) * 2016-11-22 2020-05-05 广州市诚毅科技软件开发有限公司 Network monitoring method and device based on mesh structure
CN106850853A (en) * 2017-03-24 2017-06-13 国网江苏省电力公司电力科学研究院 A kind of information channel intelligent selecting method based on load balancing
CN106850853B (en) * 2017-03-24 2019-06-11 国网江苏省电力公司电力科学研究院 A kind of information channel intelligent selecting method based on load balancing
CN109561020A (en) * 2017-09-27 2019-04-02 英特尔公司 Non-minimum path and throttle port speed are selected to increase the technology of network throughput
CN111464436A (en) * 2020-04-03 2020-07-28 中电科航空电子有限公司 Method for solving single-port loop of RSTP (remote station transfer protocol)
CN111464436B (en) * 2020-04-03 2022-02-01 中电科航空电子有限公司 Method for solving single-port loop of RSTP (remote station transfer protocol)
WO2022089213A1 (en) * 2020-10-31 2022-05-05 华为技术有限公司 Packet sending method, device, and system
CN113225241A (en) * 2021-04-19 2021-08-06 中国科学院计算技术研究所 Data transmission congestion control method and system for ring-shaped data message network
CN116248583A (en) * 2023-01-03 2023-06-09 重庆长安汽车股份有限公司 Communication redundancy configuration method and device of vehicle-mounted controller, vehicle and storage medium

Also Published As

Publication number Publication date
CN104243334B (en) 2017-08-11

Similar Documents

Publication Publication Date Title
CN104243334A (en) Method and equipment for preventing link congestion
CN110166356B (en) Method and network equipment for sending message
JP5592385B2 (en) Provisioned Provider Link State Bridging (PLSB) with routed backup
JP4778062B2 (en) Provider link state bridging
EP2732597B1 (en) Placement of service delivery locations of a distributed computing service based on a logical topology
CN102823205B (en) Aggregating data traffic from access domains
JP5542927B2 (en) Inter-node link aggregation system and method
WO2009049292A1 (en) Ip network and performance monitoring using ethernet oam
WO2014204850A1 (en) Virtual chassis topology management
Farhangi et al. Performance comparison of mixed protocols based on EIGRP, IS-IS and OSPF for real-time applications
Papan et al. The new multicast repair (M‐REP) IP fast reroute mechanism
US20150036508A1 (en) Method and Apparatus For Gateway Selection In Multilevel SPB Network
CN104994019A (en) Horizontal direction interface system for SDN controller
US9825850B2 (en) Network controlling method and network controller
CN106936710B (en) Mesh Group configuration method and device
Verdi et al. InFaRR: In-network Fast ReRouting
Petrov et al. Minimization of multicast traffic and ensuring its fault tolerance in software-defined networks
Zheng et al. Comparing the complexity of two network architectures
Usino et al. Improving Internal BGP Provide Fast Failover in Multihoming Environment Mobile Backhaul
Arifwidodo et al. The Performance Analysis of Hybrid SDN–IP Reactive Routing on ONOS Controller in Tree Topologies
Ren et al. A reactive traffic flow estimation in software defined networks
Khan et al. Virtual network embedding algorithm for one-to-one site protection
Santos et al. Improving carrier ethernet recovery time using a fast reroute mechanism
Mamede et al. Relieving Core Routers from Dynamic Routing with Off-the-Shelf Equipment and Protocols
CN103414646B (en) A kind of multicast service negotiation method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant