Spanning Tree Command List


Spanning Tree Command List

By default, spanning tree is enabled on all Cisco switches. Creating an additional VLAN automatically runs another instance of the spanning tree protocol. Spanning tree configuration consists of the following tasks:

  • Modifying the spanning tree mode if a mode other than PVST+ is desired.
  • Changing the bridge priority to control which switch becomes the root bridge.
  • Designating edge ports (ports with no attached switches).
  • For PVST+, configuring UplinkFast if desired.

The following table lists commands you would use to configure spanning tree:

Command

Function

Switch(config)#spanning-tree mode pvst|rapid-pvst|mst

Sets the spanning tree mode.

Switch(config)#spanning-tree vlan <1-4094> root primary

Forces the switch to be the root of the spanning tree.

 

Switch(config)#spanning-tree vlan <1-4094> priority <0-61440>

Manually sets the bridge priority number.

  • The priority value ranges between 0 and 61,440.
  • Each switch has the default priority of 32,768.
  • Priority values are set in increments of 4096. If you enter another number, your value will be rounded to the closest increment of 4096, or you will be prompted to enter a valid value.
  • The switch with the lowest priority number becomes the root bridge.

Switch(config-if)#spanning-tree portfast

Enables PortFast on the interface. When the PortFast feature is enabled, the interface changes directly from a blocking state to a forwarding state without making the intermediate spanning-tree state changes.

Note: This command is for an edge-type interface. Configuring PortFast on interfaces connected to hubs, concentrators, switches, and bridges can cause temporary bridging loops.

Switch(config)#spanning-tree uplinkfast

Enables UplinkFast to accelerate the choice of a new root port when a link or switch fails or when the spanning tree reconfigures itself.

Note: When you configure rapid spanning tree, disable UplinkFast. Similar functionality is built into rapid spanning tree.

Switch(config)#no spanning-tree vlan <1-4094>

Disables spanning tree on the selected VLAN.

Switch#show spanning-tree

Show spanning tree configuration information including the following:

  • Root bridge priority and MAC address
  • The cost to the root bridge
  • Local switch bridge ID and MAC address
  • The role and status of all local interfaces
  • The priority and number for each interface

To verify that spanning tree is working, look for an entry similar to the following for each VLAN:

Spanning tree enabled protocol ieee

Switch#show spanning-tree vlan <1-4094> root

Show information about the root bridge for a specific VLAN. Information shown includes:

  • The root bridge ID, including the priority number and the MAC address
  • The cost to the root bridge from the local switch
  • The local port that is the root port

Switch#show spanning-tree vlan <1-4094> bridge

Show spanning tree configuration information about the local switch for the specified VLAN. Information includes the local bridge ID, including the priority and MAC address.

Examples
The following commands set the bridge priority for a VLAN and enables PortFast on two ports:

Switch(config)#spanning-tree vlan 20 priority 4096
Switch(config)#int fa0/12
Switch(config-if)#spanning-tree portfast
Switch(config-if)#int fa0/13
Switch(config-if)#spanning-tree portfast

The following commands enable Rapid PVST+ for the switch, sets the bridge priority to a higher value than the default, and disables UplinkFast:

Switch(config)#spanning-tree mode rapid-pvst
Switch(config)#spanning-tree vlan 1 priority 36864
Switch(config)#no spanning-tree uplinkfast

Note: When switching from PVST+ to Rapid PVST+, PortFast designations can still be used.

 

Credit: Testout 640-802 CCNA Notes

หมายเลขบันทึก: 319935เขียนเมื่อ 13 ธันวาคม 2009 08:37 น. ()แก้ไขเมื่อ 15 มิถุนายน 2012 15:52 น. ()สัญญาอนุญาต: ครีเอทีฟคอมมอนส์แบบ แสดงที่มา-ไม่ใช้เพื่อการค้า-ไม่ดัดแปลงจำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท