Comandos spanning tree

56
Matrix X Router Command Line Interface Reference Guide 16-1 16 Spanning Tree Commands Overview This chapter describes the Spanning Tree Configuration set of commands and how to use them. The commands are separated into two groups. The first group of commands are used to review and set spanning tree bridge parameters. The second group of commands are used to review and set spanning tree port parameters. Reviewing and Setting Spanning Tree Bridge Parameters Purpose These switch commands are used to display and set Spanning Tree bridge parameters, including device priorities, hello time, maximum wait time, forward delay, path cost, topology change trap suppression, and transmit hold count. Commands The commands used to review and set Spanning Tree bridge parameters are listed below. For information about... Refer to page... Reviewing and Setting Spanning Tree Bridge Parameters 16-1 Reviewing and Setting Spanning Tree Port Parameters 16-38 For information about... Refer to page... show spantree stats 16-4 show spantree version 16-6 set spantree version 16-6 clear spantree version 16-7 set spantree stpmode 16-8 clear spantree stpmode 16-8 show spantree mstilist 16-9 set spantree msti 16-9 clear spantree msti 16-10

description

 

Transcript of Comandos spanning tree

Page 1: Comandos spanning tree

16Spanning Tree Commands

OverviewThis chapter describes the Spanning Tree Configuration set of commands and how to use them. The commands are separated into two groups. The first group of commands are used to review and set spanning tree bridge parameters. The second group of commands are used to review and set spanning tree port parameters.

Reviewing and Setting Spanning Tree Bridge Parameters

PurposeThese switch commands are used to display and set Spanning Tree bridge parameters, including device priorities, hello time, maximum wait time, forward delay, path cost, topology change trap suppression, and transmit hold count.

CommandsThe commands used to review and set Spanning Tree bridge parameters are listed below.  

For information about... Refer to page...

Reviewing and Setting Spanning Tree Bridge Parameters 16-1

Reviewing and Setting Spanning Tree Port Parameters 16-38

For information about... Refer to page...

show spantree stats 16-4

show spantree version 16-6

set spantree version 16-6

clear spantree version 16-7

set spantree stpmode 16-8

clear spantree stpmode 16-8

show spantree mstilist 16-9

set spantree msti 16-9

clear spantree msti 16-10

Matrix X Router Command Line Interface Reference Guide 16-1

Page 2: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree mstmap 16-10

set spantree mstmap 16-11

clear spantree mstmap 16-11

show spantree vlanlist 16-12

show spantree mstcfgid 16-12

set spantree mstcfgid 16-14

clear spantree mstcfgid 16-15

set spantree priority 16-15

clear spantree priority 16-16

show spantree bridgehellomode 16-17

set spantree bridgehellomode 16-17

clear spantree bridgehellomode 16-18

set spantree hello 16-18

clear spantree hello 16-19

set spantree maxage 16-20

clear spantree maxage 16-20

set spantree fwddelay 16-21

clear spantree fwddelay 16-22

show spantree autoedge 16-22

set spantree autoedge 16-23

clear spantree autoedge 16-23

show spantree legacypathcost 16-24

set spantree legacypathcost 16-24

clear spantree legacypathcost 16-25

show spantree tctrapsuppress 16-25

set spantree tctrapsuppress 16-26

clear spantree tctrapsuppress 16-27

show spantree txholdcount 16-27

set spantree txholdcount 16-28

clear spantree txholdcount 16-28

set spantree maxhops 16-29

clear spantree maxhops 16-29

show spantree spanguard 16-30

set spantree spanguard 16-30

For information about... Refer to page...

16-2 Spanning Tree Commands

Page 3: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree spanguard 16-31

show spantree spanguardtimeout 16-31

set spantree spanguardtimeout 16-32

clear spantree spanguardtimeout 16-32

show spantree spanguardlock 16-33

clear spantree spanguardlock 16-33

set spantree spanguardlock 16-34

clear spantree default 16-35

show spantree debug 16-35

clear spantree debug 16-37

For information about... Refer to page...

Matrix X Router Command Line Interface Reference Guide 16-3

Page 4: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree statsThis command displays Spanning Tree information for one or more ports.

Syntaxshow spantree stats [port port-string] [sid sid] [active]

Parameters

Defaults• If port‐string is not specified, no port information will be displayed.

• If sid is not specified, information for Spanning Tree 0 will be displayed.

• If active is not specified, information for all specified ports will be displayed regardless of whether or not they have received BPDUs.

ModeSwitch command, read‐only.

ExampleThe following example displays the device’s Spanning Tree configuration.

matrix-x(switch-su)-> show spantree stats

Spanning tree status - enabledSpanning tree instance - 0Designated Root MacAddr - 00-00-1d-00-00-01Designated Root Priority - 32768Designated Root Cost - 0Designated Root Port - 0Root Max Age - 20 secRoot Hello Time - 2 secRoot Forward Delay - 15 secBridge ID MAC Address - 00-00-1d-00-00-01Bridge ID Priority - 32768Bridge Max Age - 20 secBridge Hello Time - 2 secBridge Forward Delay - 15 secTopology Change Count - 0Time Since Top Change - 00 days 00:08:53Max Hops - 20

The following table shows a detailed explanation of command output.

port port‐string

(Optional) Displays information for the specified ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

sid sid (Optional) Displays information for a specific Spanning Tree identifier. If not specified, SID 0 is assumed.

active (Optional) Displays information for ports that have received STP BPDUs since boot.

16-4 Spanning Tree Commands

Page 5: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

Output What It Displays...

Spanning tree instance Spanning Tree ID.

Spanning tree status Mode currently enabled.

Designated Root MacAddr MAC address of the designated Spanning Tree root bridge.

Designated Root Priority Priority of the designated root bridge.

Designated Root Cost Total path cost to reach the root.

Designated Root Port Port through which the root bridge can be reached.

Root Max Age Amount of time (in seconds) a BPDU packet should be considered valid.

Root Hello Time 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.

Root Forward Delay Amount of time (in seconds) the root device spends in listening or learning mode.

Bridge ID MAC Address Unique bridge MAC address, recognized by all bridges in the network.

Bridge ID Priority Bridge priority, which is a default value, or is assigned using the set spantree priority command.

Bridge Max Age 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.

Bridge Hello Time Amount of time (in seconds) the bridge sends BPDUs. This is a default value, or is assigned using the set spantree hello command.

Bridge Forward Delay 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.

Topology Change Count Number of times topology has changed on the bridge.

Time Since Top Change Amount of time (in days, hours, minutes and seconds) since the last topology change.

Max Hops 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.

Matrix X Router Command Line Interface Reference Guide 16-5

Page 6: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree versionThis command displays the current version of the Spanning Tree protocol running on the device.

Syntaxshow spantree version

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only.

ExampleThe following example displays Spanning Tree version information for the device.

matrix-x(switch-su)-> show spantree versionForce Version is mstp

set spantree versionThis command sets the version of the Spanning Tree protocol to MSTP (Multiple Spanning Tree Protocol), RSTP (Rapid Spanning Tree Protocol) or to STP 802.1D‐compatible.

Syntaxset spantree version {mstp | stpcompatible | rstp}

Parameters

DefaultsMSTP.

ModeSwitch command, read‐write

mstp Sets the version to STP 802.1s‐compatible.

stpcompatible Sets the version to STP 802.1D‐compatible.

rstp Sets the version to 802.1w‐compatible.

16-6 Spanning Tree Commands

Page 7: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

UsageIn most networks, Spanning Tree version should not be changed from its default setting of mstp (Multiple Spanning Tree Protocol) mode. MSTP mode is fully compatible and interoperable with legacy STP 802.1D and Rapid Spanning Tree (RSTP) bridges. Setting the version to stpcompatible mode will cause the bridge to transmit only 802.1D BPDUs, and will prevent non‐edge ports from rapidly transitioning to forwarding state.

ExampleThe following example globally changes the Spanning Tree version from the default of MSTP to RSTP.

matrix-x(switch-su)->set spantree version rstp

clear spantree versionThis command resets the Spanning Tree version to MSTP mode.

Syntaxclear spantree version

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets the Spanning Tree version.

matrix-x(switch-su)->clear spantree version

Matrix X Router Command Line Interface Reference Guide 16-7

Page 8: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree stpmodeThis command globally enables or disables the Spanning Tree Protocol (STP) mode. 

Syntaxset spantree stpmode {none | ieee8021}

Parameters

DefaultsIEEE 802.1

ModeSwitch command, read‐write.

ExampleThe following example disables Spanning Tree.

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

clear spantree stpmodeThis command resets the Spanning Tree protocol mode to the default setting of IEEE 802.1. This re‐enables Spanning Tree.

Syntaxclear spantree stpmode

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets the STP mode to IEEE 802.1.

matrix-x(switch-su)->clear spantree stpmode

none Disables Spanning Tree.ieee8021 Enables 802.1 Spanning Tree mode.

16-8 Spanning Tree Commands

Page 9: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree mstilistThis command displays a list of Multiple Spanning Tree (MST) instances configured on the device.

Syntaxshow spantree mstilist

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only.

ExampleThis example shows spanning tree instance 2 has been configured:

matrix-x(switch-su)-> show spantree mstilistConfigured Multiple Spanning Tree Instances:2

set spantree mstiThis command creates or deletes a Multiple Spanning Tree instance.

Syntaxset spantree msti sid {create | delete}

Parameters

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example creates MST instance 2:

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

sid Sets the Multiple Spanning Tree ID. Valid values are 1 ‐ 4094.

Matrix X Router supports up to 32 MST instances.

create | delete Creates or deletes an MST instance.

Matrix X Router Command Line Interface Reference Guide 16-9

Page 10: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree mstiThis command deletes one or more Multiple Spanning Tree instances.

Syntaxclear spantree msti [sid]

Parameters

DefaultsIf sid is not specified, all MST instances will be cleared.

ModeSwitch command, read‐write.

ExampleThe following example deletes all MST instances.

matrix-x(switch-su)-> clear spantree msti

show spantree mstmapThis command displays the mapping of a filtering database ID (FID) to a Spanning Trees. Since VLANs are mapped to FIDs, this shows to which SID a VLAN is mapped.

Syntaxshow spantree mstmap [fid fid]

Parameters

DefaultsIf fid is not specified, information for all assigned FIDs will be displayed. 

ModeSwitch command, read‐only.

UsageOnly non‐default mappings are displayed by this command. That is, nothing mapped to sid 0 is displayed.

ExampleThe following example displays all non‐default SID to FID mapping information.

sid (Optional) Deletes a specific multiple Spanning Tree ID.

fid fid (Optional) Displays information for specific FIDs. The value of fid can range from 2 to 4094.

16-10 Spanning Tree Commands

Page 11: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

matrix-x(switch-su)-> show spantree mstmap

Fid 20 is mapped to Sid 3Fid 40 is mapped to Sid 3Fid 60 is mapped to Sid 10

set spantree mstmapThis command maps a filtering database ID (FID) to a SID. Since VLANs are mapped to FIDs, this essentially maps one or more VLAN IDs to a Spanning Tree (SID).

Syntaxset spantree mstmap fid [sid sid]

Parameters

DefaultsIf sid is not specified, FID(s) will be mapped to Spanning Tree 0.

ModeSwitch command, read‐write.

ExampleThe following example maps FID 3 to SID 2.

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

clear spantree mstmapThis command maps a FID back to SID 0.

Syntaxclear spantree mstmap fid

Parameters

DefaultsIf fid is not specified, all SID to FID mappings will be reset.

 fid Specifies one or a range of FIDs to assign to the MST, ranging from 1 to 4094, and must correspond to a VLAN ID created using the set vlan create command.

sid sid (Optional) Specifies a Multiple Spanning Tree ID, ranging from 1 to 4094, and must correspond to a SID created using the set spantree msti command.

fid Specifies one or more FIDs to reset to 0, ranging from 2 to 4094.

Matrix X Router Command Line Interface Reference Guide 16-11

Page 12: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ModeSwitch command, read‐write.

ExampleThe following example maps FID 2 back to SID 0: 

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

show spantree vlanlistThis command displays the Spanning Tree IDs assigned to one or more VLANs.

Syntaxshow spantree vlanlist [vlan-list]

Parameters

DefaultsIf not specified, SID assignment will be displayed for all VLANs.

ModeSwitch command, read‐only.

ExampleThe following example displays the SIDs mapped to VLAN 2. In this case, SID 2 is mapped to VLAN 2. For this information to display, the SID instance must be created using the set spantree msti command and the FIDs must be mapped to SID 2 using the set spantree mstmap command.

matrix-x(switch-su)-> show spantree vlanlist 2Vlan 2 is mapped to Sid 2

show spantree mstcfgidThis command displays the MST configuration identifier elements, including format selector, configuration name, revision level, and configuration digest.

Syntaxshow spantree mstcfgid

ParametersNone.

DefaultsNone.

vlan-list (Optional) Displays VLANs assigned to specific SIDs.

16-12 Spanning Tree Commands

Page 13: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ModeSwitch command, read‐only.

ExampleThe following example displays the MST configuration identifier elements. In this case, the default revision level of 0, and the default configuration name (a string representing the bridge MAC address) have not been changed. Refer to the set spantree mstcfgid command for information on changing these settings.

Matrix X Router Command Line Interface Reference Guide 16-13

Page 14: Comandos spanning tree

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 mstcfgidThis command sets the MST configuration name and/or revision level.

Syntaxset spantree mstcfgid {cfgname name | rev level}

Parameters

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example sets the MST configuration name to “mstconfig”.

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

cfgname name Specifies an MST configuration name. 

rev level Specifies an MST revision level. Valid values are 0 ‐ 65535.

16-14 Spanning Tree Commands

Page 15: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree mstcfgidThis command resets the MST revision level to a default value of 0, and the configuration name to a default string representing the bridge MAC address.

Syntaxclear spantree mstcfgid

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets the MST configuration identifier elements to default values.

matrix-x(switch-su)#clear spantree mstcfgid

set spantree priorityThis command sets the device’s Spanning Tree priority.

Syntaxset spantree priority priority [sid]

Parameters

Defaults• 32768 priority

• If sid is not specified, priority will be set on Spanning Tree 0.

ModeSwitch command, read‐write

UsageThe device with the highest priority becomes the Spanning Tree root device. If all devices have the same priority, the device with the lowest MAC address will then become the root device.

priority Specifies the priority of the bridge, ranging from 0 to 65535 (in increments of 4096), with 0 indicating high priority and 65535 low priority.

sid (Optional) Speicifes a specific Spanning Tree instance. If not specified, SID 0 is assumed. Valid values range from 0 to 4094.

Matrix X Router Command Line Interface Reference Guide 16-15

Page 16: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ExampleThe following example sets the bridge priority to 4096 on SID 1.

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

clear spantree priorityThis command resets the Spanning Tree priority to the default value of 32768.

Syntaxclear spantree priority [sid]

Parameters

DefaultsIf sid is not specified, priority will be reset on Spanning Tree 0.

ModeSwitch command, read‐write.

ExampleThe following example resets the bridge priority on SID 1.

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

sid (Optional) Specifies the specific Spanning Tree instance to reset priority on. If not specified, SID 0 is assumed. Valid values range from 0 to 4094.

16-16 Spanning Tree Commands

Page 17: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree bridgehellomodeThis command displays the status of bridge hello mode on the device. When enabled, a single bridge administrative hello time is being used. When disabled, per‐port administrative hello times are being used. 

Syntaxshow spantree bridgehellomode

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only.

ExampleThe following example displays the Spanning Tree bridge hello mode. In this case, a single bridge hello mode has been enabled using the set spantree bridgehellomode command.

matrix-x(switch-su)->show spantree bridgehellomodeBridge Hello Mode is currently enabled.

set spantree bridgehellomodeThis command enables or disables bridge hello mode on the device.

Syntaxset spantree bridgehellomode {enable | disable}

Parameters

DefaultsEnabled.

ModeSwitch command, read‐write.

enable  Enables single Spanning Tree bridge hello mode.disable Disables single Spanning Tree bridge hello mode, allowing for the 

configuration of per‐port hello times.

Matrix X Router Command Line Interface Reference Guide 16-17

Page 18: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

UsageWhen bridge hello mode is enabled, a single bridge administrative hello time is used. When bridge hello mode is disabled, per‐port administrative hello times are used. Per‐port hello times can be configured using the set spantree porthello command.

ExampleThe following example disables single Spanning Tree hello mode on the device. Per‐port hello times can now be configured using the set spantree porthello command:

matrix-x(switch-su)->set spantree bridgehellomode disable

clear spantree bridgehellomodeThis command resets the Spanning Tree administrative hello mode to enabled.

Syntaxclear spantree bridgehellomode

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets the Spanning Tree bridge hello mode to enabled:

matrix-x(switch-su)#clear spantree bridgehellomode

set spantree helloThis command sets the device’s Spanning Tree hello interval. 

Syntaxset spantree hello sec

Parameters

Defaults2 seconds.

sec Specifies the interval in seconds the system waits before broadcasting a bridge hello message (a multicast message indicating that the system is active). Valid values range from 1 to 10 seconds.

16-18 Spanning Tree Commands

Page 19: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ModeSwitch command, read‐write

UsageThe Spanning Tree hello time is the time interval (in seconds) the device waits between transmissions of BPDUs indicating it is active.

ExampleThe following example globally sets the Spanning Tree hello time to 10 seconds:

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

clear spantree helloThis command resets the Spanning Tree hello time to the default value of 2 seconds. 

Syntaxclear spantree hello

ParametersNone

DefaultsNone

ModeSwitch command, read‐write

ExampleThe following example globally resets the Spanning Tree hello interval:

matrix-x(switch-su)->clear spantree hello

Matrix X Router Command Line Interface Reference Guide 16-19

Page 20: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree maxageThis command sets the maximum age of a BPDU message before the message times out. 

Syntaxset spantree maxage age

Parameters

Defaults20 seconds.

ModeSwitch command, read‐write

UsageThe bridge maximum aging time is the maximum time (in seconds) a device can wait without receiving a configuration message (bridge “hello”) before attempting to reconfigure. All device ports (except for designated ports) should receive configuration messages at regular intervals. Any port that ages out STP information provided in the last configuration message becomes the designated port for the attached LAN. If it is a root port, a new root port is selected from among the device ports attached to the network.

ExampleThe following example sets the maximum aging time to 25 seconds:

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

clear spantree maxageThis command resets the maximum age before a BPDU message times out to the default value of 20 seconds.

Syntaxclear spantree maxage

ParametersNone.

DefaultsNone.

age Specifies the maximum interval in seconds that the system retains data received from other bridges through STP. Valid values range from 6 to 40 seconds.

16-20 Spanning Tree Commands

Page 21: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ModeSwitch command, read‐write

ExampleThe following example globally resets the maximum aging time:

matrix-x(switch-su)-> clear spantree maxage

set spantree fwddelayThis command sets the Spanning Tree forward delay. 

Syntaxset spantree fwddelay interval

Parameters

Defaults15 seconds.

ModeSwitch command, read‐write

UsageThe forward delay value is the maximum time (in seconds) the root device will wait before changing states (that is, from listening state to learning state to forwarding state). This delay is required because every device must receive information about topology changes before it starts to forward frames. In addition, each port needs time to listen for conflicting information that would make it return to a blocking state; otherwise, temporary data loops might result.

ExampleThe following example globally sets the bridge forward delay to 16 seconds:

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

interval Sets the interval for the bridge forward delay in seconds. Valid values range from 4 to 30 seconds.

Matrix X Router Command Line Interface Reference Guide 16-21

Page 22: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree fwddelayThis command resets the Spanning Tree forward delay to the default setting of 15 seconds. 

Syntaxclear spantree fwddelay

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write

ExampleThe following example globally resets the bridge forward delay:

matrix-x(switch-su)-> clear spantree fwddelay

show spantree autoedgeThis command displays the status of automatic edge port detection.

Syntaxshow spantree autoedge

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only

ExampleThe following example displays the status of the automatic edge port detection function:

matrix-x(switch-su)-> show spantree autoedgeAuto Edge is set to enable

16-22 Spanning Tree Commands

Page 23: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree autoedgeThis command enables or disables the automatic edge port detection function.

Syntaxset spantree autoedge {disable | enable}

Parameters

DefaultsThe default is enabled.

ModeSwitch command, read‐write

ExampleThe following example disables automatic edge port detection:

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

clear spantree autoedgeThis command resets automatic edge port detection to the default state of enabled.

Syntaxclear spantree autoedge

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write

ExampleThe following example resets automatic edge port detection to enabled:

matrix-x(switch-su)-> clear spantree autoedge

disable | enable Disables or enables automatic edge port detection. 

Matrix X Router Command Line Interface Reference Guide 16-23

Page 24: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree legacypathcostThis command displays the default Spanning Tree path cost setting.

Syntaxshow spantree legacypathcost

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only

ExampleThe following example displays the default Spanning Tree path cost setting:

matrix-x(switch-su)-> show spantree legacypathcostLegacy Path Cost is disabled

set spantree legacypathcostThis command enables or disables legacy (802.1D) path cost values.

Syntaxset spantree legacypathcost {disable | enable}

Parameters

DefaultsThe default is disabled.

ModeSwitch command, read‐write

UsageBy default, legacy path cost is disabled. Enabling the device to calculate legacy path costs affects the range of valid values that can be entered in the show spantree adminpathcost command.

ExampleThe following example sets the default path cost values to 802.1D:

matrix-x(switch-su)-> set spantree legacypathcost enable

disable | enable Enables or disables legacy (802.1D) path cost values. 

16-24 Spanning Tree Commands

Page 25: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree legacypathcostThis command sets the Spanning Tree default value for legacy path cost to 802.1t values.

Syntaxclear spantree legacypathcost

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write

ExampleThe following example sets the default path cost values to 802.1t:

matrix-x(switch-su)-> clear spantree legacypathcost

show spantree tctrapsuppressThis command displays the status of topology change trap suppression on Rapid Spanning Tree edge ports.

Syntaxshow spantree tctrapsuppress

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only

ExampleThe following example displays the status of topology change trap suppression:

matrix-x(switch-su)-> show spantree tctrapsuppressTopology change trap suppression is currently enabled.

Matrix X Router Command Line Interface Reference Guide 16-25

Page 26: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree tctrapsuppressThis command disables or enables topology change trap suppression on Rapid Spanning Tree edge ports.

Syntaxset spantree tctrapsuppress {disable | enable}

Parameters

DefaultsEnabled

ModeSwitch command, read‐write

UsageBy default, RSTP non‐edge (bridge) ports that transition to forwarding or blocking cause the switch to issue a topology change trap. When topology change trap suppression is enabled, which is the device default, edge ports (such as end station PCs) are prevented from sending topology change traps. This is because there is usually no need for network management to monitor edge port STP transition states, such as when PCs are powered on.

When topology change trap suppression is disabled, all ports, including edge and bridge ports, will transmit topology change traps.

ExampleThe following example allows Rapid Spanning Tree edge ports to transmit topology change traps:

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

disable | enable Disables or enables topology change trap suppression.

16-26 Spanning Tree Commands

Page 27: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree tctrapsuppressThis command clears topology change trap suppression settings.

Syntaxclear spantree tctrapsuppress

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write

ExampleThe following example clears topology change trap suppression settings:

matrix-x(switch-su)# clear spantree tctrapsuppress

show spantree txholdcountThis command displays the maximum BPDU transmission rate.

Syntaxshow spantree txholdcount

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only

ExampleThe following example displays the transmit hold count setting:

matrix-x(switch-su)# show spantree txholdcountTx hold count is 6

Matrix X Router Command Line Interface Reference Guide 16-27

Page 28: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree txholdcountThis command sets the maximum BPDU transmission rate. This is the number of BPDUs which will be transmitted before transmissions are subject to a one‐second timer.

Syntaxset spantree txholdcount txholdcount

Parameters

Defaults6 

ModeSwitch command, read‐write

ExampleThe following example globally sets the transmit hold count to 5:

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

clear spantree txholdcountThis command resets the transmit hold count to the default value of 6.

Syntaxclear spantree txholdcount

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write

ExampleThe following example resets the transmit hold count:

matrix-x(switch-su)# clear spantree txholdcount

txholdcount Specifies the maximum number of BPDUs to be transmitted before transmissions are subject to a one‐second timer. Valid values are 1 ‐ 10. Default value is 6.

16-28 Spanning Tree Commands

Page 29: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree maxhopsThis command sets the Spanning Tree maximum hop count. This is 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.

Syntaxset spantree maxhops max_hop_count

Parameters

DefaultsMax Hop count: 20

ModeSwitch command, read‐write.

ExampleThe following example sets the maximum hop count to 40:

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

clear spantree maxhopsThis command resets the maximum hop count to the default value of 20.

Syntaxclear spantree maxhops

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets the maximum hop count to 20:

matrix-x(switch-su)# clear spantree maxhops

max_hop_count Sets the maximum number of hops allowed, ranging from 0 to 255.

Matrix X Router Command Line Interface Reference Guide 16-29

Page 30: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree spanguardThis command displays the status of the Spanning Tree span guard function.

Syntaxshow spantree spanguard

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only.

ExampleThe following example displays the span guard function status:

matrix-x(switch-su)# show spantree spanguardSpan Guard is currently disabled

set spantree spanguardThis command enables or disables the Spanning Tree span guard function. 

Syntaxset spantree spanguard {enable | disable}

Parameters

DefaultsDisabled.

ModeSwitch command, read‐write.

UsageWhen enabled, this function prevents an unauthorized bridge from becoming part of the active Spanning Tree topology. It does this by disabling a port that receives a BPDU when that port has been defined as an edge (user) port with the set spantree adminedge command. This port will remain disabled until the amount of time, defined by the set spantree spanguardtimeout command, has passed since the last seen BPDU or the port is manually unlocked, with the clear spantree spanguardlock command.

enable | disable Enables or disables the span guard function.

16-30 Spanning Tree Commands

Page 31: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ExampleThe following example enables the span guard function:

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

clear spantree spanguardThis command resets the status of the Spanning Tree span guard function to disabled.

Syntaxclear spantree spanguard

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets the status of the span guard function to disabled:

matrix-x(switch-su)# clear spantree spanguard

show spantree spanguardtimeoutThis command displays the Spanning Tree span guard timeout setting.

Syntaxshow spantree spanguardtimeout

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐only.

ExampleThe following example displays the span guard timeout setting: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

Page 32: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

set spantree spanguardtimeoutThis command sets the amount of time (in seconds) an edge port will remain locked by the span guard function.

Syntaxset spantree spanguardtimeout timeout

Parameters

Defaults300 seconds.

ModeSwitch command, read‐write.

ExampleThe following example sets the span guard timeout to 600 seconds:

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

clear spantree spanguardtimeoutThis command resets the Spanning Tree span guard timeout to the default value of 300 seconds.

Syntaxclear spantree spanguardtimeout

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets the span guard timeout to 300 seconds:

matrix-x(switch-su)#clear spantree spanguardtimeout

timeout Specifies a timeout value in seconds. Valid values are 0 (forever) to 65535 seconds.

16-32 Spanning Tree Commands

Page 33: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

show spantree spanguardlockThis command displays the span guard lock status of one or more ports.

Syntaxshow spantree spanguardlock port port-string

Parameters

DefaultsNone.

ModeSwitch command, read‐only.

ExampleThe following example displays the span guard lock status for the Gigabit Ethernet port 1 in slot 4:

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

clear spantree spanguardlockThis command unlocks one or more ports locked by the Spanning Tree span guard function.

Syntaxclear spantree spanguardlock port-string

Parameters

DefaultsNone.

ModeSwitch command, read‐write.

UsageWhen span guard is enabled, it locks ports that receive BPDUs when those ports have been defined as edge (user) ports (using the set spantree adminedge command). The command set spantree spanguardlock can also be used to clear the span guard lock on a port.

port port-string Specifies the ports for which to show span guard lock status. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

port-string Specifies ports to unlock. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

Matrix X Router Command Line Interface Reference Guide 16-33

Page 34: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ExampleThe following example unlocks all the Gigabit Ethernet ports in slot 4:

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

set spantree spanguardlockThis command unlocks one or more ports locked by the Spanning Tree span guard function.

Syntaxset spantree spanguardlock port-string

Parameters

DefaultsNone.

ModeSwitch command, read‐write.

UsageWhen span guard is enabled, it locks ports that receive BPDUs when those ports have been defined as edge (user) ports (using the set spantree adminedge command). The command clear spantree spanguardlock can also be used to clear the span guard lock on a port.

ExampleThe following example unlocks all the Gigabit Ethernet ports in slot 4:

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

port-string Specifies ports to unlock. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

16-34 Spanning Tree Commands

Page 35: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree defaultThis command restores default values to a Spanning Tree.

Syntaxclear spantree default [sid]

Parameters

DefaultsIf sid is not specified, defaults will be restored on Spanning Tree 0.

ModeSwitch command, read‐write

ExampleThe following example restores Spanning Tree defaults on SID 1:

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

show spantree debugThis command displays Spanning Tree debug counters for one or more ports.

Syntaxshow spantree debug [port port-string] [sid sid] [active]

Parameters

Defaults• If port‐string is not specified, debug counters will be displayed for all Spanning Tree ports.

• If sid is not specified, debug counters will be displayed for Spanning Tree 0.

• If active is not specified, debug counters will be displayed for active and inactive Spanning Tree ports.

sid (Optional) Restores defaults on a specific Spanning Tree. Valid values are 0 ‐ 4094. If not specified, SID 0 is assumed.

port port‐string (Optional) Displays debug counters for specific ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2. 

sid sid (Optional) Displays the debug counters for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 is assumed.

active (Optional) Displays only the debug counters for ports that have received at least one configuration or RSTP BPDU. 

Matrix X Router Command Line Interface Reference Guide 16-35

Page 36: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

ModeSwitch command, read‐only

ExampleThe following example displays Spanning Tree debug counters for link aggregation port 3, SID 0:

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

Page 37: Comandos spanning tree

Reviewing and Setting Spanning Tree Bridge Parameters

clear spantree debugThis command clears Spanning Tree debug counters.

Syntaxclear spantree debug

ParametersNone.

DefaultsNone.

ModeSwitch command, read‐write

ExampleThe following example clears Spanning Tree debug counters:

matrix-x(switch-su)#clear spantree debug

Matrix X Router Command Line Interface Reference Guide 16-37

Page 38: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

Reviewing and Setting Spanning Tree Port Parameters

PurposeThese switch commands are used to display and set Spanning Tree port or module parameters, including enabling or disabling the Spanning Tree algorithm on one or more ports, displaying designated bridge, port and root information, displaying blocked ports, displaying and setting Spanning Tree port priorities and costs, configuring edge port parameters, and setting point‐to‐point protocol mode.

CommandsThe commands used to review and set Spanning Tree port parameters are listed below.

For information about... Refer to page...

show spantree portenable 16-39

set spantree portenable 16-40

clear spantree portenable 16-40

show spantree portadmin 16-41

set spantree portadmin 16-41

clear spantree portadmin 16-42

set spantree protomigration 16-42

show spantree portstate 16-43

show spantree blockedports 16-44

show spantree portpri 16-45

set spantree portpri 16-46

clear spantree portpri 16-46

set spantree porthello 16-47

clear spantree porthello 16-48

show spantree portcost 16-49

show spantree adminpathcost 16-49

set spantree adminpathcost 16-50

clear spantree adminpathcost 16-51

show spantree adminedge 16-51

set spantree adminedge 16-52

clear spantree adminedge 16-53

show spantree operedge 16-53

show spantree adminpoint 16-54

show spantree operpoint 16-54

16-38 Spanning Tree Commands

Page 39: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

show spantree portenableThis command displays the port status on one or more Spanning Tree ports.

Syntaxshow spantree portenable [port port-string]

Parameters

DefaultsIf port‐string is not specified, status will be displayed for all ports.

ModeSwitch command, read‐only

ExampleThe following example displays status for port ge. 5.12:

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

set spantree adminpoint 16-55

clear spantree adminpoint 16-56

For information about... Refer to page...

port port‐string (Optional) Displays status for specific ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

Matrix X Router Command Line Interface Reference Guide 16-39

Page 40: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

set spantree portenableThis command sets the port status on one or more Spanning Tree ports.

Syntaxset spantree portenable port-string {enable | disable}

Parameters

DefaultsEnabled.

ModeSwitch command, read‐write

ExampleThe following example enables Spanning Tree port ge. 5. 12:

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

clear spantree portenableThis command resets the default value for one or more Spanning Tree ports to enabled.

Syntaxclear spantree portenable [port-string]

Parameters

DefaultsIf port‐string is not specified, port enable will be reset on all ports.

ModeSwitch command, read‐write

ExampleThe following example resets the default Spanning Tree port status value to enabled on ten Gigabit port 2 in slot 1:

matrix-x(switch-su)clear spantree portenable tg.2.1

port-string Specifies the ports to enable or disable. Refer to Port Strings Used in the CLI on page 10‐2 for a detailed description of port‐string values.

enable | disable Enables or disables the Spanning Tree port.

port-string (Optional) Resets port enable of specific ports. Refer to Port Strings Used in the CLI on page 10‐2 for a detailed description of port‐string values.

16-40 Spanning Tree Commands

Page 41: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

show spantree portadminThis command displays the status of the Spanning Tree algorithm on one or more ports.

Syntaxshow spantree portadmin [port port-string]

Parameters

DefaultsIf port‐string is not specified, status will be displayed for all ports.

ModeSwitch command, read‐only

ExampleThe following example displays port admin status for ten Gigabit Ethernet port 1 in slot 7:

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

set spantree portadminThis command disables or enables the Spanning Tree algorithm on one or more ports.

Syntaxset spantree portadmin port-string {disable | enable}

Parameters

DefaultsDisabled.

ModeSwitch command, read‐write

ExampleThe following example disables Spanning Tree on ten Gigabit Ethernet port 2 in slot 5:

matrix-x(switch-su)# set spantree portadmin tg.5.2 disable

port port‐string (Optional) Displays status for specific ports. Refer to Port Strings Used in the CLI on page 10‐2 for a detailed description of port‐string values.

port-string Specifies the ports for which to enable or disable Spanning Tree. Refer to Port Strings Used in the CLI on page 10‐2 for a detailed description of port‐string values.

disable | enable Disables or enables Spanning Tree.

Matrix X Router Command Line Interface Reference Guide 16-41

Page 42: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

clear spantree portadminThis command resets the default Spanning Tree admin status to disable on one or more ports.

Syntaxclear spantree portadmin port-string

Parameters

DefaultsDisable.

ModeSwitch command, read‐write

ExampleThe following example resets the default Spanning Tree admin state to enable Gigabit Ethernet port 2 in slot 5:

matrix-x(switch-su)# clear spantree portadmin tg.5.2

set spantree protomigrationThis command resets the protocol state migration machine for one or more Spanning Tree ports. When operating in RSTP mode, this forces a port to transmit MSTP BPDUs.

Syntaxset spantree protomigration port-string true

Parameters

DefaultsNone.

ModeSwitch command, read‐write

port-string Resets the default admin status on specific ports. Refer to Port Strings Used in the CLI on page 10‐2 for a detailed description of port‐string values.

port-string Specifies the ports for which protocol migration mode will be enabled. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

true Enables protocol migration mode.

16-42 Spanning Tree Commands

Page 43: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

ExampleThe following example resets the protocol state migration machine on ten Gigabit Ethernet port 2 in slot 5:

matrix-x(switch-su)# set spantree protomigration tg.5.2 true

show spantree portstateThis command displays the state (blocking, forwarding, or listening) for a port on one or more Spanning Trees.

Syntaxshow spantree portstate [port port-string] [sid sid]

Parameters

Defaults• If port‐string is not specified, current state will be displayed for all Spanning Tree ports.

• If sid is not specified, current port state will be displayed for Spanning Tree 0.

ModeSwitch command, read‐only

ExampleThe following example displays the Spanning Tree state for ten Gigabit Ethernet port 2 in slot 7:

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

port port‐string (Optional) Displays the Spanning Tree state for specific Spanning Tree ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

sid sid (Optional) Displays the state for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 is assumed.

Matrix X Router Command Line Interface Reference Guide 16-43

Page 44: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

show spantree blockedportsThis command displays the ports in a Spanning Tree that are enabled, have link and are blocked. Ports that do not have link or are disabled are not displayed.

Syntaxshow spantree blockedports [sid]

Parameters

DefaultsIf sid is not specified, blocked ports will be displayed for Spanning Tree 0.

ModeSwitch command, read‐only.

UsageA port in a blocked state is enabled and has link but does not participate in the transmission of frames, thus preventing duplication arising through multiple paths existing in the active topology of the bridged LAN. It receives Spanning Tree configuration messages, but does not forward packets.

ExampleThe following example displays blocked ports on SID 1:

matrix-x(switch-su)# show spantree blockedports 11 ge.5.11 ge.5.31 ge.5.51 ge.5.61 ge.5.71 ge.5.81 ge.5.101 ge.5.111 ge.5.12

Number of blocked ports in SID 1 : 9

sid (Optional) Displays ports on a specific Spanning Tree that are enabled, have link and are blocked, ranging from 0 to 4094.

16-44 Spanning Tree Commands

Page 45: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

show spantree portpriThis command shows the Spanning Tree priority for one or more ports. Port priority is a component of the port ID, which is one element used in determining Spanning Tree port roles.

Syntaxshow spantree portpri [port port-string] [sid sid]

Parameters

Defaults• If port‐string is not specified, port priority will be displayed for all Spanning Tree ports.

• If sid is not specified, port priority will be displayed for Spanning Tree 0.

ModeSwitch command, read‐only.

ExampleThe following example displays the port priority for ten Gigabit Ethernet port 2 in slot 7:

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

port port‐string (Optional) Specifies the ports for which to display Spanning Tree priority. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

sid sid (Optional) Displays port priority for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 is assumed.

Matrix X Router Command Line Interface Reference Guide 16-45

Page 46: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

set spantree portpriThis command sets a port’s Spanning Tree priority.

Syntaxset spantree portpri port-string priority [sid sid]

Parameters

DefaultsIf sid is not specified, port priority will be set for Spanning Tree 0.

ModeSwitch command, read‐write.

ExampleThe following example sets the priority of Gigabit Ethernet port 3 in slot 1 to 240 on SID 1.

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

clear spantree portpriThis command resets the bridge priority of a Spanning Tree port to a default value of 128.

Syntaxclear spantree portpri port-string [sid sid]

Parameters

DefaultsIf sid is not specified, port priority will be set for Spanning Tree 0.

port-string Specifies the ports for which to set Spanning Tree port priority. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

priority Specifies a number that represents the priority of a link in a Spanning Tree bridge, ranging from 0 to 240 (in increments of 16) with 0 indicating high priority.

sid sid (Optional) Sets port priority for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 is assumed.

port‐string Specifies the ports for which to set Spanning Tree port priority. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

sid sid (Optional) Resets the port priority for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 will be assumed.

16-46 Spanning Tree Commands

Page 47: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

ModeSwitch command, read‐write.

ExampleThe following example resets the priority of Gigabit Ethernet port 3 in slot 1 to 128 on SID 1.

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

set spantree porthelloThis command sets the hello time for one or more Spanning Tree ports.

Syntaxset spantree porthello port-string interval

Parameters

Defaults2 seconds.

ModeSwitch command, read‐write.

UsageThis command sets the Spanning Tree port hello time, which is the time interval in seconds the ports will transmit BPDUs.

This command can be executed only if bridge hello mode is disabled. Refer to the set spantree bridgehellomode command for information about disabling bridge hello mode.

ExampleThe following example sets the hello time to 10 seconds for port ge.1.4:

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

port‐string Specifies the ports for which to set hello time.

interval Specifies the number of seconds the system waits before broadcasting a bridge hello message. Valid values are 1 ‐ 10.

Matrix X Router Command Line Interface Reference Guide 16-47

Page 48: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

clear spantree porthelloThis command resets the hello time for one or more Spanning Tree ports to the default.

Syntaxclear spantree porthello port-string

Parameters

Defaults2 seconds

ModeSwitch command, read‐write.

ExampleThe following example resets the hello time to 2 seconds for port ge.1.4:

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

show spantree porthelloThis command displays the hello time for all ports.

Syntaxshow spantree porthello [port-range]

Parameters

DefaultsIf a port string is not specified, the hello time for all ports is displayed.

ModeSwitch, read‐only.

ExampleThe following example shows the port hello time for all ports.

matrix-x(switch-su)-> show spantree porthelloPort 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 :

port‐string Specifies the ports for which to reset hello time.

port‐string (Optional) Specifies the ports for which to display.

16-48 Spanning Tree Commands

Page 49: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

show spantree portcostThis command displays cost values assigned to one or more Spanning Tree ports.

Syntaxshow spantree portcost [port port-string] [sid sid]

Parameters

Defaults• If port‐string is not specified, port cost will be displayed for all Spanning Tree ports.

• If sid is not specified, port cost will be displayed for all Spanning Trees.

ModeSwitch command, read‐only

ExampleThe following example displays the port cost for Gigabit Ethernet port 21 in slot 7:

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

show spantree adminpathcostThis command displays the admin path cost for a port on one or more Spanning Trees.

Syntaxshow spantree adminpathcost [port port-string] [sid sid]

Parameters

Defaults• If port‐string is not specified, admin path cost for all Spanning Tree ports will be displayed.

• If sid is not specified, admin path cost for Spanning Tree 0 will be displayed.

port port‐string (Optional) Displays cost values for specific ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2

sid sid (Optional) Displays port cost for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 will be assumed.

port port‐string (Optional) Displays the admin path cost value for specific ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

sid sid (Optional) Displays the admin path cost for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 will be assumed.

Matrix X Router Command Line Interface Reference Guide 16-49

Page 50: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

ModeSwitch command, read‐only

ExampleThe following example displays the admin path cost for Gigabit Ethernet port 10 in slot 7 on SID 1:

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

set spantree adminpathcostThis command sets the administrative path cost on a port and one or more Spanning Trees.

Syntaxset spantree adminpathcost port-string cost [sid sid]

Parameters

DefaultsIf sid is not specified, admin path cost will be set for Spanning Tree 0.

ModeSwitch command, read‐write

UsageBy default, the admin path cost value is set to 0, which forces the port to recalculate Spanning Tree path cost based on the speed of the port and whether or not legacy path cost is enabled. Refer to the set spantree legacypathcost command for more details.

ExampleThe following example sets the admin path cost to 200 for Gigabit Ethernet port 10 in slot 7 on SID 1:

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

port‐string Sets the ports on which to set an admin path cost. Refer to Port Strings Used in the CLI on page 10‐2 for a detailed description of port‐string values.

cost Specifies the port path cost. Va1id values are:

0 ‐ 65535 if legacy path cost is enabled. 

0 ‐ 200000000 if legacy path cost is disabled.

sid sid (Optional) Sets the admin path cost for a specific Spanning Tree identifier. Valid values are 0 ‐ 4094. If not specified, SID 0 will be assumed.

16-50 Spanning Tree Commands

Page 51: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

clear spantree adminpathcostThis command resets the Spanning Tree default value for port admin path cost to 0.

Syntaxclear spantree adminpathcost port-string [sid sid]

Parameters

DefaultsIf sid is not specified, admin path cost will be reset for Spanning Tree 0.

ModeSwitch command, read‐write

UsageThis command will force Spanning Tree path cost to be recalculated on specified ports based on whether or not set spantree legacypathcost is enabled.

ExampleThe following example resets the admin path cost to 0 for port 10 in slot 7 on SID 1:

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

show spantree adminedgeThis command displays the edge port administrative status for a port.

Syntaxshow spantree adminedge port-string

Parameters

DefaultsNone.

port‐string Specifies the ports for which to reset admin path cost. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

sid sid (Optional) Resets the admin path cost for specific Spanning Tree. Valid values are 0 ‐ 4094. If not specified, SID 0 is assumed.

port‐string Specifies the ports for which to display edge port administrative status. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

Matrix X Router Command Line Interface Reference Guide 16-51

Page 52: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

ModeSwitch command, read‐only

ExampleThe following example displays the edge port status for ten Gigabit port 2 in slot 1:

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

set spantree adminedgeThis command sets the edge port administrative status on a Spanning Tree port.

Syntaxset spantree adminedge port-string {true | false}

Parameters

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example sets Gigabit Ethernet port 11 in slot 1 as an edge port:

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

port-string Specifies the edge port. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

true | false Enables (true) or disables (false) the specified port as a Spanning Tree edge port.

16-52 Spanning Tree Commands

Page 53: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

clear spantree adminedgeThis command resets a Spanning Tree port to non‐edge status.

Syntaxclear spantree adminedge port-string

Parameters

DefaultsNone.

ModeSwitch command, read‐write.

ExampleThe following example resets port 11 in slot 1 as a non‐edge port:

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

show spantree operedgeThis command displays the Spanning Tree edge port operating status for a port. 

Syntaxshow spantree operedge [port port-string]

Parameters

DefaultsIf port‐string is not specified edge port operating status will be displayed for all Spanning Tree ports.

ModeSwitch command, read‐only.

ExampleThe following example displays the edge port status for port 21 in slot 7:

matrix-x(switch-su)# show spantree operedge port ge.7.21

port‐string Specifies ports on which to reset edge port status. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

port port‐string (Optional) Displays edge port operating status for specific ports. See Port Strings Used in the CLI on page 10‐2 for a description of port‐string values.

Matrix X Router Command Line Interface Reference Guide 16-53

Page 54: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

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

show spantree adminpointThis command displays the administrative point‐to‐point status of the LAN segment attached to a Spanning Tree port.

Syntaxshow spantree adminpoint [port port-string]

Parameters

DefaultsIf port‐string is not specified, status will be displayed for all Spanning Tree ports.

ModeSwitch command, read‐only.

ExampleThe following example displays the point‐to‐point status of the LAN segment attached to port 21 in slot 7.

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

show spantree operpointThis command displays the operating point‐to‐point status of the LAN segment attached to a port.

Syntaxshow spantree operpoint [port port-string]

Parameters

DefaultsIf not specified, status will be displayed for all ports.

ModeSwitch command, read‐only.

port port‐string (Optional) Displays point‐to‐point status for specific ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

port port‐string  (Optional) Displays point‐to‐point operating status for specific ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

16-54 Spanning Tree Commands

Page 55: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

ExampleThe following example displays the point‐to‐point status operating of the LAN segment attached to port 21 in slot 7.

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

set spantree adminpointThis command sets the administrative point‐to‐point status of the LAN segment attached to a Spanning Tree port.

Syntaxset spantree adminpoint port-string {true | false | auto}

Parameters

ModeSwitch command, read‐write.

ExampleThe following example sets the LAN attached to port 3 in slot 1 as a point‐to‐point segment.

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

port‐string Specifies the port on which to set point‐to‐point protocol status. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

true | false | auto Specifies the point‐to‐point status of the LAN attached to the specified port.

• true forces the port to be considered point‐to‐point.

• false forces the port to be considered non point‐to‐point.

• auto (the default setting) allows the firmware to determine the port’s point‐to‐point status.

Matrix X Router Command Line Interface Reference Guide 16-55

Page 56: Comandos spanning tree

Reviewing and Setting Spanning Tree Port Parameters

clear spantree adminpointThis command resets the administrative point‐to‐point status of the LAN segment attached to a Spanning Tree port to auto mode.

Syntaxclear spantree adminpoint [port-string]

Parameters

DefaultsIf port‐string is not specified, point‐to‐point status will be reset for all Spanning Tree ports.

ModeSwitch command, read‐write.

ExampleThe following example resets all ports on all Spanning Trees to auto point‐to‐point status.

matrix-x(switch-su)# clear spantree adminpoint

port‐string (Optional) Resets point‐to‐point protocol status on specific ports. For a detailed description of possible port‐string values, refer to Port Strings Used in the CLI on page 10‐2.

16-56 Spanning Tree Commands