Sei sulla pagina 1di 56

16

Spanning Tree Commands


Overview
ThischapterdescribestheSpanningTreeConfigurationsetofcommandsandhowtousethem. Thecommandsareseparatedintotwogroups.Thefirstgroupofcommandsareusedtoreview andsetspanningtreebridgeparameters.Thesecondgroupofcommandsareusedtoreviewand setspanningtreeportparameters. For information about...
Reviewing and Setting Spanning Tree Bridge Parameters Reviewing and Setting Spanning Tree Port Parameters

Refer to page...
16-1 16-38

Reviewing and Setting Spanning Tree Bridge Parameters


Purpose
TheseswitchcommandsareusedtodisplayandsetSpanningTreebridgeparameters,including devicepriorities,hellotime,maximumwaittime,forwarddelay,pathcost,topologychangetrap suppression,andtransmitholdcount.

Commands
ThecommandsusedtoreviewandsetSpanningTreebridgeparametersarelistedbelow. For information about...
show spantree stats show spantree version set spantree version clear spantree version set spantree stpmode clear spantree stpmode show spantree mstilist set spantree msti clear spantree msti

Refer to page...
16-4 16-6 16-6 16-7 16-8 16-8 16-9 16-9 16-10
Matrix X Router Command Line Interface Reference Guide 16-1

Reviewing and Setting Spanning Tree Bridge Parameters

For information about...


show spantree mstmap set spantree mstmap clear spantree mstmap show spantree vlanlist show spantree mstcfgid set spantree mstcfgid clear spantree mstcfgid set spantree priority clear spantree priority show spantree bridgehellomode set spantree bridgehellomode clear spantree bridgehellomode set spantree hello clear spantree hello set spantree maxage clear spantree maxage set spantree fwddelay clear spantree fwddelay show spantree autoedge set spantree autoedge clear spantree autoedge show spantree legacypathcost set spantree legacypathcost clear spantree legacypathcost show spantree tctrapsuppress set spantree tctrapsuppress clear spantree tctrapsuppress show spantree txholdcount set spantree txholdcount clear spantree txholdcount set spantree maxhops clear spantree maxhops show spantree spanguard set spantree spanguard

Refer to page...
16-10 16-11 16-11 16-12 16-12 16-14 16-15 16-15 16-16 16-17 16-17 16-18 16-18 16-19 16-20 16-20 16-21 16-22 16-22 16-23 16-23 16-24 16-24 16-25 16-25 16-26 16-27 16-27 16-28 16-28 16-29 16-29 16-30 16-30

16-2

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

For information about...


clear spantree spanguard show spantree spanguardtimeout set spantree spanguardtimeout clear spantree spanguardtimeout show spantree spanguardlock clear spantree spanguardlock set spantree spanguardlock clear spantree default show spantree debug clear spantree debug

Refer to page...
16-31 16-31 16-32 16-32 16-33 16-33 16-34 16-35 16-35 16-37

Matrix X Router Command Line Interface Reference Guide

16-3

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree stats


ThiscommanddisplaysSpanningTreeinformationforoneormoreports.

Syntax
show spantree stats [port port-string] [sid sid] [active]

Parameters
port portstring sidsid active (Optional)Displaysinformationforthespecifiedports.Foradetailed descriptionofpossibleportstringvalues,refertoPortStringsUsedinthe CLIonpage 102. (Optional)DisplaysinformationforaspecificSpanningTreeidentifier.If notspecified,SID0isassumed. (Optional)DisplaysinformationforportsthathavereceivedSTPBPDUs sinceboot.

Defaults
Ifportstringisnotspecified,noportinformationwillbedisplayed. Ifsidisnotspecified,informationforSpanningTree0willbedisplayed. Ifactiveisnotspecified,informationforallspecifiedportswillbedisplayedregardlessof whetherornottheyhavereceivedBPDUs.

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaysthedevicesSpanningTreeconfiguration.
matrix-x(switch-su)-> show spantree stats Spanning tree status Spanning tree instance Designated Root MacAddr Designated Root Priority Designated Root Cost Designated Root Port Root Max Age Root Hello Time Root Forward Delay Bridge ID MAC Address Bridge ID Priority Bridge Max Age Bridge Hello Time Bridge Forward Delay Topology Change Count Time Since Top Change Max Hops enabled 0 00-00-1d-00-00-01 32768 0 0 20 sec 2 sec 15 sec 00-00-1d-00-00-01 32768 20 sec 2 sec 15 sec 0 00 days 00:08:53 20

Thefollowingtableshowsadetailedexplanationofcommandoutput.
16-4 Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

Output
Spanning tree instance Spanning tree status Designated Root MacAddr Designated Root Priority Designated Root Cost Designated Root Port Root Max Age Root Hello Time

What It Displays...
Spanning Tree ID. Mode currently enabled. MAC address of the designated Spanning Tree root bridge. Priority of the designated root bridge. Total path cost to reach the root. Port through which the root bridge can be reached. Amount of time (in seconds) a BPDU packet should be considered valid. Interval (in seconds) at which the root device sends BPDU (Bridge Protocol Data Unit) packets. The device with the highest priority becomes the STA root device. Amount of time (in seconds) the root device spends in listening or learning mode. Unique bridge MAC address, recognized by all bridges in the network. Bridge priority, which is a default value, or is assigned using the set spantree priority command. Maximum time (in seconds) the bridge can wait without receiving a configuration message (bridge hello) before attempting to reconfigure. This is a default value, or is assigned using the set spantree maxage command. Amount of time (in seconds) the bridge sends BPDUs. This is a default value, or is assigned using the set spantree hello command. Amount of time (in seconds) the bridge spends in listening or learning mode. This is a default value, or is assigned using the set spantree fwddelay command. Number of times topology has changed on the bridge. Amount of time (in days, hours, minutes and seconds) since the last topology change. The maximum number of hops that the information for a particular Spanning Tree instance may traverse (via relay of BPDUs within the applicable MST region) before being discarded. This is a default value or is assigned using the set spantree maxhops command.

Root Forward Delay Bridge ID MAC Address Bridge ID Priority Bridge Max Age

Bridge Hello Time Bridge Forward Delay

Topology Change Count Time Since Top Change Max Hops

Matrix X Router Command Line Interface Reference Guide

16-5

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree version


ThiscommanddisplaysthecurrentversionoftheSpanningTreeprotocolrunningonthedevice.

Syntax
show spantree version

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaysSpanningTreeversioninformationforthedevice.
matrix-x(switch-su)-> show spantree version Force Version is mstp

set spantree version


ThiscommandsetstheversionoftheSpanningTreeprotocoltoMSTP(MultipleSpanningTree Protocol),RSTP(RapidSpanningTreeProtocol)ortoSTP802.1Dcompatible.

Syntax
set spantree version {mstp | stpcompatible | rstp}

Parameters
mstp stpcompatible rstp SetstheversiontoSTP802.1scompatible. SetstheversiontoSTP802.1Dcompatible. Setstheversionto802.1wcompatible.

Defaults
MSTP.

Mode
Switchcommand,readwrite

16-6

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

Usage
Inmostnetworks,SpanningTreeversionshouldnotbechangedfromitsdefaultsettingofmstp (MultipleSpanningTreeProtocol)mode.MSTPmodeisfullycompatibleandinteroperablewith legacySTP802.1DandRapidSpanningTree(RSTP)bridges.Settingtheversiontostpcompatible modewillcausethebridgetotransmitonly802.1DBPDUs,andwillpreventnonedgeportsfrom rapidlytransitioningtoforwardingstate.

Example
ThefollowingexamplegloballychangestheSpanningTreeversionfromthedefaultofMSTPto RSTP.
matrix-x(switch-su)->set spantree version rstp

clear spantree version


ThiscommandresetstheSpanningTreeversiontoMSTPmode.

Syntax
clear spantree version

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
ThefollowingexampleresetstheSpanningTreeversion.
matrix-x(switch-su)->clear spantree version

Matrix X Router Command Line Interface Reference Guide

16-7

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree stpmode


ThiscommandgloballyenablesordisablestheSpanningTreeProtocol(STP)mode.

Syntax
set spantree stpmode {none | ieee8021}

Parameters
none ieee8021

DisablesSpanningTree. Enables802.1SpanningTreemode.

Defaults
IEEE802.1

Mode
Switchcommand,readwrite.

Example
ThefollowingexampledisablesSpanningTree.
matrix-x(switch-su)->set spantree stpmode none

clear spantree stpmode


ThiscommandresetstheSpanningTreeprotocolmodetothedefaultsettingofIEEE802.1.This reenablesSpanningTree.

Syntax
clear spantree stpmode

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
ThefollowingexampleresetstheSTPmodetoIEEE802.1.
matrix-x(switch-su)->clear spantree stpmode

16-8

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree mstilist


ThiscommanddisplaysalistofMultipleSpanningTree(MST)instancesconfiguredonthedevice.

Syntax
show spantree mstilist

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly.

Example
Thisexampleshowsspanningtreeinstance2hasbeenconfigured:
matrix-x(switch-su)-> show spantree mstilist Configured Multiple Spanning Tree Instances: 2

set spantree msti


ThiscommandcreatesordeletesaMultipleSpanningTreeinstance.

Syntax
set spantree msti sid {create | delete}

Parameters
sid SetstheMultipleSpanningTreeID.Validvaluesare14094. MatrixXRoutersupportsupto32MSTinstances. create|delete CreatesordeletesanMSTinstance.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
ThefollowingexamplecreatesMSTinstance2:
matrix-x(switch-su)-> set spantree msti 2 create

Matrix X Router Command Line Interface Reference Guide

16-9

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree msti


ThiscommanddeletesoneormoreMultipleSpanningTreeinstances.

Syntax
clear spantree msti [sid]

Parameters
sid (Optional)DeletesaspecificmultipleSpanningTreeID.

Defaults
Ifsidisnotspecified,allMSTinstanceswillbecleared.

Mode
Switchcommand,readwrite.

Example
ThefollowingexampledeletesallMSTinstances.
matrix-x(switch-su)-> clear spantree msti

show spantree mstmap


ThiscommanddisplaysthemappingofafilteringdatabaseID(FID)toaSpanningTrees.Since VLANsaremappedtoFIDs,thisshowstowhichSIDaVLANismapped.

Syntax
show spantree mstmap [fid fid]

Parameters
fidfid (Optional)DisplaysinformationforspecificFIDs.Thevalueoffidcan rangefrom2to4094.

Defaults
Iffidisnotspecified,informationforallassignedFIDswillbedisplayed.

Mode
Switchcommand,readonly.

Usage
Onlynondefaultmappingsaredisplayedbythiscommand.Thatis,nothingmappedtosid0is displayed.

Example
ThefollowingexampledisplaysallnondefaultSIDtoFIDmappinginformation.
16-10 Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

matrix-x(switch-su)-> show spantree mstmap Fid 20 is mapped to Sid 3 Fid 40 is mapped to Sid 3 Fid 60 is mapped to Sid 10

set spantree mstmap


ThiscommandmapsafilteringdatabaseID(FID)toaSID.SinceVLANsaremappedtoFIDs,this essentiallymapsoneormoreVLANIDstoaSpanningTree(SID).

Syntax
set spantree mstmap fid [sid sid]

Parameters
fid sidsid SpecifiesoneorarangeofFIDstoassigntotheMST,rangingfrom1to4094,and mustcorrespondtoaVLANIDcreatedusingthesetvlancreatecommand. (Optional)SpecifiesaMultipleSpanningTreeID,rangingfrom1to4094,andmust correspondtoaSIDcreatedusingthesetspantreemsticommand.

Defaults
Ifsidisnotspecified,FID(s)willbemappedtoSpanningTree0.

Mode
Switchcommand,readwrite.

Example
ThefollowingexamplemapsFID3toSID2.
matrix-x(switch-su)-> set spantree mstmap 3 sid 2

clear spantree mstmap


ThiscommandmapsaFIDbacktoSID0.

Syntax
clear spantree mstmap fid

Parameters
fid

SpecifiesoneormoreFIDstoresetto0,rangingfrom2to4094.

Defaults
Iffidisnotspecified,allSIDtoFIDmappingswillbereset.

Matrix X Router Command Line Interface Reference Guide

16-11

Reviewing and Setting Spanning Tree Bridge Parameters

Mode
Switchcommand,readwrite.

Example
ThefollowingexamplemapsFID2backtoSID0:
matrix-x(switch-su)-> clear spantree mstmap 2

show spantree vlanlist


ThiscommanddisplaystheSpanningTreeIDsassignedtooneormoreVLANs.

Syntax
show spantree vlanlist [vlan-list]

Parameters
vlan-list

(Optional)DisplaysVLANsassignedtospecificSIDs.

Defaults
Ifnotspecified,SIDassignmentwillbedisplayedforallVLANs.

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaystheSIDsmappedtoVLAN2.Inthiscase,SID2ismappedto VLAN2.Forthisinformationtodisplay,theSIDinstancemustbecreatedusingthesetspantree msticommandandtheFIDsmustbemappedtoSID2usingthesetspantreemstmapcommand.
matrix-x(switch-su)-> show spantree vlanlist 2 Vlan 2 is mapped to Sid 2

show spantree mstcfgid


ThiscommanddisplaystheMSTconfigurationidentifierelements,includingformatselector, configurationname,revisionlevel,andconfigurationdigest.

Syntax
show spantree mstcfgid

Parameters
None.

Defaults
None.

16-12

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaystheMSTconfigurationidentifierelements.Inthiscase,thedefault revisionlevelof0,andthedefaultconfigurationname(astringrepresentingthebridgeMAC address)havenotbeenchanged.Refertothesetspantreemstcfgidcommandforinformationon changingthesesettings.

Matrix X Router Command Line Interface Reference Guide

16-13

Reviewing and Setting Spanning Tree Bridge Parameters

matrix-x(switch-su)-> show spantree mstcfgid MST Configuration Identifier: Format Selector: 0 Configuration Name: 00:01:f4:89:51:94 Revision Level: 0 Configuration Digest: ac:36:17:7f:50:28:3c:d4:b8:38:21:d8:ab:26:de:62

set spantree mstcfgid


ThiscommandsetstheMSTconfigurationnameand/orrevisionlevel.

Syntax
set spantree mstcfgid {cfgname name | rev level}

Parameters
cfgnamename revlevel SpecifiesanMSTconfigurationname. SpecifiesanMSTrevisionlevel.Validvaluesare065535.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
ThefollowingexamplesetstheMSTconfigurationnametomstconfig.
matrix-x(switch-su)#set spantree mstconfigid cfgname mstconfig

16-14

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree mstcfgid


ThiscommandresetstheMSTrevisionleveltoadefaultvalueof0,andtheconfigurationnameto adefaultstringrepresentingthebridgeMACaddress.

Syntax
clear spantree mstcfgid

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
ThefollowingexampleresetstheMSTconfigurationidentifierelementstodefaultvalues.
matrix-x(switch-su)#clear spantree mstcfgid

set spantree priority


ThiscommandsetsthedevicesSpanningTreepriority.

Syntax
set spantree priority priority [sid]

Parameters
priority sid

Specifiesthepriorityofthebridge,rangingfrom0to65535(inincrementsof4096), with0indicatinghighpriorityand65535lowpriority. (Optional)SpeicifesaspecificSpanningTreeinstance.Ifnotspecified,SID0is assumed.Validvaluesrangefrom0to4094.

Defaults
32768priority Ifsidisnotspecified,prioritywillbesetonSpanningTree0.

Mode
Switchcommand,readwrite

Usage
ThedevicewiththehighestprioritybecomestheSpanningTreerootdevice.Ifalldeviceshavethe samepriority,thedevicewiththelowestMACaddresswillthenbecometherootdevice.
Matrix X Router Command Line Interface Reference Guide 16-15

Reviewing and Setting Spanning Tree Bridge Parameters

Example
Thefollowingexamplesetsthebridgepriorityto4096onSID1.
matrix-x(switch-su)->set spantree priority 4096 1

clear spantree priority


ThiscommandresetstheSpanningTreeprioritytothedefaultvalueof32768.

Syntax
clear spantree priority [sid]

Parameters
sid

(Optional)SpecifiesthespecificSpanningTreeinstancetoreset priorityon.Ifnotspecified,SID0isassumed.Validvaluesrangefrom 0to4094.

Defaults
Ifsidisnotspecified,prioritywillberesetonSpanningTree0.

Mode
Switchcommand,readwrite.

Example
ThefollowingexampleresetsthebridgepriorityonSID1.
matrix-x(switch-su)->clear spantree priority 1

16-16

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree bridgehellomode


Thiscommanddisplaysthestatusofbridgehellomodeonthedevice.Whenenabled,asingle bridgeadministrativehellotimeisbeingused.Whendisabled,perportadministrativehellotimes arebeingused.

Syntax
show spantree bridgehellomode

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaystheSpanningTreebridgehellomode.Inthiscase,asinglebridge hellomodehasbeenenabledusingthesetspantreebridgehellomodecommand.
matrix-x(switch-su)->show spantree bridgehellomode Bridge Hello Mode is currently enabled.

set spantree bridgehellomode


Thiscommandenablesordisablesbridgehellomodeonthedevice.

Syntax
set spantree bridgehellomode {enable | disable}

Parameters
enable
disable

EnablessingleSpanningTreebridgehellomode. DisablessingleSpanningTreebridgehellomode,allowingforthe configurationofperporthellotimes.

Defaults
Enabled.

Mode
Switchcommand,readwrite.

Matrix X Router Command Line Interface Reference Guide

16-17

Reviewing and Setting Spanning Tree Bridge Parameters

Usage
Whenbridgehellomodeisenabled,asinglebridgeadministrativehellotimeisused.When bridgehellomodeisdisabled,perportadministrativehellotimesareused.Perporthellotimes canbeconfiguredusingthesetspantreeporthellocommand.

Example
ThefollowingexampledisablessingleSpanningTreehellomodeonthedevice.Perporthello timescannowbeconfiguredusingthesetspantreeporthellocommand:
matrix-x(switch-su)->set spantree bridgehellomode disable

clear spantree bridgehellomode


ThiscommandresetstheSpanningTreeadministrativehellomodetoenabled.

Syntax
clear spantree bridgehellomode

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
ThefollowingexampleresetstheSpanningTreebridgehellomodetoenabled:
matrix-x(switch-su)#clear spantree bridgehellomode

set spantree hello


ThiscommandsetsthedevicesSpanningTreehellointerval.

Syntax
set spantree hello sec

Parameters
sec

Specifiestheintervalinsecondsthesystemwaitsbeforebroadcastingabridgehello message(amulticastmessageindicatingthatthesystemisactive).Validvalues rangefrom1to10seconds.

Defaults
2seconds.
16-18 Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

Mode
Switchcommand,readwrite

Usage
TheSpanningTreehellotimeisthetimeinterval(inseconds)thedevicewaitsbetween transmissionsofBPDUsindicatingitisactive.

Example
ThefollowingexamplegloballysetstheSpanningTreehellotimeto10seconds:
matrix-x(switch-su)->set spantree hello 10

clear spantree hello


ThiscommandresetstheSpanningTreehellotimetothedefaultvalueof2seconds.

Syntax
clear spantree hello

Parameters
None

Defaults
None

Mode
Switchcommand,readwrite

Example
ThefollowingexamplegloballyresetstheSpanningTreehellointerval:
matrix-x(switch-su)->clear spantree hello

Matrix X Router Command Line Interface Reference Guide

16-19

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree maxage


ThiscommandsetsthemaximumageofaBPDUmessagebeforethemessagetimesout.

Syntax
set spantree maxage age

Parameters
age

Specifiesthemaximumintervalinsecondsthatthesystemretainsdata receivedfromotherbridgesthroughSTP.Validvaluesrangefrom6to40 seconds.

Defaults
20seconds.

Mode
Switchcommand,readwrite

Usage
Thebridgemaximumagingtimeisthemaximumtime(inseconds)adevicecanwaitwithout receivingaconfigurationmessage(bridgehello)beforeattemptingtoreconfigure.Alldevice ports(exceptfordesignatedports)shouldreceiveconfigurationmessagesatregularintervals. AnyportthatagesoutSTPinformationprovidedinthelastconfigurationmessagebecomesthe designatedportfortheattachedLAN.Ifitisarootport,anewrootportisselectedfromamong thedeviceportsattachedtothenetwork.

Example
Thefollowingexamplesetsthemaximumagingtimeto25seconds:
matrix-x(switch-su)-> set spantree maxage 25

clear spantree maxage


ThiscommandresetsthemaximumagebeforeaBPDUmessagetimesouttothedefaultvalueof 20seconds.

Syntax
clear spantree maxage

Parameters
None.

Defaults
None.

16-20

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

Mode
Switchcommand,readwrite

Example
Thefollowingexamplegloballyresetsthemaximumagingtime:
matrix-x(switch-su)-> clear spantree maxage

set spantree fwddelay


ThiscommandsetstheSpanningTreeforwarddelay.

Syntax
set spantree fwddelay interval

Parameters
interval

Setstheintervalforthebridgeforwarddelayinseconds.Validvaluesrangefrom4 to30seconds.

Defaults
15seconds.

Mode
Switchcommand,readwrite

Usage
Theforwarddelayvalueisthemaximumtime(inseconds)therootdevicewillwaitbefore changingstates(thatis,fromlisteningstatetolearningstatetoforwardingstate).Thisdelayis requiredbecauseeverydevicemustreceiveinformationabouttopologychangesbeforeitstartsto forwardframes.Inaddition,eachportneedstimetolistenforconflictinginformationthatwould makeitreturntoablockingstate;otherwise,temporarydataloopsmightresult.

Example
Thefollowingexamplegloballysetsthebridgeforwarddelayto16seconds:
matrix-x(switch-su)-> set spantree fwddelay 16

Matrix X Router Command Line Interface Reference Guide

16-21

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree fwddelay


ThiscommandresetstheSpanningTreeforwarddelaytothedefaultsettingof15seconds.

Syntax
clear spantree fwddelay

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite

Example
Thefollowingexamplegloballyresetsthebridgeforwarddelay:
matrix-x(switch-su)-> clear spantree fwddelay

show spantree autoedge


Thiscommanddisplaysthestatusofautomaticedgeportdetection.

Syntax
show spantree autoedge

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly

Example
Thefollowingexampledisplaysthestatusoftheautomaticedgeportdetectionfunction:
matrix-x(switch-su)-> show spantree autoedge Auto Edge is set to enable

16-22

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree autoedge


Thiscommandenablesordisablestheautomaticedgeportdetectionfunction.

Syntax
set spantree autoedge {disable | enable}

Parameters
disable|enable Disablesorenablesautomaticedgeportdetection.

Defaults
Thedefaultisenabled.

Mode
Switchcommand,readwrite

Example
Thefollowingexampledisablesautomaticedgeportdetection:
matrix-x(switch-su)-> set spantree autoedge disable

clear spantree autoedge


Thiscommandresetsautomaticedgeportdetectiontothedefaultstateofenabled.

Syntax
clear spantree autoedge

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite

Example
Thefollowingexampleresetsautomaticedgeportdetectiontoenabled:
matrix-x(switch-su)-> clear spantree autoedge

Matrix X Router Command Line Interface Reference Guide

16-23

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree legacypathcost


ThiscommanddisplaysthedefaultSpanningTreepathcostsetting.

Syntax
show spantree legacypathcost

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly

Example
ThefollowingexampledisplaysthedefaultSpanningTreepathcostsetting:
matrix-x(switch-su)-> show spantree legacypathcost Legacy Path Cost is disabled

set spantree legacypathcost


Thiscommandenablesordisableslegacy(802.1D)pathcostvalues.

Syntax
set spantree legacypathcost {disable | enable}

Parameters
disable|enable Enablesordisableslegacy(802.1D)pathcostvalues.

Defaults
Thedefaultisdisabled.

Mode
Switchcommand,readwrite

Usage
Bydefault,legacypathcostisdisabled.Enablingthedevicetocalculatelegacypathcostsaffects therangeofvalidvaluesthatcanbeenteredintheshowspantreeadminpathcostcommand.

Example
Thefollowingexamplesetsthedefaultpathcostvaluesto802.1D:
matrix-x(switch-su)-> set spantree legacypathcost enable
16-24 Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree legacypathcost


ThiscommandsetstheSpanningTreedefaultvalueforlegacypathcostto802.1tvalues.

Syntax
clear spantree legacypathcost

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite

Example
Thefollowingexamplesetsthedefaultpathcostvaluesto802.1t:
matrix-x(switch-su)-> clear spantree legacypathcost

show spantree tctrapsuppress


ThiscommanddisplaysthestatusoftopologychangetrapsuppressiononRapidSpanningTree edgeports.

Syntax
show spantree tctrapsuppress

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly

Example
Thefollowingexampledisplaysthestatusoftopologychangetrapsuppression:
matrix-x(switch-su)-> show spantree tctrapsuppress Topology change trap suppression is currently enabled.

Matrix X Router Command Line Interface Reference Guide

16-25

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree tctrapsuppress


ThiscommanddisablesorenablestopologychangetrapsuppressiononRapidSpanningTree edgeports.

Syntax
set spantree tctrapsuppress {disable | enable}

Parameters
disable|enable Disablesorenablestopologychangetrapsuppression.

Defaults
Enabled

Mode
Switchcommand,readwrite

Usage
Bydefault,RSTPnonedge(bridge)portsthattransitiontoforwardingorblockingcausethe switchtoissueatopologychangetrap.Whentopologychangetrapsuppressionisenabled,which isthedevicedefault,edgeports(suchasendstationPCs)arepreventedfromsendingtopology changetraps.Thisisbecausethereisusuallynoneedfornetworkmanagementtomonitoredge portSTPtransitionstates,suchaswhenPCsarepoweredon. Whentopologychangetrapsuppressionisdisabled,allports,includingedgeandbridgeports, willtransmittopologychangetraps.

Example
ThefollowingexampleallowsRapidSpanningTreeedgeportstotransmittopologychangetraps:
matrix-x(switch-su)# set spantree tctrapsuppress disable

16-26

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree tctrapsuppress


Thiscommandclearstopologychangetrapsuppressionsettings.

Syntax
clear spantree tctrapsuppress

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite

Example
Thefollowingexampleclearstopologychangetrapsuppressionsettings:
matrix-x(switch-su)# clear spantree tctrapsuppress

show spantree txholdcount


ThiscommanddisplaysthemaximumBPDUtransmissionrate.

Syntax
show spantree txholdcount

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly

Example
Thefollowingexampledisplaysthetransmitholdcountsetting:
matrix-x(switch-su)# show spantree txholdcount Tx hold count is 6

Matrix X Router Command Line Interface Reference Guide

16-27

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree txholdcount


ThiscommandsetsthemaximumBPDUtransmissionrate.ThisisthenumberofBPDUswhich willbetransmittedbeforetransmissionsaresubjecttoaonesecondtimer.

Syntax
set spantree txholdcount txholdcount

Parameters
txholdcount

SpecifiesthemaximumnumberofBPDUstobetransmittedbefore transmissionsaresubjecttoaonesecondtimer.Validvaluesare110. Defaultvalueis6.

Defaults
6

Mode
Switchcommand,readwrite

Example
Thefollowingexamplegloballysetsthetransmitholdcountto5:
matrix-x(switch-su)# set spantree txholdcount 5

clear spantree txholdcount


Thiscommandresetsthetransmitholdcounttothedefaultvalueof6.

Syntax
clear spantree txholdcount

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite

Example
Thefollowingexampleresetsthetransmitholdcount:
matrix-x(switch-su)# clear spantree txholdcount

16-28

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree maxhops


ThiscommandsetstheSpanningTreemaximumhopcount.Thisisthemaximumnumberofhops thattheinformationforaparticularSpanningTreeinstancemaytraverse(viarelayofBPDUs withintheapplicableMSTregion)beforebeingdiscarded.

Syntax
set spantree maxhops max_hop_count

Parameters
max_hop_count

Setsthemaximumnumberofhopsallowed,rangingfrom0to255.

Defaults
MaxHopcount:20

Mode
Switchcommand,readwrite.

Example
Thefollowingexamplesetsthemaximumhopcountto40:
matrix-x(switch-su)# set spantree maxhops 40

clear spantree maxhops


Thiscommandresetsthemaximumhopcounttothedefaultvalueof20.

Syntax
clear spantree maxhops

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
Thefollowingexampleresetsthemaximumhopcountto20:
matrix-x(switch-su)# clear spantree maxhops

Matrix X Router Command Line Interface Reference Guide

16-29

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree spanguard


ThiscommanddisplaysthestatusoftheSpanningTreespanguardfunction.

Syntax
show spantree spanguard

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly.

Example
Thefollowingexampledisplaysthespanguardfunctionstatus:
matrix-x(switch-su)# show spantree spanguard Span Guard is currently disabled

set spantree spanguard


ThiscommandenablesordisablestheSpanningTreespanguardfunction.

Syntax
set spantree spanguard {enable | disable}

Parameters
enable|disable Enablesordisablesthespanguardfunction.

Defaults
Disabled.

Mode
Switchcommand,readwrite.

Usage
Whenenabled,thisfunctionpreventsanunauthorizedbridgefrombecomingpartoftheactive SpanningTreetopology.ItdoesthisbydisablingaportthatreceivesaBPDUwhenthatporthas beendefinedasanedge(user)portwiththesetspantreeadminedgecommand.Thisportwill remaindisableduntiltheamountoftime,definedbythesetspantreespanguardtimeout command,haspassedsincethelastseenBPDUortheportismanuallyunlocked,withtheclear spantreespanguardlockcommand.

16-30

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

Example
Thefollowingexampleenablesthespanguardfunction:
matrix-x(switch-su)# set spantree spanguard enable

clear spantree spanguard


ThiscommandresetsthestatusoftheSpanningTreespanguardfunctiontodisabled.

Syntax
clear spantree spanguard

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
Thefollowingexampleresetsthestatusofthespanguardfunctiontodisabled:
matrix-x(switch-su)# clear spantree spanguard

show spantree spanguardtimeout


ThiscommanddisplaystheSpanningTreespanguardtimeoutsetting.

Syntax
show spantree spanguardtimeout

Parameters
None.

Defaults
None.

Mode
Switchcommand,readonly.

Example
Thefollowingexampledisplaysthespanguardtimeoutsetting:
matrix-x(switch-su)-> show spantree spanguardtimeout Span Guard Timeout is set at 300 seconds.
Matrix X Router Command Line Interface Reference Guide 16-31

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree spanguardtimeout


Thiscommandsetstheamountoftime(inseconds)anedgeportwillremainlockedbythespan guardfunction.

Syntax
set spantree spanguardtimeout timeout

Parameters
timeout

Specifiesatimeoutvalueinseconds.Validvaluesare0(forever)to 65535seconds.

Defaults
300seconds.

Mode
Switchcommand,readwrite.

Example
Thefollowingexamplesetsthespanguardtimeoutto600seconds:
matrix-x(switch-su)#set spantree spanguardtimeout 600

clear spantree spanguardtimeout


ThiscommandresetstheSpanningTreespanguardtimeouttothedefaultvalueof300seconds.

Syntax
clear spantree spanguardtimeout

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
Thefollowingexampleresetsthespanguardtimeoutto300seconds:
matrix-x(switch-su)#clear spantree spanguardtimeout

16-32

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree spanguardlock


Thiscommanddisplaysthespanguardlockstatusofoneormoreports.

Syntax
show spantree spanguardlock port port-string

Parameters
portport-string Specifiestheportsforwhichtoshowspanguardlockstatus.Fora detaileddescriptionofpossibleportstringvalues,refertoPortStrings UsedintheCLIonpage 102.

Defaults
None.

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaysthespanguardlockstatusfortheGigabitEthernetport1inslot4:
matrix-x(switch-su)#show spantree spanguardlock port ge.4.1 Span Guard status for port ge.4.1 is UNLOCKED.

clear spantree spanguardlock


ThiscommandunlocksoneormoreportslockedbytheSpanningTreespanguardfunction.

Syntax
clear spantree spanguardlock port-string

Parameters
port-string

Specifiesportstounlock.Foradetaileddescriptionofpossibleport stringvalues,refertoPortStringsUsedintheCLIonpage 102.

Defaults
None.

Mode
Switchcommand,readwrite.

Usage
Whenspanguardisenabled,itlocksportsthatreceiveBPDUswhenthoseportshavebeen definedasedge(user)ports(usingthesetspantreeadminedgecommand).Thecommandset spantreespanguardlockcanalsobeusedtoclearthespanguardlockonaport.

Matrix X Router Command Line Interface Reference Guide

16-33

Reviewing and Setting Spanning Tree Bridge Parameters

Example
ThefollowingexampleunlocksalltheGigabitEthernetportsinslot4:
matrix-x(switch-su)# clear spantree spanguardlock ge.4.*

set spantree spanguardlock


ThiscommandunlocksoneormoreportslockedbytheSpanningTreespanguardfunction.

Syntax
set spantree spanguardlock port-string

Parameters
port-string

Specifiesportstounlock.Foradetaileddescriptionofpossibleport stringvalues,refertoPortStringsUsedintheCLIonpage 102.

Defaults
None.

Mode
Switchcommand,readwrite.

Usage
Whenspanguardisenabled,itlocksportsthatreceiveBPDUswhenthoseportshavebeen definedasedge(user)ports(usingthesetspantreeadminedgecommand).Thecommandclear spantreespanguardlockcanalsobeusedtoclearthespanguardlockonaport.

Example
ThefollowingexampleunlocksalltheGigabitEthernetportsinslot4:
matrix-x(switch-su)# set spantree spanguardlock ge.4.*

16-34

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree default


ThiscommandrestoresdefaultvaluestoaSpanningTree.

Syntax
clear spantree default [sid]

Parameters
sid (Optional)RestoresdefaultsonaspecificSpanningTree.Validvaluesare0 4094.Ifnotspecified,SID0isassumed.

Defaults
Ifsidisnotspecified,defaultswillberestoredonSpanningTree0.

Mode
Switchcommand,readwrite

Example
ThefollowingexamplerestoresSpanningTreedefaultsonSID1:
matrix-x(switch-su)#clear spantree default 1

show spantree debug


ThiscommanddisplaysSpanningTreedebugcountersforoneormoreports.

Syntax
show spantree debug [port port-string] [sid sid] [active]

Parameters
portportstring (Optional)Displaysdebugcountersforspecificports.Foradetailed descriptionofpossibleportstringvalues,refertoPortStringsUsedinthe CLIonpage 102. (Optional)DisplaysthedebugcountersforaspecificSpanningTree identifier.Validvaluesare04094.Ifnotspecified,SID0isassumed. (Optional)Displaysonlythedebugcountersforportsthathavereceivedat leastoneconfigurationorRSTPBPDU.

sidsid active

Defaults
Ifportstringisnotspecified,debugcounterswillbedisplayedforallSpanningTreeports. Ifsidisnotspecified,debugcounterswillbedisplayedforSpanningTree0. Ifactiveisnotspecified,debugcounterswillbedisplayedforactiveandinactiveSpanning Treeports.

Matrix X Router Command Line Interface Reference Guide

16-35

Reviewing and Setting Spanning Tree Bridge Parameters

Mode
Switchcommand,readonly

Example
ThefollowingexampledisplaysSpanningTreedebugcountersforlinkaggregationport3,SID0:
matrix-x(switch-su)-> show spantree debug port lag.0.3 STP Diagnostic Common Counters for SID 0 ----------------------------------------Topology Change Count - 379 Message Expiration Count - 16 Invalid BPDU Count - 0 STP BPDU Rx Count - 3 STP BPDU Tx Count - 3 STP TCN BPDU Rx Count - 335 STP TCN BPDU Tx Count - 0 STP TC BPDU Rx Count - 0 STP TC BPDU Tx Count - 0 RST BPDU Rx Count - 81812 RST BPDU Tx Count - 790319 RST TC BPDU Rx Count - 2131 RST TC BPDU Tx Count - 26623 MST BPDU Rx Count - 0 MST BPDU Tx Count - 0 MST CIST TC BPDU Rx Count - 0 MST CIST TC BPDU Tx Count - 0 STP Diagnostic Port Counters for Interface Number lag.0.3 -----------------------------------------------------------Port Role - RootPort Message Expiration Count - 4 Invalid BPDU Count - 0 STP BPDU Rx Count - 0 STP BPDU Tx Count - 0 STP TCN BPDU Rx Count - 0 STP TCN BPDU Tx Count - 0 STP TC BPDU Rx Count - 0 STP TC BPDU Tx Count - 0 RST BPDU Rx Count - 50263 RST BPDU Tx Count - 47602 RST TC BPDU Rx Count - 497 RST TC BPDU Tx Count - 3325 MST BPDU Rx Count - 0 MST BPDU Tx Count - 0 MST CIST TC BPDU Rx Count - 0 MST CIST TC BPDU Tx Count - 0

16-36

Spanning Tree Commands

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree debug


ThiscommandclearsSpanningTreedebugcounters.

Syntax
clear spantree debug

Parameters
None.

Defaults
None.

Mode
Switchcommand,readwrite

Example
ThefollowingexampleclearsSpanningTreedebugcounters:
matrix-x(switch-su)#clear spantree debug

Matrix X Router Command Line Interface Reference Guide

16-37

Reviewing and Setting Spanning Tree Port Parameters

Reviewing and Setting Spanning Tree Port Parameters


Purpose
TheseswitchcommandsareusedtodisplayandsetSpanningTreeportormoduleparameters, includingenablingordisablingtheSpanningTreealgorithmononeormoreports,displaying designatedbridge,portandrootinformation,displayingblockedports,displayingandsetting SpanningTreeportprioritiesandcosts,configuringedgeportparameters,andsettingpointto pointprotocolmode.

Commands
ThecommandsusedtoreviewandsetSpanningTreeportparametersarelistedbelow. For information about...
show spantree portenable set spantree portenable clear spantree portenable show spantree portadmin set spantree portadmin clear spantree portadmin set spantree protomigration show spantree portstate show spantree blockedports show spantree portpri set spantree portpri clear spantree portpri set spantree porthello clear spantree porthello show spantree portcost show spantree adminpathcost set spantree adminpathcost clear spantree adminpathcost show spantree adminedge set spantree adminedge clear spantree adminedge show spantree operedge show spantree adminpoint show spantree operpoint
16-38 Spanning Tree Commands

Refer to page...
16-39 16-40 16-40 16-41 16-41 16-42 16-42 16-43 16-44 16-45 16-46 16-46 16-47 16-48 16-49 16-49 16-50 16-51 16-51 16-52 16-53 16-53 16-54 16-54

Reviewing and Setting Spanning Tree Port Parameters

For information about...


set spantree adminpoint clear spantree adminpoint

Refer to page...
16-55 16-56

show spantree portenable


ThiscommanddisplaystheportstatusononeormoreSpanningTreeports.

Syntax
show spantree portenable [port port-string]

Parameters
portportstring (Optional)Displaysstatusforspecificports.Foradetaileddescriptionof possibleportstringvalues,refertoPortStringsUsedintheCLIon page 102.

Defaults
Ifportstringisnotspecified,statuswillbedisplayedforallports.

Mode
Switchcommand,readonly

Example
Thefollowingexampledisplaysstatusforportge.5.12:
matrix-x(switch-su)#show spantree portenable port ge.5.12 Port ge.5.12 has a Port Status of Enabled

Matrix X Router Command Line Interface Reference Guide

16-39

Reviewing and Setting Spanning Tree Port Parameters

set spantree portenable


ThiscommandsetstheportstatusononeormoreSpanningTreeports.

Syntax
set spantree portenable port-string {enable | disable}

Parameters
port-string

Specifiestheportstoenableordisable.RefertoPortStringsUsedinthe CLIonpage 102foradetaileddescriptionofportstringvalues. EnablesordisablestheSpanningTreeport.

enable|disable

Defaults
Enabled.

Mode
Switchcommand,readwrite

Example
ThefollowingexampleenablesSpanningTreeportge.5.12:
matrix-x(switch-su)#set spantree portenable ge.5.12

clear spantree portenable


ThiscommandresetsthedefaultvalueforoneormoreSpanningTreeportstoenabled.

Syntax
clear spantree portenable [port-string]

Parameters
port-string

(Optional)Resetsportenableofspecificports.RefertoPortStringsUsed intheCLIonpage 102foradetaileddescriptionofportstringvalues.

Defaults
Ifportstringisnotspecified,portenablewillberesetonallports.

Mode
Switchcommand,readwrite

Example
ThefollowingexampleresetsthedefaultSpanningTreeportstatusvaluetoenabledonten Gigabitport2inslot1:
matrix-x(switch-su)clear spantree portenable tg.2.1

16-40

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

show spantree portadmin


ThiscommanddisplaysthestatusoftheSpanningTreealgorithmononeormoreports.

Syntax
show spantree portadmin [port port-string]

Parameters
portportstring (Optional)Displaysstatusforspecificports.RefertoPortStringsUsedin theCLIonpage 102foradetaileddescriptionofportstringvalues.

Defaults
Ifportstringisnotspecified,statuswillbedisplayedforallports.

Mode
Switchcommand,readonly

Example
ThefollowingexampledisplaysportadminstatusfortenGigabitEthernetport1inslot7:
matrix-x(switch-su)# show spantree portadmin port tg.7.1 Port tg.7.1 has portadmin set to enable

set spantree portadmin


ThiscommanddisablesorenablestheSpanningTreealgorithmononeormoreports.

Syntax
set spantree portadmin port-string {disable | enable}

Parameters
port-string

SpecifiestheportsforwhichtoenableordisableSpanningTree.Referto PortStringsUsedintheCLIonpage 102foradetaileddescriptionof portstringvalues. DisablesorenablesSpanningTree.

disable|enable

Defaults
Disabled.

Mode
Switchcommand,readwrite

Example
ThefollowingexampledisablesSpanningTreeontenGigabitEthernetport2inslot5:
matrix-x(switch-su)# set spantree portadmin tg.5.2 disable
Matrix X Router Command Line Interface Reference Guide 16-41

Reviewing and Setting Spanning Tree Port Parameters

clear spantree portadmin


ThiscommandresetsthedefaultSpanningTreeadminstatustodisableononeormoreports.

Syntax
clear spantree portadmin port-string

Parameters
port-string

Resetsthedefaultadminstatusonspecificports.RefertoPortStrings UsedintheCLIonpage 102foradetaileddescriptionofportstring values.

Defaults
Disable.

Mode
Switchcommand,readwrite

Example
ThefollowingexampleresetsthedefaultSpanningTreeadminstatetoenableGigabitEthernet port2inslot5:
matrix-x(switch-su)# clear spantree portadmin tg.5.2

set spantree protomigration


ThiscommandresetstheprotocolstatemigrationmachineforoneormoreSpanningTreeports. WhenoperatinginRSTPmode,thisforcesaporttotransmitMSTPBPDUs.

Syntax
set spantree protomigration port-string true

Parameters
port-string

Specifiestheportsforwhichprotocolmigrationmodewillbeenabled. Foradetaileddescriptionofpossibleportstringvalues,refertoPort StringsUsedintheCLIonpage 102. Enablesprotocolmigrationmode.

true

Defaults
None.

Mode
Switchcommand,readwrite

16-42

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

Example
ThefollowingexampleresetstheprotocolstatemigrationmachineontenGigabitEthernetport2 inslot5:
matrix-x(switch-su)# set spantree protomigration tg.5.2 true

show spantree portstate


Thiscommanddisplaysthestate(blocking,forwarding,orlistening)foraportononeormore SpanningTrees.

Syntax
show spantree portstate [port port-string] [sid sid]

Parameters
portportstring (Optional)DisplaystheSpanningTreestateforspecificSpanningTree ports.Foradetaileddescriptionofpossibleportstringvalues,refertoPort StringsUsedintheCLIonpage 102. (Optional)DisplaysthestateforaspecificSpanningTreeidentifier.Valid valuesare04094.Ifnotspecified,SID0isassumed.

sidsid

Defaults
Ifportstringisnotspecified,currentstatewillbedisplayedforallSpanningTreeports. Ifsidisnotspecified,currentportstatewillbedisplayedforSpanningTree0.

Mode
Switchcommand,readonly

Example
ThefollowingexampledisplaystheSpanningTreestatefortenGigabitEthernetport2inslot7:
matrix-x(switch-su)# show spantree portstate port tg.7.2 Port tg.7.2 has a Port State of Forwarding on SID 0

Matrix X Router Command Line Interface Reference Guide

16-43

Reviewing and Setting Spanning Tree Port Parameters

show spantree blockedports


ThiscommanddisplaystheportsinaSpanningTreethatareenabled,havelinkandareblocked. Portsthatdonothavelinkoraredisabledarenotdisplayed.

Syntax
show spantree blockedports [sid]

Parameters
sid (Optional)DisplaysportsonaspecificSpanningTreethatareenabled, havelinkandareblocked,rangingfrom0to4094.

Defaults
Ifsidisnotspecified,blockedportswillbedisplayedforSpanningTree0.

Mode
Switchcommand,readonly.

Usage
Aportinablockedstateisenabledandhaslinkbutdoesnotparticipateinthetransmissionof frames,thuspreventingduplicationarisingthroughmultiplepathsexistingintheactivetopology ofthebridgedLAN.ItreceivesSpanningTreeconfigurationmessages,butdoesnotforward packets.

Example
ThefollowingexampledisplaysblockedportsonSID1:
matrix-x(switch-su)# show spantree blockedports 1 1 ge.5.1 1 ge.5.3 1 ge.5.5 1 ge.5.6 1 ge.5.7 1 ge.5.8 1 ge.5.10 1 ge.5.11 1 ge.5.12 Number of blocked ports in SID 1 : 9

16-44

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

show spantree portpri


ThiscommandshowstheSpanningTreepriorityforoneormoreports.Portpriorityisa componentoftheportID,whichisoneelementusedindeterminingSpanningTreeportroles.

Syntax
show spantree portpri [port port-string] [sid sid]

Parameters
portportstring (Optional)SpecifiestheportsforwhichtodisplaySpanningTreepriority. Foradetaileddescriptionofpossibleportstringvalues,refertoPortStrings UsedintheCLIonpage 102. (Optional)DisplaysportpriorityforaspecificSpanningTreeidentifier. Validvaluesare04094.Ifnotspecified,SID0isassumed.

sidsid

Defaults
Ifportstringisnotspecified,portprioritywillbedisplayedforallSpanningTreeports. Ifsidisnotspecified,portprioritywillbedisplayedforSpanningTree0.

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaystheportpriorityfortenGigabitEthernetport2inslot7:
matrix-x(switch-su)# show spantree portpri port tg.7.2 Port tg.7.2 has a Port Priority of 128 on SID 0

Matrix X Router Command Line Interface Reference Guide

16-45

Reviewing and Setting Spanning Tree Port Parameters

set spantree portpri


ThiscommandsetsaportsSpanningTreepriority.

Syntax
set spantree portpri port-string priority [sid sid]

Parameters
port-string

SpecifiestheportsforwhichtosetSpanningTreeportpriority.Fora detaileddescriptionofpossibleportstringvalues,refertoPortStrings UsedintheCLIonpage 102. SpecifiesanumberthatrepresentsthepriorityofalinkinaSpanningTree bridge,rangingfrom0to240(inincrementsof16)with0indicatinghigh priority. (Optional)SetsportpriorityforaspecificSpanningTreeidentifier.Valid valuesare04094.Ifnotspecified,SID0isassumed.

priority

sidsid

Defaults
Ifsidisnotspecified,portprioritywillbesetforSpanningTree0.

Mode
Switchcommand,readwrite.

Example
ThefollowingexamplesetsthepriorityofGigabitEthernetport3inslot1to240onSID1.
matrix-x(switch-su)# set spantree portpri ge.1.3 240 sid 1

clear spantree portpri


ThiscommandresetsthebridgepriorityofaSpanningTreeporttoadefaultvalueof128.

Syntax
clear spantree portpri port-string [sid sid]

Parameters
portstring SpecifiestheportsforwhichtosetSpanningTreeportpriority.Fora detaileddescriptionofpossibleportstringvalues,refertoPortStrings UsedintheCLIonpage 102. (Optional)ResetstheportpriorityforaspecificSpanningTreeidentifier. Validvaluesare04094.Ifnotspecified,SID0willbeassumed.

sidsid

Defaults
Ifsidisnotspecified,portprioritywillbesetforSpanningTree0.

16-46

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

Mode
Switchcommand,readwrite.

Example
ThefollowingexampleresetsthepriorityofGigabitEthernetport3inslot1to128onSID1.
matrix-x(switch-su)#clear spantree portpri ge.1.3 sid 1

set spantree porthello


ThiscommandsetsthehellotimeforoneormoreSpanningTreeports.

Syntax
set spantree porthello port-string interval

Parameters
portstring interval Specifiestheportsforwhichtosethellotime. Specifiesthenumberofsecondsthesystemwaitsbeforebroadcastinga bridgehellomessage.Validvaluesare110.

Defaults
2seconds.

Mode
Switchcommand,readwrite.

Usage
ThiscommandsetstheSpanningTreeporthellotime,whichisthetimeintervalinsecondsthe portswilltransmitBPDUs. Thiscommandcanbeexecutedonlyifbridgehellomodeisdisabled.Refertothesetspantree bridgehellomodecommandforinformationaboutdisablingbridgehellomode.

Example
Thefollowingexamplesetsthehellotimeto10secondsforportge.1.4:
matrix-x(switch-su)#set spantree porthello ge.1.4 10

Matrix X Router Command Line Interface Reference Guide

16-47

Reviewing and Setting Spanning Tree Port Parameters

clear spantree porthello


ThiscommandresetsthehellotimeforoneormoreSpanningTreeportstothedefault.

Syntax
clear spantree porthello port-string

Parameters
portstring Specifiestheportsforwhichtoresethellotime.

Defaults
2seconds

Mode
Switchcommand,readwrite.

Example
Thefollowingexampleresetsthehellotimeto2secondsforportge.1.4:
matrix-x(switch-su)#clear spantree porthello ge.1.4

show spantree porthello


Thiscommanddisplaysthehellotimeforallports.

Syntax
show spantree porthello [port-range]

Parameters
portstring

(Optional)Specifiestheportsforwhichtodisplay.

Defaults
Ifaportstringisnotspecified,thehellotimeforallportsisdisplayed.

Mode
Switch,readonly.

Example
Thefollowingexampleshowstheporthellotimeforallports.
matrix-x(switch-su)-> show spantree porthello Port hello time for port lag.0.1 is 2 seconds. Port hello time for port lag.0.2 is 2 seconds. Port hello time for port lag.0.3 is 2 seconds. Port hello time for port lag.0.4 is 2 seconds. --More-<space> forward, <!> dump all output, <q> quit

16-48

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

show spantree portcost


ThiscommanddisplayscostvaluesassignedtooneormoreSpanningTreeports.

Syntax
show spantree portcost [port port-string] [sid sid]

Parameters
portportstring (Optional)Displayscostvaluesforspecificports.Foradetailed descriptionofpossibleportstringvalues,refertoPortStringsUsedinthe CLIonpage 102 (Optional)DisplaysportcostforaspecificSpanningTreeidentifier.Valid valuesare04094.Ifnotspecified,SID0willbeassumed.

sidsid

Defaults
Ifportstringisnotspecified,portcostwillbedisplayedforallSpanningTreeports. Ifsidisnotspecified,portcostwillbedisplayedforallSpanningTrees.

Mode
Switchcommand,readonly

Example
ThefollowingexampledisplaystheportcostforGigabitEthernetport21inslot7:
matrix-x(switch-su)# show spantree portcost port ge.7.21 Port ge.7.21 has a Port Path Cost of 20000 on SID 0

show spantree adminpathcost


ThiscommanddisplaystheadminpathcostforaportononeormoreSpanningTrees.

Syntax
show spantree adminpathcost [port port-string] [sid sid]

Parameters
portportstring (Optional)Displaystheadminpathcostvalueforspecificports.Fora detaileddescriptionofpossibleportstringvalues,refertoPortStrings UsedintheCLIonpage 102. (Optional)DisplaystheadminpathcostforaspecificSpanningTree identifier.Validvaluesare04094.Ifnotspecified,SID0willbeassumed.

sidsid

Defaults
Ifportstringisnotspecified,adminpathcostforallSpanningTreeportswillbedisplayed. Ifsidisnotspecified,adminpathcostforSpanningTree0willbedisplayed.

Matrix X Router Command Line Interface Reference Guide

16-49

Reviewing and Setting Spanning Tree Port Parameters

Mode
Switchcommand,readonly

Example
ThefollowingexampledisplaystheadminpathcostforGigabitEthernetport10inslot7onSID1:
matrix-x(switch-su)# show spantree adminpathcost port ge.7.10 sid 1 Port ge.7.18 has a Port Admin Path Cost of 0 on SID 1

set spantree adminpathcost


ThiscommandsetstheadministrativepathcostonaportandoneormoreSpanningTrees.

Syntax
set spantree adminpathcost port-string cost [sid sid]

Parameters
portstring Setstheportsonwhichtosetanadminpathcost.RefertoPortStrings UsedintheCLIonpage 102foradetaileddescriptionofportstring values. Specifiestheportpathcost.Va1idvaluesare: 065535iflegacypathcostisenabled. 0200000000iflegacypathcostisdisabled. sidsid (Optional)SetstheadminpathcostforaspecificSpanningTreeidentifier. Validvaluesare04094.Ifnotspecified,SID0willbeassumed.

cost

Defaults
Ifsidisnotspecified,adminpathcostwillbesetforSpanningTree0.

Mode
Switchcommand,readwrite

Usage
Bydefault,theadminpathcostvalueissetto0,whichforcestheporttorecalculateSpanningTree pathcostbasedonthespeedoftheportandwhetherornotlegacypathcostisenabled.Referto thesetspantreelegacypathcostcommandformoredetails.

Example
Thefollowingexamplesetstheadminpathcostto200forGigabitEthernetport10inslot7onSID 1:
matrix-x(switch-su)# set spantree adminpathcost ge.7.10 200 sid 1

16-50

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

clear spantree adminpathcost


ThiscommandresetstheSpanningTreedefaultvalueforportadminpathcostto0.

Syntax
clear spantree adminpathcost port-string [sid sid]

Parameters
portstring Specifiestheportsforwhichtoresetadminpathcost.Foradetailed descriptionofpossibleportstringvalues,refertoPortStringsUsedin theCLIonpage 102. (Optional)ResetstheadminpathcostforspecificSpanningTree. Validvaluesare04094.Ifnotspecified,SID0isassumed.

sidsid

Defaults
Ifsidisnotspecified,adminpathcostwillberesetforSpanningTree0.

Mode
Switchcommand,readwrite

Usage
ThiscommandwillforceSpanningTreepathcosttoberecalculatedonspecifiedportsbasedon whetherornotsetspantreelegacypathcostisenabled.

Example
Thefollowingexampleresetstheadminpathcostto0forport10inslot7onSID1:
matrix-x(switch-su)# clear spantree adminpathcost ge.7.10 sid 1

show spantree adminedge


Thiscommanddisplaystheedgeportadministrativestatusforaport.

Syntax
show spantree adminedge port-string

Parameters
portstring Specifiestheportsforwhichtodisplayedgeportadministrative status.Foradetaileddescriptionofpossibleportstringvalues, refertoPortStringsUsedintheCLIonpage 102.

Defaults
None.

Matrix X Router Command Line Interface Reference Guide

16-51

Reviewing and Setting Spanning Tree Port Parameters

Mode
Switchcommand,readonly

Example
ThefollowingexampledisplaystheedgeportstatusfortenGigabitport2inslot1:
matrix-x(switch-su)# show spantree adminedge tg.1.2 Port tg.1.2 has a Port Admin Edge of Edge-Port

set spantree adminedge


ThiscommandsetstheedgeportadministrativestatusonaSpanningTreeport.

Syntax
set spantree adminedge port-string {true | false}

Parameters
port-string

Specifiestheedgeport.Foradetaileddescriptionofpossibleportstring values,refertoPortStringsUsedintheCLIonpage 102. Enables(true)ordisables(false)thespecifiedportasaSpanningTree edgeport.

true|false

Defaults
None.

Mode
Switchcommand,readwrite.

Example
ThefollowingexamplesetsGigabitEthernetport11inslot1asanedgeport:
matrix-x(switch-su)# set spantree adminedge ge.1.11 true

16-52

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

clear spantree adminedge


ThiscommandresetsaSpanningTreeporttononedgestatus.

Syntax
clear spantree adminedge port-string

Parameters
portstring Specifiesportsonwhichtoresetedgeportstatus.Foradetaileddescription ofpossibleportstringvalues,refertoPortStringsUsedintheCLIon page 102.

Defaults
None.

Mode
Switchcommand,readwrite.

Example
Thefollowingexampleresetsport11inslot1asanonedgeport:
matrix-x(switch-su)# clear spantree adminedge ge.1.11

show spantree operedge


ThiscommanddisplaystheSpanningTreeedgeportoperatingstatusforaport.

Syntax
show spantree operedge [port port-string]

Parameters
portportstring (Optional)Displaysedgeportoperatingstatusforspecificports.SeePort StringsUsedintheCLIonpage 102foradescriptionofportstring values.

Defaults
IfportstringisnotspecifiededgeportoperatingstatuswillbedisplayedforallSpanningTree ports.

Mode
Switchcommand,readonly.

Example
Thefollowingexampledisplaystheedgeportstatusforport21inslot7:
matrix-x(switch-su)# show spantree operedge port ge.7.21
Matrix X Router Command Line Interface Reference Guide 16-53

Reviewing and Setting Spanning Tree Port Parameters

Port ge.7.21 has a Port Oper Edge of Edge-Port

show spantree adminpoint


ThiscommanddisplaystheadministrativepointtopointstatusoftheLANsegmentattachedtoa SpanningTreeport.

Syntax
show spantree adminpoint [port port-string]

Parameters
portportstring (Optional)Displayspointtopointstatusforspecificports.Foradetailed descriptionofpossibleportstringvalues,refertoPortStringsUsedinthe CLIonpage 102.

Defaults
Ifportstringisnotspecified,statuswillbedisplayedforallSpanningTreeports.

Mode
Switchcommand,readonly.

Example
ThefollowingexampledisplaysthepointtopointstatusoftheLANsegmentattachedtoport21 inslot7.
matrix-x(switch-su)# show spantree adminpoint port ge.7.21 Port ge.7.21 has a Port Admin Point to Point of Auto

show spantree operpoint


ThiscommanddisplaystheoperatingpointtopointstatusoftheLANsegmentattachedtoaport.

Syntax
show spantree operpoint [port port-string]

Parameters
portportstring (Optional)Displayspointtopointoperatingstatusforspecificports.Fora detaileddescriptionofpossibleportstringvalues,refertoPortStringsUsed intheCLIonpage 102.

Defaults
Ifnotspecified,statuswillbedisplayedforallports.

Mode
Switchcommand,readonly.

16-54

Spanning Tree Commands

Reviewing and Setting Spanning Tree Port Parameters

Example
ThefollowingexampledisplaysthepointtopointstatusoperatingoftheLANsegmentattached toport21inslot7.
matrix-x(switch-su)# show spantree operpoint port ge.7.21 Port fg.7.21 has a Port Oper Point to Point of False on SID 1

set spantree adminpoint


ThiscommandsetstheadministrativepointtopointstatusoftheLANsegmentattachedtoa SpanningTreeport.

Syntax
set spantree adminpoint port-string {true | false | auto}

Parameters
portstring Specifiestheportonwhichtosetpointtopointprotocolstatus.Fora detaileddescriptionofpossibleportstringvalues,refertoPortStringsUsed intheCLIonpage 102. SpecifiesthepointtopointstatusoftheLANattachedtothespecifiedport. trueforcestheporttobeconsideredpointtopoint. falseforcestheporttobeconsiderednonpointtopoint. auto(thedefaultsetting)allowsthefirmwaretodeterminetheports pointtopointstatus.

true|false|auto

Mode
Switchcommand,readwrite.

Example
ThefollowingexamplesetstheLANattachedtoport3inslot1asapointtopointsegment.
matrix-x(switch-su)# set spantree adminpoint ge.1.3 true

Matrix X Router Command Line Interface Reference Guide

16-55

Reviewing and Setting Spanning Tree Port Parameters

clear spantree adminpoint


ThiscommandresetstheadministrativepointtopointstatusoftheLANsegmentattachedtoa SpanningTreeporttoautomode.

Syntax
clear spantree adminpoint [port-string]

Parameters
portstring (Optional)Resetspointtopointprotocolstatusonspecificports.Fora detaileddescriptionofpossibleportstringvalues,refertoPortStringsUsed intheCLIonpage 102.

Defaults
Ifportstringisnotspecified,pointtopointstatuswillberesetforallSpanningTreeports.

Mode
Switchcommand,readwrite.

Example
ThefollowingexampleresetsallportsonallSpanningTreestoautopointtopointstatus.
matrix-x(switch-su)# clear spantree adminpoint

16-56

Spanning Tree Commands

Potrebbero piacerti anche