Rapid Spanning Tree Protocol

Introduction

This document gives an overview of RSTP, a redundancy protocol for layer-2.

The spanning tree protocol (STP) and its successor rapid spanning tree protocol (RSTP) are the standard protocols to support redundancy while avoiding broadcast storms in switched networks. RSTP supports a fall-back to STP when connecting the switch to another device only capable of STP.

The purpose of the spanning tree protocol is to ensure that an arbitrary physical LAN topology is turned into a logical tree topology (i.e., loop free) in such a way that all links in the network are still connected (i.e., a spanning tree). This is accomplished by having the switches put some of their ports in blocking state.

Overview

The RSTP is always starting with all ports in blocking state. After the init phase one switch, only one, will be elected to root switch. The election is based of the mac addresses on the device and the bridge priority ID. The root switch is responsible to send out the RSTP frames, called Bridge Protocol Data Unit (BPDU) packet. The BPDU packet is an IEEE standard multicast packet and can go through a blocked port.

The RSTP service supports version IEEE 802.1D-2004.

    RSTP network after the election is done

         .-----.               .-----.               .-----.
         |     |               |     |               |     |
         | SW1 +---------------+ SW2 |---------------+ SW3 |
         | Root|               |     |               |     |
         '--+--'               '--+--'               '--+--'
            |                     |                     \
            |                     |                     |
            |                     \                     |
         .--+--.               .--+--.               .--+--.
         |     |               |     |               |     |
         | SW4 +---------------+ SW5 |---------------+ SW6 |
         |     |               |     |               |     |
         '-----'               '-----'               '-----'

    \ = port is in blocking mode

Figure 1: RSTP network, SW1 has the lowest bridge ID and is therefore elected to root switch. The bridge ID is combination of both bridge priority and the MAC address. The switch can be configured to act as a root switch with the bridge priority configuration.

Configuration

example:/#> configure
example:/config/#> spanning-tree
example:/config/spanning-tree/#>
[no] spanning-tree

Configure spanning-tree on the device. The spanning-tree settings is global on the switch. It is only possible to have one spanning-tree instance running at the same time.

no
Disable the spanning-tree.
[no] priority PRIO

Set bridge priority, where a low value means high priority, which increase the probability of being elected as root bridge.

no
Use default bridge priority 8 (32768).
PRIO
An integer to set the bridge priority in range 0-15 (0-65536).
[no] max-age-time AGE

Set spanning-tree max age timeout. Since bridges use the max age configured at the root bridge, this parameter setting only matters if this bridge becomes the root bridge.

no
Use default bridge max-age-time. The default time is 20 seconds.
AGE
An integer to set the bridge maximum age timeout in the range of 6-40 seconds.
[no] hello-time HELLO

Since bridges use the hello time configured at the root bridge, this parameter setting only matters if this bridge becomes the root bridge. This is the time between the hello BPDU packets.

no
Use default bridge hello-time. The default time is 2 seconds.
HELLO
An integer to set the bridge hello-time interval in range of 1-10 seconds.
[no] forward-delay FWD

Since bridges use the forward delay configured at the root bridge, this parameter setting only matters if this bridge becomes the root bridge. Used when operating in STP mode (i.e., not RSTP). Defines the time period by which the protocol can be sure that STP information on a topology change has propagated from one side of the network to the other. The STP convergence time is limited by twice the forwarding delay (plus the time it takes to detect the topology change).

no
Use default bridge forward-delay. The default time is 15 seconds.
FWD
An integer to set the bridge forward-delay timeout in the range of 4-30 seconds.

Spanning Tree Port Configuration

Enter Spanning Tree Port Configuration context to manage per port spanning- tree settings for one or more ports.

example:/config/spanning-tree/#> port eth1
example:/config/spanning-tree/eth1/#>
[no] enable

Enable/disable RSTP on this/these port(s).

no
Disable RSTP on this/these port(s).
[no] admin-edge

Ports where only end nodes connect are referred to as edge ports. If a port is only used for connecting hosts (i.e., no risk for loops), it can be configured as an admin edge port.

no
Disable edge function on this/these port(s).
[no] path-cost <COST>

Each port is assigned a ”cost”. This is used by each bridge to find the least cost path to the root bridge as part of the tree establishment.

no
Disable the path-cost on this/these port(s). No path-cost resets to default, i.e., based on speed-duplex.
COST

Set path-cost to COST. This will override the path-cost based on speed-duplex. This can control which port that will be designated port. The cost is in range 0-20000000. The different path-cost due to the port speed :

Speed in Mbps path-cost value
10 2000000
100 200000
1000 20000