Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
MapKitとオープンデータで実現する地図情報の拡張と可視化
zozotech
PRO
1
140
AIと二人三脚で育てた、個人開発アプリグロース術
zozotech
PRO
1
730
Snowflakeでデータ基盤を もう一度作り直すなら / rebuilding-data-platform-with-snowflake
pei0804
6
1.6k
AI-DLCを現場にインストールしてみた:プロトタイプ開発で分かったこと・やめたこと
recruitengineers
PRO
2
130
プロンプトやエージェントを自動的に作る方法
shibuiwilliam
10
8.4k
mairuでつくるクレデンシャルレス開発環境 / Credential-less development environment using Mailru
mirakui
5
510
Sansanが実践する Platform EngineeringとSREの協創
sansantech
PRO
2
870
MLflowで始めるプロンプト管理、評価、最適化
databricksjapan
1
240
文字列の並び順 / Unicode Collation
tmtms
3
590
評価駆動開発で不確実性を制御する - MLflow 3が支えるエージェント開発
databricksjapan
1
190
大企業でもできる!ボトムアップで拡大させるプラットフォームの作り方
findy_eventslides
1
780
[デモです] NotebookLM で作ったスライドの例
kongmingstrap
0
150
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3k
How to Ace a Technical Interview
jacobian
280
24k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Mobile First: as difficult as doing things right
swwweet
225
10k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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