stp
DESCRIPTION
stpTRANSCRIPT
Presentation_ID 1© 2008 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Spanning-Tree Understanding how it cuts the loop
Presentation_ID 2© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
STP – Spanning Tree Protocol
Break the loop
Presentation_ID 3© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
STP – Spanning Tree Protocol
Which port should be blocked?
? ?
?
??
?
? ?
Presentation_ID 4© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Spanning Tree Determination
1. Root Bridge
2. Root Port on each switch
3. Designated Port on each segment
4. Non-Designated Port on switch with blocking port
Presentation_ID 5© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Sample Topology
Sample Topology
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
Presentation_ID 6© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Electing Root Bridge
Each switch claims that they are the
root bridge
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
I’m Root
I’m Root
I’m Root
I’m Root
Hello Hello
Hello H
ello
Presentation_ID 7© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
STP Hello Message Content
Hello
Field in BPDU Example of Switch John
Root Bridge ID AA
Root Path Cost 0
Sender Bridge ID AA
Sender Port ID 1
AA,0,AA,1
Presentation_ID 8© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Electing Root Bridge
Eric received better BPDU because the received Root BID
is lower than its
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
AA,0,AA,1
AA is lower (better)AA is Root
I update the RPC, SBID and SPID and
fwd it
AA
,Ne
w
BD
I,SB
ID,S
PID
RBID, RPC,SBID,SPID
Presentation_ID 9© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Determine the Root Port
Each switch received the BPDU
cost value + the receiving port cost
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
Root
AA is RootF1: BB, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, BB, 2
AA is RootF1: 57, CC, 1F2: 19, AA, 2
AA,0,AA,10+19
19+1919+1919+38
Presentation_ID 10© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Sample Topology
Each switch claims that they are the
root bridge
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
Root
AA is RootF1: BB, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, BB, 2
?
?R
R
F1 has lowest Cost to Root,
F1 is Root Port
Both F1 and F2 has the same
RPCWhat should I
do?
AA is RootF1: 57, CC, 1F2: 19, AA, 2
Presentation_ID 11© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Tie Breaker
1. Lowest Root Path Cost
2. Lowest Sender Bridge ID
3. Lowest Sender Port ID
Presentation_ID 12© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Determine the Root Port when tie break
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
Root
AA is RootF1: BB, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, BB, 2
RR
R
F2’s neighbor has lower BID
F2 is RP
BB vs DD
AA is RootF1: 57, CC, 1F2: 19, AA, 2
Presentation_ID 13© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Determine the Designated Port
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
Root
AA is RootF1: BB, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, BB, 2
RR
RD
D D
D
I’m RootAll my ports
are designated Port
My port F2 is sending the
lowest RPC in the segment,
F2 is DP
AA is RootF1: 57, CC, 1F2: 19, AA, 2
Presentation_ID 14© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Determine the Non-Designated Port
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
Root
AA is RootF1: BB, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, BB, 2
AA is RootF1: 19, AA, 1F2: 57, CC, 2
RR
RD
D D
D
F1 is neither RP or DP, F1 is
Non-DPBlock it
Presentation_ID 15© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Advanced – Redundant Link
Redundant Link
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA BB
CCDD
Root
AA is RootF1: BB, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, BB, 2F3: 38, DD, 3
RR
RD
D D
DD
F3 F3AA is RootF1: 57, CC, 1F2: 19, AA, 2F3: 57, CC, 3
Presentation_ID 16© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Tie Breaker
1. Lowest Root Path Cost
2. Lowest Sender Bridge ID
3. Lowest Sender Port ID
Presentation_ID 17© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Advanced – Redundant Link
BID on Switch Ananth is lower
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA EE
CCDD
Root
AA is RootF1: EE, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, EE, 2F3: 38, DD, 3
R
R
RD
D D
DD
F3 F3AA is RootF1: 57, CC, 1F2: 19, AA, 2F3: 57, CC, 3
Presentation_ID 18© 2009 Cisco Systems, Inc. All rights reserved. Cisco Confidential
Advanced – Redundant Link
BID on Switch Ananth is lower
John Eric
KangAnanth
F1 F1
F2
F2 F2
F2
F1 F1
AA EE
CCDD
Root
AA is RootF1: EE, 1F2: DD, 2
0 19
19 38
AA is RootF1: 19, AA, 1F2: 57, CC, 2
AA is RootF1: 38, DD, 1F2: 38, EE, 2F3: 38, DD, 3
R
R
RD
D D
DD
F3 F3AA is RootF1: 57, CC, 1F2: 19, AA, 2F3: 57, CC, 3