Contents
Configuring Flex Links
This chapter describes how to configure flex links. It contains the following sections:
- Information About Flex Links
- Guidelines
- Default Settings
- Configuring Flex Links
- Configuring Flex Link Preemption
- Verifying Flex Link Configuration
- Configuration Examples
Information About Flex Links
Flex links are a pair of a Layer 2 interfaces (switch ports or port channels) where one interface is configured to act as a backup to the other. The feature provides an alternative solution to the Spanning Tree Protocol (STP). You 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 the switch. If the switch is running STP, flex links are not necessary because STP already provides link-level redundancy or backup.
You configure flex links on one Layer 2 interface (the active link) by assigning another Layer 2 interface as the flex links or backup link. The flex links interface can be on the same switch. 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 shuts down. At any given time only one of the interfaces is in the linkup state and forwarding traffic. If the primary link shuts down, the standby link starts forwarding traffic. When the active link comes back up, it goes into standby mode and does not forward traffic. Flex links are not configured by default and there are no backup interfaces defined. STP is disabled on flex link interfaces.
In the Flex Links Configuration Example, 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 goes down, port 2 comes up and starts forwarding traffic to switch C. When port 1 comes back up, it goes into standby mode and does not forward traffic; port 2 continues forwarding traffic.
Flex Links are supported only on Layer 2 ports and port channels, not on VLANs or on Layer 3 ports.
Preemption
You can optionally configure a preemption mechanism to specify the preferred port for forwarding traffic. For example, you can configure a flexlink pair with preemption mode so that when a port comes back up, if it has greater bandwidth than the peer port, then it will begin forwarding after 60 seconds and the peer port will be on standby. This is done by entering the preemption mode bandwidth and delay commands.
If a primary (forwarding) link goes down, a trap notifies the network management stations. If the standby link goes down, a trap notifies the users.
You can configure preemption in the following three modes:
You can also configure the preemption delay as a specified amount of time (in seconds) before preempting a working interface for another. This ensures that the counterpart in the upstream switch has transitioned to an STP forwarding state before the switch over.
Multicast
When a flexlink interface is learned as an mrouter port, the standby (non-forwarding) interface is also co-learned as an mrouter port if it has link up. This co-learning is only for internal software state maintenance and has no further relevance with respect to IGMP operations and hardware forwarding, unless multicast fast-convergence is enabled. With multicast fast-convergence configured, the co-learned mrouter port is immediately added to the hardware. Flex link supports multicast fast convergence for IPv4 IGMP.
Guidelines
Follow these guidelines to configure Flex Links:
You can configure only one flex link backup link for any active link and it must be a different interface from the active interface.
An interface can belong to only one flex link pair; it can be a backup link for only one active link.
Neither of the links can be a port that belongs to an EtherChannel. However, you can configure two port channels (EtherChannel logical interfaces) as flex links, and you can configure a port channel and a physical interface as flex links, with either the port channel or the physical interface as the active link.
STP is disabled on flex link ports. A flex link port does not participate in STP, even if the VLANs present on the port are configured for STP. When STP is not enabled, be sure that there are no loops in the configured topology.
Do not configure any STP features (for example, PortFast, BPDU Guard, and so forth) on Flex Links ports or the ports to which the links connect.
vPC is not supported. Flex link is used in place of vPC where configuration simplicity is desired and there is no need for active-active redundancy.
Flex link cannot be configured on the following types of interface:
Configuring Flex Links
SUMMARY STEPSYou can configure a pair of Layer 2 interfaces (switch ports or port channels) as flex link interfaces where one interface is configured to act as a backup to the other.
3. switchport backup interface {ethernet slot/port | port-channel channel-no } [ multicast fast-convergence | preemption { delay delay-time | mode [ bandwidth | forced | off ] }]
5. (Optional) show interface interface-id switchport backup
6. (Optional) copy running-config startup config
DETAILED STEPS
Command or Action Purpose Step 1 configure terminal
Enters configuration mode.
Step 2 interface slot/port
Specifies the Ethernet interface and enters interface configuration mode. The interface can be a physical Layer 2 interface or a port channel (logical interface). The port channel range is 1 to 48.
Step 3 switchport backup interface {ethernet slot/port | port-channel channel-no } [ multicast fast-convergence | preemption { delay delay-time | mode [ bandwidth | forced | off ] }]
Configures a physical Layer 2 interface (Ethernet or port channel) as part of a flex link pair. When one link is forwarding traffic the other interface is in standby mode.
ethernet slot/port—Specifies the backup Ethernet interface. The slot number is from 1 to 255 and the port number is from 1 to 128.
port-channel channel-no—Specifies the port channel interface. The interface number is from 1 to 4096.
multicast—(Optional) Specifies to configure the multicast parameters.
fast-convergence—(Optional) Configures fast convergence on the backup interface.
preemption—(Optional) Specifies to configure a preemption scheme for a backup interface pair.
delay delay-time—(Optional) Specifies a preemption delay. The range is from 1 to 300 seconds. The default is 35 seconds.
mode—(Optional) Specifies the preemption mode.
bandwidth—(Optional) Specifies that the interface with the higher available bandwidth always preempts the backup.
forced—(Optional) Specifies the interface that always preempts the backup.
off—(Optional) Specifies no preemption occurs from backup to active.
Step 4 end
(Optional) Return to privileged EXEC mode.
Step 5 show interface interface-id switchport backup
(Optional) Verifies the configuration.
Step 6 copy running-config startup config
(Optional) Save your entries in the switch startup configuration file.
This example shows how to configure an Ethernet switchport backup pair: Ethernet 1/1 is active interface, Ethernet 1/2 is the backup interface:
switch(config)# feature flexlink Switch(config)# interface ethernet1/1 Switch(config-if)# switchport backup interface ethernet2/1 switch(config)# interface po300 Switch(config-if)# switchport backup interface po301 switch# show ip igmp snooping mrouter Type: S - Static, D - Dynamic, V - vPC Peer Link, I - Internal, C - Co-learned Vlan Router-port Type Uptime Expires 4 Po300 D 00:00:12 00:04:50 4 Po301 DC 00:00:12 00:04:50Configuring Flex Link Preemption
SUMMARY STEPS3. switchport backup interface ethernet slot/port
4. switchport backup interface ethernet slot/port preemption mode [ bandwidth | forced | off ]
5. switchport backup interface ethernet slot/port preemption delay delay-time
7. (Optional) show interface interface-id switchport backup
8. (Optional) copy running-config startup config
DETAILED STEPS
Command or Action Purpose Step 1 configure terminal
Enters configuration mode.
Step 2 interface slot/port
Specifies the Ethernet interface and enters interface configuration mode. The interface can be a physical Layer 2 interface or a port channel (logical interface). The port channel range is 1 to 48.
Step 3 switchport backup interface ethernet slot/port
Configure a physical Layer 2 interface (or port channel) as part of a Flex Link pair with the interface. When one link is forwarding traffic, the other interface is in standby mode.
Step 4 switchport backup interface ethernet slot/port preemption mode [ bandwidth | forced | off ]
Configures a physical Layer 2 interface (Ethernet or port channel) as part of a flex link pair. When one link is forwarding traffic the other interface is in standby mode.
Configure a preemption mechanism and delay for a Flex link interface pair. You can configure the preemption as:
Step 5 switchport backup interface ethernet slot/port preemption delay delay-time
Configure the delay time until a port preempts another port. The default preemption delay is 35 seconds.
Note Setting a delay time only works with forced and bandwidth modes.
Step 6 end
(Optional) Return to privileged EXEC mode.
Step 7 show interface interface-id switchport backup
(Optional) Verifies the configuration.
Step 8 copy running-config startup config
(Optional) Save your entries in the switch startup configuration file.
This example shows how to configure preemption mode as bandwidth, for a backup interface pair and to verify the configuration:
Switch# configure terminal Switch(conf)# interface ethernet0/1 Switch(conf-if)#switchport backup interface ethernet0/2 preemption mode forced Switch(conf-if)#switchport backup interface ethernet0/2 preemption delay 50 Switch(conf-if)# end Switch# show interface switchport backup detail Active Interface Backup Interface State ------------------------------------------------------------------------ Ethernet0/21 Ethernet0/2 Active Up/Backup Standby Interface Pair : Gi0/1, Gi0/2 Preemption Mode : forced Preemption Delay : 50 seconds Bandwidth : 100000 Kbit (Gi0/1), 100000 Kbit (Gi0/2) Mac Address Move Update Vlan : autoVerifying Flex Link Configuration
Use the following commands to display flex link configuration information:
Command Purpose show interface switchport backup
Displays information about all switch ort Flex Link interfaces. show interface switchport backup detail
Displays detailed information about all switch ort Flex Link interfaces. show running-config backup
show startup-config backup
Displays the running or startup configuration for backup interfaces. show running-config flexlink
show startup-config flexlink
Displays the running or startup configuration for flex link interfaces. Configuration Examples
This example shows how to configure a port-channel switchport backup pair with forced preemption. The active interface port-channel10 is the preferred forwarding interface:
switch(config)# interface port-channel10 switch(config-if)# switchport backup interface port-channel20 preemption mode forced switch(config-if)# switchport backup interface port-channel20 preemption delay 35This example shows the port channel switchport backup pair with multicast fast convergence:
switch(config)# interface port-channel10 switch(config-if)# switchport backup interface port-channel20 multicast fast-convergenceThis example shows an example of multicast convergence with a pair of flex link interfaces: po300 and po301. A general query received on po300 makes it an mrouter port and po301 as co-learned.
switch(config)# interface po300 Switch(config-if)# switchport backup interface po301 switch# show ip igmp snooping mrouter Type: S - Static, D - Dynamic, V - vPC Peer Link, I - Internal, C - Co-learned Vlan Router-port Type Uptime Expires 4 Po300 D 00:00:12 00:04:50 4 Po301 DC 00:00:12 00:04:50This example shows po300 and po301 as mrouter ports (po301 is co-learned); it is not added to the hardware table when multicast fast-convergence is disabled.
switch# show ip igmp snooping groups vlan 4 Type: S - Static, D - Dynamic, R - Router port Vlan Group Address Ver Type Port list 4 */* - R Po300 Po301 224.1.1.1 v2 D Eth1/31 switch# show platform fwm info hw-stm | grep 0100.5e01.0101 1.4 0100.5e01.0101 midx 36 1:2849:0 0:0:1:0 1.0.0.0.0.24 (e:0) switch# show platform fwm info oifl 36 oifl 36 vdc 1 oifl 36: vdc 1 gpinif 0, mcast idx 36(alt:0), oifl_type 2 oifl 36 vdc 1 oifl 36: oifl iods 8,44 oifl 36 vdc 1 oifl 36: max_iod 8192, ref count 1000 num_oifs 2, seq_num 33 oifl 36 vdc 1 oifl 36: hw pgmd: 1 msg present: 0 oifl 36 vdc 1 oifl 36: l2_bum_ref_cnt 0, l3_macg_ref_cnt 1000 oifl 36 vdc 1 oifl 36: if_indexs - Po300 Eth1/31This example shows co-learned po301 is added to hardware when multicast fast-convergence is enabled:
switch(config)# interface po300 Switch(config-if)# switchport backup interface po301 multicast fast-convergence switch# show platform fwm info hw-stm | grep 0100.5e01.0101 1.4 0100.5e01.0101 midx 38 1:2849:0 0:0:1:0 1.0.0.0.0.26 (e:0) switch# show platform fwm info oifl 38 oifl 38 vdc 1 oifl 38: vdc 1 gpinif 0, mcast idx 38(alt:0), oifl_type 2 oifl 38 vdc 1 oifl 38: oifl iods 8-9,44 oifl 38 vdc 1 oifl 38: max_iod 8192, ref count 1000 num_oifs 3, seq_num 35 oifl 38 vdc 1 oifl 38: hw pgmd: 1 msg present: 0 oifl 38 vdc 1 oifl 38: l2_bum_ref_cnt 0, l3_macg_ref_cnt 1000 oifl 38 vdc 1 oifl 38: if_indexs - Po300 Po301 Eth1/31This example shows the running configuration of flex link:
switch# show running-config flexlink !Command: show running-config flexlink !Time: Thu Jan 1 03:21:12 2011 version 5.0(3)N2(1) feature flexlink logging level Flexlink 5 interface port-channel500 switchport backup interface port-channel501 preemption delay 36 switchport backup interface port-channel501 multicast fast-convergence interface Ethernet2/2 switchport backup interface port-channel507 preemption mode forcedThis example shows details about the flex link interface. Forced preemption is about to take place because (scheduled) is displayed.
switch# show interface switchport backup detail Switch Backup Interface Pairs: Active Interface Backup Interface State ------------------------------------------------------------------------ port-channel300 port-channel301 Active Down/Backup Up Preemption Mode : forced Preemption Delay : 35 seconds (default) (scheduled) Multicast Fast Convergence : Off Bandwidth : 20000000 Kbit (port-channel300), 10000000 Kbit (port-channel301)