STP Timers:
Timers effect the transition between port states. (down
blocking listening learning and forwarding) default on Catalyst IOS switches is
PVST+
These timers are set only on the Root bridge. These timers
effect eh convergence time.
NOTE: is common spanning-tree and PVSTP – ONLY the root
bridge is allowed to generate BPDU’s.
BPDU’s start at the root of the STP and flow down the tree.
Hello –
How often configuration BPDU’s are sent – default is 2
seconds.
MaxAge –
How long to wait in a
blocking state without hearing a BPDU – default is 20 seconds. This is very
similar to the dead interval in OSPF, basically how long to wait until you
declare a neighbor down. If no BPDU’s
are heard for the MaxAge time STP will start to recalculate the STP and
invalidate any BPDU’s it recently heard. To find a new route to the root
bridge.
Forward Delay –
How long to wait unitl each listening and learning stage –
default is 15 seconds.
Switch listens and learns and populated the CAM table – then
forwarding. So the total of listening and learning together is 30 seconds.
Again – in Common and PVST these values are all configured
on the root bridge.
Configuration:
#spanning-tree vlan (vlan) hello-time
#spanning-tree vlan (vlan) Max-age
#spanning-tree vlan (vlan) Forward-time
If you change these timers on a switch that is NOT the root
bridge, it will not affect anything, Unless that switch becomes the root
bridge.
Best practice is to leave the values along. If you want to
speed up convergence there are several features that can be deployed.
PortFast:
Edge ports should not be subject to forward delay –
Also effects TCN generation
Used on end-host, phones etc. Nothing that need to run
spanning-tree. This does not mean STP is disabled. Just means you don’t need to
go through the forwarding phases.
UplinkFast:
Direct root port failure should reconverge immediately if an
alternate port is available.
BackboneFast
Indirect failures should start to recalculate immediately
Topology Change Notification:
This can be watched via: Debug spanning-tree events:
You want to make sure your edge ports are configures for
PortFast – PortFast keeps edge ports from generating a TCN.
A TCN - says to flush
out your CAM table by setting the CAM ageing time to be equal to the Max age
time.
Note: The default
MAC address table aging time is 300 seconds or 5 minutes by default.
So a MAC address will stay in the table for 5 minutes if it
has been Idle. If the MAC address is not in the table, it will flood the frame
out all ports in the VLAN, etc.
Switches that are not in the root path and are not forwarding
for that VLAN, etc will not have the associated MAC addresses in the CAM Table.
So once the TCN event is triggered – it
will flush the MAC from the downed port out of the CAM table.
For example. You have VLAN 10 that is forwarding traffic and
you shut and no shut an interface for an end host on that VLAN (a router for
example). The switch wil send a TCN. You can verify the MAC has been flushed by
once the root bridge replys back to the TCN – This will flush the CAM table for
that entire VLAN.
# sh mac
address-table dynamic Vlan 10
Note: When
PortFast is on this is does NOT disable Spanning-tree.
A quick PortFast verification is ex: Sh spanning-tree int Gi0/1 portfast
You can also verfy BPDU’s sent out an interface:
EX: SH spanning-tree
int gi0/1 detail | in BPDU
PortFast can be enabled globally:
EX: Spanning-tree portfast default.
This is bascially the same as using an interface range for all ports and setting portfast.
For Tunk Interfaces - portfast willnot be on dy default. Even if they're not receive BPDU's.
The only time you'd really want a trunk with portfast is if you had say a VMWare server that needed Vlans trunked.
This can be configured via:
ex: spaning-tree portfast trunk on the interface level. This will ensure that when the interface goes down it will not generate a TCN.
No comments:
Post a Comment