Professional Documents
Culture Documents
It prevents a network from frame looping by putting some interfaces in forwarding state & some
interfaces in blocking state.
Whenever two or more switches are connected with each other for redundancy purpose loop can occur.
STP Protocol is used to prevent the loop. STP is layer 2 Protocol & by default it is enabled on switches.
Figure 1 STP
LOOP Problem
CST (Common Spanning Tree)- All Vlan will participate in the single instance number.
IST (Inter Spanning Tree)- For different-different Vlans different-different instances number.
If we dont use STP, these problems will occur on the network:
(i)
(ii)
Broadcast Storms
High Processor Utilization
STP Tasks
1. Elect Root Bridge
2. Elect Designated Port
3. Elect Root Port
Figure 2 Root
Bridge
Ethernet Standard
Cost
10 Mbps
100 Mbps
1 Gbps
10 Gbps
100
19
4
2
Types of BPDU
1. Configuration BPDU (Root to Non-root)
2. TCN BPDU (Topology Change Notification) Non-root to Root
TCN Contents
1. Protocol ID
2. Version
3. Message Type
Lower Bridge ID (Only for DP, Between Root & Non Root)
Lower Cost
|
For DP & RP
Lower Sender Bridge ID
|
B/W Root Non Root
Lower Sender Port Priority |
Non Root Non Root
Lower Sender Port ID
Figure 3
Figure 4
Disable
Blocking
Listening
Learning
Forwarding
Hello 2 sec
Max Age 20 sec
Forward Delay 15 sec
Listening 15 sec
Learning 15 sec
Listening - 15 sec
Learning - 15 sec
BPDU - 2 sec
Total - 32 Sec
Max-age always related to superior BPDU.
Convergence Mechanism
Port Fast- A feature that puts a port directly in forwarding state when it becomes physically
active.
1.
2.
3.
4.
Uplink Fast- A feature it enable non root switches to put their alternate port (Blocking port)
directly in forwarding state, when their root port goes down. (In case of Direct Link Failure, it will
work)
It sends multicast updates 0100-0CCd-CDCD
It sends 150 packet per/sec
Priority will change 32768 49152
3000 cost will add per link cost
(Note: If you will change the priority then uplink fast will not work.
With using uplink fast load balancing will not possible.)
Figure 5
Backbone Fast- A feature which prevents your network from inferior BPDU. (We use this for in
case of indirect link failure)
When an indirect link failure occurs in a topology then switch will receive inferior BPDUs. Due to
max-age timer of superior BPDU Switch will not take any action on inferior BPDUs until and
unless its max-age timer expire. To reduce this timer we enable back bone fast on all switches in
the network.
(Note: Backbone fast will remove max age time. Now total convergence time will 32 sec.
Using backbone fast we save 20 sec (Max-Age).)
Inferior BPDU
When a Switch announces itself as a root in the presence of root, these BPDUs are called inferior BPDU.
When we enable back bone fast and a switch root port goes down now this switch will not send inferior
BPDUs. It will send RLQ (Root Link Query) to neighbor Switch.
Figure 6
Figure 7
Sw1#sh spanning-tree
19/20 - DP, 21 Root, 22/23/24 Alt Blk
Sw2#sh spanning-tree
19 Root, 20 Alt Blk, 21/22/23/24 DP
Sw3#sh spanning-tree
19/20/21/22/24 Blk, 23 RP
Sw4#sh spanning-tree
All port DP
Figure 8
Figure 9
Figure 10
Now here if we connect one more link on 23 port, then by default 23 would be the root port but if we
decrease the priority of 24 then it would become root port.
Sw2 (config) #int fa0/24
Sw2 (config-if) #spanning-tree vlan 1 cost 140
Sw2#sh spanning-tree vlan 1
Sw2#sh spanning-tree int fa0/23 detail
Now we will change the port priority
SW1 (config) # int f0/24
Sw1 (config-if) # spanning-tree vlan 1 port priority 120
We will get some warning message here
Port Priority in increments of 16 is required
Sw1 (config-if) #spanning-tree vlan 1 port priority 112
Sw2#sh spanning-tree int fa0/23 detail
Sw2#sh spanning-tree int fa0/24 detail
Here we can see port id is 112.
To create a root port manually
Figure 11