Flex Links are a pair of Layer 2 interfaces (switch ports or port channels) where one interface is configured to act as a backup to the other. Users can disable STP and still retain basic link redundancy. Flex Links are typically configured in service provider or enterprise networks where customers do not want to run STP on some interfaces.
Note The Catalyst 4500 series switch supports a maximum of 16 Flex Links.
You configure Flex Links on one Layer 2 interface (the active link) by assigning another Layer 2 interface as the Flex Link or backup link. When one of the links is up and forwarding traffic, the other link is in standby mode, ready to begin forwarding traffic if the other link fails. At any given time, only one of the interfaces is in the forwarding state and forwarding traffic. If the primary link fails, the standby link starts forwarding traffic. When the active link reactivates, it enters standby mode and does not forward traffic. STP is disabled on Flex Links interfaces.
In Figure 23-1, ports 1 and 2 on switch A are connected to uplink switches B and C. Because they are configured as Flex Links, only one of the interfaces is forwarding traffic; the other is in standby mode. If port 1 is the active link, it begins forwarding traffic between port 1 and switch B; the link between port 2 (the backup link) and switch C is not forwarding traffic. If port 1 shuts down, port 2 activates and starts forwarding traffic to switch C. When port 1 reactivates, it enters standby mode and does not forward traffic; port 2 continues forwarding traffic.
You can also choose to configure a preemption mechanism, specifying the preferred port for forwarding traffic. In Figure 23-1, for example, you can configure the Flex Links pair with preemption mode so that after port 1 reactivates in the scenario, and it has greater bandwidth than port 2, port 1 begins forwarding after a duration equal to the preemption delay; and port 2 becomes the standby. You do this by entering the interface configuration switchport backup interface preemption mode bandwidth and switchport backup interface preemption delay commands.
Figure 23-1 Flex Links Configuration Example
If a primary (forwarding) link shuts down, a trap notifies the network management stations. If the standby link shuts down, a trap notifies the users.
Flex Links are supported only on Layer 2 ports and port channels. Flex Links are compatible with promiscuous trunks. It is not supported on isolated PVLAN trunks.
VLAN Flex Links Load Balancing and Support
VLAN Flex Links load balancing allows you to configure a Flex Links pair so that both ports simultaneously forward the traffic for mutually exclusive VLANs. For example, if Flex Links ports are configured for 1 to100 VLANs, the traffic of the first 50 VLANs can be forwarded on one port and the rest on the other port. If one of the ports fail, the other active port forwards all the traffic. When the failed port reactivates, it resumes forwarding traffic in the preferred VLANs. In addition to providing the redundancy, this Flex Links pair can be used for load balancing. Also, Flex Links VLAN load balancing also does not impose any restrictions on uplink switches (Figure 23-2).
Figure 23-2 VLAN Flex Links Load Balancing Configuration Example
Note A static MAC address must point to a Flex Links interface that is forwarding for given VLAN. For example, if a backup interface is forwarding VLAN X, then a static MAC address in VLAN X must point to the backup interface. Misconfiguration might cause unexpected results.
Flex Links Failover Actions
When a Flex Links primary fails, the following important actions are taken:
Detects link failure.
Moves static unicast MAC addresses that are configured on the primary link to the standby link.
Moves dynamic unicast MAC addresses that are learned on the primary link to the standby link.
Moves the standby link to a forwarding state.
Transmits MAC address-table move updates over a new active link, if you enter the
mac move update transmit command.
Transmits dummy multicast packets over a new active interface.
Note Local administrative shut down or a link that starts forwarding again due to preemption is not considered a link failure. In those cases, flush the dynamic hosts and not move them.
Static MAC addresses configured on a Flex Links member interface are moved over to the backup, if it fails. Static MAC addresses configured on a Flex Links member interface are restored when it starts forwarding again.
Note The show mac address-table command always shows static MAC addresses as associated with the interface on which it was configured even if it may have been moved to the standby link because of a Flex Links failover.