What Does Alternate port Mean?
On This Page
Quick Definition
In a network using Spanning Tree Protocol, an alternate port is a blocked port that provides a backup connection to the root bridge. It stays in blocking mode to prevent loops, but if the main path fails, it can quickly take over. This helps keep the network reliable without causing data collisions.
Commonly Confused With
A backup port provides a redundant connection to the same network segment (e.g., two ports on the same switch connected to the same root bridge). An alternate port provides a path to the root bridge through a different switch. The backup port is a backup to a designated port, while the alternate port is a backup to the root port.
Switch A has two ports connected to the root bridge. The port with lower cost is root port, the other is backup port. If Switch A connects to the root via two different switches, the second-best path port is alternate.
The root port is the port on a non-root switch that provides the best (lowest cost) path to the root bridge and is in forwarding state. The alternate port is the second-best path and is blocked. When the root port fails, the alternate port becomes the new root port.
On a switch, port Gi0/1 has path cost 4 to the root, Gi0/2 has cost 8. Gi0/1 is root port, Gi0/2 is alternate port.
A designated port is the port on a segment that has the best path to the root bridge. Every segment has one designated port, which forwards traffic. An alternate port is never a designated port; it is a blocked port on a non-root switch that provides an alternative path to the root.
In a link between two switches, one switch's port is designated (forwarding), the other is non-designated (blocked). The blocked port could be an alternate port if it provides a path to the root via another switch.
Must Know for Exams
The alternate port is a core concept in the CCNA (200-301) exam, specifically under the 'Network Access' domain, which includes spanning tree protocol operations. Cisco expects candidates to understand port roles (root, designated, alternate, backup) and port states (blocking, listening, learning, forwarding, disabled). The alternate port is tested in multiple choice, drag-and-drop, and simulation questions. Candidates must be able to identify which port on a switch is an alternate based on path costs, bridge IDs, and port priorities. In exam scenarios, you might be given a topology diagram and asked to determine the role of each port. The alternate port is often the one that receives inferior BPDUs from the root bridge compared to the root port.
Beyond CCNA, the alternate port appears in more advanced certifications like CCNP Enterprise (ENCOR 350-401) where RSTP and MSTP are covered in depth. In those exams, the focus shifts to rapid transition mechanisms and how alternate ports enable faster convergence. However, for CCNA, the requirement is to understand the basic STP algorithm and port roles. Exam objectives specifically list 'Describe spanning tree protocol' and 'Configure and verify spanning tree protocol'. Questions often ask what happens when a root port fails, the answer is that the alternate port transitions to forwarding state. Another common question type is identifying the port that will become root if the current root port fails, which requires recognizing the alternate port.
Cisco also tests the distinction between alternate and backup ports. A backup port is a port that provides a redundant connection to the same segment, while an alternate port provides a redundant path to the root bridge. Candidates must not confuse these. In exam labs, you might use the command 'show spanning-tree' to see port roles. The output will show 'Alt' for alternate ports. Knowing how to interpret this output is essential. Finally, the exam may include troubleshooting scenarios where a network has a loop because an alternate port was misconfigured or missing. Understanding why alternate ports exist and how they prevent loops is fundamental to passing the switching portion of the CCNA.
Simple Meaning
Imagine you have a busy office building with only one main entrance. Everyone uses that door to get in and out. But the building manager knows that if that door gets jammed, people would be stuck.
So they add a second door that stays locked all the time, just in case. That second door is like an alternate port. In a network, switches use Spanning Tree Protocol to prevent data from going in circles, which would clog everything up.
The protocol picks one main path to send data through, and that path uses something called a root port. Any other port that could also reach the main switch, but is currently not needed, gets put into blocking mode. That is the alternate port.
It is ready to go, but it waits silently. If the main path breaks, the alternate port wakes up and becomes the new root port, allowing traffic to flow again. This is important because in a network, you cannot have two active paths to the same place or data will loop forever, crashing the network.
The alternate port solves this by being a backup that stays quiet until it is needed. Without alternate ports, networks would have to choose between having no backups (risky) or having loops (disastrous). So think of the alternate port as the emergency exit that is always there, locked but ready, so the network can survive a failure without going down.
Full Technical Definition
An alternate port is a concept defined by the IEEE 802.1D Spanning Tree Protocol (STP) and its enhancements, such as Rapid Spanning Tree Protocol (RSTP, 802.1w) and Multiple Spanning Tree Protocol (MSTP, 802.1s). In STP, every switch in a bridged network elects a root bridge, which is the central reference point for all path calculations. Each non-root switch then determines one root port, the port that provides the best (lowest cost) path to the root bridge. Any other port on that switch that could also reach the root bridge, but offers a higher cost, is designated as an alternate port. The alternate port is placed in a blocking state (or discarding state in RSTP) to prevent layer 2 loops. It receives Bridge Protocol Data Units (BPDUs) from the root bridge or from other switches, but it does not forward user traffic.
In RSTP, the alternate port is part of the rapid transition mechanism. Unlike classic STP, which could take 30 to 50 seconds to reconverge after a failure, RSTP allows an alternate port to transition to the forwarding state almost immediately, often within a few milliseconds. This is because the alternate port already has a valid, loop-free path to the root bridge; it simply needs to be activated. RSTP uses a process called proposal-agreement to quickly synchronize port roles without waiting for timers. The alternate port role is critical for providing redundancy without sacrificing convergence speed.
From a standards perspective, the alternate port is defined in terms of its role in the spanning tree algorithm. Each port on a switch has a role (root, designated, alternate, or backup) and a state (blocking, listening, learning, forwarding, or disabled). An alternate port is always a port that leads to the root bridge, but via a different switch than the current root port. Its path cost to the root bridge is higher than the root port's cost. In a well-designed network, every switch should have at least one alternate port on a different switch or link to ensure redundancy. In practice, network engineers configure features like PortFast, UplinkFast, and BackboneFast to optimize how alternate ports behave, especially in legacy STP environments. Configuration on Cisco switches involves setting bridge priorities, path costs, and port priorities to influence which ports become alternate.
Real IT implementation requires careful planning. For example, in a data center with redundant links, switches exchange BPDUs every 2 seconds. The algorithm deterministically assigns root and alternate roles. If the root port goes down, the alternate port immediately takes over, cutting downtime to near zero. Monitoring tools like show spanning-tree on Cisco IOS display the role of each port, including whether it is an alternate. Troubleshooting involves checking for design issues such as a missing alternate port, which would leave the network vulnerable to a single point of failure. Understanding alternate ports is foundational for any network professional working with switched networks.
Real-Life Example
Think about a big city with multiple bridges connecting two islands. Most people use the main bridge because it is the shortest and fastest route. That main bridge is like the root port, it is the preferred path to the root bridge.
But there is also a second bridge nearby that is older and a bit longer. It is kept open but with a toll booth that stops traffic unless the main bridge is closed. That second bridge is the alternate port.
It is physically there, and it can carry traffic, but it is blocked from everyday use to prevent cars from going in circles between the two islands. Now imagine the main bridge has a sudden structural issue and closes. The city quickly opens the second bridge, and traffic flows again with minimal delay.
In a network, exactly the same thing happens: the alternate port is a fully functional link that stays in blocking mode, and when the root port fails, it transitions to forwarding mode to keep the network running. Without that alternate bridge, if the main bridge closed, everyone would be stuck. Similarly, without an alternate port, a single cable failure could take down connectivity for an entire department.
This analogy also shows why multiple alternate paths are not always better, if too many bridges were open at once, cars would get confused and create gridlock. That is why Spanning Tree Protocol deliberately blocks alternate ports to keep the topology simple and loop-free until they are needed.
Why This Term Matters
Alternate ports are crucial for building resilient networks that can survive link failures without manual intervention. In a typical enterprise network, switches are interconnected with multiple cables to provide redundancy. Without Spanning Tree Protocol, those redundant links would create loops, broadcast storms, duplicate frames, and MAC address table instability. The alternate port solves this by acting as a standby, ready to take over when the primary path fails. This matters in practice because network downtime costs money. A single switch failure can isolate hundreds of users, interrupt critical applications, and require IT staff to physically reconnect cables. With alternate ports, the network heals itself in seconds or milliseconds, depending on the STP variant.
For IT professionals, understanding alternate ports directly impacts how they design and troubleshoot networks. When configuring spanning tree, engineers must ensure that every switch has an alternate path to the root bridge. If a switch does not have an alternate port, that switch is a single point of failure. In a campus network with dozens of switches, missing alternate ports can cause widespread outages that are hard to diagnose. Tools like show spanning-tree highlight which ports are alternate, allowing engineers to verify redundancy. Features like UplinkFast (Cisco proprietary) and RSTP make alternate ports converge faster, which is critical for voice and video traffic that cannot tolerate long interruptions.
Alternate ports also matter for security. Malicious actors can exploit STP by sending fake BPDUs to force a topology change, potentially causing a denial of service. Understanding which ports are alternate helps engineers implement protections like BPDU Guard and Root Guard. Alternate ports are not just a theoretical concept, they are a practical building block of enterprise network reliability, and any CCNA-level professional must grasp their role and behavior.
How It Appears in Exam Questions
CCNA and CCNP exams feature the alternate port in several question formats. One common pattern is a topology-based multiple-choice question. For example, you are given a diagram with four switches interconnected, each showing bridge priorities and port costs. The question asks: 'Which port on Switch C is the alternate port?' You must calculate the root bridge, determine the root port on each switch, and then identify the port that provides the next best path to the root. The answer is the port that has a higher path cost than the root port but still leads to the root bridge. Another pattern involves scenario-based questions: 'Switch A’s root port fails. Which port will become the new root port?' The correct answer is the alternate port, assuming one exists. If no alternate port exists, the switch will reconverge, but that is a longer process.
Configuration-type questions require you to choose the correct command to influence which port becomes alternate. For example, 'Which command would ensure that Gi0/2 becomes the alternate port instead of Gi0/3?' The answer might involve setting a higher path cost on Gi0/3 or changing the port priority. Cisco IOS commands like 'spanning-tree cost' or 'spanning-tree port-priority' are tested. Simulation questions may ask you to configure spanning tree and then verify port roles using 'show spanning-tree'. In the output, you must identify which ports are in blocking state, those are likely alternate ports. Troubleshooting questions describe symptoms like a network loop after a link failure. The cause could be that a switch has no alternate port, so when the root port fails, the switch does not have a standby and must recalculate, potentially causing temporary loops.
Another advanced pattern involves RSTP. A question might state: 'In an RSTP network, how long does it take for an alternate port to transition to forwarding after a root port failure?' The answer is essentially immediate (sub-second) due to the proposal-agreement mechanism. Candidates must know that in classic STP, this takes 30 seconds, while in RSTP it is much faster. Finally, compare-and-contrast questions may ask: 'What is the difference between an alternate port and a backup port?' The alternate port provides a redundant path to the root bridge, while the backup port provides a redundant path to the same segment (usually on the same switch). Recognizing these patterns is key to scoring well.
Practise Alternate port Questions
Test your understanding with exam-style practice questions.
Example Scenario
Consider a small office network with three switches: Switch A, Switch B, and Switch C. Switch A is the root bridge because it has the lowest bridge priority. Switch B connects to Switch A via port Gi0/1 and also to Switch C via port Gi0/2.
Switch C connects to Switch A via port Gi0/1 and to Switch B via port Gi0/2. In this topology, Switch B's port Gi0/1 has a path cost of 4 to reach the root, while port Gi0/2 has a path cost of 8 (because it goes through Switch C first). Therefore, Gi0/1 becomes the root port.
The other port, Gi0/2, becomes an alternate port because it still provides a path to the root, but at a higher cost. Switch C similarly elects Gi0/1 as its root port and Gi0/2 as alternate. Now, imagine that the direct link between Switch A and Switch B (connected via Gi0/1 on Switch B) fails.
Switch B immediately detects the loss of BPDUs on its root port. In classic STP, it would take 30 seconds for the alternate port to move through listening and learning states to forwarding. In RSTP, the transition is nearly instant.
The alternate port becomes the new root port, and traffic from Switch B to the rest of the network now flows through Switch C. The network remains operational. Without the alternate port, Switch B would be completely isolated until STP reconverges, which could take 30-50 seconds and cause significant disruption for users trying to access servers or the internet.
This scenario is exactly what CCNA simulation questions test: you must be able to identify the alternate port and understand its role in failover.
Common Mistakes
Thinking an alternate port is the same as a backup port.
A backup port provides a redundant connection to the same network segment, often on a single switch. An alternate port is a different path to the root bridge. They serve different redundancy purposes.
Remember: alternate = alternate path to root bridge; backup = redundant connection to same segment.
Believing an alternate port forwards traffic in normal operation.
An alternate port is always in a blocking or discarding state under normal conditions. If it forwarded traffic, it would create a loop. It only forwards after the root port fails.
Think of the alternate port as a 'standby' that stays quiet until needed.
Assuming every switch must have an alternate port.
A switch will only have an alternate port if there is a redundant path to the root. In a tree topology with no extra links, there will be no alternate port. This is not a failure; it just means no redundancy.
Check if redundant links exist. No redundant links means no alternate port.
Confusing the alternate port with the root port during troubleshooting.
The root port is the best path to the root bridge and is in forwarding state. The alternate port is the second-best path and is blocked. Misidentifying them leads to incorrect failover analysis.
Use the 'show spanning-tree' command. The root port is labeled 'Root', alternate is 'Alt'.
Thinking that a higher path cost guarantees a port becomes alternate.
Path cost is a factor, but the STP algorithm also considers bridge ID and port priority. A port with a lower cost might still become alternate if another port with an even lower cost exists.
Learn the full STP tie-breaking sequence: lowest root bridge ID, lowest path cost, lowest sender bridge ID, lowest sender port priority, lowest port ID.
Exam Trap — Don't Get Fooled
{"trap":"The exam shows a topology with two links from a non-root switch to the root bridge, but both links are on the same switch. The question asks: 'What are the port roles?' and the candidate might call one of them an alternate port."
,"why_learners_choose_it":"Learners see two connections to the root and assume one must be alternate. However, both ports are on the same switch and both provide a direct path to the root. One will be root (lowest cost) and the other will actually be a backup port, not an alternate, because it connects to the same segment (the root bridge)."
,"how_to_avoid_it":"Remember: an alternate port always provides a path to the root via another switch. If both ports connect directly to the root bridge on the same switch, the second one is a backup port. The distinction is based on the segment, not just the destination."
Step-by-Step Breakdown
Elect the root bridge
All switches exchange BPDUs. The switch with the lowest bridge ID (priority + MAC) becomes the root bridge. This is the central reference for all path calculations.
Determine the root port on each non-root switch
Each non-root switch evaluates all its ports to find the one with the lowest path cost to the root bridge. That port becomes the root port and transitions to forwarding state.
Identify alternate ports
On the same non-root switch, any other port that also leads to the root bridge (but with a higher path cost) becomes an alternate port. The switch blocks this port to prevent loops.
Block the alternate port
The alternate port is placed in a blocking state (discarding in RSTP). It receives BPDUs but does not forward user traffic. This ensures a loop-free logical topology.
Monitor for root port failure
The switch continuously listens for BPDUs on the root port. If BPDUs stop or a superior BPDU appears elsewhere, the switch detects a failure.
Failover to the alternate port
When the root port fails, the alternate port transitions to forwarding state. In RSTP, this happens rapidly via the proposal-agreement mechanism. In classic STP, it goes through listening and learning states (30 seconds total).
Recalculate spanning tree if needed
The switch now has a new root port. If the topology changes further, STP recalculates, possibly assigning new roles to other ports.
Practical Mini-Lesson
In real-world networking, the alternate port is a cornerstone of redundancy. As a network professional, you must not only know what it is but also how to design, verify, and troubleshoot it. Start with design: when cabling your network, always plan for at least two paths from each access switch to the core. This creates the possibility of an alternate port. Use tools like Cisco's 'show spanning-tree' to confirm that each switch has an alternate port. If a switch shows no alternate port, that switch is a single point of failure, any link failure isolating it from the root will cause an outage until STP reconverges. To create an alternate port, you may need to adjust bridge priorities or path costs. For instance, lowering the path cost on a desired alternate link can make it the root port; the old root port becomes alternate.
Configuration context is critical. On Cisco switches, you can influence which port becomes alternate by using the 'spanning-tree cost' interface command. For example, 'int gi0/2' then 'spanning-tree cost 19' makes that port less preferred compared to a port with cost 4. You can also use 'spanning-tree port-priority' to fine-tune. In RSTP, alternate ports play a key role in fast convergence. When a root port fails, the switch immediately knows the alternate port is a valid loop-free path, so transitions are sub-second. This is vital for real-time applications like VoIP or video conferencing.
What can go wrong? A common issue is a missing alternate port due to a single link between switches. Another problem is misconfiguration where a port that should be alternate is actually forwarding, causing a loop. This can happen if BPDU filtering is enabled accidentally. Also, some engineers confuse alternate and backup ports, leading to incorrect troubleshooting. For example, if you have a redundant link to the same switch, that is a backup port, not alternate. Knowing the difference helps you analyze the 'show spanning-tree' output correctly. Finally, security features like BPDU Guard can be applied to alternate ports in some designs to prevent rogue switch attacks. Understanding alternate ports deeply allows you to build networks that are both efficient and resilient.
Memory Tip
Think 'A' for Alternate: 'Another path to the root, but blocked.'
Covered in These Exams
Current Exam Context
Current exam versions that test this topic — use these objectives when studying.
200-301Cisco CCNA →N10-009CompTIA Network+ →Related Glossary Terms
The 24-pin motherboard connector is the main power cable that connects the computer's power supply unit (PSU) to the motherboard, supplying electricity to the motherboard and its components.
Two-factor authentication (2FA) is a security method that requires two different types of proof before granting access to an account or system.
A 3D printer is a device that creates physical objects by depositing layers of material based on a digital model.
5G is the fifth generation of cellular network technology, designed to deliver faster speeds, lower latency, and support for many more connected devices than previous generations.
The 8-pin CPU connector is a power cable from the power supply that delivers dedicated electricity to the processor on a computer's motherboard.
802.1Q is the networking standard that allows multiple virtual LANs (VLANs) to share a single physical network link by tagging Ethernet frames with VLAN identification information.
802.1X is a network access control standard that authenticates devices before they are allowed to connect to a wired or wireless network.
A/B testing is a controlled experiment that compares two versions of a single variable to determine which one performs better against a predefined metric.
Frequently Asked Questions
Can a switch have more than one alternate port?
Yes, a switch can have multiple alternate ports if it has more than two paths to the root bridge. However, only the best among them becomes the alternate that will be used in failover; the others remain blocked and are considered 'alternate' in a broader sense.
What is the difference between an alternate port and a backup port in STP?
An alternate port provides a redundant path to the root bridge via another switch. A backup port provides a redundant connection to the same network segment, usually on the same switch. They are different roles with different failover purposes.
Does an alternate port forward BPDUs?
An alternate port receives BPDUs but does not forward them. It stays in blocking/discarding state to prevent loops. It only starts forwarding traffic after it becomes the new root port.
How does RSTP make the alternate port converge faster than classic STP?
RSTU uses a proposal-agreement mechanism that allows the alternate port to transition to forwarding without waiting for listening and learning timers. It already knows the path is loop-free, so it can become active in milliseconds.
What commands show if a port is an alternate port on a Cisco switch?
Use 'show spanning-tree' or 'show spanning-tree detail'. The output lists each port with its role, such as 'Root', 'Desg', 'Alt', or 'Bkup'. Alternate ports are labeled 'Alt'.
Can an alternate port be configured as a trunk port?
Yes, an alternate port can be a trunk port carrying multiple VLANs. Its role is independent of the trunk configuration. However, PVST+ treats each VLAN separately, so the port might be alternate for one VLAN and root for another.
Summary
An alternate port is a fundamental concept in Spanning Tree Protocol that provides network redundancy without causing loops. It is a blocked port on a non-root switch that offers a backup path to the root bridge. When the root port fails, the alternate port takes over quickly, keeping the network operational.
Understanding alternate ports is essential for passing the CCNA exam and for real-world network design. In exams, you will be tested on identifying port roles, understanding failover behavior, and distinguishing alternate ports from backup ports. Memory tip: 'A for Alternate, Another path to root, blocked.'
Always remember that an alternate port is a silent guardian that only activates when needed. By mastering this concept, you will be better prepared to build resilient networks and ace your certification.