Hands-On Lab: Configuring Flex Links

This hands-on lab configures Flex Links between two uplinks on an access switch, providing sub-second failover without relying on Spanning Tree at all, and verifies traffic automatically shifts to the backup link when the primary fails.

Flex Links ConfigurationSTP-Independent RedundancyActive Backup Failover

~3 min read · Updated Sep 23, 2026

Lab Objective

Configure two uplink ports on an access switch as a Flex Links pair, verify one becomes active while the other stays in standby without Spanning Tree blocking either, and confirm traffic automatically shifts to the backup link within roughly a second of the primary failing.

Lab Purpose

Spanning Tree, covered extensively earlier in this series, provides loop prevention but with convergence delays even in its fastest Rapid PVST+ form. Flex Links offers a simpler, STP-independent alternative specifically for the common case of a single access switch with two uplinks to the same or different upstream switches, trading STP's general-purpose flexibility for significantly faster, more predictable failover in this specific topology.

Lab Topology

AccessSwitch
  Gi1/0/23 ---- uplink to DistSwitch1 (primary)
  Gi1/0/24 ---- uplink to DistSwitch1 (backup)

Both uplinks connect to the same upstream
switch for this lab, though Flex Links also
supports uplinks to two different switches

Task 1: Configure the Flex Links Pair

Configure Gi1/0/23 as the active interface with Gi1/0/24 as its Flex Links backup.

Task 2: Verify the Flex Links Status

Confirm Gi1/0/23 shows as active/forwarding and Gi1/0/24 shows as standby, independent of any Spanning Tree state.

Task 3: Verify Gi1/0/24 Is Not Simply STP-Blocked

Confirm Gi1/0/24's standby state is a Flex Links function rather than a Spanning Tree blocking state.

Task 4: Simulate the Primary Uplink Failing

Shut down Gi1/0/23 and observe how quickly Gi1/0/24 takes over.

Task 5: Verify Traffic Resumes via the Backup Link

Confirm connectivity through the switch is restored via Gi1/0/24.

Solution and Verification

AccessSwitch(config)# interface gigabitethernet1/0/23
AccessSwitch(config-if)# switchport backup interface gigabitethernet1/0/24

-- This single command on the primary interface
-- establishes the entire Flex Links pair --
-- no configuration is needed on Gi1/0/24 itself

AccessSwitch# show interfaces switchport backup

Switch Backup Interface Pairs:

Active Interface        Backup Interface        State
------------------------------------------------------------------------
Gi1/0/23                 Gi1/0/24                Active Up/Backup Standby

AccessSwitch# show spanning-tree interface gigabitethernet1/0/24

Interface        Role Sts Cost
Gi1/0/24          Desg FWD 4
-- Notice STP itself considers this port
-- Designated/Forwarding -- Flex Links
-- operates as a completely separate
-- mechanism layered on top, independently
-- holding the port in standby regardless
-- of what STP's own state would otherwise
-- allow

AccessSwitch(config)# interface gigabitethernet1/0/23
AccessSwitch(config-if)# shutdown

AccessSwitch# show interfaces switchport backup

Active Interface        Backup Interface        State
------------------------------------------------------------------------
Gi1/0/23                 Gi1/0/24                Active Down/Backup Up
-- Gi1/0/24 activated almost immediately --
-- well under a second, since Flex Links
-- does not need to run any STP recalculation
-- or convergence process at all

DownstreamPC> ping [upstream gateway]

!!!!!
Success rate is 100 percent (5/5)
-- Connectivity confirmed restored through
-- Gi1/0/24

Key Takeaway

Flex Links operates entirely independently of Spanning Tree, as shown by Gi1/0/24 still displaying a Designated/Forwarding STP role even while genuinely held in standby by the Flex Links mechanism — this independence is precisely what allows failover far faster than any STP convergence process, but it also means Flex Links only handles this specific simple pair-of-uplinks scenario, unlike STP's general-purpose loop prevention across arbitrarily complex topologies.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Configuring HSRP for IPv6

This hands-on lab configures HSRP for IPv6 between two routers, demonstrating the option to use an automatically generated link-local virtual address rather than manually assigning one, and verifies failover behavior mirrors the IPv4 HSRP lab covered earlier in this series.

Continue

Hands-On Lab: Configuring SVI Autostate Exclude

This hands-on lab configures SVI autostate exclude on a monitoring port within a VLAN, preventing that single inactive port from incorrectly bringing down the SVI for an entire VLAN that still has other active member ports.

Continue

Hands-On Lab: Configuring Private VLANs (PVLANs)

This hands-on lab configures a full Private VLAN structure with a primary VLAN and both isolated and community secondary VLANs, demonstrating fine-grained Layer 2 isolation within a single IP subnet beyond what the simple protected-port feature from an earlier lab can achieve.

Continue

Hands-On Lab: Configuring VLAN Access Control Lists (VACLs)

This hands-on lab configures a VLAN Access Control List using a VLAN access-map to filter traffic within a single VLAN at Layer 2, something a standard router-applied ACL cannot achieve since traffic never leaves the VLAN to reach a routed interface.

Continue

Hands-On Lab: Configuring Storm Control

This hands-on lab configures storm control thresholds on a switch port to limit broadcast and multicast traffic, simulating a broadcast storm and verifying the switch suppresses excess traffic before it can overwhelm the network.

Continue

Hands-On Lab: Configuring PVLAN Edge (Protected Ports)

This hands-on lab configures PVLAN Edge (protected ports) on two access ports within the same VLAN, isolating them from each other at Layer 2 while both retain normal connectivity to an uplink port, demonstrating a lightweight isolation feature that requires no separate VLAN.

Continue