Configuring Rapid Spanning Tree Protocol (RSTP)


Rapid Spanning Tree Protocol (RSTP) is a standard inter-switch protocol to ensure that an ad hoc network topology is loop-free at Layer 2, on a per-VLAN basis. If your network connections form loops and STP is disabled, packets re-circulate between the switches, causing a degradation of network performance. If you are certain that your network connections are loop-free, you do not need to enable RSTP. A drawback of STP is that it does not allow for Layer 2 multipathing and can result in sub-optimal utilization of available network links. Therefore, a fabric of switches does not run RSTP within the boundaries of the fabric. The use of RSTP is recommended for ad hoc networks that inter-operate in a heterogeneous, multi-vendor switch environment.


To build a loop-free topology, switches (“bridges”) have to determine the root bridge and compute the port roles, root, designated, or blocked. To do this, the bridges use special data frames called Bridge Protocol Data Units (BPDUs) to exchange information about bridge IDs and root path costs. BPDUs are exchanged regularly, typically at two second intervals, and enable switches to keep track of network topology changes and to start and stop forwarding on ports as required. Hosts should not send BPDUs to their switch ports and to avoid malfunctioning or malicious hosts from doing so, the switch can filter or block BPDUs. If you enable BPDU filtering on a port, BPDUs received on that port are dropped but other traffic is forwarded as usual. If you enable BPDU blocking on a port, BPDUs received on that port are dropped and the port is shut down.

 

Rapid Spanning Tree Protocol is also supported by modifying an RSTP port and configuring it as an edge port.



Note: RSTP is enabled on the switch by default.



Before you begin, view the status of STP on the switch by using the following command:


CLI (network-admin@Leaf1) > stp-show


switch:             tac-1

enable:             yes

stp-mode:           rstp

bpdus-bridge-ports: yes

bridge-id:          3a:7f:b1:43:8a:0f

bridge-priority:    32768

hello-time:         2

forwarding-delay:   15

max-age:            20

cluster-mode:       master

 

 

To disable STP, use the following command:


CLI (network-admin@Leaf1) > stp-modify disable


To display the STP state, use the following command:


CLI (network-admin@Leaf1) > stp-state-show


switch:           Leaf01

vlan:             1

ports:            none

instance-id:      1

name:             stg-default

bridge-id:        66:0e:94:65:e1:ef

bridge-priority:  8193

root-id:          64:0e:94:c0:06:4b

root-priority:    4097

root-port:        128

hello-time:       2

forwarding-delay: 15

max-age:          20

disabled:         none

learning:         none

forwarding:       25-28,128-129

discarding:       none

edge:             25-28

designated:       25-28,129

alternate:        none

backup:           none

 

To display information about STP on ports, use the stp-port-show command:


CLI (network-admin@Leaf1) > stp-port-show


switch   port block filter edge bpdu-guard root-guard priority cost

-------- ---- ----- ------ ---- ---------- ---------- -------- ----

draco01  1    off   off    no   no         no         128      500  

draco01  2    off   off    no   no         no         128      2000

draco01  3    off   off    no   no         no         128      2000

draco01  4    off   off    no   no         no         128      2000

draco01  5    off   off    no   no         no         128      500  

draco01  6    off   off    no   no         no         128      500  

draco01  7    off   off    no   no         no         128      2000

draco01  8    off   off    no   no         no         128      2000

draco01  9    off   off    no   no         no         128      2000

draco01  10   off   off    no   no         no         128      500

 

To filter BPDUs on port 17, use the following command:


CLI (network-admin@Leaf1) > stp-port-modify port 17 filter


To block BPDUs on port 17 and shut down the port if BPDUs are received on the port, use the following command:


CLI (network-admin@Leaf1) > stp-port-modify port 17 block


To stop blocking BPDUs on port 17, use the following command:


CLI (network-admin@Leaf1) > stp-port-modify port 17 no-block


You can disable STP on a port or a group of ports. If the devices connected to the switch ports are hosts and not downstream switches, or you know that a loop is not possible, then disable STP and the port is enabled much faster when the switch restarts.

To enable RSTP on port 35, use the following command:


CLI (network-admin@Leaf1) > stp-port-modify port 35 edge


To enable STP, use the following command:


CLI (network-admin@Leaf1) > stp-modify enable


Managing STP BPDU After Disabling LLDP


Netvisor ONE optimizes STP BPDUs by not sending BPDUs on any ports if the ports are not switch ports. This is the default setting for the parameter, bpdus-bridge-port.


If you do not configure LLDP, Netvisor One does not detect host ports and does not t send BPDU pacekts. As a result, both ports are in Forwarding state.


When you add the parameter, bpdus-all-ports, to allow sending BPDUs on ports even if ports are not detected, unless the port is configured as an edge port. On a switch with a port connected to itself with this configuration one of the ports goes into a Discarding state.