Académique Documents
Professionnel Documents
Culture Documents
SpanningTreeProtocol(STP)IntroductionForDummies
SpanningTreeProtocol(STP)Introduction
ByEdwardTetzfromCiscoNetworkingAllinOneForDummies
SpanningTreeProtocol(STP)wasdevelopedbeforeswitcheswerecreatedinordertodealwith
anissuethatoccurredwithnetworksthatwereimplementingnetworkbridges.STPservestwo
purposes:First,itpreventsproblemscausedbyloopsonanetwork.Second,whenredundant
loopsareplannedonanetwork,STPdealswithremediationofnetworkchangesorfailures.
Thedifferencebetweenabridgeandaswitchisthataswitchfunctionslikeamultiport
bridgewhereasabridgemighthavetwotofourports,aswitchlookslikeahuband,on
anenterprisenetwork,willusuallyhave12to48ports.Asyougothroughthischapter,
notethatSTPtechnologyusesthetermbridges,whenyouareactuallyplacingswitches
(multiportbridges).AtthetimeSTPwascreated,switchesdidnotexist.Clearasmud?
STPisaLayer2protocolthatpassesdatabackandforthtofindouthowtheswitchesare
organizedonthenetworkandthentakesalltheinformationitgathersandusesittocreatealogical
tree.PartoftheinformationSTPreceivesdefinesexactlyhowallthenetworkswitchesare
interconnected.
STPbuildsthisinformationbysendingoutnetworkpacketscalledBridgeProtocolDataUnits
(BPDUsorsometimesBDUs).TheseBPDUsorratherthedatainthemcontrolthewaySTP
determinesthenetworktopology.
Thefollowingfigureshowsabasicnetworkwithsimplified4digitMACaddressesfortheswitches.
AlltheswitchesonthenetworkwillsendBPDUframestotheentirenetwork,evenifanetworkthat
doesnothaveanyloops.Thesepackets,bydefault,aresentoutonthenetworkeverytwo
seconds,areverysmall,anddonotnegativelyaffectthenetworktraffic.
Ifyouareperformingapacketcaptureonanetwork,however,beawarethatthesepacketsfillyour
capturescreenquicklyandcanbedistractingwhenreviewingyourcaptureddata.Theinitial
processofsendingBPDUframeswilldeterminewhichswitchwillbetheRootBridgeandactas
thecontrollerormanagerforSTPonthenetwork.Bydefault,theRootBridgeistheswitchwiththe
numericallylowestMACaddress.
http://www.dummies.com/howto/content/spanningtreeprotocolstpintroduction.html
1/4
14/07/2016
SpanningTreeProtocol(STP)IntroductionForDummies
IdentifyingRootPorts
TheBPDU,whicheveryswitchsends,containsinformationabouttheswitchanditsBridgeIDthat
uniquelyidentifiestheswitchonthenetwork.TheBridgeIDismadeoftwocomponents:a
configurableBridgePriorityvalue(whichis32,768bydefault)andtheswitchMACaddress.
IfnoneoftheswitchesonyournetworkhashaditsBridgePriorityvaluesadjusted,thentheswitch
withthelowestMACaddresswillbetheRootBridgebutiftheBridgePriorityvaluesonyour
networkhavebeenmodified,theRootBridgewillbetheswitchwiththelowestBridgePriority
value.TheRootBridgeshownintheprecedingfigureisswitch11:11.
AftertheRootBridgeisidentified,allotherswitchesdeterminethequickestpathfromthemselves
totheRootBridge.SomeswitcheshavemorethanonepathtotheRootBridgeduetoanetwork
loop.Intheprecedingfigure,switch11:22hastwopaths,onethatistwohopsawayfromtheRoot
Bridgeandonethatisonehopaway.
Ifthespeedofthenetworkingtechnologyisthesameforallnetworksegments,thepathwiththe
fewestnumberofhopsisdesignatedastheRootPort.
TheswitchwillidentifywhichofitsinterfacesistheRootPort.Eachnetworktechnologyhasa
ratedspeed,sobasedonthetechnologyofeachnetworksegmentbetweentheswitchandthe
RootBridge,theswitchisabletocalculatethecostofeachavailablepath.
ThefollowingtableliststheSTPcostassociatedwitheachnetworktechnologyspeed.Noticein
thetablethatthedatarateisinverselyproportionaltotheSTPcost.
NetworkSpeedsand
STPCosts
DataRate
STPCost
4Mbps
5,000,000
10Mbps
2,000,000
16Mbps
1,250,000
100Mbps
200,000
1Gbps
20,000
2Gbps
10,000
10Gbps
2,000
Inthefollowingfigure,alltheRootPortsareidentified.Intheeventthataswitchhastwopathsto
theRootBridgeandeachpathhasthesamecost,thentheswitchwilllookattheBPDUframes
fromitsclosetneighboroneachofthepaths.TheswitchwilldesignateitsRootPortbasedonthe
neighborwiththelowestBridgeID.
http://www.dummies.com/howto/content/spanningtreeprotocolstpintroduction.html
2/4
14/07/2016
SpanningTreeProtocol(STP)IntroductionForDummies
IdentifyingDesignatedPorts
EachswitchknowstheleastcostpathtotaketogettotheRootBridge,whichmayrequirepassing
datatoanotherswitch'sinterface.Forthesakeofthisexample,themainswitchthatisbeingused
intheexamplethereferenceswitchanditsneighbortheneighborswitch.Theportonthenext
closestswitch(neighborswitch)totheRootBridgethatisfacingthereferenceswitchiscalled
theDesignatedPort.
ThereferenceswitchwillusetheDesignatedPortasitspathtogettotheRootBridge.The
followingfigureidentifiesalltheDesignatedPortsthatthedownstreamswitcheswillusetosend
datatotheRootBridge.
BlockingLoops
Youstillhaveoneoutstandingproblemtoresolve.Therearestillloopsonthisnetworkthat
threatentobringthecurrentnetworkdownhowever,byworkingthroughhowalltheRootPorts
andDesignatedPortsareassigned,youhaveactuallycompletedtheworktoresolvetheloop
issueonthenetwork.
Inthefigureimmediatelyprecedingthissection,onlytwoportsareusedtoconnecttoneighboring
switchesthatareneitherRootPortsnorDesignatedPorts.Becausetheseportsdonothaveeither
http://www.dummies.com/howto/content/spanningtreeprotocolstpintroduction.html
3/4
14/07/2016
SpanningTreeProtocol(STP)IntroductionForDummies
roleassignedtothem,theyarepartofalooponthenetwork.Ifyoureviewthefigure,youshould
beabletoidentifytheloopsonthenetwork.Toresolvetheloopissue,STPputstheseports
withoutaroleintoBlockingstate,whichmeanstheseareBlockingPorts.
BlockingPortsareportsthatdonotallowtraffictobesentorreceivedthroughtheportitis
blockingthetraffic.Essentially,youcouldsaythattheBlockingPortshavebeendisabled,butthey
arenotdisabled.Sincetheportsarenotdisabled,theswitchontheotherendofthelinkstillsees
thelinkasactive,butframesthataresentoverthatlink(excludingBPDUframes)aredropped
(blocked).
ThefollowingfigureshowsyouthecompletedSTPdiagram,includingtheBlockingPorts.
http://www.dummies.com/howto/content/spanningtreeprotocolstpintroduction.html
4/4