STP and Convergence
STP and Convergence
VLAN troubleshooting
Default CAM table age in switch is 300 seconds. This time is called MAC ageing time.
STP convergence: 2.2. Spanning-Tree Protocol 802.1D - STP Convergence after topology changes with
Example - YouTube
1. Insignificant topology change: The topology changes which does not affect the STP behavior
b/w the switches. Means a port goes down where the end user is connected or the router is
connected, that will not affect the STP. This kind of topology changes called insignificant
topology changes.
a. When an access port goes down, then the switch generates a TCN BPDU to inform the
root bridge.
i. TCN BPDUs are always generated by the non-root bridges in every 2 seconds, to
inform the root bridge about the topology change. So, TCN BPDU always sent on
RP port and received on DP port.
ii. TCN BPDU have the same fields as configuration BPDU.
iii. The TCN BPDU which is sent by the non-root bridge to rood bridge in point “a”,
will not contain any information about the actual change.
b. Root bridge received this BPDU and came to know that there is a change in the
topology, so whenever it will send its next configuration BPDU it will mark the TCN &
TCN ack bits ON into flag.
i. TCN bit to tell the other SWH that there is a change.
ii. TCN ack bit will work as an acknowledgement for the originator of the TCN
BPDU.
c. When the originator receives the ack for the TCN BPDU, then only it will stop generating
TCN BPDUs.
d. All those switches who receives this BPDU sent in step “b”, will change their MAC ageing
time equal to forward delay time (15 sec). Change the MAC ageing time from 300 sec to
15 sec.
e. NOTE: Now every SWH will clear the MAC address from their CAM table for the users
who are sitting ideal for more than 15 seconds. Now if anyone starts to communicate
with those ideal users whose MAC address got cleared by all the switches, now
switches will perform “unknown unicast flooding”, and that will cause congestion in
our network.
f. Now if that access port again came UP:
i. By default, switch also forwards BPDU on the access ports also, so the role of
every access port in default situation will be DP port.
ii. So, it will take 30 seconds to go from blocking listing learning
forwarding state.
iii. And when it came to forwarding state, the switch will again generate a TCN
BPDU and forward it to the root bridge and the whole process from point “a-to-
e” will happen again. This is very BAD.
iv. That’s why use “portfast” on access ports as much as you can because it will
stop the BPDU on that port.
v. Portfast is a cisco proprietary feature.
vi. In the o/p of “show spanning tree” command, if keyword “edge” is written in
front of any port then it means “portfast” command is enabled on that port.
vii. There is a command “spanning-tree portfast default”, this command run in
global mode and after this command, portfast will be automatically enable on
access ports.
viii. There will be only one situation where you need to enable portfast on the trunk
port, that is, if an IP phone is connected on the switch port. So to enable
portfast on the trunk interface you need to run the “spanning-tree portfast
trunk” command under the interface.
2. Direct topology change: When a RP port goes down and the switch already have the alternate
port then this kind of topology change is called direct topology changed.
a. Whenever there is a direct topology change it will take 30 seconds in the convergence.
Why?
3. Indirect topology change: When a RP port goes down and the switch does not have any
alternate port, that topology change is called Indirect topology change.
Direct topology change: When a RP port goes down and the switch already have the
alternate port then this kind of topology change is called direct topology changed.
a. Whenever there is a direct topology change it will take 30 seconds in the convergence.
Why? Refer snap.
b. Solution: Use uplink fast
UplinkFast:
Indirect topology change: When a RP port goes down and the switch does not have any
alternate port, that topology change is called Indirect topology change.
c. Whenever there is an Indirect topology change it will take 50 seconds in the
convergence. Why? Refer snap.
d. Solution: Use Backbone-fast
Backbone-fast: