Flex link is a Cisco solution which replaces STP in certain network topologies. It
works by detecting link down on a primary interface and then bringing up the backup
interface that has been defined as backup. It is most commonly implemented at the access
layer where the switch has dual uplinks to the distribution layer.
How does it work?
Under the primary interface the backup interface is defined with the switchport backup
interface command. This command can be applied to L2 links or portchannels. The backup
interface is kept in down state until the primary fails. Under normal conditions traffic
will flow through the primary interface so all dynamic MAC entries are learned via the
As soon as the primary interface goes down the backup interface is brought online.
These things happen when the primary fails:
- All dynamic MAC entries are moved to the backup interface
- Moves the backup link into a forwarding state
- Transmit dummy multicast frames to multicast destination 01:00:0c:cd:cd:cd
- The source of these frames are the sources learned by the switch on its local ports
This is quite similar to the STP Uplinkfast feature. However with Flex link no BPDUs are
transmitted and STP is disabled on the interfaces that are enabled for Flex link.
Bringing the backup interface up is very fast and should take less than a second. To send
out dummy multicast frames the MAC-address table move update feature needs to be enabled.
Preemption is disabled by default. Enabling preemption means that the primary interface
will be brought into forwarding when it comes back. There is a preemption delay that can
be set to prevent flapping. Enable preemption if you have a primary interface of
higher bandwidth than the backup one.
Flex link can support load balancing. This means that one interface is primary for a set
of VLANs and backup for other VLANs and vice versa. Enable this if you need to use both
uplinks to support the amount of traffic exiting the switch.
Advantages of Flex links
What are the advantages of Flex link?
- Light weight, no BPDUs transmitted.
- Fast to converge
- The topology is deterministic and not subject to STP reconverging due to misconfig
Disadvantages of Flex link
There are always negative sides with every solution/protocol in networking. It’s always
a choice to make to make the right design.
- Relies on link down to detect failure
- Can’t detect unidirectional links
- Can’t detect wonky SFP or hardware failure not leading to link down
- Risk of loops in certain topologies
Flex link could be used together with UDLD to solve some of these issues.
Risk of loops
So how could a loop be formed with Flex link? The first scenario is that someone
accidentally connects two access switches together.
Because Flex link has no concept of STP if the link between the access switches is
brought into forwarding a loop has formed. This could be stopped by implementing BPDU
guard on all non uplink ports.
There could also be a situation where a link is added between the access and distribution
layer and because the Flex link does not consume/send BPDUs a loop could form.
Flex link is a STP replacement from Cisco that works by bringing up an backup interface
when the primary interface has gone link down. It is light weight and fast but relies
on links going physically down. It also has the risk of loops in certain topologies.
It’s a viable solution where STP is not wanted due to buying a L2 service from a
provider or such to not mix STP with the provider.
13 thoughts on “Cisco Flex link”
did you pass your ccie without knowing of this feature?
Nope. It’s on the CCDE blueprint so I’m writing about those things to kind of keep notes. When I write for the CCDE I’m thinking more about design and advantages/disadvantages and different scenarios.
You will notice that they are not configuration centric. For the CCIE it was such a minor thing to implement so I never bothered to blog about it. It’s more interesting from a design perspective.
What would be the real world scenario/application for Flex Links ?
To switch between uplinks fast without running STP. Could be buying L2 from ISP and you don’t want to mess around with STP and BPDU filter etc.
Or like Howard said if you connect switch to FEX where BPDU guard is enabled.
Good post. Another example of the use of flex links is the need to connect an ios based switch to a nexus 2000 fabric extender due to the fact these devices have bpduguard on s an non-removable default.
Thanks for the input Howard.
That’s great to know. I would love to hear from people if and why they have Flex link deployed.
Very cool feature. As we do not like STP, this could be a possible assist in a few locations where we can’t go fully L3 from access/dist to core. Thanks!!
Pingback:CCNP Madness - Page 3
Excellent, many thanks
I have my Primary Internet (AT&T Ethernet) coming in to a switch port Interface. Let’s say port 20.
This is the Active connection.
I have a Meraki MX64 with a live USB 4G Internet access connected to the Backup Interface. Let’s say port 22.
This is the Backup connection/port to the AT&T Internet.
If AT&T Internet goes down, the 4G connection takes over. When AT&T comes back online, it takes over again and 4G goes back to Standby.
Note: I have reduced port speed on 20 to 100.
description Local Internet Uplink
switchport access vlan 250
switchport mode access
switchport backup interface Gi2/0/18
switchport backup interface Gi2/0/18 preemption mode bandwidth
switchport backup interface Gi2/0/18 preemption delay 10
description 4G Internet Failover
switchport access vlan 250
switchport mode access
I meant to say ‘I have reduced port speed on 22 to 100’
Well explained! Thanks!
What is the correct way to configure flex link in a scenario where I have two l2 circuits connecting a branch office to the main campus. Is the idea that I apply the flex link config to the branch interfaces only or should I be applying the configs to both ends of the connection?