spanning-tree

To enable and define spanning tree operation for an interface, use the spanning-tree command in Interface Configuration Mode. The no form of this command disables the spanning tree operation on an interface and resets the spanning tree to its default values. Note that the spanning tree operation can be enabled in the switch only if the spanning tree functionality has not been shut down in the switch.

spanning-tree

spanning-tree { [auto-edge] } { [bpdu-receive } { {enabled } { disabled}] }
{ [bpdu-transmit } { {enabled } { | disabled}] }
{ [bpdufilter } { {disable } { | enable}] }
{ [bpduguard } { {disable } { | enable } { [admin-down] } { [disable-discarding] } { | enable } { | none}] }
{ [cost } { <pathcost value(0-200000000)] }
{ [disable] } { [encap } { {ISL } { | dot1q}] }
{ [guard } { {loop } { | none } { | root}] }
{ [layer2-gateway-port] } { [link-type } { {point-to-point } { | shared}] }
{ [mode } { dot1w } { {disable } { | enable}] }
{ [mst } { {<instance-id (1-64)> } { {cost } { <cost value(0-200000000) } { | disable } { | port-priority } { <port priority value(0-240)> } { | pseudoRootId } { priority } { <priority value(0-61440)> } { mac-address } { <ucast_mac>} } { | hello-time } { <port based value(1-2)>} }
{ [port-priority } { <port priority value(0-240)>] }
{ [portfast] }
{ | pseudoRootId } { priority } { <priority value(0-61440)> } { mac-address } { <ucast_mac>} }
{ [restricted-role] }
{ [restricted-tcn] }
{ [vlan } { <vlan-id/vfi_id> } { {cost } { <pathcost value(0-200000000) }
{ | port-priority } { <port priority (0-240)> } { | status } { {disable } { | enable}] }

no spanning-tree

spanning-tree { {auto-edge } { | bpdufilter } { | bpduguard } { | cost } { | disable } { | encap } { | guard } { | layer2-gateway-port } { | link-type } { | mst } { | port-priority } { | portfast } { | pseudoRootId } { | restricted-role } { | restricted-tcn } { | vlan} }

Parameters

Parameter Type Description
auto-edge   Enter to enable automatic detection of bridge attached on an interface. Once automatic detection is enabled, the edge port parameter is automatically detected and set. The port is set as edge port, if no BPDU is received on the port. The port is set as non-edge port if any BPDU is received
bpdu-receive   Enter to configure the processing status of the BPDUs received in a port. BPDUs are used to carry bridge related information that is used during spanning tree operation.
enabled   Enter to allow normal processing of BPDUs received on the port.
disabled   Enter to discard the BPDUs received on the port.
bpdu-transmit   Enter to configure the BPDU transmission status of a port. BPDUs are used to carry bridge related information that is used during spanning tree operation. The transmission status is reset to its default value, once the spanning tree mode is changed.
enabled   Enter to allow the transmission of BPDUs from the port.
disabled   Enter to block the transmission of BPDUs from the port.
bpdufilter Integer Enter to configure the status of BPDU filter feature in an interface.
disable   Enter to disable the BPDU filter in the interface; the port state is maintained till it is manually made up.
enable   Enter to enable BPDU filter in the interface to prevent temporary loops; it moves the port to disabled discarding state when BPDU is received on this port.
bpduguard   Enter to configure the status of BPDU guard feature in an interface.
disable   Enter to disable the BPDU guard feature in the interface; the port state is maintained till it is manually made up.
enable   Enter to enable BPDU guard feature i in the interface to prevent temporary loops; it moves the port to disabled discarding state when BPDU is received on this port.
admin-down   Enter to disable the port and puts the port in error-disabled state on receiving BPDU.
disable-discarding   Enter to disable spanning-tree on the port.
none   Enter to remove BPDU guard on the specified interface. Global BPDU guard configuration takes effect if this port is an edge port.
cost   Enter to configure the port’s path cost value that contributes to the path cost of paths containing this particular port. The paths’ path cost is used during calculation of shortest path to reach the root. The path cost represents the distance between the root port and designated port. The configured path cost is used, even if the dynamic pathcost calculation feature or LAGG speed feature is enabled. This configuration is not supported for the spanning tree mode PVRST.
<path cost value(0-200000000)> Integer Enter a value for path cost. This value ranges from 1 to 200000000.
disable   Enter to disable the spanning tree operation on the port. The port does not take part in the execution of spanning tree operation for preventing undesirable loops in the network.
encap Integer Enter to configure the encapsulation type used in the interface.
ISL   Enter to configure the Encapsulation type as ISL
dot1q Integer Enter to set the Encapsulation type as dot1q
guard   Enter to configure the various guard features such as root guard in a port.
loop Integer Enter to enable loop guard feature in the port. This feature changes the port to an inconsistent state if no BPDUs are received. Thus isolating the failure and letting spanning tree converge to a stable topology until the port starts receiving BPDUs again.
Note:

This parameter can be configured only for Point-to-point links. Loop guard feature is not supported for shared links

Note:

PVRST Loop Guard feature can be enabled on all port types – access, trunk & hybrid, but the behavior of a guard loop enabled hybrid port in an interoperation scenario is not defined in the implementation.

none   Enter to disable both root and loop guard features in the port. This is the default.
root   Enter to enable root guard feature in the port. This feature prevents the port from becoming root port or blocked port. The port changes to the root-inconsistent state, if the port receives superior BPDUs. The port automatically reverts back to forwarding state, once the superior BPDUs are not received.
Note:

Root Guard implementation in PVRST is applicable only for trunk ports.

layer2-gateway-port   Enter to configure a port to operate as a L2GP (L2 gateway port). L2GP operates similar to that of the normal port operation but pretends to continuously receive BPDUs when admin state of the port is up.
link-type   Enter to configure the link status of the LAN segment attached to the port. The options available are:
point-to-point   Enter to use this option when the port is to be treated as if it is connected to a point-to-point link.
shared   Enter to use this option when the port is to be treated as if it is using a shared media connection.
mode   Enter to enable or disable the bridge to send agreement PDU in accordance with 802.1w.
dot1w   Enter to enable or disable the bridge to send agreement PDU in accordance with 802.1w.
disable   Enter to disable the bridge to send agreement PDU in accordance with 802.1w.
enable   Enter to enable the bridge to send agreement PDU in accordance with 802.1w.
mst   Enter to specify the spanning tree instance.
<instance-id (1-64)> Integer Enter a value for instance ID. This value ranges from 1 to 64.
cost   Enter to configure the cost value associated with the port.
<cost value(0-200000000)> Integer Enter a value for path cost. This value ranges from 1 to 200000000.
disable   Enter to disable the spanning tree on the port
port-priority   Enter to configure the port priority.
<port priority value(0-240)> Integer Enter a value for port priority. This value ranges from 0 to 61440. The value should be set in steps of 4096, that is, you can set the value as 0, 4096, 8192, 12288 and so on.
pseudoRootId   Enter to configure the pseudo root related information for a port set as L2GP. The information contains pseudo root priority and pseudo root MAC address for the port. This configuration is not utilized in PVRST Mode.
priority   Enter for pseudo root priority.
<port priority value(0-61440)> Integer Enter value for port priority. This value ranges from 0 to 61440. The value should be set in steps of 4096, that is, you can set the value as 0, 4096, 8192, 12288 and so on.
mac-address   Enter to configure the unicast MAC address of the pseudo root. Port configured as L2GP uses this value as its address.
<ucast_mac>   Enter the unicast MAC address of the pseudo root. For example, 00:00:12:34:45:55.
hello-time   Enter to set the port-based hello timer value.
<port based value(1-2)> Integer Enter a port-based hello timer value.
port-priority   Enter to configure the port priority value
<port priority value(0-240)> Integer Enter a port-priority value. This value ranges from 0 t
portfast   Enter to configure the portfast feature in the port. This feature specifies that the port is connected to only one host and hence can rapidly transit to forwarding. This feature can cause temporary bridging loops if hubs, concentrators, switches, bridges and so on are connected to this port. This feature takes effect only after the interface is shut down and turned on again.
pseudoRootId   Enter to the pseudo root related information for a port set as L2GP. The information contains pseudo root priority and pseudo root MAC address for the port. This configuration is not utilized in PVRST Mode
priority   Enter to configure port priority value.
<port priority value(0-61440)> Integer Enter for pseudo root priority.
mac-address Integer Enter to configure the unicast MAC address of the pseudo root. A port configured as L2GP uses this value as its address.
<ucast_mac>   Enter the unicast MAC address of the pseudo root. For example, 00:00:12:34:45:55.
restricted-role   Enter to enable the root-guard/ Restricted role feature on the port.
restricted-tcn   Enter to enable the Topology change guard/ Restricted tcn feature on the port.
vlan   Enter for configures spanning tree related information on a per VLAN basis.
<vlan-id/vfi_id> Integer VLAN ID is a unique value that represents the specific VLAN. This value ranges from 1 to 4094. VFI ID is a VLAN created in the system which contains Pseudo wires and Attachment Circuits as member ports. This creates a logical LAN for the VPLS service. This value ranges from 4096 to 65535.The VLAN ID 4095 is reserved and may be used to indicate a wildcard match for the VID in management operations or Filtering Database entries.

VFI IDs 4096 and 4097 are reserved identifiers used in MPLS PW. The theoretical maximum for the maximum number of VFI is 65535 but the actual number of VFI supported is a sizing constant. Based on this, the maximum number of VFI ID accepted in the management interface is restricted. For example, if 100 VFIs are supported, the maximum number of VFI supported will be restricted to maximum number of VLANs + 100. An error message is displayed for any value beyond this range.

cost   Enter to configure the port’s path cost value that contributes to the path cost of paths containing this particular port. The paths’ path cost is used during calculation of shortest path to reach the root. The path cost represents the distance between the root port and designated port. The configured path cost is used, even if the dynamic pathcost calculation feature or LAGG speed feature is enabled. This configuration is not supported for the spanning tree mode PVRST.
<cost value(0-200000000)> Integer Enter a value for path cost. This value ranges from 1 to 200000000.
port-priority   Enter to configure the priority value assigned to the port.
<port priority value(0-240)> Integer Enter a priority value to be assigned to the port. This value is used during port role selection process. This value ranges from 0 to 240. This value should be set in steps of 16, that is, you can set the value as 0, 16, 32, 48 and so on. The default port-priority is 128.
status   Enter to configure the status of PVRST on a port for the specified VLAN. PVRST works in conjunction with VLAN to provide better control over traffic in the network. It maintains a separate spanning tree for each active VLAN in the network, thus providing load balancing through multiple instances of spanning tree, fault tolerance and rapid reconfiguration support through RSTP.
disable   Enter to disable the PVRST Status for the specified VLAN ID.
enable   Enter to enable the PVRST Status for the specified VLAN ID.

Mode

Interface Configuration Mode

Examples

iS5Comm (config)# interface gi 0/1

iS5Comm (config-if)# spanning-tree auto-edge

iS5Comm(config-if)# spanning-tree bpdu-receive disabled

iS5Comm (config-if)# spanning-tree bpdu-transmit enabled

iS5Comm (config-if)# spanning-tree bpduguard enable admin-down

iS5Comm(config-if)# spanning-tree cost 2200

iS5Comm (config-if)# spanning-tree link-type point-to-point

iS5Comm(config-if)# spanning-tree portfast

iS5Comm(config)# spanning-tree portfast bpduguard default

iS5Comm(config-if)# spanning-tree port-priority 32

iS5Comm (config-if)# spanning-tree restricted-role

iS5Comm(config-if)# spanning-tree restricted-tcn

iS5Comm(config-if)# spanning-tree layer2-gateway-port

iS5Comm(config-if)# spanning-tree mst 1 pseudoRootId priority 8192 mac-address 00:00:12:34:45:55

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

iS5Comm(config-if)# spanning-tree mode dot1w enable

iS5Comm(config-if)# spanning-tree vlan 1status disable