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
130
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
CDK Toolkit Libraryにおけるテストの考え方
smt7174
1
490
ビジネス職が分析も担う事業部制組織でのデータ活用の仕組みづくり / Enabling Data Analytics in Business-Led Divisional Organizations
zaimy
1
310
LLM時代の検索
shibuiwilliam
2
650
microCMSではじめるAIライティング
himaratsu
0
120
united airlines ™®️ USA Contact Numbers: Complete 2025 Support Guide
flyunitedhelp
1
470
Lufthansa ®️ USA Contact Numbers: Complete 2025 Support Guide
lufthanahelpsupport
0
250
セキュアな社内Dify運用と外部連携の両立 ~AIによるAPIリスク評価~
zozotech
PRO
0
100
United airlines®️ USA Contact Numbers: Complete 2025 Support Guide
unitedflyhelp
0
340
AWS CDK 開発を成功に導くトラブルシューティングガイド
wandora58
3
170
cdk initで生成されるあのファイル達は何なのか/cdk-init-generated-files
tomoki10
1
580
「Chatwork」のEKS環境を支えるhelmfileを使用したマニフェスト管理術
hanayo04
1
250
CDKコード品質UP!ナイスな自作コンストラクタを作るための便利インターフェース
harukasakihara
2
200
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
246
12k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
A Tale of Four Properties
chriscoyier
160
23k
Rails Girls Zürich Keynote
gr2m
95
14k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Facilitating Awesome Meetings
lara
54
6.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
47
9.6k
Why Our Code Smells
bkeepers
PRO
336
57k
Bash Introduction
62gerente
613
210k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
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