Transcription of Cisco Switch Command Reference - Spanning Tree …
1 SpanningTree Commands Spanning -treebpdu (Global), on page 2 Spanning -treeforward-time, on page 3 Spanning -treehello-time, on page 4 Spanning -treeloopback-guard, on page 5 Spanning -treemax-age, on page 6 Spanning -treemode, on page 7 Spanning -treemst configuration, on page 8 Spanning -treemst max-hops, on page 9 Spanning -treemst port-priority, on page 10 Spanning -treepathcostmethod, on page 11 Spanning -treepriority, on page 12 Spanning -treeenable, on page 13 Spanning -treebpdu (Interface), on page 14 Spanning -treebpduguard, on page 15 Spanning -treecost, on page 16 Spanning -treeguardroot, on page 17 Spanning -treelink-type, on page 18 Spanning -treeport-priority, on page 19 Spanning -treeportfast, on page 20 showspanning- tree , on page 21 showswitchspanning- tree , on page 22 SpanningTree Commands1spanning-treebpdu(Global)To defineBridgeProtocolData Unit (BPDU)
2 Handlingwhenthe spanningtree is disabledgloballyor on asingleinterface,use thespanning-treebpducommandin restorethe defaultconfiguration,use thenoform of this {filtering|flooding}nospanning-treebpduS yntaxDescriptionSpecifiesthat BPDU packetsare filteredwhenthe spanningtree is disabledon an untaggedBPDU packetsare floodedunconditionally(withoutapplyingVL AN rules)to all ports wherespanningtree is disabledand the BPDU handlingmodeis defaultsettingis (config- Switch )CommandHistoryModificatio nReleaseThis commandwas filteringand floodingmodesare relevantwhenthe spanningtree is disabledgloballyor on a followingexamplesets the BPDU packethandlingmodeto floodingwhenthe spanningtree isdisabledon an interface.
3 Nfvis(config- Switch )# Spanning -treebpdufl oodingnfvis(config- Switch )#commitnfvis(c onfig- Switch )#endSpanningTree Commands2 SpanningTree Commandsspanning-treebpdu(Global)spannin g-treeforward-timeTo configurethe Spanning -treebridgeforwardtime, whichis the amountof time a port remainsin the listeningand learningstatesbeforeenteringthe forwardingstate,use restorethe defaultconfiguration,use thenoform of this Spanning -treeforwardtime in rangeis from 4 to secondsCommandModesSwitchconfiguration(c onfig- Switch )CommandHistoryModificationR eleaseThis commandwas forwardingtime,the followingrelationshipshouldbe maintained:2 * (Forward-Time - 1) >= Max-Age>= 2 * (Hello-Time + 1)ExampleThe followingexampleconfiguresthe spanningtree bridgeforwardingtime to 25 seconds.
4 Nfvis(config- Switch )# Spanning -treeforwar d-time25nfvis(config- Switch )#commitnfvis (config- Switch )#endSpanningTree Commands3 SpanningTree Commandsspanning-treeforward-timespannin g-treehello-timeTo configurehow often the devicebroadcastsHellomessagesto other devices,use thespanning- tree hello-timecommandin restorethe defaultconfiguration,use thenoform of this commandspanning-treehello-timesecondsnos panning-treehello-timeSyntaxDescriptionS pecifiesthe Spanning -treeHellotime in from 1 to secondsCommandModesSwitchconfiguration(c onfig- Switch )CommandHistoryModificationR eleaseThis commandwas Hellotime,the followingrelationshipshouldbe maintained:Max-Age>= 2*(Hello-Time + 1)ExampleThe followingexampleconfiguresthe Spanning -treebridgehello time to 5 seconds.
5 Nfvis(config- Switch )# Spanning -treehello- time5nfvis(config- Switch )#commitnfvis(co nfig- Switch )#endSpanningTree Commands4 SpanningTree Commandsspanning-treehello-timespanning- treeloopback-guardTo shut downan interfaceif it receivesa loopbackBPDU,use thespanning- tree loopback-guardcommandin returnto the defaultsetting,use thenoform of this commandhas no (config- Switch )CommandHistoryModificatio nReleaseThis commandwas enablesshuttingdownall interfacesif a loopbackBPDUis receivedon (config- Switch )# Spanning -treeloopback-gu ardnfvis(config- Switch )#commitnfvis(conf ig- Switch )#endSpanningTree Commands5 SpanningTree Commandsspanning-treeloopback-guardspann ing-treemax-ageTo configurethe STP maximumage, use thespanning- tree max-agecommandin restorethe defaultconfiguration,use thenoform of this Spanning -treebridgemaximumage in rangeis from 6 to 40secondsCommandDefault20 (config- Switch )CommandHistoryModificatio nReleaseThis commandwas maximumage, the followingrelationshipsshouldbe maintained.
6 2*(Forward-Time - 1) >= Max-AgeMax-Age>= 2*(Hello-Time + 1)ExampleThe followingexamplesets the Spanning -treebridgemaximumage to 10 (config- Switch )# Spanning -treemax-age10nf vis(config- Switch )#commitnfvis(config-sw itch)#endSpanningTree Commands6 SpanningTree Commandsspanning-treemax-agespanning-tre emodeTo selectwhichSpanningTree Protocol(STP)protocolto run, use restorethe defaultconfiguration,use thenoform of this {stp|rstp|mst}nospanning-treemodeSyntaxD escriptionSpecifiesthat STP is the RapidSTP is the MultipleSTP is (config- Switch )CommandHistoryModificatio nReleaseThis commandwas RSTP mode,the deviceuses STP whenthe neighbordeviceuses MSTP mode,the deviceuses RSTP whenthe neighbordeviceuses RSTP, and uses STP whenthe neighbordeviceuses followingexampleenablesSTP:nfvis(config- Switch )# Spanning -treemodestpnfvis(config - Switch )#commitnfvis(config- Switch )#endE xampleThe followingexampleenablesMST.
7 Nfvis(config- Switch )# Spanning -treemodems tnfvis(config- Switch )#commitnfvis(config - Switch )#endSpanningTree Commands7 SpanningTree Commandsspanning-treemodespanning-treems t configurationUse thespanning-treemstconfigurationcommandt o enableconfiguringan MSTregionby (config- Switch )CommandHistoryModificatio nReleaseThis commandwas two or moreswitchesto be in the sameMSTregion,they must containthe sameVLAN mapping,thesameconfigurationrevisionnumb er, and the followingexampleconfiguresan (config- Switch )# Spanning -treemst configurationnfvis(config- Switch -mst)#in stance1 vlan15nfvis(config- Switch -mst)#namemst_t estnfvis(config- Switch -mst)#revision2nfv is(config- Switch -mst)#commitSpanningTree Commands8 SpanningTree Commandsspanning-treemst configurationspanning-treemst max-hopsUse thespanning-treemstmax-hopscommandto configurethe numberof hops in an MSTregionbeforethe BDPUis discardedand the port informationis aged out.
8 Use the no form of this commandto numberof hops in an MSTregionbeforethe BDPUis rangeisfrom 1 to defaultnumberof hops is (config- Switch )CommandHistoryModificatio nReleaseThis commandwas followingexampleconfiguresthe maximumnumberof hops that a packettravelsin an MSTregionbeforeit is discardedto (config- Switch )# Spanning -treemst max-hops10nfvis(config- Switch )#commitSpa nningTree Commands9 SpanningTree Commandsspanning-treemst max-hopsspanning-treemst port-priorityUse thespanning-treemstport-prioritycommandt o configurethe priorityof a port. Use the no form ofthis commandto restorethe spanningtree instanceID.
9 Valid rangeis from 1 to port priority. Valid rangeis from 0 to 240 in multiplesof defaultport priorityis (config- Switch )CommandHistoryModificatio nReleaseThis commandwas priorityvaluemust be a multipleof followingexampleconfiguresthe port priority:nfvis(config- Switch )#interfaceg igabitEthernet1/1nfvis(config- Switch -if) # Spanning -treemst 1 port-priority96nfvis(config- Switch -if)#s panning-treemst 1 cost2nfvis(config- Switch -if)#commitSpann ingTree Commands10 SpanningTree Commandsspanning-treemst port-priorityspanning-treepathcostmethod To set the defaultpath cost method,use thespanning-treepathcostmethodin returnto the defaultconfiguration,use thenoform of this {long|short}nospanning-treepathcostmetho dSyntaxDescriptionUse 32-bitbasedvaluesfor defaultport path 16-bitbasedvaluesfor defaultport path cost (config- Switch )CommandHistoryModificatio nReleaseThis commandwas commandappliesto all the spanningtree instanceson the Switch .
10 If the short methodis selected,the switchcalculatesthe defaultcost as 100. If the long methodis selected,the switchcalculatesthe defaultcost as followingexamplesets the defaultpath cost methodto (config- Switch )# Spanning -treepathcostmet hodlongnfvis(config- Switch )#commitnfvis( config- Switch )#endSpanningTree Commands11 SpanningTree Commandsspanning-treepathcostmethodspann ing-treepriorityTo configurethe deviceSTP priority, whichis used to determinewhichbridgeis selectedas the root bridge,use thespanning-treeprioritycommandin restorethe defaultdevicespanning-treepriority, use thenoform of this commandspanning-treepriorityprioritynosp anning-treeprioritySyntaxDescriptionSpec ifiesthe bridgepriority.