Spanning Tree Protocol operates internally with port roles, which are determined by received BPDUs and on the ports via which those BPDUs are received. Ports change their STP port states based on their assigned roles.
For example, if a port that was previously a Non-Designated Port receives the best BPDU to the Root Bridge, and is elected Root Port, the STP topology is recalculated and the port transitions from a Blocking state to a Forwarding state. RSTP defines a set of port roles for Spanning Tree ports, and these port roles are defined as follows:
- Root Port (Forwarding state)
- Designated Port (Forwarding state)
- Alternate Port (Blocking state)
- Backup Port (Blocking state)
The Root Port is defined as the port that receives the best BPDU from the Root Bridge. This port provides the shortest path to the Root Bridge in terms of cost. The Root Port is always an active Forwarding port that points toward the STP Root Bridge. The Root Port is elected in the same manner for 802.1w as it is for 802.1D (i.e. based on the Path Cost value).
A Designated Port is an active forwarding port that points away from the Root Bridge and toward the edge of the network. This is the port sending the best BPDU on a segment. Again, the calculation of the Designated Port when using RTSP follows the same logic as that used when implementing traditional STP.
An Alternate Port is a non-forwarding (blocking) port that backs up a Root Port. In traditional STP, this would simply be referred to as a Blocking port. This port is blocked by BPDUs from a different bridge and therefore provides a redundant path to the Root Bridge. Figure 4-5 below illustrates an Alternate Port in an RSTP network:

Fig. 4-5. The RSTP Alternate Port
A Backup Port receives better BPDUs from the same bridge rather than from a different bridge. Like an Alternate Port, a Backup Port is also a non-forwarding (blocking) port. Unlike the Alternate Port, however, a Backup Port backs up a Designated Port on the same segment, thus providing a redundant path to a network segment. Figure 4-6 below illustrates a Backup Port in an RSTP network:

Fig. 4-6. The RSTP Backup Port