Sei sulla pagina 1di 65

Enterprise LAN Switching for Cisco

CCNA 200-125/200-105
SPANNING TREE PROTOCOL (STP)

Ross Bagurdes
NETWORK ENGINEER

@bagurdes
Module Goals
The need for STP
STP operation
STP demonstration
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages
Broadcast Messages

Broadcast Storm!
Spanning Tree Protocol
Shuts Down Redundancy

X
Introducing
Spanning Tree Protocol
(STP)
Spanning Tree Protocol
Shuts Down Redundancy

X
Spanning Tree Protocol

X X
X X
?
X X
Spanning Tree Protocol Operation

1. Select Root Bridge


2. Select best path to Root Bridge
3. Select port to block on non-Root
Bridge
Bridge
- A switch
- A device that converts media from one type to another
i.e. A wireless Ethernet to wired Ethernet bridge
Select the Root Bridge
Bridge Protocol Data Units (BPDU)
A message used in STP to communicate:
Root Bridge ID
Cost to Root Bridge
Senders Bridge ID
Port ID
STP timers
Select the Root Bridge
Select the Root Bridge
Bridge ID

Priority Switch MAC Address

32,769 0015.27A4.FD36
Bridge ID

Priority Switch MAC Address


Priority VLAN ID
32,769
1000000000000001
4 bits 12 Bits 0015.27A4.FD36
Bridge ID

Priority Switch MAC Address


Priority VLAN ID
32,769
4 bits 12 Bits 0015.27A4.FD36
1000000000000001
Bridge ID

Priority Switch MAC Address

32,769 0015.27A4.FD36
1000000000000001

Priority VLAN ID
4 bits 12 Bits
VLAN 1 - Bridge Priority
VLAN 1 Priority Options
0000000000000001 1 1000000000000001 32,769

0001000000000001 4,097 1001000000000001 36,865

0010000000000001 8,193 1010000000000001 40,961

0011000000000001 12,289 1011000000000001 45,057

0100000000000001 16,385 1100000000000001 49,153

0101000000000001 20,481 1101000000000001 53,249

0110000000000001 24,577 1110000000000001 57,345

0111000000000001 28,673 1111000000000001 61,441


VLAN 175 - Bridge Priority
VLAN 175 Priority Options
0000000010101111 175 1000000010101111 32,943

0001000010101111 4,271 1001000010101111 37,039

0010000010101111 8,367 1010000010101111 41,135

0011000010101111 12,463 1011000010101111 45,231

0100000010101111 16,559 1100000010101111 49,327

0101000010101111 20,655 1101000010101111 53,423

0110000010101111 24,751 1110000010101111 57,519

0111000010101111 28,847 1111000010101111 61,615


Priority = Priority + VLAN ID

1000000000000001

Priority VLAN ID
4 bits 12 Bits
Bridge ID

Priority Switch MAC Address

32,769 0015.27A4.FD36
1000000000000001

Priority VLAN ID
4 bits 12 Bits
Select the Root Bridge
Bridge ID
Priority Switch MAC Priority Switch MAC
Address Address
32,769 0015.27A4.FD36 32,769 6ADC.FC89.9974

Priority Switch MAC


Address
32,769 3175.AC8F.2121
Root Bridge
Switch with the lowest Bridge ID.
Select the Root Bridge
Bridge ID
Priority Switch MAC Priority Switch MAC
Address Address
32,769 0015.27A4.FD36 32,769 6ADC.FC89.9974

Priority Switch MAC


Address
32,769 3175.AC8F.2121
Select the Root Bridge
Root Bridge
32769:0015.27A4.FD36 32769:6ADC.FC89.9974

G0/1
G0/1
A G0/3 G0/2
B

G0/3 G0/2

C
32769: 3175.AC8F.2121
Root Port
Port on non-root bridge with the best cost to the root
bridge.
STP Port Costs

Port Speed Port Cost


10 Mbps 100
100 Mbps 19
1 Gbps 4
10 Gbps 2
Choose Root Ports
Root Bridge
32769:0015.27A4.FD36 32769:6ADC.FC89.9974

G0/1 G0/1
A G0/3
4 4
G0/2
B
4 4

Cost = 4
G0/3 G0/2
4 4
C
32769: 3175.AC8F.2121
Choose Root Ports
Root Bridge
32769:0015.27A4.FD36 32769:6ADC.FC89.9974

G0/1 G0/1
A G0/3
4 4
G0/2
B
4 4

G0/3 G0/2
Cost = 4
4 4
C
32769: 3175.AC8F.2121
Choose Root Ports
Cost = 4 + 4 = 8
Root Bridge
32769:0015.27A4.FD36 32769:6ADC.FC89.9974

G0/1 G0/1
A G0/3
4 4
G0/2
B
4 4

G0/3 G0/2
Cost = 4
4 4
C
32769: 3175.AC8F.2121
Choose Root Ports

Root Bridge
32769:0015.27A4.FD36 32769:6ADC.FC89.9974

G0/1 G0/1
A G0/3
4 4
G0/2
B
4 4

Root
Port G0/3 G0/2
4 4
C
32769: 3175.AC8F.2121
Choose Root Ports
Root Bridge
32769:0015.27A4.FD36 32769:6ADC.FC89.9974
Root
Port
G0/1 G0/1
A G0/3 G0/2
B

Root
Port G0/3 G0/2

C
32769: 3175.AC8F.2121
Designated Port
Port that receives and forwards frames.

Non-designated Port
Port that drops incoming frames and does not send
frames.
*Receives and processes Bridge Protocol Data Units
Select Designated/Non-designated Ports
Root Bridge
32769:0015.27A4.FD36 32769:6ADC.FC89.9974
Root
DP Port

X
G0/1 G0/1
A G0/3
DP
G0/2
B
DP NDP

Root
DP Port G0/3 G0/2 DP

C
32769: 3175.AC8F.2121
Spanning Tree Protocol Process
1. Switch port link established
(plug in cable)
2. Switch port begins in BLOCKING
X 3. Transition all ports to LISTENING state
and send/process BPDUs (15 seconds)
a) Transition non-designated ports to
BLOCKING
BLOCKING

4. Transition all designated ports to


LEARNING state (15 seconds)
5. Transition all designated ports to
FORWARDING state
Spanning Tree Protocol
Protocol Process
Process
1. Switch stops receiving BPDUs
2. Transition all ports to BLOCKING
BLOCKING (20
seconds)
3. Transition all ports to LISTENING
LISTENING state
and send/process BPDUs (15 seconds)
a) Transition non-designated ports to
BLOCKING

4. Transition all designated ports to


LEARNING state (15 seconds)
5. Transition all designated ports to
FORWARDING state
Spanning Tree Protocol Process

BLOCKING 20 seconds

LISTENING 15 seconds

LEARNING 15 seconds

FORWARDING
Demonstrating
Spanning Tree Protocol
STP Demonstration
2960-1 2960-2
32769:0cf5.a471.bd00 32769:2037.06d2.5500

F0/1 F0/2

F0/2 F0/1

F0/1 F0/2

32769:0022.907f.3380
s3560
STP Demonstration
2960-1 2960-2
32769:0cf5.a471.bd00 32769:2037.06d2.5500

F0/1 F0/2

F0/2 F0/1

F0/1 F0/2

Root Bridge

32769:0022.907f.3380
s3560
STP Demonstration
2960-1 2960-2
32769:0cf5.a471.bd00 32769:2037.06d2.5500

F0/1 F0/2
Root Root
Port
F0/2 F0/1 Port
DP DP

F0/1 F0/2
DP DP
Root Bridge

32769:0022.907f.3380
s3560
STP Demonstration
2960-1 2960-2
32769:0cf5.a471.bd00 32769:2037.06d2.5500

X
DP NDP
F0/1 F0/2
Root Root
Port
F0/2 F0/1 Port
DP DP

F0/1 F0/2
DP DP
Root Bridge

32769:0022.907f.3380
s3560
Algorhyme
I think that I shall never see
A graph more lovely than a tree.
A tree whose crucial property
Is loop-free connectivity.
A tree that must be sure to span
So packets can reach every LAN
First, the root must be selected.
By ID, its elected.
Least-cost paths from root are traced.
In the tree, these paths are placed.
A mesh is made by folks like me,
Then bridges find a spanning tree.

-Radia Perlman
Summary
The need for STP
STP operation
STP demonstration

Potrebbero piacerti anche