TechKnowSurge
Cisco CCNA 2.5
VideoNetworkFree

STA - Elect Designated and Non-Designated Ports

Spanning Tree Protocol determines designated and non-designated ports on each network link after identifying the root bridge and root ports, ensuring a loop-free topology by blocking redundant paths. Ports on the root bridge are always designated, while any remaining ports not selected as root or designated are blocked as alternates.

Complete this video to capture a CTF flag worth 1 point.

About this video

Spanning Tree Protocol follows a sequential election process to build a loop-free network topology. Once the root bridge is elected based on the lowest bridge ID, each non-root switch identifies its root port — the port with the lowest-cost path back to the root bridge. The next step is to determine which port on each individual link segment becomes the designated port and which becomes the non-designated, or alternate, port. Designated port selection is evaluated on a link-by-link basis using two criteria. The first is lowest path cost to the root bridge; the port on whichever side has the shorter cumulative cost wins the designation. Because all traffic ultimately flows through the root bridge, every port on the root bridge itself automatically qualifies as a designated port. When both sides of a link share the same path cost — as can happen on a segment connecting two non-root switches — the tiebreaker is the lowest bridge ID, determined first by priority value and then by MAC address. Any port connecting a switch to an end device such as a workstation or server is also automatically designated. Once all root ports and designated ports are identified, any remaining ports that hold neither role are placed into a blocking state and function as alternate or backup ports. These ports go by several names depending on the STP variant in use — alternate ports, non-designated ports, or blocked ports — but their function is consistent: they pass no traffic under normal conditions and activate only if a root port or designated port on the active path fails. This blocking mechanism is the core method by which STP eliminates switching loops while preserving redundant physical paths for fault tolerance.

What you'll learn

What's covered

STP Port Roles

Aligned to

Cisco CCNA
2.5 Interpret basic operations of Rapid PVST+ Spanning Tree Protocol

Key terms

Spanning Tree Protocol
STP
A network protocol that prevents loops in Ethernet networks by creating a loop-free logical topology.
Switch
A network device that connects devices within a LAN and forwards traffic based on MAC addresses.
Bridge
A network device that connects two or more network segments and filters traffic based on MAC addresses.
Media Access Control
MAC
A sublayer of the Data Link layer that controls how devices on a network gain access to a medium and transmit data.
Designated Port
DP
In STP, the port on each network segment that provides the best path to the root bridge and is placed in a forwarding state. Each segment has exactly one designated port, which is selected based on the lowest cumulative path cost to the root.
Alternate Port
A switch port that is not elected as a root port or designated port and is placed in a blocking state to prevent loops, serving as a backup path.
Root Bridge
The switch elected as the reference point for the Spanning Tree Protocol topology, determined by the switch with the lowest Bridge ID (priority + MAC address). All other switches calculate their best path to the root bridge and block redundant links to create a loop-free tree.
Bridge ID
BID
A unique identifier used in the Spanning Tree Protocol consisting of a configured priority value and the bridge's MAC address. The BID is used in STP elections to determine which switch becomes the root bridge.

Topics

Spanning Tree Protocol Designated Ports Alternate Ports Loop Free Topology Root Bridge Layer 2 Switching Networking

Transcript

Once a port identifies the root port, that is going to be the fastest path to the root bridge, then it needs to identify what's going to be a designated port and a non-designated port.

A designated port is going to be those ports that are going to remain up and running and able to receive frames, where a non-designated port - or an alternate port, it goes by several different names - is going to be one of those ports that will be shut down and used as an alternate route in case the root port goes down. So it's going to designate either a designated port or a non-designated port. Let's talk about how it elects designated ports and non-designated ports.

Electing Designated Ports

So after we've figured out what the root bridge is, which in this network is switch one, and after we've elected what root ports there are - in switch 2 this is the root port, and in switch three this is the root port - the next thing is we need to figure out what the designated ports are. There's really just two criteria for this. First of all, it's the lowest cost to the root.

This is a link-by-link case right here. So for this first link right here, we say which side, this port on switch 2 or this port on switch one, is going to be the designated port. Well, what's the lowest cost? Since this is the root bridge, this is going to be the designated port.

Then we go to the next link right here, and which is the designated port on this link? Well, whatever is closest to the root bridge, so this is the designated port. Then I'm going to jump over to this link right here, and on this side it's going to be the root bridge. And then for this link right here, once again the root bridge.

So you can see a pattern here: it's always going to be the root bridge side is going to have all the designated ports. Part of this is that whatever's on the root bridge, those are all designated ports.

Next then we take a look at this link right here, and we say that from this port this direction has the same cost, from this port this direction. So this first criterion doesn't apply to it, so now we need to go to the second one, which is what is the lowest bridge ID. We take a look at the priorities, they're the same, and then we take a look at the MAC addresses. This one is lower, and so now this side becomes the designated port. And we take a look at this last link, and same thing, this side becomes the designated port.

One other thing to note here is if you have any devices that are hanging off of here - maybe you've got a laptop, maybe you've got some sort of server or something running - whatever is connected to those end devices, those are all designated ports as well. So designated ports essentially, those are the ports that are going to be up and running.

Electing Alternate Ports

And then finally what we'll do is we will elect alternate ports. These are the ports that are not chosen to be the root ports, the primary ports that's going to be used for communication, but they're alternates or backup ports.

In fact, they go by many different names. They're alternate, non-designated ports versus the designated ports, blocked ports because we're going to end up blocking them, backup ports. It kind of depends on what version of STP that you're using. You'll see several terminologies involved with this.

But essentially, after you get your root port selected - and so in this case it was these two ports right here - and then all your designated ports that are selected, then what will happen is that any ports that are not either a root port or a designated port are going to be shut off. And so it comes by and shuts off all of the ports, or at least goes into a blocking state where it's not going to allow traffic to go across it. So that is what happens: it elects these alternate ports.

Working Through the Example

Here's the example where we have the root bridge right here, and it's the root bridge because it's got the lowest priority. Then we select those root ports. This is going to be the root port because it has the lowest cost, and then on this switch this is the root port.

And then next what it's going to do is select designated ports for each of these links. So for this link, this is the designated port on this side. In fact, I could just automatically fill in all the ports on a root bridge as being the designated ports. And then between these two links right here, then I'm going to choose the lowest bridge ID, so that's on this side. So we've got this is a designated port and this is the designated port.

And then for each one of those links, whatever is left over, essentially the alternate ports, then we're going to shut down. So shut down those two, and then these two right here, so those are shut down.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →