Latest revision as of 21:05, 1 June 2012

Objective

This tech note outlines the main differences in Spanning-Tree Protocol (STP) support between Cisco® NX-OS Software and Cisco IOS® Software. Sample configurations are included for Cisco NX-OS and Cisco IOS Software for some common features to demonstrate the similarities and differences. Please refer to the NX-OS documentation on Cisco.com for a complete list of supported features.

STP Overview

STP is a standards based link-layer protocol originally defined in IEEE 802.1d that runs on switches to prevent forwarding loops when using redundant layer-2 network topologies. Newer variants of STP have been developed called Rapid Spanning Tree protocol (RSTP) defined in IEEE 802.1w and Multiple Spanning Tree protocol (MST) defined in IEEE 802.1s that are enhanced for better scalability and converge faster than the original version.

Important Cisco NX-OS and Cisco IOS Software Differences

In Cisco NX-OS:

STP supports stateful process restarts and In-Service-Software-Upgrades (ISSU) if two supervisors are present in a chassis.

Spanning-Tree best practices are applicable to both Cisco NX-OS and Cisco IOS Software

Do not disable STP. Even if the layer-2 topology does not require STP, it should always be enabled as a safeguard for configuration and/or cabling errors.

Changing the STP mode can disrupt traffic.

Enabling Bridge Assurance is recommended. However, only enable Bridge Assurance on layer-2 links if both devices on each end of the link support it.

Bridge Assurance should only be configured on the vPC peer-link (configured by default) and not on any other vPC interfaces in a vPC domain.

Typically the core/backbone devices should be configured as the primary and secondary root bridges.

The default bridge priority is 32,768 (plus the VLAN #). The lower the value, the more likely it will become the root bridge.

Configure 802.1q trunk ports as edge trunk port type when connecting to layer-3 hosts such as firewalls, load-balancers, or servers for faster convergence.

Configuration Comparison

The following sample code shows configuration similarities and differences between the Cisco NX-OS and Cisco IOS Software CLIs. The CLI is identical with the exception of the port type terminology. The Cisco IOS uses the portfast designation, whereas Cisco NX-OS uses the port type designation.

Cisco IOS CLI

Cisco NX-OS CLI

Configuring VLANs

vlan 10,20

vlan 10,20

Configuring Rapid PVST+

spanning-tree mode rapid-pvst

Rapid-PVST is enabled by default.

spanning-tree mode rapid-pvst

Configuring the Rapid-PVST+ Bridge Priority

spanning-tree vlan 10 root primary

spanning-tree vlan 20 root secondary

spanning-tree vlan 10 root primary

spanning-tree vlan 20 root secondary

Configuring MST

spanning-tree mode mst

spanning-tree mode mst

Configuring a MST Instance

spanning-tree mst configuration

instance 1 vlan 10

instance 2 vlan 20

spanning-tree mst configuration

instance 1 vlan 10

instance 2 vlan 20

Configuring the MST Bridge Priority

spanning-tree mst 1 root primary

spanning-tree mst 2 root secondary

spanning-tree mst 1 root primary

spanning-tree mst 2 root secondary

Configuring STP Port Types Globally

spanning-tree portfast edge default

or

spanning-tree portfast network default

spanning-tree port type edge default

or

spanning-tree port type network default

Configuring STP Port Types per Interface

interface gigabitethernet1/1

switchport

spanning-tree portfast edge

or

spanning-tree portfast network

or

spanning-tree portfast disable

interface ethernet 1/1

switchport

spanning-tree port type edge

or

spanning-tree port type network

or

spanning-tree port type normal

Configuring a Trunk as an Edge Port Type

interface gigabitethernet1/1

switchport

spanning-tree portfast edge trunk

interface ethernet 1/1

switchport

spanning-tree port type edge trunk

Disabling PVST Simulation Globally

no spanning-tree mst simulate pvst global

no spanning-tree mst simulate pvst global

Disabling PVST Simulation per Port

interface gigabitethernet1/1

switchport

spanning-tree mst simulate pvst disable

interface ethernet 1/1

switchport

spanning-tree mst simulate pvst disable

Verification Command Comparison

The following table lists some useful show commands for verifying and troubleshooting a STP network configuration. The show commands are almost identical for Cisco IOS and Cisco NX-OS Software.