Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
76 views20 pages

Nuance Power PDF Trial: Spanning Tree Commands

The document provides an overview of various spanning tree commands including commands to configure bridge forward time, hello time, BPDU handling, loopback guard, max age, mode, pathcost method, priority, and enable/disable spanning tree on interfaces and globally. It lists the command syntax and usage guidelines for each spanning tree command on separate pages numbered 1 through 18.

Uploaded by

James Omara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views20 pages

Nuance Power PDF Trial: Spanning Tree Commands

The document provides an overview of various spanning tree commands including commands to configure bridge forward time, hello time, BPDU handling, loopback guard, max age, mode, pathcost method, priority, and enable/disable spanning tree on interfaces and globally. It lists the command syntax and usage guidelines for each spanning tree command on separate pages numbered 1 through 18.

Uploaded by

James Omara
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

l

ria
FT
Spanning Tree Commands
• spanning-tree bpdu (Global), page 2

c D
• spanning-tree forward-time, page 3
• spanning-tree hello-time, page 4

P
om
• spanning-tree loopback-guard, page 5
• spanning-tree max-age, page 6
n r
• spanning-tree mode, page 7
e
• spanning-tree pathcost method, page 8
ce.
w.n w
• spanning-tree priority, page 9
• spanning-tree enable, page 10
o
ua
• spanning-tree bpdu (Interface), page 11
P

• spanning-tree bpduguard, page 12


• spanning-tree cost, page 13
• spanning-tree guard root, page 14
ce

• spanning-tree link-type, page 15


ww

• spanning-tree port-priority, page 16


an

• spanning-tree portfast, page 17


• show switch spanning-tree, page 18
Nu

Cisco Enterprise Network Compute System Switch Command Reference


1
Spanning Tree Commands
spanning-tree bpdu (Global)

spanning-tree bpdu (Global)


To define Bridge Protocol Data Unit (BPDU) handling when the spanning tree is disabled globally or on a
single interface, use the spanning-tree bpdu command in switch configuration mode. To restore the default

l
ria
configuration, use the no form of this command.

spanning-tree bpdu {filtering | flooding}


no spanning-tree bpdu

FT
Syntax Description filtering Specifies that BPDU packets are filtered when the spanning tree is disabled on an
interface.

Specifies that untagged BPDU packets are flooded unconditionally (without applying

c D
flooding
VLAN rules) to all ports where spanning tree is disabled and the BPDU handling
mode is flooding. Tagged BPDU packets are filtered.

P
om
Command Default
n r
The default setting is flooding.
e
Command Modes Switch configuration (config-switch)
ce.
w.n w
o
Command History Release Modification
ua

3.5.1 This command was introduced.


P
ce

Usage Guidelines The filtering and flooding modes are relevant when the spanning tree is disabled globally or on a single
ww

interface.
an

Examples The following example sets the BPDU packet handling mode to flooding when the spanning tree is disabled
on an interface:

nfvis(config-switch)# spanning-tree bpdu flooding


Nu

nfvis(config-switch)# commit
nfvis(config-switch)# end

Cisco Enterprise Network Compute System Switch Command Reference


2
Spanning Tree Commands
spanning-tree forward-time

spanning-tree forward-time
To configure the spanning-tree bridge forward time, which is the amount of time a port remains in the listening
and learning states before entering the forwarding state, use the spanning-tree forward-time command in

l
ria
switch configuration mode. To restore the default configuration, use the no form of this command.

spanning-tree forward-time seconds


no spanning-tree forward-time

FT
Syntax Description seconds Specifies the spanning-tree forward time in seconds. Valid range is from 4 to
30.

c D
Command Default 15 seconds

P
om
Command Modes Switch configuration (config-switch)
n r
e
Command History Release
ce.
Modification
w.n w

3.5.1 This command was introduced.


o
ua
P

Usage Guidelines When configuring the forwarding time, the following relationship should be maintained:
2 * (Forward-Time - 1) >= Max-Age >= 2 * (Hello-Time + 1)
ce

Examples The following example configures the spanning tree bridge forwarding time to 25 seconds:
ww

nfvis(config-switch)# spanning-tree forward-time 25


an

nfvis(config-switch)# commit
nfvis(config-switch)# end
Nu

Cisco Enterprise Network Compute System Switch Command Reference


3
Spanning Tree Commands
spanning-tree hello-time

spanning-tree hello-time
To configure how often the device broadcasts Hello messages to other devices, use the spanning-tree hello-time
command in switch configuration mode. To restore the default configuration, use the no form of this command

l
ria
spanning-tree hello-time seconds
no spanning-tree hello-time

FT
Syntax Description seconds Specifies the spanning-tree Hello time in seconds. Range is from 1 to 10.

c D
Command Default 2 seconds

P
om
Command Modes Switch configuration (config-switch)

Command History Release


n r Modification
e
3.5.1
ce.
This command was introduced.
w.n w
o
ua
Usage Guidelines When configuring the Hello time, the following relationship should be maintained:
Max-Age >= 2*(Hello-Time + 1)
P

Examples The following example configures the spanning-tree bridge hello time to 5 seconds:
ce

nfvis(config-switch)# spanning-tree hello-time 5


ww

nfvis(config-switch)# commit
nfvis(config-switch)# end
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


4
Spanning Tree Commands
spanning-tree loopback-guard

spanning-tree loopback-guard
To shut down an interface if it receives a loopback BPDU, use the spanning-tree loopback-guard command
in switch configuration mode. To return to the default setting, use the no form of this command.

l
ria
spanning-tree loopback-guard
no spanning-tree loopback-guard

FT
Syntax Description This command has no arguments.

c D
Command Default None

P
om
Command Modes Switch configuration (config-switch)

Command History Release


n r Modification
e
3.5.1
ce.
This command was introduced.
w.n w
o
ua
Usage Guidelines This enables shutting down all interfaces if a loopback BPDU is received on it.
P

Examples
nfvis(config-switch)# spanning-tree loopback-guard
nfvis(config-switch)# commit
nfvis(config-switch)# end
ce
ww
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


5
Spanning Tree Commands
spanning-tree max-age

spanning-tree max-age
To configure the STP maximum age, use the spanning-tree max-age command in switch configuration mode.
To restore the default configuration, use the no form of this command.

l
ria
spanning-tree max-age seconds
no spanning-tree max-age

FT
Syntax Description seconds Specifies the spanning-tree bridge maximum age in seconds. Valid range is from
6 to 40

c D
Command Default 20 seconds.

P
om
Command Modes Switch configuration (config-switch)
n r
e
Command History Release Modification
ce.
3.5.1 This command was introduced.
w.n w
o
ua

Usage Guidelines When configuring the maximum age, the following relationships should be maintained:
P

2*(Forward-Time - 1) >= Max-Age


Max-Age >= 2*(Hello-Time + 1)
ce
ww

Examples The following example sets the spanning-tree bridge maximum age to 10 seconds.

nfvis(config-switch)# spanning-tree max-age 10


an

nfvis(config-switch)# commit
nfvis(config-switch)# end
Nu

Cisco Enterprise Network Compute System Switch Command Reference


6
Spanning Tree Commands
spanning-tree mode

spanning-tree mode
To select which Spanning Tree Protocol (STP) protocol to run, use the spanning-tree mode command in
switch configuration mode. To restore the default configuration, use the no form of this command.

l
ria
spanning-tree mode {stp | rstp}
no spanning-tree mode

FT
Syntax Description stp Specifies that STP is enabled.

rstp Specifies that the Rapid STP is enabled

c D
Command Default The default is rstp.

P
om
Command Modes Switch configuration (config-switch)
n r
e
Command History Release
ce.
Modification
w.n w

3.5.1 This command was introduced.


o
ua
P

Examples The following example enables STP:

nfvis(config-switch)# spanning-tree mode stp


nfvis(config-switch)# commit
ce

nfvis(config-switch)# end
ww
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


7
Spanning Tree Commands
spanning-tree pathcost method

spanning-tree pathcost method


To set the default path cost method, use the spanning-tree pathcost method in switch configuration mode.
To return to the default configuration, use the no form of this command.

l
ria
spanning-tree pathcost method {long | short}
no spanning-tree pathcost method

FT
Syntax Description long Use 32-bit based values for default port path costs.

short Use 16-bit based values for default port path costs.

c D
Command Default Long path cost method.

P
om
Command Modes Switch configuration (config-switch)
n r
e
Command History Release Modification
ce.
w.n w

3.5.1 This command was introduced.


o
ua
P

Usage Guidelines This command applies to all the spanning tree instances on the switch.
• If the short method is selected, the switch calculates the default cost as 100.
• If the long method is selected, the switch calculates the default cost as 20000.
ce
ww

Examples The following example sets the default path cost method to Long.
an

nfvis(config-switch)# spanning-tree pathcost method long


nfvis(config-switch)# commit
nfvis(config-switch)# end
Nu

Cisco Enterprise Network Compute System Switch Command Reference


8
Spanning Tree Commands
spanning-tree priority

spanning-tree priority
To configure the device STP priority, which is used to determine which bridge is selected as the root bridge,
use the spanning-tree priority command in switch configuration mode. To restore the default device

l
ria
spanning-tree priority, use the no form of this command

spanning-tree priority priority


no spanning-tree priority

FT
Syntax Description priority Specifies the bridge priority. Valid range is from 0 to 61440.

c D
Command Default The default priority is 32768.

P
om
Command Modes Switch configuration (config-switch)
n r
e
Command History Release Modification
ce.
3.5.1 This command was introduced.
w.n w
o
ua

Usage Guidelines The priority value must be a multiple of 4096.


P

The switch with the lowest priority is the root of the spanning tree. When more than one switch has the lowest
priority, the switch with the lowest MAC address is selected as the root.
ce

Examples The following example configures the spanning-tree priority to 12288:


ww

nfvis(config-switch)# spanning-tree priority 12288


an

nfvis(config-switch)# commit
nfvis(config-switch)# end
Nu

Cisco Enterprise Network Compute System Switch Command Reference


9
Spanning Tree Commands
spanning-tree enable

spanning-tree enable
To enable the spanning-tree functionality, use the spanning-tree enable command in switch configuration
mode. To disable the spanning-tree functionality, use the no form of this command.

l
ria
spanning-tree enable
no spanning-tree enable

FT
Syntax Description This command has no arguments.

c D
Command Default Spanning-tree is enabled.

P
om
Command Modes Switch configuration (config-switch)

Command History Release


n r Modification
e
3.5.1
ce.
This command was introduced.
w.n w
o
ua
Examples The following example enables the spanning-tree functionality:
P

nfvis(config-switch)# spanning-tree enable


nfvis(config-switch)# commit
nfvis(config-switch)# end
ce
ww
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


10
Spanning Tree Commands
spanning-tree bpdu (Interface)

spanning-tree bpdu (Interface)


To define Bridge Protocol Data Unit (BPDU) handling when the spanning tree is disabled on a single interface,
use the spanning-tree bpdu command in interface switch configuration mode. To restore the default

l
ria
configuration, use the no form of this command.

spanning-tree bpdu {filtering | flooding}


no spanning-tree bpdu

FT
Syntax Description filtering Specifies that BPDU packets are filtered when the spanning tree is disabled on an
interface.

Specifies that untagged BPDU packets are flooded unconditionally (without applying

c D
flooding
VLAN rules) to all ports with the spanning tree disabled and the BPDU handling
mode of flooding. Tagged BPDU packets are filtered.

P
om
Command Default
n r
The spanning-tree bpdu (Global) command determines the default configuration.
e
Command Modes
ce.
Interface (Gigabit Ethernet, Port Channel) switch configuration (config-switch-if)
w.n w
o
Command History Release Modification
ua

3.5.1 This command was introduced.


P
ce

Usage Guidelines The filtering and flooding modes are relevant when the spanning tree is disabled globally or on a single
ww

interface.
an

Examples The following example defines the BPDU packet as flooding when the spanning tree is disabled on Gigabit
Ethernet interface 1/1:

nfvis(config-switch)# interface gigabitEthernet 1/1


Nu

nfvis(config-switch-if)# spanning-tree bpdu flooding


nfvis(config-switch-if)# commit
nfvis(config-switch-if)# end

Cisco Enterprise Network Compute System Switch Command Reference


11
Spanning Tree Commands
spanning-tree bpduguard

spanning-tree bpduguard
To shut down an interface when it receives a Bridge Protocol Data Unit (BPDU), use the spanning-tree
bpduguard command in interface switch configuration mode. To restore the default configuration, use the

l
ria
no form of this command.

spanning-tree bpduguard {enable | disable}


no spanning-tree bpduguard

FT
Syntax Description enable Enables BPDU Guard.

disable Disables BPDU Guard.

c D
P
om
Command Default BPDU Guard is disabled.

Command Modes
n r
Interface (Gigabit Ethernet, Port Channel) switch configuration (config-switch-if)
e
Command History
ce.
w.n w
Release Modification
3.5.1 This command was introduced.
o
ua
P

Usage Guidelines BPDU guard can be enabled when the spanning tree is enabled (useful when the port is in the PortFast mode)
or disabled.
ce
ww

Examples The following example shuts down the Gigabit Ethernet interface 1/1 when it receives a BPDU.

nfvis(config-switch)# interface gigabitEthernet 1/1


an

nfvis(config-switch-if)# spanning-tree bpduguard enable


nfvis(config-switch-if)# commit
nfvis(config-switch-if)# end
Nu

Cisco Enterprise Network Compute System Switch Command Reference


12
Spanning Tree Commands
spanning-tree cost

spanning-tree cost
To configure the spanning-tree path cost for a port, use the spanning-tree cost command in interface switch
configuration mode. To restore the default configuration, use the no form of this command.

l
ria
spanning-tree cost cost
no spanning-tree cost

FT
Syntax Description cost Specifies the port path cost. Valid range is from 1 to 200000000.

c D
Command Default Default path cost is determined by port speed and path cost method (long or short).

Table 1:

P
om
Interface Long Short
Port-channel n r 20,000 4
e
Gigabit Ethernet (1000 Mbps) 20,000
ce. 4
w.n w

Ethernet (10 Mbps) 2,000,000 100


o
ua
P

Command Modes Interface (Gigabit Ethernet, Port Channel) switch configuration (config-switch-if)

Command History
ce

Release Modification
ww

3.5.1 This command was introduced.


an

Examples The following example configures the spanning-tree cost on Gigabit Ethernet interface 1/1 to 35000.
Nu

nfvis(config-switch)# interface gigabitEthernet 1/1


nfvis(config-switch-if)# spanning-tree cost 35000
nfvis(config-switch-if)# commit
nfvis(config-switch-if)# end

Cisco Enterprise Network Compute System Switch Command Reference


13
Spanning Tree Commands
spanning-tree guard root

spanning-tree guard root


To enable root guard on all spanning-tree instances on an interface, use the spanning-tree guard root command
in interface switch configuration mode. Root guard prevents the interface from becoming the root port of the

l
ria
device. Use the no form of this command to disable the root guard on the interface.

spanning-tree guard root


no spanning-tree guard root

FT
Syntax Description This command has no arguments.

c D
Command Default Root guard is disabled.

P
om
Command Modes Interface (Gigabit Ethernet, Port Channel) switch configuration (config-switch-if)
n r
e
Command History Release Modification
ce.
3.5.1 This command was introduced.
w.n w
o
ua

Usage Guidelines Root guard can be enabled when the device operates in any mode (STP, RSTP, and MSTP).
P

When root guard is enabled, the port changes to the alternate state if the spanning-tree calculations select the
port as the root port.
ce

Examples The following example prevents Gigabit Ethernet interface 1/1 from being the root port of the device.
ww

nfvis(config-switch)# interface gigabitEthernet 1/1


an

nfvis(config-switch-if)# spanning-tree guard root


nfvis(config-switch-if)# commit
nfvis(config-switch-if)# end
Nu

Cisco Enterprise Network Compute System Switch Command Reference


14
Spanning Tree Commands
spanning-tree link-type

spanning-tree link-type
To override the default link-type setting determined by the port duplex mode, and enable RSTP transitions
to the Forwarding state, use the spanning-tree link-type command in interface switch configuration mode.

l
ria
To restore the default configuration, use the no form of this command.

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


no spanning-tree link-type

FT
Syntax Description point-to-point Specifies that the port link type is point-to-point.

shared Specifies that the port link type is shared.

c D
P
om
Command Default The device derives the port link type from the duplex mode. A full-duplex port is considered a point-to-point
link and a half-duplex port is considered a shared link.

Command Modes
n r
e
Interface (Gigabit Ethernet, Port Channel) switch configuration (config-switch-if)
ce.
w.n w

Command History Release Modification


3.5.1 This command was introduced.
o
ua
P

Examples The following example enables shared spanning-tree on Gigabit Ethernet interface 1/1.
ce

nfvis(config-switch)# interface gigabitEthernet 1/1


ww

nfvis(config-switch-if)# spanning-tree link-type shared


nfvis(config-switch-if)# commit
nfvis(config-switch-if)# end
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


15
Spanning Tree Commands
spanning-tree port-priority

spanning-tree port-priority
To configure the port priority, use the spanning-tree port-priority command in interface switch configuration
mode. To restore the default configuration, use the no form of this command.

l
ria
spanning-tree port-priority priority
no spanning-tree port-priority

FT
Syntax Description priority Specifies the port priority. Valid range is from 0 to 240.

c D
Command Default The default port priority is 128.

P
om
Command Modes Interface (Gigabit Ethernet, Port Channel) switch configuration (config-switch-if)

Command History Release


n r Modification
e
3.5.1
ce.
This command was introduced.
w.n w
o
ua
Usage Guidelines The priority value must be a multiple of 16.
P

Examples The following example configures the spanning priority on Gigabit Ethernet interface 1/1 to 96.

nfvis(config-switch)# interface gigabitEthernet 1/1


ce

nfvis(config-switch-if)# spanning-tree port-priority 96


nfvis(config-switch-if)# commit
ww

nfvis(config-switch-if)# end
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


16
Spanning Tree Commands
spanning-tree portfast

spanning-tree portfast
To enable the PortFast mode, use the spanning-tree portfast command in interface switch configuration
mode. In PortFast mode, the interface is immediately put into the forwarding state upon linkup, without waiting

l
ria
for the standard forward time delay. To disable the PortFast mode, use the no form of this command.

spanning-tree portfast {auto | enable}


no spanning-tree portfast

FT
Syntax Description auto Specifies that the software waits for 3 seconds (with no BPDUs received on the
interface) before putting the interface into the PortFast mode.

Enables an interface to move directly to forwarding on linkup.

c D
enable

P
om
Command Default PortFast mode is disabled.

Command Modes
n r
e
Interface (Gigabit Ethernet, Port Channel) switch configuration (config-switch-if)
ce.
w.n w

Command History Release Modification


3.5.1 This command was introduced.
o
ua
P

Examples The following example enables the PortFast mode on Gigabit Ethernet interface 1/1:
ce

nfvis(config-switch)# interface gigabitEthernet 1/1


ww

nfvis(config-switch-if)# spanning-tree portfast enable


nfvis(config-switch-if)# commit
nfvis(config-switch-if)# end
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


17
Spanning Tree Commands
show switch spanning-tree

show switch spanning-tree


To display the spanning-tree configuration, use the show switch spanning-tree command in privileged EXEC
mode.

l
ria
switch show spanning-tree [bridge | interface {gigabitEthernet | port-channel} interface-id | root |
summary]

FT
Syntax Description bridge Displays the bridge information.

interface Specifies the interface type.

gigabitEthernet Specifies Gigabit Ethernet as the interface type.

c D
port-channel Specifies port channel as the interface type.

P
interface-id Specifies the interface ID.

om
root Displays the bridge information.

summary
n r Displays the spanning-tree summary.
e
ce.
w.n w

Command Default None


o
ua
P

Command Modes Privileged EXEC (#)

Command History Release Modification


ce

3.5.1 This command was introduced.


ww
an

Usage Guidelines None


Nu

Examples The following is a sample output of the show switch spanning-tree command

nfvis# show switch spanning-tree


spanning-tree summary admin-status enabled
spanning-tree summary Operation-mode RSTP
spanning-tree summary Port-Cost-Method long
spanning-tree summary Loopback-guard disabled
spanning-tree root Priority 32768
spanning-tree root Address 00:a6:ca:d6:38:50
spanning-tree root Cost 0
spanning-tree root Port 0

Cisco Enterprise Network Compute System Switch Command Reference


18
Spanning Tree Commands
show switch spanning-tree

spanning-tree root Hello-Time 2


spanning-tree root Max-Age 20
spanning-tree root Forward-Delay 15
spanning-tree bridge Priority 32768
spanning-tree bridge Address 00:a6:ca:d6:38:50
spanning-tree bridge Hello-Time 2
spanning-tree bridge Max-Age 20

l
spanning-tree bridge Forward-Delay 15

ria
ADMIN PRIO. PORT PORT GUARD
PORT STATE NBR COST STATE ROLE FAST TYPE ROOT
-------------------------------------------------------------------------
gi1/0 enabled 128.1 2000000 disabled Disable No -- disabled
gi1/1 enabled 128.2 2000000 disabled Disable No -- disabled
gi1/2 enabled 128.3 2000000 disabled Disable No -- disabled

FT
gi1/3 enabled 128.4 2000000 disabled Disable No -- disabled
gi1/4 enabled 128.5 2000000 disabled Disable No -- disabled
gi1/5 enabled 128.6 2000000 disabled Disable No -- disabled
gi1/6 enabled 128.7 2000000 disabled Disable No -- disabled
gi1/7 enabled 128.8 2000000 disabled Disable No -- disabled

ADMIN PRIO. PORT PORT GUARD


PORT STATE NBR COST STATE ROLE FAST TYPE ROOT

c D
-------------------------------------------------------------------------
1 enabled 128.1000 20000 disabled Disable No -- disabled
2 enabled 128.1001 20000 disabled Disable No -- disabled
3 enabled 128.1002 20000 disabled Disable No -- disabled

P
4 enabled 128.1003 20000 disabled Disable No -- disabled

om
n r
e
ce.
w.n w
o
ua
P
ce
ww
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


19
Spanning Tree Commands
show switch spanning-tree

l
ria
c D FT
P
om
n r
e
ce.
w.n w
o
ua
P
ce
ww
an
Nu

Cisco Enterprise Network Compute System Switch Command Reference


20

You might also like