© Copyright Lenovo 2017 Chapter 10: Spanning Tree Protocols 175
Port Priority
Theportpriorityhelpsdeterminewhichbridgeportbecomestherootportorthe
designatedport.Thecasefortherootportiswhentwoswitchesareconnected
usingaminimumoftwolinkswiththesamepath‐cost.Thecaseforthedesignated
portisinanetworktopologythat
hasmultiplebridgeportswiththesame
path‐costconnectedtoasinglesegment,theportwiththelowestportpriority
becomesthedesignatedportforthesegment.
Usethefollowingcommandstoconfiguretheportpriority:
wherepriorityvalueisanumberfrom0to240,inincrementsof
16(suchas0,16,32,
andsoon).Ifthespecifiedpriorityvalueisnotevenlydivisibleby16,thevaluewill
beautomaticallyroundeddowntothenearestvalidincrementwhenevermanually
changedintheconfiguration.
Root Guard
Therootguardfeatureprovidesawaytoenforcetherootbridgeplacementinthe
network.ItkeepsanewdevicefrombecomingrootandtherebyforcingSTP
re‐convergence.Ifaroot‐guardenabledportdetectsarootdevice,thatportwillbe
placedinablockedstate.
Youcan
configuretherootguardattheportlevelusingthefollowingcommands:
Thedefaultstateisnone(disabled).
Loop Guard
Ingeneral,STP resolvesredundantnetworktopologiesintoloop‐freetopologies.
Theloopguardfeatureperformsadditionalcheckingtodetectloopsthatmightnot
befoundusingSpanningTree.STPloopguardensuresthatanon‐designatedport
doesnotbecomeadesignatedport.
Togloballyenableloopguard,enterthe
followingcommand:
Note: Thegloballoopguardcommandwillbeeffectiveonaportonlyifthe
port‐levelloopguardcommandissettodefaultasshownbelow:
CN 4093(config-if)# spanning-tree guard loop none
Toenableloopguardattheportlevel,enterthefollowingcommand:
Thedefaultstateis“none”,i.e.disabled.
CN 4093(config)# interface port <portaliasornumber>
CN 4093(config-if)# spanning-tree stp <1‐128> priority <0‐65535>
CN 4093(config)# interface port <portaliasornumber>
CN 4093(config-if)# spanning-tree guard root
CN 4093(config)# spanning-tree loopguard
CN 4093(config)# interface port <portaliasornumber>
CN 4093(config-if)# spanning-tree guard loop