Catalyst 4500 Series Switch Cisco IOS Command Reference, 12.2(25)SG
snmp ifindex clear through vtp v2-mode

Table Of Contents

snmp ifindex clear

snmp ifindex persist

snmp-server enable traps

snmp-server ifindex persist

snmp-server ifindex persist compress

spanning-tree backbonefast

spanning-tree bpdufilter

spanning-tree bpduguard

spanning-tree cost

spanning-tree etherchannel guard misconfig

spanning-tree extend system-id

spanning-tree guard

spanning-tree link-type

spanning-tree loopguard default

spanning-tree mode

spanning-tree mst

spanning-tree mst configuration

spanning-tree mst forward-time

spanning-tree mst hello-time

spanning-tree mst max-age

spanning-tree mst max-hops

spanning-tree mst root

spanning-tree pathcost method

spanning-tree portfast (interface configuration mode)

spanning-tree portfast bpdufilter default

spanning-tree portfast bpduguard default

spanning-tree portfast default

spanning-tree port-priority

spanning-tree uplinkfast

spanning-tree vlan

speed

storm-control

storm-control broadcast include multicast

switchport

switchport access vlan

switchport block

switchport mode

switchport port-security

switchport private-vlan association trunk

switchport private-vlan host-association

switchport private-vlan mapping

switchport private-vlan trunk allowed vlan

switchport private-vlan trunk native vlan tag

switchport trunk

system mtu

test cable-diagnostics tdr

traceroute mac

traceroute mac ip

tx-queue

udld (global configuration mode)

udld (interface configuration mode)

udld reset

unidirectional

username

verify

vlan (VLAN Database mode)

vlan access-map

vlan database

vlan dot1q tag native

vlan filter

vlan internal allocation policy

vmps reconfirm (global configuration)

vmps reconfirm (privileged EXEC)

vmps retry

vmps server

vtp (global configuration mode)

vtp client

vtp domain

vtp password

vtp pruning

vtp server

vtp transparent

vtp v2-mode


2.2

snmp ifindex clear

To clear any previously configured snmp ifindex commands that were entered for a specific interface, use the snmp ifindex clear command.

snmp ifindex clear

Syntax Description

This command has no arguments or keywords.

Defaults

This command has no default settings.

Command Modes

Interface configuration mode

Command History

Release
Modification

12.1(19)EW

Support for this command was introduced on the Catalyst 4500 series switches.


Usage Guidelines

Interface index persistence occurs when ifIndex values in the interface MIB (IF-MIB) persist across reboots and allow for consistent identification of specific interfaces using SNMP.

Use the snmp ifindex clear command on a specific interface when you want that interface to use the global configuration setting for ifIndex persistence. This command clears any ifIndex configuration commands previously entered for that specific interface.

Examples

This example shows how to enable ifIndex persistence for all interfaces:

Router(config)# snmp-server ifindex persist

This example shows how to disable IfIndex persistence for FastEthernet 1/1 only:

Router(config)# interface fastethernet 1/1
Router(config-if)# no snmp ifindex persist
Router(config-if)# exit

This example shows how to clear the ifIndex configuration from the FastEthernet 1/1 configuration:

Router(config)# interface fastethernet 1/1
Router(config-if)# snmp ifindex clear
Router(config-if)# exit

As a result of this sequence of commands, ifIndex persistence is enabled for all interfaces that are specified by the snmp-server ifindex persist global configuration command.

Related Commands

snmp ifindex persist
snmp-server ifindex persist

snmp ifindex persist

To enable ifIndex values in the Interfaces MIB (IF-MIB) that persist across reboots (ifIndex persistence) on a specific interface, use the snmp ifindex persist command. To disable ifIndex persistence only on a specific interface, use the no form of this command.

snmp ifindex persist

no snmp ifindex persist

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled.

Command Modes

Interface configuration mode

Command History

Release
Modification

12.1(19)EW

Support for this command was introduced on the Catalyst 4500 series switches.


Usage Guidelines

Interface index persistence occurs when ifIndex values in the IF-MIB persist across reboots and allow for consistent identification of specific interfaces using SNMP.

The snmp ifindex persist interface configuration command enables and disables ifIndex persistence for individual entries (that correspond to individual interfaces) in the ifIndex table of the IF-MIB.

The snmp-server ifindex persist global configuration command enables and disables ifIndex persistence for all interfaces on the routing device. This action applies only to interfaces that have ifDescr and ifIndex entries in the ifIndex table of the IF-MIB.

Examples

This example shows how to enable ifIndex persistence for interface FastEthernet 1/1 only:

Router(config)# interface fastethernet 1/1
Router(config-if)# snmp ifindex persist
Router(config-if)# exit

This example shows how to enable ifIndex persistence for all interfaces, and then disable ifIndex persistence for interface FastEthernet 1/1 only:

Router(config)# snmp-server ifindex persist
Router(config)# interface fastethernet 1/1
Router(config-if)# no snmp ifindex persist
Router(config-if)# exit

Related Commands

snmp ifindex clear
snmp-server ifindex persist

snmp-server enable traps

To enable SNMP notifications (traps or informs), use the snmp-server enable traps command. To disable all SNMP notifications, use the no form of this command.

snmp-server enable traps [flash [insertion | removal] | fru-ctrl |
port-security
[trap-rate trap-rate] | removal | stpx | vlancreate | vlandelete | vtp]

no snmp-server enable traps flash [insertion | removal] | fru-ctrl | port-security [trap-rate trap-rate] | removal | stpx | vlancreate | vlandelete | vtp]

Syntax Description

flash

(Optional) Controls the SNMP FLASH trap notifications.

insertion

(Optional) Controls the SNMP Flash insertion trap notifications.

removal

(Optional) Controls the SNMP Flash removal trap notifications.

fru-ctrl

(Optional) Controls the SNMP entity FRU control trap notifications.

port-security

(Optional) Controls the SNMP trap generation.

trap-rate trap-rate

(Optional) Sets the number of traps per second.

stpx

(Optional) Controls all the traps defined in CISCO-STP-EXTENSIONS-MIB notifications.

vlancreate

(Optional) Controls the SNMP VLAN created trap notifications.

vlandelete

(Optional) Controls the SNMP VLAN deleted trap notifications.

vtp

(Optional) Controls the SNMP VTP trap notifications.


Defaults

SNMP notifications are disabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(13)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

If you enter this command without an option, all notification types controlled by this command are enabled.

SNMP notifications can be sent as traps or inform requests. This command enables both traps and inform requests for the specified notification types. To specify whether the notifications should be sent as traps or informs, use the snmp-server host [traps | informs] command.

The snmp-server enable traps command is used in conjunction with the snmp-server host command. Use the snmp-server host command to specify which host or hosts receive SNMP notifications. To send notifications, you must configure at least one snmp-server host command.

This list of the MIBs is used for the traps:

flash—Controls SNMP FLASH traps from the CISCO-FLASH-MIB.

insertion—Controls the SNMP Flash insertion trap notifications.

removal—Controls the SNMP Flash removal trap notifications.

fru-ctrl—Controls the FRU control traps from the CISCO-ENTITY-FRU-CONTROL-MIB.

port-security—Controls the port-security traps from the CISCO-PORT-SECURITY-MIB.

stpx—Controls all the traps from the CISCO-STP-EXTENSIONS-MIB.

vlancreate—Controls SNMP VLAN created trap notifications.

vlandelete—Controls SNMP VLAN deleted trap notifications.

vtp—Controls the VTP traps from the CISCO-VTP-MIB.

Examples

This example shows how to send all traps to the host is specified by the name myhost.cisco.com using the community string defined as public:

Switch(config)# snmp-server enable traps 
Switch(config)# snmp-server host myhost.cisco.com public
Switch(config)#  

Related Commands

Refer to Cisco IOS documentation for additional snmp-server enable traps commands.

snmp-server ifindex persist

To globally enable ifIndex values that will remain constant across reboots for use by SNMP, use the snmp-server ifindex persist command. To globally disable inIndex persistence, use the no form of this command.

snmp-server ifindex persist

no snmp-server ifindex persist

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled.

Command Modes

Global configuration mode

Command History

Release
Modification

12.1(19)EW

Support for this command was introduced on the Catalyst 4500 series switches.


Usage Guidelines

Interface index persistence occurs when ifIndex values in the IF-MIB persist across reboots and allow for consistent identification of specific interfaces using SNMP.

The snmp-server ifindex persist global configuration command does not override the interface-specific configuration. To override the interface-specific configuration of ifIndex persistence, enter the no snmp ifindex persist and snmp ifindex clear interface configuration commands.

Entering the no snmp-server ifindex persist global configuration command enables and disables ifIndex persistence for all interfaces on the routing device using ifDescr and ifIndex entries in the ifIndex table of the IF-MIB.

Examples

This example shows how to enable ifIndex persistence for all interfaces:

Router(config)# snmp-server ifindex persist

Related Commands

snmp ifindex clear
snmp ifindex persist

snmp-server ifindex persist compress

To configure the format of the ifIndex table in a compressed format, use the snmp-server ifindex persist compress command. To place the table in a decompressed format, use the no form of this command.

snmp-server ifindex persist compress

no snmp-server ifindex persist compress

Syntax Description

This command has no arguments or keywords.

Defaults

Disabled

Command Modes

Global configuration mode.

Command History

Release
Modification

12.2(20)EWA

Support for this command was introduced on the Catalyst 4500 series switches.


Usage Guidelines

This command is hidden on Supervisor Engine V and later supervisor engines because the ifIndex table is always in a compressed format on those supervisor engines.

At bootup, if the nvram:ifIndex-table.gz file (the ifIndex table ina compressed format) is present on a Supervisor Engine II+, Supervisor Engine III, or Supervisor Engine IV, the snmp-server ifindex persist compress command is automatically run even if the startup-config file does not have this configuration.

Examples

This example shows how to enable compression of the ifIndex table:

Router(config)# snmp-server ifindex persist compress

This example shows how to disable compression of the ifIndex table:

Router(config)# no snmp-server ifindex persist compress

Related Commands

snmp ifindex clear
snmp ifindex persist
snmp-server ifindex persist

spanning-tree backbonefast

To enable BackboneFast on a spanning-tree VLAN, use the spanning-tree backbonefast command. To disable BackboneFast, use the no form of this command.

spanning-tree backbonefast

no spanning-tree backbonefast

Syntax Description

This command has no arguments or keywords.

Defaults

BackboneFast is disabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(8a)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

BackboneFast should be enabled on all Catalyst 4006 family switches to allow the detection of indirect link failures. Enabling BackboneFast starts the spanning-tree reconfiguration more quickly.

Examples

This example shows how to enable BackboneFast on all VLANs:

Switch(config)# spanning-tree backbonefast
Switch(config)# 

Related Commands

spanning-tree cost
spanning-tree port-priority
spanning-tree portfast default
spanning-tree portfast (interface configuration mode)
spanning-tree uplinkfast
spanning-tree vlan
show spanning-tree

spanning-tree bpdufilter

To enable BPDU filtering on an interface, use the spanning-tree bpdufilter command. To return to the default settings, use the no form of this command.

spanning-tree bpdufilter {enable | disable}

no spanning-tree bpdufilter

Syntax Description

enable

Enables BPDU filtering on this interface.

disable

Disables BPDU filtering on this interface.


Defaults

Disabled

Command Modes

Interface configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines


Caution Use care when entering the spanning-tree bpdufilter enable command. Enabling BPDU filtering on an interface is approximately equivalent to disabling the spanning tree for this interface. It is possible to create bridging loops if this command is not correctly used.

When configuring Layer 2 protocol tunneling on all the service provider edge switches, you must enable spanning-tree BPDU filtering on the 802.1Q tunnel ports by entering the spanning-tree bpdufilter enable command.

BPDU filtering allows you to prevent a port from sending and receiving BPDUs. The configuration is applicable to the whole interface, whether it is trunking or not. This command has three states:

spanning-tree bpdufilter enableThis state unconditionally enables the BPDU filter feature on the interface.

spanning-tree bpdufilter disableThis state unconditionally disables the BPDU filter feature on the interface.

no spanning-tree bpdufilterThis state enables the BPDU filter feature on the interface if the interface is in operational PortFast state and if the spanning-tree portfast bpdufilter default command is configured.

Examples

This example shows how to enable the BPDU filter feature on this interface:

Switch(config-if)# spanning-tree bpdufilter enable
Switch(config-if)# 

Related Commands

show spanning-tree
spanning-tree portfast bpdufilter default

spanning-tree bpduguard

To enable BPDU guard on an interface, use the spanning-tree bpduguard command. To return to the default settings, use the no form of this command.

spanning-tree bpduguard {enable | disable}

no spanning-tree bpduguard

Syntax Description

enable

Enables BPDU guard on this interface.

disable

Disables BPDU guard on this interface.


Defaults

BPDU guard is disabled.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

BPDU guard is a feature that prevents a port from receiving BPDUs. This feature is typically used in a service provider environment where the administrator wants to prevent an access port from participating in the spanning tree. If the port still receives a BPDU, it is put in the ErrDisable state as a protective measure. This command has three states:

spanning-tree bpduguard enableThis state unconditionally enables BPDU guard on the interface.

spanning-tree bpduguard disableThis state unconditionally disables BPDU guard on the interface.

no spanning-tree bpduguard—This state enables BPDU guard on the interface if it is in the operational PortFast state and if the spanning-tree portfast bpduguard default command is configured.

Examples

This example shows how to enable BPDU guard on this interface:

Switch(config-if)# spanning-tree bpduguard enable
Switch(config-if)# 

Related Commands

show spanning-tree
spanning-tree portfast bpduguard default

spanning-tree cost

To calculate the path cost of STP on an interface, use the spanning-tree cost command. To revert to the default, use the no form of this command.

spanning-tree cost cost

no spanning-tree cost cost

Syntax Description

cost

Path cost; valid values are from 1 to 200,000,000.


Defaults

The default settings are as follows:

FastEthernet—19

GigabitEthernet—1

Command Modes

Interface configuration

Command History

Release
Modification

12.1(8a)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

When you configure the cost, the higher values indicate higher costs. The range applies regardless of the protocol type that is specified. The path cost is calculated, based on the interface bandwidth.

Examples

This example shows how to access an interface and set a path cost value of 250 for the spanning-tree VLAN that is associated with that interface:

Switch(config)# interface fastethernet 2/1
Switch(config-if)# spanning-tree cost 250
Switch(config-if)# 

Related Commands

spanning-tree port-priority
spanning-tree portfast default
spanning-tree portfast (interface configuration mode)
spanning-tree uplinkfast
spanning-tree vlan
show spanning-tree

spanning-tree etherchannel guard misconfig

To display an error message when a loop due to a channel misconfiguration is detected, use the spanning-tree etherchannel guard misconfig command. To disable the feature, use the no form of this command.

spanning-tree etherchannel guard misconfig

no spanning-tree etherchannel guard misconfig

Syntax Description

This command has no arguments or keywords.

Defaults

Spanning-tree EtherChannel guard is enabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(8a)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

When an EtherChannel guard misconfiguration is detected, this message is displayed:

%SPANTREE-2-CHNL_MISCFG:Detected loop due to etherchannel misconfig of interface 
Port-Channel1

To determine which local ports are involved in the misconfiguration, enter the show interfaces status err-disabled command. To check the EtherChannel configuration on the remote device, enter the show etherchannel summary command on the remote device.

After you correct the configuration, enter the shutdown and the no shutdown commands on the associated port-channel interface.

Examples

This example shows how to enable the EtherChannel guard misconfiguration feature:

Switch(config)# spanning-tree etherchannel guard misconfig
Switch(config)# 

Related Commands

show etherchannel
show interfaces status
shutdown
(refer to Cisco IOS documentation)

spanning-tree extend system-id

To enable the extended system ID feature on a chassis that supports 1024 MAC addresses, use the spanning-tree extend system-id command. To disable the feature, use the no form of this command.

spanning-tree extend system-id

no spanning-tree extend system-id

Syntax Description

This command has no arguments or keywords.

Defaults

Enabled on systems that do not provide 1024 MAC addresses.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

Releases 12.1(13)E and later support chassis with 64 or 1024 MAC addresses. For chassis with 64 MAC addresses, STP uses the extended system ID plus a MAC address to make the bridge ID unique for each VLAN.

You cannot disable the extended system ID on chassis that support 64 MAC addresses.

Enabling or disabling the extended system ID updates the bridge IDs of all active STP instances, which might change the spanning-tree topology.

Examples

This example shows how to enable the extended system ID:

Switch(config)# spanning-tree extend system-id 
Switch(config)# 

Related Commands

show spanning-tree

spanning-tree guard

To enable root guard, use the spanning-tree guard command. To disable root guard, use the no form of this command.

spanning-tree guard {loop | root | none}

no spanning-tree guard

Syntax Description

loop

Enables the loop guard mode on the interface.

root

Enables root guard mode on the interface.

none

Sets the guard mode to none.


Defaults

Root guard is disabled.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(8a)EW

Support for this command was introduced on the Catalyst 4500 series switch.

12.1(12c)EW

Loop guard support was added.


Examples

This example shows how to enable root guard:

Switch(config-if)# spanning-tree guard root
Switch(config-if)# 

Related Commands

show spanning-tree

spanning-tree link-type

To configure a link type for a port, use the spanning-tree link-type command. To return to the default settings, use the no form of this command.

spanning-tree link-type {point-to-point | shared}

no spanning-tree link-type

Syntax Description

point-to-point

Specifies that the interface is a point-to-point link.

shared

Specifies that the interface is a shared medium.


Defaults

Link type is derived from the duplex mode.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

RSTP+ fast transition works only on point-to-point links between two bridges.

By default, the switch derives the link type of a port from the duplex mode. A full-duplex port is considered as a point-to-point link while a half-duplex configuration is assumed to be on a shared link.

If you designate a port as a shared link, RSTP+ fast transition is forbidden, regardless of the duplex setting.

Examples

This example shows how to configure the port as a shared link:

Switch(config-if)# spanning-tree link-type shared
Switch(config-if)# 

Related Commands

show spanning-tree interface

spanning-tree loopguard default

To enable loop guard as the default on all ports of a specific bridge, use the spanning-tree loopguard default command. To disable loop guard, use the no form of this command.

spanning-tree loopguard default

no spanning-tree loopguard default

Syntax Description

This command has no keywords or arguments.

Defaults

Loop guard is disabled.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

Loop guard provides an additional security in the bridge network. Loop guard prevents alternate or root ports from becoming the designated port because of a failure leading to a unidirectional link.

Loop guard operates only on ports that are considered point-to-point by the spanning tree.

Individual loop-guard port configuration overrides this global default.

Examples

This example shows how to enable loop guard:

Switch(config)# spanning-tree loopguard default
Switch(config)# 

Related Commands

show spanning-tree
spanning-tree guard

spanning-tree mode

To switch between PVST+ and MST modes, use the spanning-tree mode command. To return to the default settings, use the no form of this command.

spanning-tree mode {pvst | mst | rapid-pvst}

no spanning-tree mode {pvst | mst | rapid-pvst}

Syntax Description

pvst

Specifies PVST+ mode.

mst

Specifies MST mode.

rapid-pvst

Specifies Rapid PVST mode.


Defaults

PVST+ mode

Command Modes

Configuration

Command History

Release
Modification

12.1(8a)EW

Support for this command was introduced on the Catalyst 4500 series switch.

12.1(19)EW

Support for the rapid-pvst keyword.


Usage Guidelines


Caution Be careful when using the spanning-tree mode command to switch between PVST+ and MST modes. When you enter the command, all spanning-tree instances are stopped for the previous mode and restarted in the new mode. Using this command may cause disruption of user traffic.

Examples

This example shows how to switch to MST mode:

Switch(config)# spanning-tree mode mst
Switch(config)# 

This example shows how to return to the default mode (PVST):

Switch(config)# no spanning-tree mode
Switch(config)# 

Related Commands

show spanning-tree mst

spanning-tree mst

To set the path cost and port-priority parameters for any MST instance (including the CIST with instance ID 0), use the spanning-tree mst command. To return to the default settings, use the no form of this command.

spanning-tree mst instance-id [cost cost] | [port-priority prio]

no spanning-tree mst instance-id {cost | port-priority}

Syntax Description

instance-id

Instance ID number; valid values are from 0 to 15.

cost cost

(Optional) Specifies the path cost for an instance; valid values are from 1 to 200000000.

port-priority prio

(Optional) Specifies the port priority for an instance; valid values are from 0 to 240 in increments of 16.


Defaults

Port priority is 128.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

The higher cost cost values indicate higher costs. When entering the cost value, do not include a comma in the entry; for example, enter 1000, not 1,000.

The higher port-priority prio values indicate smaller priorities.

By default, the cost depends on the port speed; faster interface speeds indicate smaller costs. MST always uses long path costs.

Examples

This example shows how to set the interface path cost:

Switch(config-if)# spanning-tree mst 0 cost 17031970
Switch(config-if)# 

This example shows how to set the interface priority:

Switch(config-if)# spanning-tree mst 0 port-priority 64
Switch(config-if)# 

Related Commands

show spanning-tree mst
spanning-tree port-priority

spanning-tree mst configuration

To enter the MST configuration submode, use the spanning-tree mst configuration command. To return to the default MST configuration, use the no form of this command.

spanning-tree mst configuration

no spanning-tree mst configuration

Syntax Description

This command has no arguments or keywords.

Defaults

The default settings are as follows:

No VLANs are mapped to any MST instance.

All VLANs are mapped to the CIST instance.

The region name is an empty string.

The revision number is 0.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

The MST configuration consists of three main parameters:

Instance VLAN mapping (see the instance command)

Region name (see the name command)

Configuration revision number (see the revision command)

By default, the value for the MST configuration is the default value for all its parameters.

The abort and exit commands allow you to exit the MST configuration submode. The difference between the two commands depends on whether you want to save your changes or not.

The exit command commits all the changes before leaving MST configuration submode. If you do not map the secondary VLANs to the same instance as the associated primary VLAN, when you exit the MST configuration submode, a message displays and lists the secondary VLANs that are not mapped to the same instance as the associated primary VLAN. The message is as follows:

These secondary vlans are not mapped to the same instance as their primary:
->3

The abort command leaves the MST configuration submode without committing any changes.

Whenever you change an MST configuration submode parameter, it can cause a loss of connectivity. To reduce the number of service disruptions, when you enter the MST configuration submode, you are changing a copy of the current MST configuration. When you are done editing the configuration, you can apply all the changes at once by using the exit keyword, or you can exit the submode without committing any change to the configuration by using the abort keyword.

In the unlikely event that two users enter a new configuration at exactly at the same time, this message is displayed:

Switch(config-mst)# exit
% MST CFG:Configuration change lost because of concurrent access
Switch(config-mst)# 

Examples

This example shows how to enter the MST configuration submode:

Switch(config)# spanning-tree mst configuration
Switch(config-mst)# 

This example shows how to reset the MST configuration to the default settings:

Switch(config)# no spanning-tree mst configuration
Switch(config)# 

Related Commands

instance
name
revision
show spanning-tree mst


spanning-tree mst forward-time

To set the forward delay timer for all the instances, use the spanning-tree mst forward-time command. To return to the default settings, use the no form of this command.

spanning-tree mst forward-time seconds

no spanning-tree mst forward-time

Syntax Description

seconds

Number of seconds to set the forward delay timer for all the instances on the Catalyst 4500 series switch; valid values are from 4 to 30 seconds.


Defaults

The forward delay timer is set for 15 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Examples

This example shows how to set the forward-delay timer:

Switch(config)# spanning-tree mst forward-time 20
Switch(config)# 

Related Commands

show spanning-tree mst

spanning-tree mst hello-time

To set the hello-time delay timer for all the instances, use the spanning-tree mst hello-time command. To return to the default settings, use the no form of this command.

spanning-tree mst hello-time seconds

no spanning-tree mst hello-time

Syntax Description

seconds

Number of seconds to set the hello-time delay timer for all the instances on the Catalyst 4500 series switch; valid values are from 1 to 10 seconds.


Defaults

The hello-time delay timer is set for 2 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

If you do not specify the hello-time value, the value is calculated from the network diameter.

Examples

This example shows how to set the hello-time delay timer:

Switch(config)# spanning-tree mst hello-time 3
Switch(config)# 

Related Commands

show spanning-tree mst

spanning-tree mst max-age

To set the max-age timer for all the instances, use the spanning-tree mst max-age command. To return to the default settings, use the no form of this command.

spanning-tree mst max-age seconds

no spanning-tree mst max-age

Syntax Description

seconds

Number of seconds to set the max-age timer for all the instances on the Catalyst 4500 series switch; valid values are from 6 to 40 seconds.


Defaults

The max-age timer is set for 20 seconds.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Examples

This example shows how to set the max-age timer:

Switch(config)# spanning-tree mst max-age 40
Switch(config)# 

Related Commands

show spanning-tree mst

spanning-tree mst max-hops

To specify the number of possible hops in the region before a BPDU is discarded, use the spanning-tree mst max-hops command. To return to the default settings, use the no form of this command.

spanning-tree mst max-hops hopnumber

no spanning-tree mst max-hops

Syntax Description

hopnumber

Number of possible hops in the region before a BPDU is discarded; valid values are from 1 to 40 hops.


Defaults

Number of hops is 20.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Examples

This example shows how to set the number of possible hops in the region before a BPDU is discarded to 25:

Switch(config)# spanning-tree mst max-hops 25
Switch(config)# 

Related Commands

show spanning-tree mst

spanning-tree mst root

To designate the primary root, secondary root, bridge priority, and timer value for an instance, use the spanning-tree mst root command. To return to the default settings, use the no form of this command.

spanning-tree mst instance-id root {primary | secondary} | {priority prio} [diameter dia [hello-time hello]]

no spanning-tree mst root

Syntax Description

instance-id

Instance identification number; valid values are from 1 to 15.

root

Configures switch as the root switch.

primary

Sets a high enough priority (low value) to make the bridge root of the spanning-tree instance.

secondary

Designates this switch as a secondary root if the primary root fails.

priority prio

Sets the bridge priority; see the "Usage Guidelines" section for valid values and additional information.

diameter dia

(Optional) Sets the timer values for the bridge based on the network diameter; valid values are from 2 to 7.

hello-time hello

(Optional) Specifies the duration between the generation of configuration messages by the root switch.


Defaults

Bridge priority is 32768.

Command Modes

Global configuration

Command History

Release
Modification

12.1(12c)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

The bridge priority can be set in increments of 4096 only. When you set the priority, valid values are 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 32768, 36864, 40960, 45056, 49152, 53248, 57344, and 61440.

You can set the priority to 0 to make the switch root.

The spanning-tree root secondary bridge priority value is 16384.

The diameter dia and hello-time hello options are available for instance 0 only.

If you do not specify the hello_time value, the value is calculated from the network diameter.

Examples

This example shows how to set the bridge priority:

Switch(config)# spanning-tree mst 0 root priority 4096
Switch(config)# 

This example shows how to set the priority and timer values for the bridge:

Switch(config)# spanning-tree mst 0 root primary diameter 7 hello-time 2
Switch(config)# spanning-tree mst 5 root primary
Switch(config)# 

Related Commands

show spanning-tree mst

spanning-tree pathcost method

To set the path cost calculation method, use the spanning-tree pathcost method command. To revert to the default setting, use the no form of this command.

spanning-tree pathcost method {long | short}

no spanning-tree pathcost method

Syntax Description

long

Specifies 32-bit-based values for port path costs.

short

Specifies 16-bit-based values for port path costs.


Defaults

Port path cost has 32-bit-based values.

Command Modes

Global configuration

Command History

Release
Modification

12.1(8a)EW

Support for this command was introduced on the Catalyst 4500 series switch.


Usage Guidelines

This command applies to all the spanning-tree instances on the switch.

The long path cost calculation method uses all the 32 bits for path cost calculation and yields values in the range of 1 through 200,000,000.

The short path cost calculation method (16 bits) yields values in the range of 1 through 65,535.

Examples

This example shows how to set the path cost calculation method to long:

Switch(config) spanning-tree pathcost method long
Switch(config)

This example shows how to set the path cost calculation method to short:

Switch(config) spanning-tree pathcost method short
Switch(config)

Related Commands

show spanning-tree

spanning-tree portfast (interface configuration mode)

To enable PortFast mode, where the interface is immediately put into the forwarding state upon linkup without waiting for the timer to expire, use the spanning-tree portfast command. To return to the default setting, use the no form of this command.

spanning-tree portfast {disable | trunk}

no spanning-tree portfast

Syntax Description

disable

Disables PortFast on the interface.

trunk

Enables PortFast on the interface even while in the trunk mode.


Defaults

PortFast mode is disabled.

Command Modes

Interface configuration

Command History

Release
Modification

12.1(8a)EW

Support for this command was introduced on the Catalyst 4500 series switch.

12.1(12c)EW

The disable and trunk options were added.


Usage Guidelines

You should use this feature only with interfaces that connect to end stations; otherwise, an accidental topology loop could cause a data packet loop and disrupt the Catalyst 4500 series switch and network operation.

An interface with PortFast mode enabled is moved directly to the spanning-tree forwarding state when linkup occurs without waiting for the standard forward-time delay.

Be careful when using the no spanning-tree portfast command. This command does not disable PortFast if the spanning-tree portfast default command is enabled.

This command has four states:

spanning-tree portfast—This command enables PortFast unconditionally on the given port.

spanning-tree portfast disable—This command explicitly disables PortFast for the given port. The configuration line shows up in the running-configuration as it is not the default.

spanning-tree portfast trunk—This command allows you to configure PortFast on trunk ports.


Note If you enter the spanning-tree portfast trunk command, the port is configured for PortFast even when in the access mode.


no spanning-tree portfast—This command implicitly enables PortFast if the spanning-tree portfast default command is defined in global configuration and if the port is not a trunk port. If you do not configure PortFast globally, the