Rapid Spanning Tree Protocol (RSTP) Analysis and Configuration
Overview
This lab explores how Rapid Spanning Tree Protocol (RSTP) determines root bridges, assigns port roles and states, and classifies link types across a multi-switch topology in Cisco Packet Tracer. The root bridge was identified based on MAC addresses, and port roles such as root, designated, alternate, and backup were observed in context. We tested the effects of RSTP's default link-type detection and manually configured point-to-point and edge ports using PortFast. The lab also covered differences in behavior between full-duplex and shared links and validated configuration changes through CLI verification.
Skills Demonstrated |
---|
Identifying the root bridge based on priority + VLAN ID and MAC address |
Understanding port roles: root, designated, alternate, backup |
Observing and verifying default RSTP port types (point-to-point, shared, edge) |
Configuring PortFast for end-host connections |
Classifying links as point-to-point or shared based on duplex settings |
Validating configurations with show spanning-tree command |
Tools Used |
---|
Cisco Packet Tracer |
Switch Configuration CLI |
STP Show Commands |
Link Light Indicators |
Crossover Cables |
1. Network Topology
First, I set up a network topology of 4 switches interconnected with straight-through cables.
Each switch is connected to client devices with one hub being connected between SW1 and SW2. This will be used to analyze the backup port role later.
By having the switches all interconnected together, this will be a great way to test and configure RSTP.
I have also listed the MAC address and priority number of each switch to determine the root bridge later.

2. Checking Current RSTP Topology
In RSTP, the root bridge is elected on the switch with the lowest bridge ID.
Bridge ID is a combination of bridge priority (4 bits), VLAN ID (12 bits), and MAC Address (48 bits). The priority is often a combination of the bridge priority + VLAN ID.
For example, the default bridge priority is 32768 and if it is in VLAN 1, then it will become 32769, similar to our example.

Going back to the lab, we can see that all the switches have a priority of 32769. Since they all have the same priority, the root bridge cannot be determined from that. We will now have to see which switch has the lowest MAC address value, and that will determine which switch is the root bridge. In this case, it is SW1 which means that should be the root bridge.
SW1
Running the "show spanning-tree" command on SW1, we can confirm that it is the root bridge.
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
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 0005.5E4E.714B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/3 Back BLK 19 128.3 Shr
Fa0/24 Desg FWD 19 128.24 Shr
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 Shr
Examining the interface port roles, we can see that they are all designated ports except for F0/3 which is connected to the hub, making it a backup port.
Now that we know SW1 is the root bridge, we know interface F0/2 on SW3 and interface F0/1 on SW2 will be root ports, but let's look at the port roles on each switch.
SW2
Here is SW2's spanning tree information:
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00D0.5882.4834
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/23 Desg FWD 19 128.23 P2p
Gi0/1 Altn BLK 4 128.25 P2p
Fa0/24 Desg FWD 19 128.24 P2p
SW3
Here is SW3's spanning tree information:
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
Cost 19
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000C.8519.6EBA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Root FWD 19 128.2 Shr
Gi0/1 Desg FWD 4 128.25 P2p
Fa0/24 Desg FWD 19 128.24 P2p
SW4
Here is SW4's spanning tree information:
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
Cost 38
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00E0.A381.AD46
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Altn BLK 19 128.2 P2p
Fa0/24 Desg FWD 19 128.24 P2p
In terms of port roles, everything looks normal, the only port roles to take note of include SW2's Gi0/1 alternate port role and SW4's F0/2 alternate port role.
Since SW3's Gi0/1 and SW2's Gi0/1 have the same root cost of 19, it will come down to which has the lowest MAC address and that is SW3. Because of this, SW3's Gi0/1 becomes a designated port and SW2's Gi0/1 becomes an alternate port.
Now, since SW2's F0/2 and SW4's F0/2 have the same root cost of 19, it will come down to which has the lowest MAC address and that is SW2. Because of this, SW2's F0/2 becomes a designated port and SW4's F0/2 becomes an alternate port.
3. Configuring RSTP Link Type
Now that we have determined the port roles for each interface, let's configure the link types for each interface and whether it should be point-to-point, shared, or edge.

SW1
Starting on SW1, we have:
- F0/24 which is connected to a hub, so it should be an edge and a shared link-type.
- F0/2 and F0/3 which are connected to a hub, so they should be shared link type.
- F0/1 which is connected to another switch, so it should be a point-to-point link type.
To configure this, I run the following commands:
SW1> en
SW1# conf t
SW1(config)# int f0/24
SW1(config-if)# spanning-tree link-type shared
SW1(config-if)# spanning-tree portfast
SW1(config-if)# spanning-tree bpduguard enable
SW1(config-if)# int range f0/2 - 3
SW1(config-if-range)# spanning-tree link-type shared
SW1(config-if-range)# int f0/1
SW1(config-if)# spanning-tree link-type point-to-point
Now when running "show spanning-tree" we can see each interface is configured with the correct link type:
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
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 0005.5E4E.714B
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/3 Back BLK 19 128.3 Shr
Fa0/24 Desg FWD 19 128.24 Shr
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 Shr
SW2
On SW2, we have:
- F0/1 which is connected to another switch, so it should be a point-to-point link type.
- G0/1 which is connected to another switch, so it should be a point-to-point link type.
- F0/2 which is connected to another switch, so it should be a point-to-point link type.
- F0/23 and F0/24 which are connected to client devices so they should be edge link types.
To configure this, I run the following commands:
SW2> en
SW2# conf t
SW2(config)# int f0/1
SW2(config-if)# spanning-tree link-type point-to-point
SW2(config-if)# int g0/1
SW2(config-if)# spanning-tree link-type point-to-point
SW2(config-if)# int f0/2
SW2(config-if)# spanning-tree link-type point-to-point
SW2(config-if)# int range f0/23 - 24
SW2(config-if-range)# spanning-tree portfast
SW2(config-if-range)# spanning-tree bpduguard enable
Now when running "show spanning-tree" we can see each interface is configured with the correct link type. While F0/23 and F0/24 were configured as edge ports, in Packet Tracer it will still display it as P2P:
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
Cost 19
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00D0.5882.4834
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/23 Desg FWD 19 128.23 P2p
Gi0/1 Altn BLK 4 128.25 P2p
Fa0/24 Desg FWD 19 128.24 P2p
SW3
On SW3, we have:
- F0/2 which is connected to a hub, so it should be a shared link type.
- F0/24 which is connected to a client device, so it should be an edge link type.
- G0/1 which is connected to another switch, so it should be a point-to-point link type.
- F0/1 which is connected to another switch, so it should be a point-to-point link type.
To configure this, I run the following commands:
SW3> en
SW3# conf t
SW3(config)# int f0/24
SW3(config-if)# spanning-tree portfast
SW3(config-if)# spanning-tree bpduguard enable
SW3(config-if)# int f0/2
SW3(config-if)# spanning-tree link-type shared
SW3(config-if)# int range g0/1, f0/1
SW3(config-if-range)# spanning-tree link-type point-to-point
Now when running "show spanning-tree" we can see each interface is configured with the correct link type. While F0/24 is configured as an edge port, in Packet Tracer it will still display it as P2P:
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
Cost 19
Port 2(FastEthernet0/2)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 000C.8519.6EBA
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/2 Root FWD 19 128.2 Shr
Gi0/1 Desg FWD 4 128.25 P2p
Fa0/24 Desg FWD 19 128.24 P2p
SW4
On SW4, we have:
- F0/1 which is connected to another switch, so it should be a point-to-point link type.
- F0/2 which is connected to another switch, so it should be a point-to-point link type.
- F0/24 which is connected to a client device, so it should be an edge link type.
To configure this I run the following commands:
SW4> en
SW4# conf t
SW4(config)# int range f0/1 - 2
SW4(config-if-range)# spanning-tree link-type point-to-point
SW4(config-if)# int f0/24
SW4(config-if)# spanning-tree portfast
SW4(config-if)# spanning-tree bpduguard enable
Now when running "show spanning-tree" we can see each interface is configured with the correct link type. While F0/24 is configured as an edge port, in Packet Tracer it will still display it as P2P:
VLAN0001
Spanning tree enabled protocol rstp
Root ID Priority 32769
Address 0005.5E4E.714B
Cost 38
Port 1(FastEthernet0/1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 00E0.A381.AD46
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Root FWD 19 128.1 P2p
Fa0/2 Altn BLK 19 128.2 P2p
Fa0/24 Desg FWD 19 128.24 P2p