spanning-tree
Use the spanning-tree Global Configuration mode command to enable spanning-tree functionality. Use the no form of this command to disable the spanning-tree functionality.
Syntax
spanning-tree no spanning-tree
Parameters
N/A
Default Configuration
Spanning-tree is enabled.
Command Mode
Global Configuration mode
Example
The following example enables spanning-tree functionality.
switchxxxxxx(config)# spanning-tree |
spanning-tree mode
Use the spanning-tree mode Global Configuration mode command to select which Spanning Tree Protocol (STP) protocol to run. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree mode {stp| rstp | mst} no spanning-tree mode
Parameters
- stp—Specifies that STP is enabled.
- rstp—Specifies that the Rapid STP is enabled.
- mst—Specifies that the Multiple STP is enabled.
Default Configuration The default is RSTP.
Command Mode
Global Configuration mode
User Guidelines
In RSTP mode, the device uses STP when the neighbor device uses STP.
In MSTP mode, the device uses RSTP when the neighbor device uses RSTP, and uses STP when the neighbor device uses STP.
Example
The following example enables MSTP.
switchxxxxxx(config)# spanning-tree mode mst |
spanning-tree forward-time
Use the spanning-tree forward-time Global Configuration mode command 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 no form of this command to restore the default configuration.
Syntax spanning-tree forward-time seconds no spanning-tree forward-time
Parameters
seconds—Specifies the spanning-tree forward time in seconds. (Range: 4–30)
Default Configuration 15 seconds.
Command Mode
Global Configuration mode
User Guidelines
When configuring the forwarding time, the following relationship should be maintained:
2*(Forward-Time – 1) >= Max-Age
Example
The following example configures the spanning tree bridge forwarding time to 25 seconds.
switchxxxxxx(config)# spanning-tree forward-time 25 |
spanning-tree hello-time
Use the spanning-tree hello-time Global Configuration mode command to configure how often the device broadcasts Hello messages to other devices. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree hello-time seconds no spanning-tree hello-time
Parameters
seconds—Specifies the spanning-tree Hello time in seconds. (Range: 1–10)
Default Configuration 2 seconds.
Command Mode
Global Configuration mode
User Guidelines
When configuring the Hello time, the following relationship should be maintained:
Max-Age >= 2*(Hello-Time + 1)
Example
The following example configures the spanning-tree bridge hello time to 5 seconds.
switchxxxxxx(config)# spanning-tree hello-time 5 |
spanning-tree max-age
Use the spanning-tree max-age Global Configuration mode command to configure the STP maximum age. Use the no form of this command to restore the default configuration.
Syntax spanning-tree max-age seconds no spanning-tree max-age
Parameters
seconds—Specifies the spanning-tree bridge maximum age in seconds. (Range: 6–40)
Default Configuration
The default maximum age is 20 seconds.
Command Mode
Global Configuration mode
User Guidelines
When configuring the maximum age, the following relationships should be maintained:
2*(Forward-Time – 1) >= Max-Age
Max-Age >= 2*(Hello-Time + 1)
Example
The following example configures the spanning-tree bridge maximum age to 10 seconds.
switchxxxxxx(config)# spanning-tree max-age 10 |
spanning-tree priority
Use the spanning-tree priority Global Configuration mode command to configure the device STP priority, which is used to determine which bridge is selected as the root bridge. Use the no form of this command to restore the default device spanning-tree priority.
Syntax
spanning-tree priority priority
no spanning-tree priority
Parameters
priority—Specifies the bridge priority. (Range: 0–61440)
Default Configuration
Default priority = 32768.
Command Mode
Global Configuration mode
User Guidelines
The priority value must be a multiple of 4096.
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.
Example
The following example configures the spanning-tree priority to 12288.
switchxxxxxx(config)# spanning-tree priority 12288 |
spanning-tree disable
Use the spanning-tree disable Interface (Ethernet, Port Channel) Configuration mode command to disable the spanning tree on a specific port. Use the no form of this command to enable the spanning tree on a port.
Syntax
spanning-tree disable no spanning-tree disable
Parameters
N/A
Default Configuration
Spanning tree is enabled on all ports.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
Example
The following example disables the spanning tree on te1/0/5
switchxxxxxx(config)# interface te1/0/5 switchxxxxxx(config-if)# spanning-tree disable |
spanning-tree cost
Use the spanning-tree cost Interface (Ethernet, Port Channel) Configuration mode command to configure the spanning-tree path cost for a port. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree cost cost no spanning-tree cost
Parameters
cost—Specifies the port path cost. (Range: 1–200000000)
Default Configuration
Default path cost is determined by port speed and path cost method (long or short )as shown below
Interface | Long | Short |
Port-channel | Half the default cost based on Port-channelinterfacespeed | Half the default cost based on Port-channelinterfacespeed |
TenGigabit Ethernet (10000Mbps) | 2000 | 2 |
Gigabit Ethernet (1000 Mbps) | 20,000 | 4 |
Fast Ethernet (100 Mbps) | 200,000 | 19 |
Ethernet (10 Mbps) | 2,000,000 | 100 |
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
Example
The following example configures the spanning-tree cost on te1/0/15 to 35000.
switchxxxxxx(config)# interface te1/0/15 switchxxxxxx(config-if)# spanning-tree cost 35000 |
spanning-tree port-priority
Use the spanning-tree port-priority Interface (Ethernet, Port Channel)
Configuration mode command to configure the port priority. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree port-priority priority no spanning-tree port-priority
Parameters
priority—Specifies the port priority. (Range: 0–240)
Default Configuration
The default port priority is 128.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
User Guidelines
The priority value must be a multiple of 16.
Example
The following example configures the spanning priority on te1/0/15 to 96
switchxxxxxx(config)# interface te1/ 0 / 15 switchxxxxxx(config- if )# spanning-tree port-priority 96 |
spanning-tree portfast
Use the spanning-tree portfast Interface (Ethernet, Port Channel) Configuration mode command to enable the PortFast mode. In PortFast mode, the interface is immediately put into the forwarding state upon linkup, without waiting for the standard forward time delay. Use the no form of this command to disable the PortFast mode.
Syntax
spanning-tree portfast [auto] no spanning-tree portfast
Parameters
auto—Specifies that the software waits for 3 seconds (with no Bridge Protocol Data Units (BPDUs) received on the interface) before putting the interface into the PortFast mode.
Default Configuration
PortFast mode is disabled.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
Example
The following example enables the PortFast mode on te1/0/15.
switchxxxxxx(config)# interface te1/0/15 switchxxxxxx(config-if)# spanning-tree portfast |
spanning-tree link-type
Use the spanning-tree link-type Interface (Ethernet, Port Channel) Configuration mode command to override the default link-type setting determined by the port duplex mode, and enable RSTP transitions to the Forwarding state. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree link-type {point-to-point | shared} no spanning-tree spanning-tree link-type
Parameters
- point-to-point—Specifies that the port link type is point-to-point.
- shared—Specifies that the port link type is shared.
Default Configuration
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 Mode
Interface (Ethernet, Port Channel) Configuration mode
Example
The following example enables shared spanning-tree on te1/0/15.
switchxxxxxx(config)# interface te1/0/15 switchxxxxxx(config-if)# spanning-tree link-type shared |
spanning-tree pathcost method
Use the spanning-tree pathcost method Global Configuration mode command to set the default path cost method. Use the no form of this command to return to the default configuration.
Syntax
spanning-tree pathcost method {long | short} no spanning-tree pathcost method
Parameters
- long—Specifies that the default port path costs are within the range: 1– 200,000,000.
- short—Specifies that the default port path costs are within the range: 1– 65,535.
Default Configuration
Long path cost method.
Command Mode
Global Configuration mode
User 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.
Example
The following example sets the default path cost method to Long.
switchxxxxxx(config)# spanning-tree pathcost method long |
spanning-tree bpdu (Global)
Use the spanning-tree bpdu Global Configuration mode command to define Bridge Protocol Data Unit (BPDU) handling when the spanning tree is disabled globally or on a single interface. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree bpdu {filtering | flooding} no spanning-tree bpdu
Parameters
- filtering—Specifies that BPDU packets are filtered when the spanning tree is disabled on an interface.
- flooding—Specifies that untagged BPDU packets are flooded unconditionally (without applying VLAN rules) to all ports with the spanning tree disabled and BPDU handling mode of flooding. Tagged BPDU packets are filtered.
Default Configuration
The default setting is flooding.
Command Mode
Global Configuration mode
User Guidelines
The filtering and flooding modes are relevant when the spanning tree is disabled globally or on a single interface.
Example
The following example defines the BPDU packet handling mode as flooding when the spanning tree is disabled on an interface.
switchxxxxxx(config)# spanning-tree bpdu flooding |
spanning-tree bpdu (Interface)
Use the spanning-tree bpdu Interface (Ethernet, Port Channel) Configuration mode command to define BPDU handling when the spanning tree is disabled on a single interface. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree bpdu {filtering | flooding} no spanning-tree bpdu
Parameters
- filtering—Specifies that BPDU packets are filtered when the spanning tree is disabled on an interface.
- flooding—Specifies that untagged BPDU packets are flooded unconditionally (without applying VLAN rules) to ports with the spanning tree disabled and BPDU handling mode of flooding. Tagged BPDU packets are filtered.
Default Configuration
The spanning-tree bpdu (Global) command determines the default configuration.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
Example
The following example defines the BPDU packet as flooding when the spanning tree is disabled on te1/0/3.
switchxxxxxx(config)# interface te1/0/3 switchxxxxxx(config-if)# spanning-tree bpdu flooding |
spanning-tree guard root
Use the spanning-tree guard root Interface (Ethernet, Port Channel) Configuration mode command to enable Root Guard on all spanning-tree instances on the interface. Root guard prevents the interface from becoming the root port of the device. Use the no form of this command to disable the root guard on the interface.
Syntax
spanning-tree guard root no spanning-tree guard root
Default Configuration
Root guard is disabled.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
User Guidelines
Root Guard can be enabled when the device operates in any mode (STP, RSTP and MSTP).
When Root Guard is enabled, the port changes to the alternate state if the spanning-tree calculations select the port as the root port.
Example
The following example prevents te1/0/1 from being the root port of the device.
switchxxxxxx(config)# interface te1/0/1 switchxxxxxx(config-if)# spanning-tree guard root |
spanning-tree bpduguard
Use the spanning-tree bpduguard Interface (Ethernet, Port Channel) Configuration mode command to shut down an interface when it receives a Bridge Protocol Data Unit (BPDU). Use the no form of this command to restore the default configuration.
Syntax
spanning-tree bpduguard {enable | disable} no spanning-tree bpduguard
Parameters bpduguard enable—Enables BPDU Guard. bpduguard disable—Disables BPDU Guard.
Default Configuration
BPDU Guard is disabled.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
User Guidelines
The command can be enabled when the spanning tree is enabled (useful when the port is in the PortFast mode) or disabled.
Example
The following example shuts down te1/0/5 when it receives a BPDU.
switchxxxxxx(config)# interface te1/0/5 switchxxxxxx(config-if)# spanning-tree bpduguard enable |
clear spanning-tree detected-protocols
Use the clear spanning-tree detected-protocols Privileged EXEC mode command to restart the STP migration process (force renegotiation with neighboring switches) on all interfaces or on the specified interface
Syntax
clear spanning-tree detected-protocols [interface interface-id]
Parameters
interface-id—Specifies an interface ID. The interface ID can be one of the following types: Ethernet port or Port-channel.
Default Configuration All interfaces.
Command Mode
Privileged EXEC mode
User Guidelines
This feature can only be used when working in RSTP or MSTP mode.
Example
This restarts the STP migration process on all interfaces.
switchxxxxxx# clear spanning-tree detected-protocols |
spanning-tree mst priority
Use the spanning-tree mst priority Global Configuration mode command to configure the device priority for the specified spanning-tree instance. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree mst instance-id priority priority no spanning-tree mst instance-id priority
Parameters
- instance-id—Specifies the spanning-tree instance ID. (Range:1–15)
- priority—Specifies the device priority for the specified spanning-tree instance. This setting determines the likelihood that the switch is selected
as the root switch. A lower value increases the probability that the switch is selected as the root switch. (Range: 0–61440)
Default Configuration
The default priority is 32768.
Command Mode
Global Configuration mode
User Guidelines
The priority value must be a multiple of 4096.
The switch with the lowest priority is the root of the spanning tree.
Example
The following example configures the spanning tree priority of instance 1 to 4096.
switchxxxxxx(config)# spanning-tree mst 1 priority 4096 |
spanning-tree mst max-hops
Use the spanning-tree mst max-hops Global Configuration mode command to configure the number of hops in an MST region before the BDPU is discarded and the port information is aged out. Use the no form of this command to restore the default configuration.
Syntax spanning-tree mst max-hops hop-count no spanning-tree mst max-hops
Parameters
max-hops hop-count—Specifies the number of hops in an MST region before the BDPU is discarded. (Range: 1–40)
Default Configuration
The default number of hops is 20.
Command Mode
Global Configuration mode
Example
The following example configures the maximum number of hops that a packet travels in an MST region before it is discarded to 10.
switchxxxxxx(config)# spanning-tree mst max-hops 10 |
spanning-tree mst port-priority
Use the spanning-tree mst port-priority Interface (Ethernet, Port Channel) Configuration mode command to configure the priority of a port. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree mst instance-id port-priority priority no spanning-tree mst instance-id port-priority
Parameters
- instance-id—Specifies the spanning tree instance ID. (Range: 1–15)
- priority—Specifies the port priority. (Range: 0–240 in multiples of 16)
Default Configuration
The default port priority is 128.
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
User Guidelines
The priority value must be a multiple of 16.
Example
The following example configures the port priority of te1/0/1 to 144.
switchxxxxxx(config)# interface te1/0/1 switchxxxxxx(config-if)# spanning-tree mst 1 port-priority 144 |
spanning-tree mst cost
Use the spanning-tree mst cost Interface (Ethernet, Port Channel) Configuration mode command to configure the path cost for MST calculations. If a loop occurs, the spanning tree considers path cost when selecting an interface to put in the Forwarding state. Use the no form of this command to restore the default configuration.
Syntax
spanning-tree mst instance-id cost cost no spanning-tree mst instance-id cost
Default Configuration
N/A
Parameters
- instance-id—Specifies the spanning-tree instance ID. (Range: 1–15)
- cost—Specifies the port path cost. (Range: 1–200000000)
Default Configuration
Default path cost is determined by the port speed and path cost method (long or short) as shown below:
Interface | Long | Short |
Port-channel | 20,000 | 4 |
TenGigabit Ethernet (10000Mbps) | ||
Command Mode
Interface (Ethernet, Port Channel) Configuration mode
Example
The following example configures the MSTP instance 1 path cost for port te1/0/9 to 4.
switchxxxxxx(config)# interface te1/0/9 switchxxxxxx(config-if)# spanning-tree mst 1 cost 4 |
spanning-tree mst configuration
Use the spanning-tree mst configuration Global Configuration mode command to enable configuring an MST region by entering the MST mode.
Syntax
spanning-tree mst configuration
Command Mode
Global Configuration mode
User Guidelines
For two or more switches to be in the same MST region, they must contain the same VLAN mapping, the same configuration revision number, and the same name.
Example
The following example configures an MST region.
switchxxxxxx(config)# spanning-tree mst configuration switchxxxxxx(config-mst)# instance 1 vlan 10-20 switchxxxxxx(config-mst)# name region1 switchxxxxxx(config-mst)# revision 1 |
instance (MST)
Use instance MST Configuration mode command to map VLANs to an MST instance. Use the no form of this command to restore the default mapping.
Syntax
instance instance-id vlan vlan-range no instance instance-id vlan vlan-range
Parameters
- instance-id—MST instance (Range: 1–15)
- vlan-range—The specified range of VLANs is added to the existing ones. To specify a range, use a hyphen. To specify a series, use a comma. (Range: 1– 4094)
Default Configuration
All VLANs are mapped to the common and internal spanning tree (CIST) instance (instance 0).
Command Mode
MST Configuration mode
User Guidelines
All VLANs that are not explicitly mapped to an MST instance are mapped to the common and internal spanning tree (CIST) instance (instance 0) and cannot be unmapped from the CIST.
For two or more devices to be in the same MST region, they must have the same VLAN mapping, the same configuration revision number, and the same name.
Example
The following example maps VLANs 10-20 to MST instance 1.
switchxxxxxx(config)# spanning-tree mst configuration switchxxxxxx(config-mst)# instance 1 vlan 10-20 |
name (MST)
Use the name MST Configuration mode command to define the MST instance name. Use the no form of this command to restore the default setting.
Syntax name string no name
Parameters
string—Specifies the MST instance name. (Length: 1–32 characters)
Default Configuration
The default name is the bridge MAC address.
Command Mode
MST Configuration mode
Example
The following example defines the instance name as Region1.
switchxxxxxx(config)# spanning-tree mst configuration switchxxxxxx(config-mst)# name region1 |
revision (MST)
Use the revision MST Configuration mode command to define the MST configuration revision number. Use the no form of this command to restore the default configuration.
Syntax
revision value no revision Parameters
value—Specifies the MST configuration revision number. (Range: 0–65535)
Default Configuration
The default configuration revision number is 0.
Command Mode
MST Configuration mode
Example
The following example sets the configuration revision to 1.
switchxxxxxx(config)# spanning-tree mst configuration switchxxxxxx(config-mst) # revision 1 |
show (MST)
Use the show MST Configuration mode command to display the current or pending MST region configuration.
Syntax
show {current | pending}
Parameters
- current—Displays the current MST region configuration.
- pending—Displays the pending MST region configuration.
Default Configuration
N/A
Command Mode
MST Configuration mode
Example
The following example displays a pending MST region configuration
switchxxxxxx(config-mst)# show pending Gathering information .......... Current MST configuration Name: Region1 Revision: 1 Instance VLANs Mapped State -------- ------------------------ ----0 1-4094 Disabled switchxxxxxx(config-mst)# |
exit (MST)
Use the exit MST Configuration mode command to exit the MST region Configuration mode and apply all configuration changes.
Syntax
exit
Parameters
N/A
Default Configuration
N/A
Command Mode
MST Configuration mode
Example
The following example exits the MST Configuration mode and saves changes.
switchxxxxxx(config)# spanning-tree mst configuration switchxxxxxx(config-mst)# exit switchxxxxxx(config)# |
abort (MST)
Use the abort MST Configuration mode command to exit the MST Configuration mode without applying the configuration changes.
Syntax
abort
Parameters
N/A
Default Configuration
N/A
Command Mode
MST Configuration mode
Example
The following example exits the MST Configuration mode without saving changes.
switchxxxxxx(config)# spanning-tree mst configuration switchxxxxxx(config-mst)# abort |
show spanning-tree
Use the show spanning-tree Privileged EXEC mode command to display the spanning-tree configuration.
Syntax
show spanning-tree [interface-id] [instance instance-id] show spanning-tree [detail] [active | blockedports] [instance instance-id]
show spanning-tree mst-configuration
Parameters
- instance instance-id—Specifies the spanning tree instance ID. (Range: 1–
15).
- detail—Displays detailed information.
- active—Displays active ports only.
- blockedports—Displays blocked ports only.
- mst-configuration—Displays the MST configuration identifier.
- interface-id—Specifies an interface ID. The interface ID can be one of the following types: Ethernet port or Port-channel.
Default Configuration
If no interface is specified, the default is all interfaces.
Command Mode
Privileged EXEC mode
User Guidelines
This command only works when MST is enabled.
Example
The following examples display spanning-tree information in various configurations
switchxxxxxx# show spanning-tree Spanning tree enabled mode RSTP Default port cost method: long Loopback guard: Disabled Root ID Priority 32768 Address 00:01:42:97:e0:00 Cost 20000 Port te1/0/1 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec |
Bridge ID PriorityAddress | 3686400:02:4b:29:7a:00 | |
Hello Time 2 secInterfaces | Max Age 20 sec Forward Delay 15 sec | |
Name State Prio. No —— —— —–te1/0/1 Enabled 128.1 te1/0/2 Enabled 128.2 te1/0/3 Disabled128.3 te1/0/4 Enabled 128.4 te1/0/5 Enabled 128.5 | Cost—–2000020000200002000020000 | Sts Role PortFastType— —- ——- ———-FRW Root No P2p (RSTP)FRW Desg No Shared (STP)- – – -BLK Altn No Shared (STP)DIS – – – |
switchxxxxxx# show spanning-tree Spanning tree enabled mode RSTP Default port cost method: long |
Root ID Priority 36864 Address 00:02:4b:29:7a:00 | ||
This switch is the Root. | ||
Hello Time 2 secInterfaces | Max Age 20 sec Forward Delay 15 sec | |
Name State Prio.Nbr——– —————-te1/0/1 Enabled 128.1 te1/0/2 Enabled 128.2 te1/0/3 Disabled128.3 te1/0/4 Enabled 128.4 te1/0/5 Enabled 128.5 | Cost—–2000020000200002000020000 | Sts Role PortFastType— —- ——————FRW Desg – P2p (RSTP)FRW Desg No Shared (STP)- – No -FRW Desg – Shared (STP)DIS – No — |
switchxxxxxx# show spanning-tree Spanning tree disabled (BPDU filtering) mode RSTP Default port cost method: long |
Root ID | PriorityAddressPath CostRoot PortHello Time | N/AN/AN/AN/AN/A | Max Age N/A | Forward Delay N/A |
Bridge ID Priority 36864
Address | ||||
Hello Time 2 secInterfaces | Max Age 20 sec Forward Delay 15 sec | |||
Name State Prio.Nb——— ————–te1/0/1 Enabled 128.1 te1/0/2 Enabled 128.2 te1/0/3 Disabled128.3 te1/0/4 Enabled 128.4 te1/0/5 Enabled 128.5 | Cost—–2000020000200002000020000 | Sts——– | Role——— | PortFastType——————- — — — — — |
00:02:4b:29:7a:00
switchxxxxxx# show spanning-tree active Spanning tree enabled mode RSTP Default port cost method: long |
Root ID PriorityAddressPath CostRoot Port | 3276800:01:42:97:e0:0020000 te1/0/1 |
Hello Time 2 sec | Max Age 20 sec Forward Delay 15 sec |
Bridge ID PriorityAddress | 3686400:02:4b:29:7a:00 |
Hello Time 2 sec
Interfaces
Max Age 20 sec Forward Delay 15 sec
Name ——–te1/0/1 te1/0/2 te1/0/4 | State Prio.Nbr————–Enabled 128.1Enabled 128.2Enabled 128.4 | Cost—–200002000020000 | Sts—FRWFRWBLK | Role—-RootDesgAltn | PortFastType——————- P2p (RSTP)No Shared (STP)No Shared (STP)No |
switchxxxxxx# show spanning-tree blockedports |
Root ID PriorityAddressPath CostRoot Port | 3276800:01:42:97:e0:0020000 te1/0/1 |
Hello Time 2 sec | Max Age 20 sec Forward Delay 15 sec |
Bridge ID PriorityAddress | 3686400:02:4b:29:7a:00 |
Hello Time 2 sec | Max Age 20 sec Forward Delay 15 sec |
Spanning tree enabled mode RSTP Default port cost method: long
Root ID PriorityAddressPath CostRoot Port | 3276800:01:42:97:e0:0020000 te1/0/1 |
Hello Time 2 sec | Max Age 20 sec Forward Delay 15 sec |
Bridge ID Priority | 36864 |
Address | 00:02:4b:29:7a:00 |
Hello Time 2 secInterfaces | Max Age 20 sec Forward Delay 15 sec |
Name State Prio.Nbr——— ——- —–te1/0/4 Enabled 128.4 | Cost Sts Role PortFastType—– — —- ——————19 BLK Altn No Shared (STP) |
switchxxxxxx# show spanning-tree detail Spanning tree enabled mode RSTP Default port cost method: long Number of topology changes 2 last change occurred 2d18h ago Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Port 1 (te1/0/1) enabled State: Forwarding Port id: 128.1 Type: P2p (configured: auto) RSTP Designated bridge Priority: 32768 Designated port id: 128.25 Guard root: Disabled Role: Root Port cost: 20000 Port Fast: No (configured:no) Address: 00:01:42:97:e0:00 Designated path cost: 0 |
Number of transitions to forwarding state: 1BPDU: sent 2, received 120638Port 2 (te1/0/2) enabledState: Forwarding Role: Designated Port id: 128.2 Port cost: 20000Type: Shared (configured: auto) STP Port Fast: No (configured:no)Designated bridge Priority: 32768 Address: 00:02:4b:29:7a:00Designated port id: 128.2 Designated path cost: 20000Guard root: Disabled BPDU guard: DisabledNumber of transitions to forwarding state: 1BPDU: sent 2, received 170638Port 3 (te1/0/3) disabled |
BPDU guard: Disabled BPDU: sent N/A, received N/A Port 4 (te1/0/4) enabled State: Blocking Port id: 128.4 Type: Shared (configured:auto) STP Designated bridge Priority: 28672 Designated port id: 128.25 Guard root: Disabled Role: Alternate Port cost: 20000 Port Fast: No (configured:no) Address: 00:30:94:41:62:c8 Designated path cost: 20000 BPDU guard: Disabled |
Number of transitions to forwarding state: N/A |
BPDU guard: Disabled State: N/A Port id: 128.3 Type: N/A (configured: auto) Designated bridge Priority: N/A Designated port id: N/A Guard root: Disabled Role: N/A Port cost: 20000 Port Fast: N/A (configured:no) Address: N/A Designated path cost: N/A |
Number of transitions to forwarding state: 1BPDU: sent 2, received 120638Port 5 (te1/0/5) enabled |
State: Disabled Port id: 128.5 Type: N/A (configured: auto) Designated bridge Priority: N/A Designated port id: N/A Guard root: Disabled Role: N/A Port cost: 20000 Port Fast: N/A (configured:no) Address: N/A Designated path cost: N/A BPDU guard: Disabled Number of transitions to forwarding state: N/A BPDU: sent N/A, received N/A switchxxxxxx# show spanning-tree ethernet te1/0/1 |
Port 1 (te1/0/1) enabled | |
State: ForwardingPort id: 128.1Type: P2p (configured: auto) RSTP Designated bridge Priority: 32768Designated port id: 128.25Guard root: Disabled | Role: RootPort cost: 20000Port Fast: No (configured:no)Address: 00:01:42:97:e0:00Designated path cost: 0BPDU guard: Disabled |
Number of transitions to forwarding state: 1 BPDU: sent 2, received 120638 switchxxxxxx# show spanning-tree mst-configuration Name: Region1 Revision: 1 |
Instance——–12 | Vlans mapped————1-9, 21-409410-20 | State———EnabledEnabled |
switchxxxxxx# show spanning-tree Spanning tree enabled mode MSTP Default port cost method: long ###### MST 0 Vlans Mapped: 1-9 |
CST Root ID | Priority 32768Address 00:01:42:97:e0:00Path Cost 20000Root Port te1/0/1Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec | |||
IST Master IDInterfaces | Priority 32768Address 00:02:4b:29:7a:00This switch is the IST master. | |||
Hello Time 2 secMax hops 20 | Max Age 20 sec Forward Delay 15 sec | |||
Name State | Prio.Nbr Cost | Sts Role— —-FRW RootFRW DesgFRW DesgFRW Desg | PortFastType——————— | |
—- ——- ——– —-te1/0/1 Enabled 128.1 20000 te1/0/2 Enabled 128.2 20000 te1/0/3 Enabled 128.3 20000 te1/0/4 Enabled 128.4 20000###### MST 1 Vlans Mapped: 10-20 | ||||
NoNoNoNo | P2p Bound(RSTP)Shared Bound(STP)P2pP2p | |||
Root ID Priority 24576 | ||||
Address 00:02:4b:29:89:76Path Cost 20000Root Port te1/0/4 Rem hops 19Bridge ID Priority 32768 Address 00:02:4b:29:7a:00 |
Interfaces
Name —te1/0/1 te1/0/2 te1/0/3 te1/0/4 | State Prio.Nbr——- ——–Enabled 128.1Enabled 128.2Enabled 128.3Enabled 128.4 | Cost—–20000200002000020000 | Sts—FRWFRWBLKFRW | Role—-BounBounAltnRoot | PortFastType———————No P2p Bound No (RSTP)No Shared BoundNo (STP) |
P2p
P2p
switchxxxxxx# show spanning-tree detail Spanning tree enabled mode MSTP Default port cost method: long ###### MST 0 Vlans Mapped: 1-9 |
CST Root ID | Priority 32768Address 00:01:42:97:e0:00Path Cost 20000Root Port te1/0/1Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec |
IST Master ID | Priority 32768 |
Address 00:02:4b:29:7a:00 This switch is the IST master. Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Max hops 20 Number of topology changes 2 last change occurred 2d18h ago Times: hold 1, topology change 35, notification 2 hello 2, max age 20, forward delay 15 Port 1 (te1/0/1) enabled State: Forwarding Role: Root Port id: 128.1 Port cost: 20000 Type: P2p (configured: auto) Boundary RSTP Port Fast: No (configured:no) Designated bridge Priority: 32768 Address: 00:01:42:97:e0:00 Designated port id: 128.25 Designated path cost: 0 Number of transitions to forwarding state: 1 BPDU: sent 2, received 120638 Port 2 (te1/0/2) enabled State: Forwarding Port id: 128.2 Type: Shared (configured: auto) Boundary STP Designated bridge Priority: 32768 Designated port id: 128.2 Number of transitions to forwarding state: 1 BPDU: sent 2, received 170638 Role: Designated Port cost: 20000 Port Fast: No (configured:no) Address: 00:02:4b:29:7a:00 Designated path cost: 20000 Port 3 (te1/0/3) enabled |
State: ForwardingPort id: 128.3Type: Shared (configured: auto) InternalDesignated bridge Priority: 32768Designated port id: 128.3Number of transitions to forwarding state: 1BPDU: sent 2, received 170638Port 4 (te1/0/4) enabled | Role: DesignatedPort cost: 20000Port Fast: No (configured:no)Address: 00:02:4b:29:7a:00Designated path cost: 20000 |
State: ForwardingPort id: 128.4Type: Shared (configured: auto) InternalDesignated bridge Priority: 32768Designated port id: 128.2Number of transitions to forwarding state: 1BPDU: sent 2, received 170638###### MST 1 Vlans Mapped: 10-20Root ID Priority 24576 | Role: DesignatedPort cost: 20000Port Fast: No (configured:no)Address: 00:02:4b:29:7a:00Designated path cost: 20000 |
Address 00:02:4b:29:89:76Path Cost 20000Root Port te1/0/4Rem hops 19Bridge ID Priority 32768 |
Address 00:02:4b:29:7a:00 Number of topology changes 2 last change occurred 1d9h ago Times: hold 1, topology change 2, notification 2 hello 2, max age 20, forward delay 15 Port 1 (te1/0/1) enabled |
State: ForwardingPort id: 128.1Type: P2p (configured: auto) Boundary RSTPDesignated bridge Priority: 32768Designated port id: 128.1Number of transitions to forwarding state: 1BPDU: sent 2, received 120638Port 2 (te1/0/2) enabled | Role: BoundaryPort cost: 20000Port Fast: No (configured:no)Address: 00:02:4b:29:7a:00Designated path cost: 20000 |
State: ForwardingPort id: 128.2Type: Shared (configured: auto) Boundary STPDesignated bridge Priority: 32768Designated port id: 128.2 | Role: Designated Port cost: 20000Port Fast: No (configured:no)Address: 00:02:4b:29:7a:00Designated path cost: 20000 |
Number of transitions to forwarding state: 1 BPDU: sent 2, received 170638 Port 3 (te1/0/3) disabled State: Blocking Port id: 128.3 Type: Shared (configured: auto) Internal Designated bridge Priority: 32768 Designated port id: 128.78 Number of transitions to forwarding state: 1 BPDU: sent 2, received 170638 Role: Alternate Port cost: 20000 Port Fast: No (configured:no) Address: 00:02:4b:29:1a:19 Designated path cost: 20000 Port 4 (te1/0/4) enabled State: Forwarding Role: Designated Port id: 128.4 Port cost: 20000 Type: Shared (configured: auto) Internal Port Fast: No (configured:no) Designated bridge Priority: 32768 Address: 00:02:4b:29:7a:00 Designated port id: 128.2 Designated path cost: 20000 Number of transitions to forwarding state: 1 BPDU: sent 2, received 170638 switchxxxxxx# show spanning-tree Spanning tree enabled mode MSTP Default port cost method: long ###### MST 0 Vlans Mapped: 1-9 |
CST Root ID | Priority 32768Address 00:01:42:97:e0:00Path Cost 20000Root Port te1/0/1Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec |
IST Master ID | Priority 32768Address 00:02:4b:19:7a:00Path Cost 10000Rem hops 19 |
Bridge ID | Priority 32768Address 00:02:4b:29:7a:00 |
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Max hops 20 switchxxxxxx# show spanning-tree Spanning tree enabled mode MSTP Default port cost method: long ###### MST 0 Vlans Mapped: 1-9 CST Root ID Priority 32768 Address 00:01:42:97:e0:00 This switch is root for CST and IST master. Root Port te1/0/1 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Max hops 20 |
show spanning-tree bpdu
Use the show spanning-tree bpdu User EXEC mode command to display the BPDU handling when spanning-tree is disabled.
Syntax
show spanning-tree bpdu [interface-id | detailed]
Parameters
- interface-id—Specifies an interface ID. The interface ID can be one of the following types: Ethernet port or Port-channel.
- detailed—Displays information for non-present ports in addition to present ports.
Default Configuration
Show information for all interfaces. If detailed is not used, only present ports are displayed.
Command Mode
User EXEC mode
Example
The following examples display spanning-tree BPDU information:
switchxxxxxx# show spanning-tree bpdu |
The following is the output if the global BPDU handling command is not supported.
Interface——–te1/0/1 te1/0/2 te1/0/3 | Admin Mode———FilteringFilteringFiltering | Oper Mode——–FilteringFilteringGuard |
The following is the output if both the global BPDU handling command and the per-interface BPDU handling command are supported. Global: Flooding
Interface——–te1/0/1 te1/0/2 te1/0/3 | Admin Mode———GlobalGlobalFlooding | Oper Mode———FloodingSTPSTP |
spanning-tree loopback-guard
Use the spanning-tree loopback-guard global configuration command to shut down an interface if it receives a loopback BPDU. Use the no form of this command to return the default setting.
Syntax spanning-tree loopback-guard no spanning-tree loopback-guard
Parameters
N/A
Default Configuration
N/A
Command Mode
Global
User Guidelines
This enables shutting down all interfaces if a loopback BPDU is received on it.
Example
switchxxxxxx(config)# spanning-tree loopback-guard |
Leave A Comment?