The present application claims priority to UK Patent Application No. 1405776.4 filed Mar. 31, 2014, the entirety of the disclosure of which is expressly incorporated herein by reference.
Not Applicable.
The present invention relates to operation of a Spanning Tree Protocol and in particular how the protocol is operated under different loads.
The Spanning Tree Protocol is a network protocol which is designed to maintain a loop-free topology in a bridged local area network. A family of spanning tree protocols is defined in IEEE 802.1D and IEEE 802.1Q, the content of which is incorporated herein. These protocols are widely deployed in Ethernet networks. The family of Spanning Tree Protocols includes the original Spanning Tree Protocol (STP), Rapid Spanning Tree Protocol (RSTP) and Multiple Spanning Tree Protocol (MSTP). RSTP is an extension of the original STP and provides significantly faster conversions after a change in the topology of a network. MSTP is a further extension to RSTP to allow it to construct different active topologies for different VLANs which can be useful for load balancing traffic. The configuration and operation of these protocols is defined by the IEEE standards mentioned above as a series of interconnected state machines.
The basic function of the Spanning Tree Protocol is to allow the bridges of a Bridged Local Area Network (referred to as a network herein) to collectively determine a spanning tree for controlling communication across the network. Such a spanning tree ensures that there are unique paths between all bridges on the network and avoids the formation of loops. Loops are particularly disadvantageous in such networks as frames can end up being endlessly switched around the network leading to saturation of the network capacity and potentially complete failure of the network. It is therefore extremely important that such loops are avoided.
The Spanning Tree Protocol is therefore used to establish a spanning tree based on the current layout and state of the elements of a network. However, the topology of a network can change. The removal of a bridge from a network or even the disabling of one port on a bridge, may result in the path between two elements on the network being removed. It would therefore be necessary for the spanning tree to be modified or recalculated to provide an alternative link path between each of the elements of the network to allow continued communication between them. This active responsiveness to changes in topology requires active monitoring and maintenance using the Spanning Tree Protocol.
As indicated above, the bridges collectively compute the spanning tree, with each bridge making its own calculations to determine which ports on that bridge are used for what purpose. Each bridge will therefore have to run the state machines shown in
For example, the network initially needs to determine a root bridge which acts as the root of the spanning tree. Once the root bridge has been determined, each bridge then determines the least cost path to the root bridge, to establish which port is connected to the path that has the least cost to the root bridge. That port is then determined as the root port and communication with the root bridge will be made through that port.
For each Local Area Network (LAN) connected to ports on two or more bridges, it is necessary to determine a designated port for that LAN on a suitable bridge. Thus for a given LAN connected to two or more bridges, one of the ports on one of the bridges will be determined to be the designated port for that LAN and communication between that LAN and the root bridge will pass through the designated port. For each LAN, if the bridge with the port selected as the designated port for that LAN has any other ports to the same LAN, these ports are determined to be backup ports. Once the root ports, designated ports and backup ports have been determined, the remaining ports will normally be selected as alternate ports (although some versions of the standard allow different port roles to be defined). Ports with roles Alternate or Backup are blocked, meaning that frames are not switched through those ports.
The configuration of the spanning tree for a given network is defined in detail in the IEEE standards mentioned above.
From the above, it will be apparent that when a network is initially configured or when the topology has changed, a significant amount of calculation must be done to establish the correct states for the bridge and its ports. This is done by running the state machines shown in
However such a stable state may be disturbed by some event which requires the status of the spanning tree state machines to be reviewed, for example the reception of an external input such as a timer pop, a received packet, or a port going down. The reference to an “external input” refers to inputs which are external to the spanning tree state (e.g. a timer pop is internal to the bridge but external to the state machines). Such input events cause the state machines to run again until they reach a stable state.
It will be appreciated that when one or part of a network changes then this may trigger the state machines in one bridge to run and potentially determine a different set of conditions/states. This will be communicated using BPDU frames to advise the other bridges in the network of the change in its state. The reception of such frames by other bridges will cause them to run their own state machines until they again reach a stable state based on the newly received information. It will be appreciated that the changes may create a cascade of changes of state in other bridges as each of the bridges recalculate their own states and issue BPDU frames to other bridges which in turn cause them to calculate their own state and so on.
This creates a substantial load on the controllers within each of the bridges that have to operate the state machines. As the state machines run in response to external inputs, if the level of such inputs increases, as they will when the network is under higher load, this increased load can lead to substantial degradation in the performance of the Spanning Tree Protocol. This effect is particularly noticeable as the number of ports on a given bridge is increased.
The non-linear degradation in performance relative to the number of ports on a bridge is explained below with reference to the
Firstly, a larger number of ports means there will be a larger number of external inputs (such as per-port timer pops). Secondly, in a single bridge, where an external input has caused the state machines to be run, it will be appreciated that the amount of work increases with the number of ports. For example, some of the state machines that have to be run in order to return the bridge to a stable state are required to be run for each of the ports on the bridge.
Additionally, looking at
It will therefore be appreciated that if there are a large number of external events (i.e. the system is under load), particularly for a bridge having a large number of ports, the amount of time spent running the spanning tree state machines is significant. Additionally, if there are a large number of ports on the bridge then the total input events from all of these ports results in an increased load and further degradation in the performance for the establishment of a stable spanning tree.
Slow performance of one bridge within the network is bad for the overall network because if one node becomes overloaded, it may delay both sending BPDU frames and processing received BPDU frames. This can have a knock-on effect around the rest of the network with the end result that the whole network is overloaded and potentially the network becoming practically inoperable.
It is therefore an aim of the present invention to overcome or at least ameliorate some of the problems referred to above.
Therefore, according to the present invention there is provided a method for managing operation of a in a network bridge, the method comprising: setting the network bridge to either: an active mode, in which said spanning tree protocol process is run in response to a triggering event; or a defer mode in which said spanning tree protocol process is not run immediately in response to a triggering event; and reverting from said defer state to said active mode after a delay period.
By setting a defer mode, the operation of the network bridge can continue without having to carry out the spanning tree protocol process in response to every triggering event. This means that the operation of the network bridge and the spanning tree operation can continue with a reduced work load. This helps to reduce delays in the system which could lead to slow running of the network or worse.
The defer mode is preferably set in response to running of the spanning tree protocol process. This means that once a spanning tree process is run, it will not run again until the defer mode has been reverted back to active mode after the delay period.
The delay period is preferably based upon the load on the network bridge. The load on the network bridge can be determined in different ways. For example, the delay period may be based upon the number of pending tasks in a queue on the network bridge when the defer mode is set. Alternatively, the delay period may be a fixed period of time. The fixed period may be altered periodically based on the load.
When the defer mode is set, a new task can be added to the queue. By adding an item to the queue, other items in front of it in the queue are processed before the new task is reached. When the new item reaches the front of the queue, this can trigger ending of the delay period. In this way, the delay period is determined by the number of items in front of the new item in the queue and how long it takes to process those items, which reflects the load on the network bridge.
The network bridge may include a token counter. The method may further comprise periodically increasing the value of the token counter, whilst it is less than a maximum value. The value of said token counter can be reduced when the spanning tree protocol process is run. The said defer mode can be set in response to running of the spanning tree protocol process when the token counter has a zero value, wherein the delay period corresponds to the period in which the token counter has a zero value. With this arrangement, the method limits the rate at which the spanning tree protocol process can be run under high load conditions but under lower load conditions, the process can be run immediately and for a short transient burst of work, the immediate running of the spanning tree protocol process can still be allowed.
In the above arrangement, the rate at which the value of said token counter is periodically increased may be based on the maximum desired rate for running the spanning tree protocol process under high load conditions.
The method of the present invention preferably further comprises storing any triggering events received when the defer mode is set, so that it can be processed when the spanning tree protocol process is run. In this way, if a number of triggering events have been received whilst the defer mode is set, when the spanning tree protocol process is run, any changes in state or state variables from each of the triggering events can be taken account of.
In the invention, the running of the spanning tree protocol process preferably includes running a plurality of state machines to determine a stable state of the network bridge parameters.
The present invention further provides a network bridge for operating a spanning tree protocol process, the bridge comprising: a controller arranged to run a spanning tree protocol process in response to a triggering event, wherein said network bridge can be set to be in either: an active mode, in which said processor runs a spanning tree protocol process run in response to a triggering event; or a defer mode in which a spanning tree protocol process is not run in response to a triggering event, and said controller is arranged to revert said network bridge from said defer mode to said active mode after a delay period.
The controller is preferably arranged to set said defer mode in response to running of said spanning tree protocol process.
The delay period may be based upon the load on the network bridge. For example, this may be achieved by basing the delay period upon the number of pending tasks in a queue on the network bridge when the defer mode is set.
The controller is preferably arranged to add a new task to the queue as the defer mode is set. Then, when the new task reaches the front of the queue, this can signify the end of the delay period.
Alternatively, the network bridge may include a token counter wherein the controller is arranged to: periodically increase the value of the token counter, whilst it is less than a maximum value; reduce the value of the token counter when the spanning tree protocol process is run; and set the defer mode in response to running of the spanning tree protocol process when the token counter has a zero value, wherein the delay period corresponds to the period in which the token counter has a zero value.
The controller is preferably arranged to periodically increase the value of the token counter at a rate based on the maximum desired rate for running the spanning tree protocol process under high load conditions.
The controller preferably stores any triggering events received when the defer mode is set, so that they can be processed when the spanning tree protocol process is run again.
Preferably, the spanning tree protocol process run by the controller includes running a plurality of state machines to determine a stable state of said network bridge parameters.
However, under high load conditions, the state machines may not have completed their operation and returned to a stable state before further inputs have arrived which may again require the state machines to restart. Furthermore, any break between running of the state machines may not allow sufficient time for other tasks to be run.
The present invention aims to deal with this issue by running the state machines as normal under normal load conditions but deferring the running of the state machines when the system is under load. It is generally undesirable to defer running the state machines after receiving an input, as this would delay the establishment of the new spanning tree for the network. However, the present invention provides a system which recognises when a system is under load and only defers running of the state machines under those conditions to prevent the perhaps more undesirable situation of overloading the bridge controller.
In this way, when the system is not under load, the state machines will respond rapidly to inputs ensuring that the system responds quickly to changes. However when the system is under load, it defers running the state machines to minimise the amount of work that the system has to do to thereby improve the overall performance.
Once the state machines have run, they will again return to a stable state. At this point, a special “Reschedule Message” is created and added to the queue and the bridge is put into a defer mode. The queue may contain items of work to be carried out by the STP controller in the bridge, although in the example of
Depending on the workload condition of the controller, the queue may already contain a number of pending items of work to be completed or the queue may be relatively unpopulated if the system is not under load. In this example, the queue is empty. Any items in the queue ahead of the Reschedule Message have been processed, as shown. When the Reschedule Message reaches the end of the queue, it is processed, switching back from the defer mode.
Once the Reschedule Message has been processed, the controller may then go on to continue to process other items in the queue behind the Reschedule Message or which arrive subsequently. However, having received and processed the Reschedule Message, the network is returned from the defer mode to a normal, or active mode. In this active mode, the controller is in a state which is responsive to new external inputs. In this example, as soon as another external input (INPUT 2) arrives, the controller will initiate the operation of the state machines (as represented by the lower shaded box in
The state machines complete the task (i.e. have returned to a stable state) and a Reschedule Message is issued putting the bridge into the defer mode. The Reschedule Message is added to the queue of work items for the controller to complete, behind INPUT 4, INPUT 3 and INPUT 2. There may also be other tasks waiting to be processed which are not shown in this example.
When the system is under load, the number of items of work in the queue may be significantly greater meaning that the Reschedule Message is further down the queue and it will typically be longer before it is processed. Once the state machines have completed operation and returned to a stable state, the controller goes back to processing other items of work in the queue.
As shown in
Further external inputs (INPUT 3 and INPUT 4) successively reach the front of the queue and are processed. In the same way as for INPUT 2, the controller updates state variables as a direct result of the input, but does not initiate running of the state machines. Finally, the Reschedule Message reaches the front of the queue and is processed. The controller will then switch out of defer mode and into active mode. At this point the controller initiates running of the state machines to return the system to a stable state.
In this way, the controller is effectively running the state machines once for a batch of inputs (INPUT 2, INPUT 3 and INPUT 4), rather than running the state machines multiple times, once for each input. This means that the state machines are run less frequently, thereby reducing the overall processing load on the controller. This allows it to deal with other tasks to manage the higher load rather than spending significant amounts of time running the state machines.
The result of the above method is that when the system is not under load, the state machines are run with a minimum amount of delay allowing them to respond quickly to topology changes in the system and other triggers. However under load, the number of times the state machines are run is reduced in order to reduce the processing burden on the controller to provide an improvement in performance compared to running the state machines in response to every single external input. This means that the performance under load is improved without significantly compromising the ability of the system to respond to changes (for example, for protection switching).
The above-described embodiment of the present invention is responsive to the loading of the system by inserting the Reschedule Message into a queue. The length of the queue and the rate at which items in the queue are processed reflect the load on the system and effectively provide a delay before running the state machines in response to external inputs where the system is under load.
In an alternative embodiment of the invention, a modified version of the load monitoring may be achieved by using a token-bucket mechanism. In this arrangement, the system would operate in a similar way to that described above in that when an external input is received, the state machines are operated until they return to a stable condition. Before the state machines can run though, a token must be available from the notional bucket. It is assumed in this instance that at least one token is provisionally available. Once the state machines have been run, the token is used up.
New tokens will be added to the bucket at a predetermined rate until it is full (reaches a predetermined limit). As long as a token is available, the controller is able to run the state machines in response to external inputs. In this example, the rate at which the bucket is refilled with tokens is determined according to the rate at which the state machines should be run when the system is under stress. In other words, if it is desired to only run the state machines after a period T when the system is under stress, a token is added to the bucket at a rate corresponding to T.
In this way, when the system is not under stress and is operating at lower load level, the tokens should be replenished into the bucket at a rate which is greater than the rate at which they are used. The token bucket will therefore remain in a substantially full state, meaning that there will typically always be a token available to allow running of the state machines when an external input is received.
When the system is under load and the requirement to run the state machines exceeds the predetermined rate, the tokens in the bucket start to be depleted. Once the store of tokens in the bucket has been depleted, the bridge will go into defer mode and further external inputs will not trigger running of the state machines. If external inputs continue to arrive, the rate at which the state machines will run will correspond to that of the predetermined rate. In other words, the state machines will not be run until the next token becomes available and then not again until the subsequent token is available and so on.
The rate at which the bucket is refilled may be controlled to reflect the status of the system. For example, filling of the bucket may be changed to reflect different load conditions. Under high load, the filling rate may be reduced further than the predetermined rate mentioned above.
With the above arrangement, the size of the bucket can be controlled to provide a degree of delay before the rate at which the state machines are run is reduced. Under low load conditions the bucket is likely to be full or nearly full. If a burst of external inputs suddenly occurs, then until the bucket is empty, running of the state machines is not limited. This allows the system to cope with a small burst of external inputs before backing off.
If the system load does increase, the rate at which the tokens are removed from the bucket will exceed the rate at which they are added and the tokens in the bucket will start to be depleted, as described above. This means that if there is a transient increase in loading, the state machines will initially run immediately upon receipt of the external inputs. However, if the increase in load persists, the tokens will be depleted as the rate of arrival of the external inputs will exceed the rate at which tokens are added to the bucket. Once the bucket is empty, the rate at which the state machines run will decline to the permitted rate set by the rate at which the bucket is filled.
The size of the bucket may alternatively be selected to hold a maximum of one token. This means it will respond much more rapidly to even transient changes in the loading on the system. Even if two external inputs arrive in quick succession, the bucket will be emptied by the first and will not be replenished until after the predetermined period and so the running of the machines will be deferred
In the above embodiment the invention is presumed to operate all the time, so that operation of the state machines can be delayed whenever the bridge is under load. However, the invention may be implemented in a selective manner, so that the bridge can be operated to use the invention at some times but switched back to operating without the invention under certain conditions.
Number | Date | Country | Kind |
---|---|---|---|
1405776.4 | Mar 2014 | GB | national |
Number | Name | Date | Kind |
---|---|---|---|
4811337 | Hart | Mar 1989 | A |
6188694 | Fine | Feb 2001 | B1 |
6330229 | Jain | Dec 2001 | B1 |
6580715 | Bare | Jun 2003 | B1 |
6678241 | Gai | Jan 2004 | B1 |
6801506 | Dey | Oct 2004 | B1 |
6898189 | Di Benedetto | May 2005 | B1 |
7061875 | Portolani | Jun 2006 | B1 |
7352748 | Rozario | Apr 2008 | B1 |
7411915 | Spain | Aug 2008 | B1 |
7606939 | Finn | Oct 2009 | B1 |
7701881 | Sankaran | Apr 2010 | B1 |
7710882 | Previdi et al. | May 2010 | B1 |
7782869 | Chitlur Srinivasa | Aug 2010 | B1 |
7877483 | Finn | Jan 2011 | B1 |
7903586 | Rose | Mar 2011 | B2 |
7911982 | Dalvi | Mar 2011 | B1 |
7965638 | Schzukin | Jun 2011 | B1 |
8031709 | Alexander, Jr. | Oct 2011 | B2 |
8077604 | Kanekar | Dec 2011 | B1 |
8427969 | Juillard | Apr 2013 | B1 |
9059901 | Kumar | Jun 2015 | B1 |
9231831 | Chiueh | Jan 2016 | B2 |
9548926 | Raman | Jan 2017 | B2 |
9608903 | Eastlake, III | Mar 2017 | B2 |
20030009092 | Parker | Jan 2003 | A1 |
20030097468 | Hamadi | May 2003 | A1 |
20040190454 | Higasiyama | Sep 2004 | A1 |
20050013260 | Ramanathan | Jan 2005 | A1 |
20050050220 | Rouyer | Mar 2005 | A1 |
20050237943 | Sasagawa | Oct 2005 | A1 |
20060114912 | Kwan | Jun 2006 | A1 |
20060146845 | Rose | Jul 2006 | A1 |
20060268748 | Rose | Nov 2006 | A1 |
20060285499 | Tzeng | Dec 2006 | A1 |
20070025275 | Tallet | Feb 2007 | A1 |
20070030803 | Gooch | Feb 2007 | A1 |
20070058571 | Rose | Mar 2007 | A1 |
20070086361 | Allan | Apr 2007 | A1 |
20070274295 | Nishimura | Nov 2007 | A1 |
20080049621 | McGuire | Feb 2008 | A1 |
20080062862 | Goyal et al. | Mar 2008 | A1 |
20080123561 | Sharma | May 2008 | A1 |
20080181138 | Dalberg | Jul 2008 | A1 |
20080198769 | Tzeng | Aug 2008 | A1 |
20080215910 | Gabriel | Sep 2008 | A1 |
20080240129 | Elmeleegy | Oct 2008 | A1 |
20080250137 | Zufelt | Oct 2008 | A1 |
20080259798 | Loh | Oct 2008 | A1 |
20080304428 | Stilling | Dec 2008 | A1 |
20090190503 | Tallet | Jul 2009 | A1 |
20090279549 | Ramanathan | Nov 2009 | A1 |
20100254264 | Ford | Oct 2010 | A1 |
20100290479 | Baron | Nov 2010 | A1 |
20110026437 | Roja-Cessa | Feb 2011 | A1 |
20110044346 | Mueller | Feb 2011 | A1 |
20110116366 | Smith | May 2011 | A1 |
20110222440 | Phillips | Sep 2011 | A1 |
20110235524 | North | Sep 2011 | A1 |
20110255405 | Dorau | Oct 2011 | A1 |
20120008530 | Kulkarni | Jan 2012 | A1 |
20120033668 | Humphries | Feb 2012 | A1 |
20120051252 | Iwao | Mar 2012 | A1 |
20120155245 | Zhang | Jun 2012 | A1 |
20130039170 | Higgins | Feb 2013 | A1 |
20130064137 | Santoso | Mar 2013 | A1 |
20130301440 | Yajima | Nov 2013 | A1 |
20130301553 | Klein | Nov 2013 | A1 |
20130308437 | Hayakawa | Nov 2013 | A1 |
20130343229 | Gasparakis | Dec 2013 | A1 |
20140003295 | Gossain | Jan 2014 | A1 |
20140133360 | Chiueh | May 2014 | A1 |
20150006755 | Turlington | Jan 2015 | A1 |
20150016473 | Wakabayashi | Jan 2015 | A1 |
20150055486 | Maggiari | Feb 2015 | A1 |
20150124655 | Saxena | May 2015 | A1 |
20150222491 | Clark | Aug 2015 | A1 |
Number | Date | Country | |
---|---|---|---|
20150281405 A1 | Oct 2015 | US |