Changing the STP Timers
Changing the STP Timers The timers are important in an STP network to stop network loops from occurring. The different timers are used to give the network time to update the correct topology information to all the switches and also to determine the whereabouts of all the redundant links. The problem with the STP timers is that, if a link goes down, it takes up to 50 seconds for the backup link to take over forwarding frames. This is a convergence problem that can be addressed when instability is occurring in the network. The following timers can be changed: fwddelay This interval indicates how long it takes for a port to move from listening to learning state and then from learning to forwarding state. The default is 15 seconds, but it can be changed to anywhere from 4 to 30 seconds. If you set this too low, the switch won’t be allowed ample time to make sure no loops will occur before setting a port in forwarding mode. The following switch output shows how to set the fwddelay to 10 seconds: Terry_4000> (enable) set spantree fwddelay ? Usage: set spantree fwddelay <delay> [vlans] (delay = 4..30 seconds, vlan = 1..1005) Terry_4000> (enable) set spantree fwddelay 10 Spantree 1 forward delay set to 10 seconds. hello This is the time interval for sending BPDUs from the root switch. It is set to 2 seconds by default; you would think it couldn’t be set any lower, but it can be increased or decreased. You can set it to 1 second to actually double the amount of BPDUs sent out that must be lost before triggering an unwanted convergence in the network. However, it doubles the CPU load and processing load as well. The following switch output shows how to change the BPDU timers to 1 second: Terry_4000> (enable) set spantree hello ? Usage: set spantree hello <interval> [vlans] (interval = 1..10, vlan = 1..1005) Terry_4000> (enable) set spantree hello 1 Spantree 1 hello time set to 1 seconds. maxage The max age is the amount of time that a switch will hold BPDU information. If a new BPDU is not received before the max age expires, then the BPDU is discarded and is considered invalid. The default is 20 seconds; it can be set to as low as 6 seconds. However, network instability will happen if too many BPDUs are discarded because this timer is set too low. The following output shows how to change the max age of a BPDU to 30 seconds: Terry_4000> (enable) set spantree maxage ? Usage: set spantree maxage <agingtime> [vlans]
(agingtime = 6..40, vlan = 1..1005) Terry_4000> (enable) set spantree maxage 30 Spantree 1 max aging time set to 30 seconds. Terry_4000> (enable) Rather than directly modifying the timers, it is usually better to modify the size of the network. Table 16.1 referred to a “diameter” value that can be set when selecting the spanning tree root. The diameter used is the width of the network from one side to the other. Three switches daisy-chained together would have a diameter of 3, whereas three configured in a triangle would have a diameter of 2. The diameter automatically sets the timers to a value appropriate to the size of your network. Setting the timers yourself to low values in a large network risks topological loops because the delay might not be long enough to account for BPDU propagation delay. The best thing to do is to use the diameter option when setting the root and then modify the timers from there, if necessary. We have been discussing redundant links and STP, but most of the discussion has been about how to make STP run efficiently, and that is by making the non-root port a blocking port. We discussed load balancing only when we showed you how to set the port priority on a per-VLAN basis. However, that really wasn’t load balancing to the degree that is possible with a Cisco switched network. In the next section, we’ll cover the most efficient ways of using redundant links in a large, switched internetwork. To set similar parameters on the IOS-based switches, use the global command spanning-tree vlan vlan_number options as follows: Terry_2950(config)#spanning-tree ? backbonefast Enable BackboneFast Feature etherchannel Spanning tree etherchannel specific configuration extend Spanning Tree 802.1t extensions loopguard Spanning tree loopguard options mode Spanning tree operating mode pathcost Spanning tree pathcost options pathcost Spanning tree pathcost options uplinkfast Enable UplinkFast Feature vlan VLAN Switch Spanning Tree Terry_2950(config)#spanning-tree vlan 1 ? forward-time Set the forward delay for the spanning tree hello-time Set the hello interval for the spanning tree max-age Set the max age interval for the spanning tree priority Set the bridge priority for the spanning tree root Configure switch as root <cr> Terry_2950(config)#spanning-tree vlan 1 forward-time ? <4-30> number of seconds for the forward delay timer
Terry_2950(config)#spanning-tree vlan 1 hello-time ? <1-10> number of seconds between generation of config BPDUs Terry_2950(config)#spanning-tree vlan 1 max-age ? <6-40> maximum number of seconds the information in a BPDU is valid
645 times read
|
|
|
Did you enjoy this article?
(total 0 votes)
|