Global Configuration - |
Interface Configuration - |
Privileged Exec - |
This section includes commands that configure Spanning Tree Protocol (STP) for the overall switch or for the selected interface.
Use this command to enable the spanning tree protocol globally for this switch. Use the no form to disable it.
Syntax
bridge bridge-group spanning-tree
no bridge bridge-group spanning-tree
bridge-group - Bridge group index (bridge 1).
Default Setting
Spanning tree is enabled.
Command Mode
Global Configuration
Command Usage
The Spanning Tree Protocol can be used to detect and disable network loops, and to provide backup links between switches, bridges or routers. This allows the switch to interact with other bridging devices (that is, an STP-compliant switch, bridge or router) in your network to ensure that only one route exists between any two stations on the network, and provide backup links which automatically take over when a primary link goes down.
Example
The following example shows how to enable the spanning tree protocol for this switch:
(config)#bridge 1 spanning-tree
(config)#
Use this command to configure the spanning tree bridge forward time globally for this switch. Use the no form to restore the default.
Syntax
bridge bridge-group forward-time seconds
no bridge bridge-group forward-time
- bridge-group - Bridge group index (bridge 1).
- seconds - Time in seconds. (Range: 4 - 30 seconds)
The minimum value is the higher of 4 or [(max-age / 2) + 1].
Default Setting
15 seconds
Command Mode
Global Configuration
Command Usage
This command sets the maximum time (in seconds) the root device will wait before changing states (i.e., listening to learning to forwarding). This delay is required because every device must receive information about topology changes before it starts to forward frames. In addition, each port needs time to listen for conflicting information that would make it return to a blocking state; otherwise, temporary data loops might result.
Example
(config)#bridge 1 forward-time 20
(config)#
Use this command to configure the spanning tree bridge hello time globally for this switch. Use the no form to restore the default.
Syntax
bridge bridge-group hello-time time
no bridge bridge-group hello-time
- bridge-group - Bridge group index (bridge 1).
- time - Time in seconds. (Range: 1 - 10 seconds)
The maximum value is the lower of 10 or [(max-age / 2) -1].
Default Setting
2 seconds
Command Mode
Global Configuration
Command Usage
This command sets the time interval (in seconds) at which the root device transmits a configuration message.
Example
(config)#bridge 1 hello-time 5
(config)#
Use this command to configure the spanning tree bridge maximum age globally for this switch. Use the no form to restore the default.
Syntax
bridge bridge-group max-age seconds
no bridge bridge-group max-age
- bridge-group - Bridge group index (bridge 1).
- seconds - Time in seconds. (Range: 6-40 seconds)
The minimum value is the higher of 6 or [2 x (hello-time + 1)].
The maximum value is the lower of 40 or [2 x (forward-time - 1)].
Default Setting
20 seconds
Command Mode
Global Configuration
Command Usage
This command sets the maximum time (in seconds) a device can wait without receiving a configuration message before attempting to reconfigure. All device ports (except for designated ports) should receive configuration messages at regular intervals. Any port that ages out STP information (provided in the last configuration message) becomes the designated port for the attached LAN. If it is a root port, a new root port is selected from among the device ports attached to the network.
Example
(config)#bridge 1 max-age 40
(config)#
Use this command to configure the spanning tree priority globally for this switch. Use the no form to restore the default.
Syntax
bridge bridge-group priority priority
no bridge bridge-group priority
- bridge-group - Bridge group index (bridge 1).
- priority - Priority of the bridge. (Range: 0 - 65535)
Default Setting
32768
Command Mode
Global Configuration
Command Usage
Bridge priority is used in selecting the root device, root port, and designated port. The device with the highest priority becomes the STP root device. However, if all devices have the same priority, the device with the lowest MAC address will then become the root device.
Example
(config)#bridge 1 priority 40000
(config)#
Use this command to configure the spanning tree path cost for the specified interface. Use the no form to restore the default.
Syntax
bridge-group bridge-group path-cost cost
no bridge-group bridge-group path-cost
- bridge-group - Bridge group index (bridge 1).
- cost - The path cost for the interface. (Range: 1-65535)
The recommended range is:
- Ethernet: 50-600
- Fast Ethernet: 10-60
- Gigabit Ethernet: 3-10
Default Setting
The default is:
- Ethernet half duplex: 100; full duplex: 95; trunk: 90
- Fast Ethernet half duplex: 19; full duplex: 18; trunk: 15
- Gigabit Ethernet full duplex: 4; trunk: 3
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
Example
(config)#interface ethernet 1/5
(config-if)#bridge-group 1 path-cost 50
(config-if)#
Use this command to configure the priority for the specified interface. Use the no form to restore the default.
Syntax
bridge-group bridge-group priority priority
no bridge-group bridge-group priority
- bridge-group - Bridge group index (bridge 1).
- priority - The priority for an interface. (Range: 0-255)
Default Setting
128
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
Example
(config)#interface ethernet 1/5
(config-if)#bridge-group 1 priority 0
(config-if)#
Use this command to set an interface to fast forwarding. Use the no form to disable fast forwarding.
Syntax
bridge-group bridge-group portfast
no bridge-group bridge-group portfast
bridge-group - Bridge group index (bridge 1).
Default Setting
Default:
- Port 1-6: enabled
- Port 7-11: disabled
Command Mode
Interface Configuration (Ethernet, Port Channel)
Command Usage
Example
(config)#interface ethernet 1/5
(config-if)#bridge-group 1 portfast
(config-if)#
Use this command to show the spanning tree configuration.
Syntax
show bridge group bridge-group [interface]
- bridge-group - Bridge group index (bridge 1).
- interface
- ethernet unit/port
- unit - This is device 1.
- port - Port number.
- port-channel channel-id (Range: 1-6)
Default Setting
None
Command Mode
Privileged Exec
Example
#show bridge group 1 ethernet 1/11
Bridge-group information
--------------------------------------------------------------
Spanning tree protocol :ieee8021d
Spanning tree enable/disable :enable
Priority :32768
Hello Time (sec.) :2
Max Age (sec.) :20
Forward Delay (sec.) :15
Designated Root :32768.0000e8000002
Current root :0
Current root cost :0
Number of topology changes :3
Last topology changes time (sec.):267
Hold times (sec.) :1
---------------------------------------------------------------
Eth 1/11 information
--------------------------------------------------------------
Status :enable
State :broken
Path cost :4
Priority :128
Designated cost :0
Designated port :128.11
Designated root :32768.0000e8000002
Designated bridge :32768.0000e8000002
Fast forwarding :disable
Forward transitions :0
#