Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
STP
Search
Torsten Rehn
November 09, 2016
Technology
0
140
STP
Spanning Tree Protocol
Torsten Rehn
November 09, 2016
Tweet
Share
More Decks by Torsten Rehn
See All by Torsten Rehn
8 Years of Config Management
trehn
0
110
How the Internet works
trehn
0
64
Other Decks in Technology
See All in Technology
Firestore → Spanner 移行 を成功させた段階的移行プロセス
athug
1
470
Obsidian応用活用術
onikun94
2
490
Evolución del razonamiento matemático de GPT-4.1 a GPT-5 - Data Aventura Summit 2025 & VSCode DevDays
lauchacarro
0
190
Android Audio: Beyond Winning On It
atsushieno
0
110
allow_retry と Arel.sql / allow_retry and Arel.sql
euglena1215
1
160
AIエージェント開発用SDKとローカルLLMをLINE Botと組み合わせてみた / LINEを使ったLT大会 #14
you
PRO
0
110
dbt開発 with Claude Codeのためのガードレール設計
10xinc
2
1.2k
研究開発と製品開発、両利きのロボティクス
youtalk
1
520
KotlinConf 2025_イベントレポート
sony
1
130
RSCの時代にReactとフレームワークの境界を探る
uhyo
10
3.4k
品質視点から考える組織デザイン/Organizational Design from Quality
mii3king
0
200
COVESA VSSによる車両データモデルの標準化とAWS IoT FleetWiseの活用
osawa
1
280
Featured
See All Featured
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Balancing Empowerment & Direction
lara
3
620
Why Our Code Smells
bkeepers
PRO
339
57k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
KATA
mclloyd
32
14k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Building Adaptive Systems
keathley
43
2.7k
Transcript
STP P A N N I N G R O
T O C O L R E E
S S S S S S
S S S S S S
S S S S S S
S S S PC PC To:
S S S PC PC To:
S S S PC PC To:
S S S PC PC To:
S S S PC PC To: To: To: To: To:
To: To: To: To: To: To: To:
S S S PC PC
STP VARIANTS
STP old, do not use RSTP STP, but faster MSTP
does VLANs
STP old, do not use RSTP STP, but faster MSTP
does VLANs You are here.
Designate a root For each switch, find the shortest path
to the root For each cable, determine which end has the shorter path to root On each switch, disable all other ports that lead to root
Switches need to communicate.
Bridge Protocol Data Unit
S S S S
S S S S I am root with priority 2.
S S S S 2 5 4 3 2 3
4 5
S S S S 2 5 4 3 2 3
4 5
S S S S 2 5 4 2 3 4
S S S S 2 5 2 3 4
S S S S 2 2 3 4
S S S S 2 2 3
S S S S 2 2 3
Designate a root For each switch, find the shortest path
to the root For each cable, determine which end has the shorter path to root On each switch, disable all other ports that lead to root ✓
BPDU FORMAT
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B always zero (for classic STP)
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B config topology change topology change ack
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B 2 B priority + 6 B MAC address
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B total “cost” to root 100 MBit/s: 200k 1 GBit/s: 20k
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B 2 B priority + 6 B MAC address
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B physical port of sender
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B hops since initial BPDU from root
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B max TTL
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B interval between periodic config BPDUs
Protocol ID Version Type Flags Root ID Path cost Bridge
ID Port ID Age Max Age Hello Fwd Delay 2 B 1 B 1B 1 B 8 B 4 B 8 B 2 B 2 B 2 B 2 B 2 B time spent learning/listening
Designate a root For each switch, find the shortest path
to the root For each cable, determine which end has the shorter path to root On each switch, disable all other ports that lead to root ✓ ✓ ✓ ✓
SOME TERMINOLOGY
RSTP PORT STATES DISCARDING Only BPDUs are transmitted. LEARNING Like
DISCARDING, but learns MAC addresses. FORWARDING Regular data is transmitted.
RSTP PORT ROLES ROOT Best path to root bridge. DESIGNATED
Points away from root. ALTERNATE Worse (and thus disabled) path to root bridge. BACKUP Leads to same segment as another DESIGNATED port.
ROLE ASSIGNMENTS
S S S S
S S S S 2 3 8 9
S S S S 2 3 8 9 20,000 20,010
10,000 10,000
Designate a root For each switch, find the shortest path
to the root For each cable, determine which end has the shorter path to root On each switch, disable all other ports that lead to root
S S S S 2 3 8 9 20,000 20,010
10,000 10,000
S S S S 2 3 8 9 20,000 20,010
10,000 10,000 root bridge
Designate a root For each switch, find the shortest path
to the root For each cable, determine which end has the shorter path to root On each switch, disable all other ports that lead to root
S S S S 2 3 8 9 20,000 20,010
10,000 10,000 root bridge R R R
Designate a root For each switch, find the shortest path
to the root For each cable, determine which end has the shorter path to root On each switch, disable all other ports that lead to root
S S S S 2 3 8 9 20,000 20,010
10,000 10,000 root bridge R R R D D D D
Designate a root For each switch, find the shortest path
to the root For each cable, determine which end has the shorter path to root On each switch, disable all other ports that lead to root
S S S S 2 3 8 9 20,000 20,010
10,000 10,000 root bridge R R R D D D D A
S S S S 2 3 8 9 20,000 20,010
10,000 10,000 root bridge R R R D D D D A port discarding
DEALING WITH FAILURE
S S S S root bridge S port discarding
S S S root bridge S port discarding I just
lost my root port :’(
S S S root bridge S port discarding Now I
can be root myself \o/
S S S root bridge S port discarding I’m root.
S S S root bridge S port discarding I’m root.
S S S root bridge S port discarding NOPE
S S S root bridge S port discarding NOPE
S S S root bridge S port discarding OK :/
TCN
S S S root bridge S TCN
S S S root bridge S TCN TCN ACK
S S S root bridge S TCN ACK
S S S root bridge S TCN ACK
S S S root bridge S TCN ACK
ALWAYS configure bridge priorities configure path costs if you have
redundant links use RSTP instead of STP
PDU 1 SRV-2 SRV-1 SW-2 SW-4 PDU 2 SW-3 SW-1
SRV-2 SRV-1 SW-2 SW-4 PDU 2 SW-3 SW-1
That’s (R)STP. Further reading: http://blog.ine.com/wp-content/uploads/2010/04/understanding-stp-rstp-convergence.pdf http://blog.ine.com/2010/02/22/understanding-mstp/ Slides: https://speakerdeck.com/trehn/stp