Configuring RSTP

Most newer Cisco switches use RSTP by default. RSTP prevents frame looping out of the box and no additional configuration is necessary. To check whether a switch runs RSTP, the show spanning-tree command is used:

SW1#show spanning-tree 
VLAN0001
  Spanning tree enabled protocol rstp
  Root ID    Priority    32769
             Address     0004.9A47.1039
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)
             Address     0004.9A47.1039
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  20

Interface        Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/3            Desg FWD 19        128.3    P2p
Fa0/2            Desg FWD 19        128.2    P2p

If RSTP is not being used, the following command will enable it:

SW1(config)#spanning-tree mode rapid-pvst

Most other configuration options (electing root switch, selecting root and designated ports) are similar to the ones used in STP.