Spanning Tree Protocol Introduction
This commit is contained in:
54
2006-03-16-spanning-tree-protocol-introduction.html
Normal file
54
2006-03-16-spanning-tree-protocol-introduction.html
Normal file
@@ -0,0 +1,54 @@
|
||||
<!--# set var="title" value="Spanning Tree Protocol Introduction" -->
|
||||
<!--# set var="date" value="March 16, 2006" -->
|
||||
|
||||
<!--# include file="include/top.html" -->
|
||||
|
||||
<p>I’ve been considering increased network redundancy for awhile. After trying a few more things live than I should have, I decided to set up some gear in the lab and do some testing. First up is spanning tree.</p>
|
||||
|
||||
<p>STP is, simply, an ethernet-level protocol for disabling redundant links until they’re needed to avoid loops (which effectively kill ethernet networks). It works by electing a root “bridge” (meaning switch in this case). Every other bridge checks to see if it has more than one link to the root; if it does, it puts every link but one in blocking state. This lets you build neat redundant networks:</p>
|
||||
|
||||
<p><img src="data:image/png;base64,<!--# include file="images/stp.png.base64" -->" alt=""></p>
|
||||
|
||||
<p>(<strong>A</strong>, <strong>B</strong> and <strong>C</strong> are switches; <strong>1</strong> and <strong>2</strong> are servers)</p>
|
||||
|
||||
<p>I just plugged the above arrangement in (three Catalyst 2950s) and it worked. STP is enabled on Cisco switches by default.</p>
|
||||
|
||||
<p>A little closer examination showed more details. On <strong>B</strong>:</p>
|
||||
|
||||
<pre><code>#show spanning-tree
|
||||
….
|
||||
This bridge is the root
|
||||
….
|
||||
Fa0/2 Desg FWD
|
||||
Fa0/3 Desg FWD
|
||||
</code></pre>
|
||||
|
||||
<p><strong>B</strong> is the root, and both links out of it are “desg” — designated links to those switch segments and “FWD” — forwarding packets.</p>
|
||||
|
||||
<p>On <strong>A</strong>:</p>
|
||||
|
||||
<pre><code>#show spanning-tree
|
||||
….
|
||||
Fa0/1 Desg FWD
|
||||
Fa0/2 Root FWD
|
||||
</code></pre>
|
||||
|
||||
<p>This is the first oddity: Fa0/1 links to <strong>C</strong>, and should be blocking. However, apparently only one end of each link blocks. The switch knows that Fa0/2 is a link to the root bridge.</p>
|
||||
|
||||
<p>On <strong>C</strong>:</p>
|
||||
|
||||
<pre><code>#show spanning-tree
|
||||
….
|
||||
Fa0/1 Altn BLK
|
||||
Fa0/3 Root FWD
|
||||
</code></pre>
|
||||
|
||||
<p>This switch has realized that there’s a loop, and blocked the port that provides the longest route to the root bridge, as expected.</p>
|
||||
|
||||
<p>Now, I start a ping of <strong>2</strong> from <strong>1</strong>. Then I unplug the link between <strong>A</strong> and <strong>B</strong> that is currently carrying the traffic. The ping stops. 49 seconds later, it starts again. The Fa0/1 interface on <strong>C</strong> went from BLK to LIS to LRN to FWD.</p>
|
||||
|
||||
<p>Now, I plug the link back in. The ping stops again. Fa0/1 on <strong>C</strong> sees the loop immediately and goes to BLK. The restored interface on <strong>B</strong> goes to LIS, then LRN, and finally FWD. The ping resumes in 31 seconds.</p>
|
||||
|
||||
<p>Spanning tree isn’t particularly fast, and it doesn’t really “route”. Ethernet packets often traverse less-than-optimal paths through the switch fabric since STP doesn’t care where they came from or where they’re going; it only shuts down interfaces that might loop. Nevertheless, it’s simple and effective at building switch redundancy.</p>
|
||||
|
||||
<!--# include file="include/bottom.html" -->
|
||||
82
images/stp.png.base64
Normal file
82
images/stp.png.base64
Normal file
@@ -0,0 +1,82 @@
|
||||
iVBORw0KGgoAAAANSUhEUgAAAMQAAAEQCAIAAABgHEyxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA
|
||||
B3RJTUUH1gMQFhUtdcsdfgAAAB10RVh0Q29tbWVudABDcmVhdGVkIHdpdGggVGhlIEdJTVDvZCVu
|
||||
AAARgklEQVR42u2de3RU1b3H93nNeyYhIRESEJVAIKA1cJGHQCm0UF4VUJEk1FQKXS5aFrB6l7iu
|
||||
LYj31nVxXV/Vy1VBJQgJPggiSIstxfLyhYApREKARcAEeYRk3jPnef/IkBkCJpPkzMyZM9/PymKd
|
||||
CTPn/PbsT/b+nb33OYdSFIUAoAY0vgIAmQBkApAJAMgEIBOATAAyAQCZAGQCuoRN1IHPSLVfCIeq
|
||||
pCO1Us138oVG+aqf+AghZmL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QykYib7VFWs25kyjMwBV29jcQrWZZfOsImneSlmfWe5u4N
|
||||
BBRwdJ7uuzn6jtxwat7o1NPowExrV1qC53uaF0TMmZzhpen17u4PKXUtmCSTyTBrcjgfP6Grud7i
|
||||
iNYlSp7NND+ebmp9eV6Qpja4v5eUhASTZDIxhQWmZY+Fk/HtuhoKzzMwszvTHqzMMC3tETapQZSn
|
||||
1nvq1Rismm1V7baFmptOoRw2Ov8uw6zJxseLKVPoL0aqPcdvrCT6YkmaKfprClZk3JAy5rD0iTvS
|
||||
OjhBq3OeimI955I0k1ol0vREb+ic7tJVz8O/JaKoM5lGWtgSG6fiTb26QImNU/EmhVpfacnv2usa
|
||||
O1euPUf0yKpMi40kbEGEjSirMi0q7lBz3Zzi9SlOt3TyrPjlN/x7H8s1Z4l+yeXo57Isi690vCjZ
|
||||
erpJ9aM/l6XyjS4TIFOy32JVXUrTTEeDUvxvhLLIYShVL1tKjm4uFXgp2zrFHNe/6ilm9qVsq+q7
|
||||
hUyaoCLHPt4UpxvAjzcxFTkxWYIBmTSBkSIf5jri0D5NMbMf5jqMFIFMOvepMte+yGGI3SEWOQyV
|
||||
ufYYmQSZtJg/rc0yqz5eYCPK2ixzLPIkyKT187sj/dJLbJxaOyyxcUf6pat+7nYzeHaKdsGDeCCT
|
||||
yuARYZApJla1PrzwgihfEeWWKyctRMliaTy8EDLpCiTgADIByAQgEwCQCUAmAJlAStPpcSYA0DIB
|
||||
yAQgE4BMAEAmAJkAZAIAMgHIBCATgEwAQCYAmQBkAgAyAcgEtM7/A4dEKEKlPWDkAAAAAElFTkSu
|
||||
QmCC
|
||||
@@ -40,6 +40,7 @@
|
||||
<li>2009-Sep-11: <a href="2009-09-11-confusing-bind-with-cnames.html">Confusing BIND with CNAMEs</a></li>
|
||||
<li>2009-Feb-19: <a href="2019-02-19-the-odd-case-of-my-mugging.html">The odd case of my mugging</a></li>
|
||||
<li>2009-Feb-03: <a href="2009-02-03-5-packet-tcp-connection.html">5-packet TCP connection?</a></li>
|
||||
<li>2006-Mar-16: <a href="2006-03-16-spanning-tree-protocol-introduction.html">Spanning Tree Protocol Introduction</a></li>
|
||||
<li>2006-Mar-15: <a href="2006-03-15-maudio-fast-track-pro-in-linux.html">M-Audio Fast Track Pro in Linux</a></li>
|
||||
<li>2006-Mar-15: <a href="2006-03-15-mysql-base64-functions.html">MySQL base64 functions</a></li>
|
||||
<li>2006-Mar-03: <a href="2006-03-03-mail-relaying-with-netsuite.html">Mail relaying with NetSuite</a></li>
|
||||
|
||||
51
markdown/2006-03-16-spanning-tree-protocol-introduction.md
Normal file
51
markdown/2006-03-16-spanning-tree-protocol-introduction.md
Normal file
@@ -0,0 +1,51 @@
|
||||
<!--# set var="title" value="Spanning Tree Protocol Introduction" -->
|
||||
<!--# set var="date" value="March 16, 2006" -->
|
||||
|
||||
<!--# include file="include/top.html" -->
|
||||
|
||||
I’ve been considering increased network redundancy for awhile. After trying a few more things live than I should have, I decided to set up some gear in the lab and do some testing. First up is spanning tree.
|
||||
|
||||
STP is, simply, an ethernet-level protocol for disabling redundant links until they’re needed to avoid loops (which effectively kill ethernet networks). It works by electing a root “bridge” (meaning switch in this case). Every other bridge checks to see if it has more than one link to the root; if it does, it puts every link but one in blocking state. This lets you build neat redundant networks:
|
||||
|
||||
<img src="data:image/png;base64,<!--# include file="images/stp.png.base64" -->" alt="">
|
||||
|
||||
(__A__, __B__ and __C__ are switches; __1__ and __2__ are servers)
|
||||
|
||||
I just plugged the above arrangement in (three Catalyst 2950s) and it worked. STP is enabled on Cisco switches by default.
|
||||
|
||||
A little closer examination showed more details. On __B__:
|
||||
|
||||
#show spanning-tree
|
||||
….
|
||||
This bridge is the root
|
||||
….
|
||||
Fa0/2 Desg FWD
|
||||
Fa0/3 Desg FWD
|
||||
|
||||
__B__ is the root, and both links out of it are “desg” — designated links to those switch segments and “FWD” — forwarding packets.
|
||||
|
||||
On __A__:
|
||||
|
||||
#show spanning-tree
|
||||
….
|
||||
Fa0/1 Desg FWD
|
||||
Fa0/2 Root FWD
|
||||
|
||||
This is the first oddity: Fa0/1 links to __C__, and should be blocking. However, apparently only one end of each link blocks. The switch knows that Fa0/2 is a link to the root bridge.
|
||||
|
||||
On __C__:
|
||||
|
||||
#show spanning-tree
|
||||
….
|
||||
Fa0/1 Altn BLK
|
||||
Fa0/3 Root FWD
|
||||
|
||||
This switch has realized that there’s a loop, and blocked the port that provides the longest route to the root bridge, as expected.
|
||||
|
||||
Now, I start a ping of __2__ from __1__. Then I unplug the link between __A__ and __B__ that is currently carrying the traffic. The ping stops. 49 seconds later, it starts again. The Fa0/1 interface on __C__ went from BLK to LIS to LRN to FWD.
|
||||
|
||||
Now, I plug the link back in. The ping stops again. Fa0/1 on __C__ sees the loop immediately and goes to BLK. The restored interface on __B__ goes to LIS, then LRN, and finally FWD. The ping resumes in 31 seconds.
|
||||
|
||||
Spanning tree isn’t particularly fast, and it doesn’t really “route”. Ethernet packets often traverse less-than-optimal paths through the switch fabric since STP doesn’t care where they came from or where they’re going; it only shuts down interfaces that might loop. Nevertheless, it’s simple and effective at building switch redundancy.
|
||||
|
||||
<!--# include file="include/bottom.html" -->
|
||||
@@ -39,6 +39,7 @@
|
||||
1. 2009-Sep-11: [Confusing BIND with CNAMEs](2009-09-11-confusing-bind-with-cnames.html)
|
||||
1. 2009-Feb-19: [The odd case of my mugging](2019-02-19-the-odd-case-of-my-mugging.html)
|
||||
1. 2009-Feb-03: [5-packet TCP connection?](2009-02-03-5-packet-tcp-connection.html)
|
||||
1. 2006-Mar-16: [Spanning Tree Protocol Introduction](2006-03-16-spanning-tree-protocol-introduction.html)
|
||||
1. 2006-Mar-15: [M-Audio Fast Track Pro in Linux](2006-03-15-maudio-fast-track-pro-in-linux.html)
|
||||
1. 2006-Mar-15: [MySQL base64 functions](2006-03-15-mysql-base64-functions.html)
|
||||
1. 2006-Mar-03: [Mail relaying with NetSuite](2006-03-03-mail-relaying-with-netsuite.html)
|
||||
|
||||
Reference in New Issue
Block a user