Cisco Network Engineer Notes: Switch STP Configuration

Switch STP Configuration

The Spanning Tree priority ranges from 0 to 61440, with an increment of 4096. Valid values are 0, 4096, 8192, 12288, ……, 61440. The smaller the priority value, the higher the priority; 0 is the highest, and 61440 is the lowest.

When a switch‘s root port or blocking port receives inferior BPDUs, it indicates a problem with the indirect link from this switch to the root bridge, possibly a link failure in the network. The blocking port will then transition to the forwarding state to fix this failure. Before transitioning to forwarding, the blocking port normally needs to wait for a Spanning Tree maximum age timer. The BackboneFast feature allows the blocking port to skip this waiting period and transition directly from the listening and learning states to the forwarding state. This transition takes approximately 30 seconds, thus improving convergence speed in the event of an indirect link failure.

The UplinkFast feature provides fast convergence when the Spanning Tree topology changes and during load balancing across redundant links in an uplink group. It allows a blocking port to skip the listening and learning states and transition directly to the forwarding state.

PortFast is used on access layer switch ports to skip normal Spanning Tree operations, accelerating the speed at which end-station workstations connect to the network. Its function is to enable a switch port to skip the listening and learning states and move directly from the blocking state to the forwarding state. This port type should generally only be used to connect a single host or server, and must not be used to connect hubs, concentrators, switches, bridges, or other network devices.

BPDU Filter causes a switch to stop sending BPDUs on the specified port and ignore any BPDUs received on that port, while immediately transitioning the port state to forwarding.

Switch STP Configuration Example 1

Catalyst 3500:

(1) Enable or Disable STP

Format: spanning-tree vlan <VLAN ID> (Enable)

no spanning-tree vlan <VLAN ID> (Disable)

(2) Set Primary Root

Format: spanning-tree vlan <VLAN ID> root primary

(3) Set Secondary Root

Format: spanning-tree vlan <VLAN ID> root secondary

(4) Configure Spanning Tree Priority

Format: spanning-tree vlan <VLAN ID> priority <0~61440>

(5) Configure the BackboneFast Spanning Tree Optional Feature

Format: spanning-tree BackboneFast

(6) Configure the UplinkFast Spanning Tree Optional Feature

Format: spanning-tree UplinkFast

spanning-tree UplinkFast max-update-rate <0~32000>

The max-update-rate value ranges from 0 to 32000, in units of packet/s (packets updated per second).

(7) Configure the PortFast Spanning Tree Optional Feature

Format: spanning-tree portfast default

(8) Configure the BPDU Filter Spanning Tree Optional Feature

Format: spanning-tree portfast bpdufilter default

Switch STP Configuration Example 2

Catalyst 6500:

(1) Enable or Disable STP

Format: set spantree enable <VLAN ID> (Enable STP)

set spantree disable <VLAN ID> (Disable STP)

(2) Set Primary Root

Format: set spantree root <VLAN ID>

(3) Set Secondary Root

Format: set spantree root secondary <VLAN ID>

(4) Configure Spanning Tree Priority

Format: set spantree priority <priority-value>

(5) Configure the BackboneFast Spanning Tree Optional Feature

Format: set spantree backbonefast enable

set spantree backbonefast disable

(6) Configure the UplinkFast Spanning Tree Optional Feature

Format: set spantree uplinkfast enable

set spantree uplinkfast enable rate <station_update_rate>

The default value for <station_update_rate> is 15packet/100ms

(7) Configure the PortFast Spanning Tree Optional Feature

Format: set spantree portfast <module-number>/<port-number> enable

set spantree portfast <module-number>/<port-number> disable

set spantree portfast <module-number>/<port-number> default (Default enable portfast)

(8) Configure the BPDU Filter Spanning Tree Optional Feature

Format: set spantree portfast bpdu-filter enable (Enable bpdu-filter on all ports)

set spantree portfast bpdu-filter disable (Disable bpdu-filter)

set spantree portfast bpdu-filter <module-number>/<port-number> enable (Enable bpdu-filter)

set spantree portfast bpdu-filter <module-number>/<port-number> disable (Disable bpdu-filter)

set spantree portfast bpdu-filter <module-number>/<port-number> default (Set to default)

Two switch STP configuration examples have been provided. Readers are encouraged to reference the content above to complete their own switch STP configuration process.

[Editor’s Picks]

Leave a Comment

Your email address will not be published.