Presentation is loading. Please wait.

Presentation is loading. Please wait.

STP – Spanning Tree Protocol A closer look

Similar presentations


Presentation on theme: "STP – Spanning Tree Protocol A closer look"— Presentation transcript:

1 STP – Spanning Tree Protocol A closer look
CIS 187 Multilayer Switched Networks CCNP SWITCH version 7 Rick Graziani

2 Five-Step STP Decision Sequence
STP Convergence Step 1 Elect one Root Bridge Step 2 Elect Root Ports Step 3 Elect Designated Ports When creating a loop-free topology, STP always uses the same five-step decision sequence: Five-Step decision Sequence Step 1: Lowest root bridge ID - Determines the root bridge Bridge ID = priority (4 bits) + locally assigned system ID extension (12 bits) + ID [MAC address] (48 bits); the default bridge priority is 32768, and Step 2: Lowest cost to the root bridge - Favors the upstream switch with the least cost to root Step 3: Lowest sender bridge ID - Serves as a tie breaker if multiple upstream switches have equal cost to root Step 4: Lowest sender Port ID (port priority then port ID) - Serves as a tie breaker if a switch has multiple (non-Etherchannel) links to a single upstream switch, where: Port ID = priority (4 bits, default 128) + ID (Interface number) Rick Graziani

3 Other notes The port that receives the best BPDU from the root switch is assigned root port status and is put into forwarding state. Rest of the active ports of that switch send this BPDU. If the switch receives a better BPDU on another port, it stops transmitting its BPDU, and send the better BPDU. If the port transmits a BPDU but doesn't receive any, it assumes a role of a designated port and is put into forwarding state. If a port is not transmitting any BPDU, then it is put in a blocking state. (It still receives BPDUs.) Best BPDU is stored on per-port basis. Rick Graziani

4 What is the BID of this switch?
Core# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority Address E.7EBB Cost Port (GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) Address C945.A573 Aging Time 20 Rick Graziani

5 Elect one Root Bridge Lowest BID wins!
Rick Graziani

6 Its all done with BPDUs! Rick Graziani

7 Root Bridge Selection Criteria
My BID is C945.A573 I’m the root! Who wins? My BID is B I’m the root! My BID is E0D.9315 I’m the root! My BID is E461.46EC I’m the root! My BID is E.7EBB I’m the root! I win! At the beginning, all bridges assume and declare themselves as the Root Bridge, by placing its own BID in the Root BID field of the BPDU. Rick Graziani

8 Root Bridge Path Cost Root bridge sends out BPDU
Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost Root bridge sends out BPDU Adjacent switches receive and store the best BPDU for each port The Root Path Cost is not incremented (only when BPDU is transmitted. Any BPDU received from another switch will be "inferior" to this BPDU. BPDU received BPDU received Fa0/3: A2, 0, A2, Fa0/1 Fa0/3: A2, 0, A2, Fa0/3 Root Bridge BPDUs sent BPDU received Fa0/1: A2, 0, A2, Fa0/1 Fa0/3: A2, 0, A2, Fa0/3 Fa0/5: A2, 0, A2, Fa0/5 Fa0/5: A2, 0, A2, Fa0/5 Rick Graziani

9 Root Bridge Path Cost The best BPDU is sent to other switches
BPDU ( * Best BPDU) Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost The best BPDU is sent to other switches The Root Path Cost = Root Path Cost of best BPDU + Path Cost of the port the BPDU was received on Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 BPDU received (not best) BPDU received (not best) G0/2: A2, 19, A1, G1/2 G0/1: A2, 19, A1, G1/1 Best BPDUs per port Root Bridge * Fa0/5: A2, 0, A2, Fa0/5 BPDUs sent BPDU sent 19 Fa0/1: A2, 0, A2, Fa0/1 Fa0/3: A2, 0, A2, Fa0/3 Fa0/5: A2, 0, A2, Fa0/5 G1/2: A2, 19, A1, G1/2 G1/1: A2, 19, A1, G1/1

10 Root Bridge Path Cost The best BPDU is sent to other switches
Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost The best BPDU is sent to other switches The Root Path Cost = Root Path Cost of best BPDU + Path Cost of the port the BPDU was received on Root Bridge: All BPDUs from other switches are considered "inferior" Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 BPDU sent BPDU sent Fa0/5: A2, 19, D1, Fa0/5 Fa0/3: A2, 19, D1, Fa0/3 G0/1: A2, 19, D1, G0/1 G0/2: A2, 19, D1, G0/2 Fa0/5: A2, 19, D2, Fa0/5 Fa0/3: A2, 19, D2, Fa0/3 G0/1: A2, 19, D2, G0/1 19 19 Root Bridge Best BPDUs per port Best BPDUs per port (inferior) * Fa0/5: A2, 0, A2, Fa0/5 G0/2: A2, 19, D1, G0/2 G01/2: A2, 19, D2, G0/1 Best BPDUs per port Fa0/3: A2, 19, D2, Fa0/3 Fa0/1: A2, 19, D1, Fa0/1 Fa0/5: A2, 19, A1, Fa0/5 Best BPDUs per port Rick Graziani

11 Root Bridge Path Cost The best BPDU is sent to other switches
Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost The best BPDU is sent to other switches The Root Path Cost = Root Path Cost of best BPDU + Path Cost of the port the BPDU was received on BPDU received BPDU received Best BPDUs per port G0/1: A2, 19, D1, G0/1 G0/2: A2, 19, D2, G0/2 * G0/1: A2, 19, D1, G0/1 G0/2: A2, 19, D2, G0/2 Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 Root Bridge Best BPDUs per port * Fa0/5: A2, 0, A2, Fa0/5 G0/2: A2, 19, D1, G0/2 G1/2: A2, 19, D2, G0/1 Best BPDUs per port Rick Graziani

12 Root Bridge Path Cost The best BPDU is sent to other switches
Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost The best BPDU is sent to other switches The Root Path Cost = Root Path Cost of best BPDU + Path Cost of the port the BPDU was received on Best BPDUs per port BPDU sent BPDU sent * G0/1: A2, 19, D1, G0/1 G0/2: A2, 19, D2, G0/2 G0/1: A2, 23, Co, G0/1 G0/2: A2, 23, Co, G0/2 4 4 BPDU received BPDU received G0/1: A2, 23, Co, G0/2 G0/2: A2, 23, Co, G0/2 Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 G0/2: A2, 23, Co, G0/2 * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 G0/1: A2, 23, Co, G0/2 Root Bridge Best BPDUs per port * Fa0/5: A2, 0, A2, Fa0/5 G0/2: A2, 19, D1, G0/2 G1/2: A2, 19, D2, G0/1 Best BPDUs per port Fa0/1: A2, 0, A2, Fa0/1 Fa0/3: A2, 0, A2, Fa0/3 Fa0/5: A2, 0, A2, Fa0/5 Rick Graziani

13 Root Bridge Path Cost After all best BPDUs are sent and received.
Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost After all best BPDUs are sent and received. Root port selection (smallest BPDU on the switch) The port that receives the best BPDU from the root switch is assigned root port status and is put into forwarding state. Best BPDUs per port * G0/1: A2, 19, D1, G0/1 G0/2: A2, 19, D2, G0/2 RP Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 G0/1: A2, 23, Co, G0/1 Fa0/5: A2, 19, D2, Fa0/5 * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 G0/2: A2, 23, Co, G0/2 Fa0/5: A2, 19, D2, Fa0/5 RP RP Root Bridge Best BPDUs per port * Fa0/5: A2, 0, A2, Fa0/5 G0/2: A2, 19, D1, G0/2 G1/2: A2, 19, D2, G0/1 Best BPDUs per port Fa0/1: A2, 0, A2, Fa0/1 Fa0/3: A2, 0, A2, Fa0/3 Fa0/5: A2, 0, A2, Fa0/5 RP Rick Graziani

14 BPDU Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost Designated port is port with “best” path to root (smallest BPDU) on link Root Bridge: All BPDUs from other switches are considered "inferior" Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 G0/1: A2, 23, Co, G0/1 Fa0/5: A2, 19, D2, Fa0/5 * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 G0/2: A2, 23, Co, G0/2 Fa0/5: A2, 19, D2, Fa0/5 RP BPDU sent BPDU sent Fa0/3: A2, 19, D1, Fa0/3 Fa0/3: A2, 19, D2, Fa0/3 RP RP Best BPDUs per port * Fa0/5: A2, 0, A2, Fa0/5 G0/2: A2, 19, D1, G0/2 G1/2: A2, 19, D2, G0/1 Best BPDUs per port Root Bridge DP DP BPDU sent Fa0/1: A2, 0, A2, Fa0/1 Fa0/3: A2, 0, A2, Fa0/3 Fa0/5: A2, 0, A2, Fa0/5 BPDU sent RP DP Fa0/5: A2, 19, A1, Fa0/5 Rick Graziani

15 BPDU Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost Designated port is port with “best” path to root (smallest BPDU) on link Best BPDUs per port BPDU sent BPDU sent * G0/1: A2, 19, D1, G0/1 G0/2: A2, 19, D2, G0/2 G0/1: A2, 23, D1, G0/1 G0/2: A2, 23, D2, G0/2 RP BPDU sent DP DP BPDU sent G0/1: A2, 19, D1, G0/1 G0/2: A2, 19, D2, G0/2 Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 G0/1: A2, 23, Co, G0/1 Fa0/5: A2, 19, D2, Fa0/5 * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 G0/2: A2, 23, Co, G0/2 Fa0/5: A2, 19, D2, Fa0/5 RP RP DP DP Root Bridge RP DP Rick Graziani

16 BPDU Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost Designated port is port with “best” path to root (smallest BPDU) on link Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 G0/1: A2, 23, Co, G0/1 Fa0/5: A2, 19, D2, Fa0/5 RP DP DP BPDU sent G0/2: A2, 19, D1, G0/2 RP E0D.9315 RP BPDU sent G1/2: A2, 19, A2, G1/2 DP DP DP E461.46EC Best BPDUs per port Root Bridge * Fa0/5: A2, 0, A2, Fa0/5 G0/2: A2, 19, D1, G0/2 G1/2: A2, 19, D2, G0/1 Best BPDUs per port RP DP Rick Graziani

17 BPDU Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost Designated port is port with “best” path to root (smallest BPDU) on link Best BPDUs per port Best BPDUs per port * Fa0/3: A2, 0, A2, Fa0/1 G0/2: A2, 19, A1, G1/2 G0/1: A2, 23, Co, G0/1 Fa0/5: A2, 19, D2, Fa0/5 RP * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 G0/2: A2, 23, Co, G0/2 Fa0/5: A2, 19, D2, Fa0/5 DP DP DP BPDU sent BPDU sent G0/2: A2, 19, D1, G0/2 Fa0/5: A2, 19, D2, Fa0/5 RP E0D.9315 RP B0.5850 DP DP DP Root Bridge RP DP Rick Graziani

18 BPDU Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost Designated port is port with “best” path to root (smallest BPDU) on link Best BPDUs per port RP * Fa0/3: A2, 0, A2, Fa0/3 G0/1: A2, 19, A1, G1/1 G0/2: A2, 23, Co, G0/2 Fa0/5: A2, 19, D2, Fa0/5 DP DP DP BPDU sent Fa0/5: A2, 19, D2, Fa0/5 RP RP B0.5850 BPDU sent G1/2: A2, 19, A2, G1/2 DP DP DP E461.46EC DP Root Bridge Best BPDUs per port Best BPDUs per port RP DP * Fa0/5: A2, 0, A2, Fa0/5 G0/2: A2, 19, D1, G0/2 G1/2: A2, 19, D2, G0/1 Rick Graziani

19 BPDU Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost If not a Root Port or Designated Port then becomes a Non-Designated (Alternate) Port and put in blocking mode. RP X NDP DP DP DP X NDP X X RP RP NDP NDP Root Bridge DP DP DP DP RP DP Rick Graziani

20 Root Bridge Sender's Port ID (lowest) Path Cost BPDU
Root ID, Root Path Cost, Sender ID, Sender Port ID Path Cost Sender's Port ID (lowest) RP Best BPDU A2, 0, D1, Fa0/3 DP DP DP NDP BPDU received Fa0/3: A2, 0, A2, Fa0/1 BPDU received RP RP Fa0/1: A2, 0, A2, Fa0/2 NDP NDP Fa0/1 NDP Root Bridge DP DP DP BPDU sent DP DP Fa0/2 Fa0/1: A2, 0, A2, Fa0/1 RP DP BPDU sent Fa0/2: A2, 0, A2, Fa0/2 Rick Graziani

21 show spanning-tree detail
Path Cost This is the root path cost that will be advertised in the BPDU Access1# show spanning-tree detail VLAN0001 is executing the ieee compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 0003.E461.46EC Configured hello time 2, max age 20, forward delay 15 Current root has priority 32769 Root port is 5 (FastEthernet0/5), cost of root path is 19 Topology change flag not set, detected flag not set Number of topology changes 0 last change occurred 00:00:00 ago from FastEthernet0/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0, aging 300 Rick Graziani

22 show spanning-tree Which port is the Root Port? Path Cost
Core# show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority Address E.7EBB Cost Port (GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority (priority sys-id-ext 1) Address C945.A573 Aging Time 20 Interface Role Sts Cost Prio.Nbr Type Gi0/ Root FWD P2p Gi0/ Altn BLK P2p Path Cost Rick Graziani

23 show spanning-tree detail
Which port is the Root Port? Core# show spanning-tree detail VLAN0001 is executing the ieee compatible Spanning Tree Protocol Bridge Identifier has priority of 32768, sysid 1, 0001.C945.A573 Configured hello time 2, max age 20, forward delay 15 Current root has priority 32769 Root port is 25 (GigabitEthernet0/1), cost of root path is 4 Topology change flag not set, detected flag not set Number of topology changes 0 last change occurred 00:00:00 ago from FastEthernet0/1 Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Timers: hello 0, topology change 0, notification 0, aging 300 Path Cost Rick Graziani

24 Access 1 has Lower Sender BID
Distribution1# show spanning-tree detail Port 26 (GigabitEthernet0/2) of VLAN0030 is designated blocking Port path cost 4, Port priority 128, Port Identifier Designated root has priority 128, address 000C.CF0B.1503 Designated bridge has priority 32769, address 0003.E461.46EC Designated port id is , designated path cost 4 Timers: message age 16, forward delay 0, hold 0 Number of transitions to forwarding state: 1 Link type is point-to-point by default Access1# show spanning-tree detail Port 26 (GigabitEthernet1/2) of VLAN0001 is designated forwarding Designated root has priority 128, address 0001.C746.B605 E461.46EC Note: PT does not show proper BID Rick Graziani

25 Distribution 1 has Lower Sender BID
Distribution1# show spanning-tree detail Port 5 (FastEthernet0/5) of VLAN0030 is designated forwarding Port path cost 19, Port priority 128, Port Identifier 128.5 Designated root has priority 128, address 000C.CF0B.1503 Designated bridge has priority 32769, address E0D.9315 Designated port id is 128.5, designated path cost 19 Timers: message age 16, forward delay 0, hold 0 Number of transitions to forwarding state: 1 Link type is point-to-point by default Distribution2# show spanning-tree detail Port 5 (FastEthernet0/5) of VLAN0001 is designated blocking Note: PT does not show proper BID Rick Graziani

26 Access 1 has Lower Sender BID
Distribution2# show spanning-tree detail Port 25 (GigabitEthernet0/1) of VLAN0001 is designated blocking Port path cost 4, Port priority 128, Port Identifier Designated root has priority 128, address 00D0.BCC1.2603 Designated bridge has priority 32769, address 0003.E461.46EC Designated port id is , designated path cost 4 Timers: message age 16, forward delay 0, hold 0 Number of transitions to forwarding state: 1 Link type is point-to-point by default Access1# show spanning-tree detail Port 25 (GigabitEthernet1/1) of VLAN0001 is designated forwarding Designated root has priority 128, address 0001.C746.B605 Note: PT does not show proper BID Rick Graziani

27 Core# show spanning-tree Interface Role Sts Cost Prio.Nbr Type
Gi0/ Root FWD P2p Gi0/ Altn BLK P2p Distribution1# show spanning-tree Interface Role Sts Cost Prio.Nbr Type Fa0/ Root FWD P2p Fa0/ Desg FWD P2p Gi0/ Desg FWD P2p Gi0/ Altn BLK P2p Distribution2# show spanning-tree Interface Role Sts Cost Prio.Nbr Type Fa0/ Root FWD P2p Fa0/ Altn BLK P2p Gi0/ Altn BLK P2p Gi0/ Desg FWD P2p Access1# show spanning-tree Interface Role Sts Cost Prio.Nbr Type Fa0/ Root FWD P2p Gi1/ Desg FWD P2p Gi1/ Desg FWD P2p Access2# show spanning-tree Interface Role Sts Cost Prio.Nbr Type Fa0/ Desg FWD P2p Fa0/ Desg FWD P2p Fa0/ Desg FWD P2p Rick Graziani


Download ppt "STP – Spanning Tree Protocol A closer look"

Similar presentations


Ads by Google