So let’s look at Rapid Spanning Tree protocol or 802.1W
this is an evolution of the IEEE 802.1D standard
however, Rapid Spanning Tree provides rapid failover and convergence times.
The big difference that you need to remember here
is that Rapid Spanning Tree is not based on timers like 802.1D
so it offers an improvement over the 30 seconds interval or longer
that 802.1D takes to move a port to the forwarding state
What Rapid Spanning Tree does is it uses a bridge to bridge handset mechanism
which allows ports to move directly to forwarding
rather than waiting for the port to move from listening to learning to forwarding.
It is backward compatible with 802.1D
is transparent to end users and is standard based
but it does introduce some enhancements
including new port role assignments and ports states
a new BPDU format and BPDU processing, a bridge to bridge handshake mechanism
and different topology change notifications and processing procedures.
So what are port states and port roles in 802.1D and Rapid Spanning Tree?
There are only 3 ports states in Rapid Spanning Tree
learning, forwarding, and discarding
in 802.1D we have disabled, blocking and listening
and this has been merged into the discarding state.
So when you administratively disable a port
that’s called disabled in 802.1D
but it's called discarding in 802.1W or Rapid Spanning Tree.
A blocking port that does not forward user data frames
and ignores incoming data frames is called discarding in 802.1W
A listening port is not used in 802.1W
a learning port is known as a learning port
and a forwarding port is known as forwarding port in 802.1W
So we have learning, forwarding and discarding
disabled, blocking and listening
have been merged into the discarding state in 802.1W
Cisco still uses the term blocking for discarding
so just see those terms as interchangeable terms
blocking is discarding and discarding is blocking.
So what about Port Roles?
The role is now a variable assigned to a given port.
Previously we had root ports and designated ports and those remain
but blocking ports are now split
into what are called back up and alternate port roles.
Spanning tree will determine the role of the port
by looking at the BPDUs received
and deciding which one is more useful than another.
A more useful BPDU is a BPDU that has a lower path cost
or a better path to get to the root bridge.
So let’s start with a root port with the Spanning Tree Protocol
the Spanning Tree algorithm elects a single root bridge
for the entire bridged network
now with PVST that stands on a per-VLAN basis
but in 802.1D or Rapid Spanning Tree
there’s only 1 root bridge or root switch for the entire layer 2 topology.
The root bridge send BPDUs that are more useful
than the one sent by any other bridge.
The port receiving the best BPDU on a bridge or switch is known as the root port.
In other words, this is the port
that is closest to the root bridge in terms of path cost.
So in this topology, this switch is the root switch.
This port would be the root port of switch A
and this would be the root port of switch B.
the root bridge doesn’t have a root port.
All other bridges have at least one root port.
What is a designated port?
This is the best port on a segment to use to get to the root bridge.
So all bridges connected to a given segment
listen to each other’s BPDUs and agree on the bridge
sending the best BPDU as the designated bridge for the segment.
So in this topology, this switches the root
so for this segment, this is the designated port
or best port to use to get to the root bridge.
On this segment, this is the best port to use to get to the root bridge
so this is the designated port.
Once again, just imagine that you’ve got a PC
connected to the middle of this cable
which is the best way to get to the root bridge?
This way or this way?
and as we can see, this is the best path or best way to get to the root bridge
so this is the root port it's much quicker to go this way
than it is to go this way. so this is the designated port.
on this segment, let’s assume that we’ve got a hub connected here
this port has been chosen as the designated port
and that maybe because the switch here has a lower bridge ID in switch A
and this is port 1 which is lower than port 2
so this is the designated port on that segment.
Now what about alternate and backup port roles?
This corresponds to the blocking state in 802.1D
A blocked port is defined as any port that is not a designated or root port.
A port remains blocked as long as it receives more useful
in other words better BPDUs than the one it would send out on the segment.
Therefore port must receive BPDUs in order to stay blocked
if it doesn’t receive BPDUs it will transition to the forwarding state.
So in Rapid Spanning Tree there are 2 types of blocked ports
an alternate port is a port that is blocked
because it's receiving more useful BPDUs from another bridge on the segment.
So in this example, this port is the designated port
on let say switch B, on switch A
this port is an alternate port because more useful or better.
BPDUs are being received on this segment from switch B then from switch A
and that maybe because the priority of switch B is lower than the priority of switch A.
a backup port is a port that is blocked
because it's receiving more useful BPDUs from the same bridge that it's on.
so in this example were assuming that this port, this port
and this port are connected to a hub
this port a becomes the backup port its connected to the same switch
as this designated ports but it may be a higher port number
therefore it becomes a backup port.