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
120
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
97
How the Internet works
trehn
0
55
Other Decks in Technology
See All in Technology
中央集権体制からDataOpsへの転換 / centralized-to-dataops-transformation
pei0804
7
1.6k
オブジェクトのおしゃべり大失敗 メッセージングアンチパターン集 / messaging anti-pattern collection
ytake
0
340
2023 Japan AWS Jr.Championsに選出されての振り返りとこれから
hiropy877
1
130
Autify Company Deck
autifyhq
1
30k
VSCode上からSlackにメッセージを送る拡張機能を作っている話
ebarakazuhiro
0
130
Introducing Pkl
enomotok
0
310
KubeCon EU: Unlocking new Platform Experiences with Open Interfaces
salaboy
1
380
データ品質をコード化! LINEヤフーのMLOpsを最適化する "ACP Data Quality" の紹介
lycorptech_jp
PRO
2
290
LLMの現在
pfn
PRO
8
4.1k
大規模言語モデル開発のための日本語 Instruction データセット作成の取り組み
kunishou
1
180
20240321_生成AI時代のDevOps
kzkmaeda
2
620
MongoDB Atlas Vectorsearchではじめる生成AIアプリ開発
chie8842
3
510
Featured
See All Featured
Fireside Chat
paigeccino
19
2.6k
Principles of Awesome APIs and How to Build Them.
keavy
119
16k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
12
1.4k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
272
12k
Fontdeck: Realign not Redesign
paulrobertlloyd
75
4.8k
WebSockets: Embracing the real-time Web
robhawkes
59
6.9k
Clear Off the Table
cherdarchuk
82
310k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Ruby is Unlike a Banana
tanoku
95
10k
Producing Creativity
orderedlist
PRO
335
39k
The Art of Programming - Codeland 2020
erikaheidi
40
12k
Why Our Code Smells
bkeepers
PRO
330
56k
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