Configuring Link-State Tracking

Finding Feature Information

Your software release may not support all the features documented in this module. For the latest caveats and feature information, see Bug Search Tool and the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the feature information table at the end of this module.

Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to https://cfnng.cisco.com/. An account on Cisco.com is not required.

Restrictions for Configuring Link-State Tracking

  • This feature is supported only on the LAN Base image.

  • You can configure only two link-state groups per switch.

  • An interface cannot be a member of more than one link-state group.

  • An interface that is defined as an upstream interface in a link-state group cannot also be defined as a downstream interface in the link-state group.

  • Do not enable link-state tracking on individual interfaces that will part of a downstream EtherChannel interface.

Understanding Link-State Tracking

Link-state tracking, also known as trunk failover, binds the link state of multiple interfaces. Link-state tracking can be with server NIC adapter teaming to provide redundancy in the network. When the server NIC adapters are configured in a primary or secondary relationship, and the link is lost on the primary interface, network connectivity is transparently changed to the secondary interface.


Note


An interface can be an aggregation of ports (an EtherChannel) or a single physical port in either access or trunk mode .


The configuration in this figure ensures that the network traffic flow is balanced.

Figure 1. Typical Link-State Tracking Configuration


  • For links to switches and other network devices

    • Server 1 and server 2 use switch A for primary links and switch B for secondary links.

    • Server 3 and server 4 use switch B for primary links and switch A for secondary links.

  • Link-state group 1 on switch A

    • Switch A provides primary links to server 1 and server 2 through link-state group 1. Port 1 is connected to server 1, and port 2 is connected to server 2. Port 1 and port 2 are the downstream interfaces in link-state group 1.

    • Port 5 and port 6 are connected to distribution switch 1 through link-state group 1. Port 5 and port 6 are the upstream interfaces in link-state group 1.

  • Link-state group 2 on switch A

    • Switch A provides secondary links to server 3 and server 4 through link-state group 2. Port 3 is connected to server 3, and port 4 is connected to server 4. Port 3 and port 4 are the downstream interfaces in link-state group 2.

    • Port 7 and port 8 are connected to distribution switch 2 through link-state group 2. Port 7 and port 8 are the upstream interfaces in link-state group 2.

  • Link-state group 2 on switch B

    • Switch B provides primary links to server 3 and server 4 through link-state group 2. Port 3 is connected to server 3, and port 4 is connected to server 4. Port 3 and port 4 are the downstream interfaces in link-state group 2.

    • Port 5 and port 6 are connected to distribution switch 2 through link-state group 2. Port 5 and port 6 are the upstream interfaces in link-state group 2.

  • Link-state group 1 on switch B

    • Switch B provides secondary links to server 1 and server 2 through link-state group 1. Port 1 is connected to server 1, and port 2 is connected to server 2. Port 1 and port 2 are the downstream interfaces in link-state group 1.

    • Port 7 and port 8 are connected to distribution switch 1 through link-state group 1. Port 7 and port 8 are the upstream interfaces in link-state group 1.

In a link-state group, the upstream ports can become unavailable or lose connectivity because the distribution switch or router fails, the cables are disconnected, or the link is lost. These are the interactions between the downstream and upstream interfaces when link-state tracking is enabled:

  • If any of the upstream interfaces are in the link-up state, the downstream interfaces can change to or remain in the link-up state.

  • If all of the upstream interfaces become unavailable, link-state tracking automatically puts the downstream interfaces in the error-disabled state. Connectivity to and from the servers is automatically changed from the primary server interface to the secondary server interface. For example, in the previous figure, if the upstream link for port 6 is lost, the link states of downstream ports 1 and 2 do not change. However, if the link for upstream port 5 is also lost, the link state of the downstream ports changes to the link-down state. Connectivity to server 1 and server 2 is then changed from link-state group1 to link-state group 2. The downstream ports 3 and 4 do not change state because they are in link-group 2.

  • If the link-state group is configured, link-state tracking is disabled, and the upstream interfaces lose connectivity, the link states of the downstream interfaces remain unchanged. The server does not recognize that upstream connectivity has been lost and does not failover to the secondary interface.

You can recover a downstream interface link-down condition by removing the failed downstream port from the link-state group. To recover multiple downstream interfaces, disable the link-state group.

How to Configure Link-State Tracking

To enable link-state tracking, create a link-state group and specify the interfaces that are assigned to the group. This task is optional.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:


Device# configure terminal

Enters global configuration mode.

Step 2

link state track number

Example:


Device(config)# link state track 2

Creates a link-state group and enables link-state tracking. The group number can be 1 or 2; the default is 1.

Step 3

interface interface-id

Example:


Device(config)# interface gigabitethernet2/0/1

Specifies a physical interface or range of interfaces to configure, and enters interface configuration mode.

Valid interfaces include switch ports in access or trunk mode (IEEE 802.1q) or routed ports.

Note

 

Do not enable link-state tracking on individual interfaces that will be part of an Etherchannel interface.

Step 4

link state group [number] {upstream | downstream }

Example:


Device(config-if)# link state group 2 upstream

Specifies a link-state group and configures the interface as either an upstream or downstream interface in the group.

Step 5

end

Example:


Device(config-if)# end

Returns to privileged EXEC mode.

Monitoring Link-State Tracking

You can display link-state tracking status using the command in this table.

Table 1. Commands for Monitoring Link-State Tracking Status

Command

Description

show link state group [number] [detail]

Displays the link-state group information.

Configuring Link-State Tracking: Example

This example shows how to create the link-state group 1 and configure the interfaces in the link-state group.


		Device# configure terminal
		Device(config)# link state track 1
		Device(config-if)# interface range gigabitethernet1/0/21-22
		Device(config-if)# link state group 1 upstream
		Device(config-if)# interface gigabitethernet1/0/1
		Device(config-if)# link state group 1 downstream
		Device(config-if)# interface gigabitethernet1/0/3
		Device(config-if)# link state group 1 downstream
		Device(config-if)# interface gigabitethernet1/0/5
  Device(config-if)# link state group 1 downstream 
  Device(config-if)# end

Additional References for Link-State Tracking

Related Documents

Related Topic Document Title

Layer 2 command reference

Catalyst 2960-X Switch Layer 2 Command Reference

Standards and RFCs

Standard/RFC Title

None

MIBs

MIB MIBs Link

All the supported MIBs for this release.

To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:

http://www.cisco.com/go/mibs

Technical Assistance

Description Link

The Cisco Support website provides extensive online resources, including documentation and tools for troubleshooting and resolving technical issues with Cisco products and technologies.

To receive security and technical information about your products, you can subscribe to various services, such as the Product Alert Tool (accessed from Field Notices), the Cisco Technical Services Newsletter, and Really Simple Syndication (RSS) Feeds.

Access to most tools on the Cisco Support website requires a Cisco.com user ID and password.

http://www.cisco.com/support

Feature Information for Link-State Tracking

Releases Feature Information

Cisco IOS Release 15.0(2)EX

This feature was introduced.