June 14, 2011

Spanning tree uses BPDU (Bridge protocol data units) to transmit information between switches regarding switches cost to the root or during root election.

Root is elected by the lowest mac address if the priory is left at the default 32768, or by the lowest priority.

Spanning tree uses different port modes to form a layer two switching topology to ensure no layer two loops exist in the network. You need to be familiar with the different port modes in PVST as given below;

• Root – The port that receives the best BPDU that is closest to the root bridge in terms of path cost is called the root port. The root bridge is the only bride in the network that does not have a root port.

• Designated – A port is designated if it can send the best BPDU on the segment to which it is directly connected. On a given LAN segment there can only be a single path towards the root bridge. This port forwards traffic to the LAN segment. Access ports are considered designated ports.

• Alternate – An alternate port is the next best path available back to the root bridge shall the root port fail.

• Backup – A backup port is a port that is connected to a segment where another bridge port already connects.

The default Spanning Tree mode is PVST on a Cisco Catalyst switch.

In this lab you will familiarize yourself with the following commands;

spanning-tree vlan # root primary – This command is executed from global configuration mode and configures the VLAN specified in the syntax on the switch you’re currently configuring as the root bridge for the specific VLAN on the network.

spanning-tree vlan # root secondary – This command is executed from global configuration mode and configures the vlan specified in the syntax on the switch you’re currently on as the backup root bridge shall the root bridge fail in the network.

spanning-tree vlan # priority # – This command is executed from global configuration mode and manually sets the bridge priority per vlan on a switch.

show spanning-tree vlan # – This command can be executed only in privileged mode and displays spanning-tree information relating to a specific VLAN number.

show spanning-tree summary – This command can be executed only in privileged mode and displays a summary of all spanning-tree instances and port counts.

show spanning-tree detail – This command can be executed only in privileged mode and displays detailed information on a per port basis of each port participating in a spanning-tree process.

show spanning-tree bridge – This command can be executed only in privileged mode and displays all spanning-tree processes per VLAN on the switch and other information including the priority per vlan, the sum of the bridge priority (vlan priority + sys-id-ext), Bridge MAC address, timers and effective spanning tree protocol.