Link-State Tracking

How Link-State Tracking Works

Summary

Link-state tracking involves grouping interfaces into uplink and downlink categories and monitoring their connectivity to maintain network availability.

This process ensures that network connectivity is maintained by automatically redirecting traffic and administratively controlling interface states in response to link failures.

Workflow

These stages describe how link-state tracking works.

  1. Interfaces are grouped into link-state groups, categorized as either uplink or downlink interfaces.
    • Uplink interfaces typically connect to distribution switches or routers, while downlink interfaces connect to end devices like servers.
  2. The system continuously monitors the link state of uplink interfaces.
    • If at least one uplink interface is active, the downlink interfaces remain in the "link-up" state.
    • If all uplink interfaces fail, downlink interfaces will transition to the trackedPortDown state. This indicates that the interface has been administratively disabled by the link-state tracking feature.
  3. When uplink connectivity is lost, the system initiates a failover to redirect traffic to secondary interfaces.
    • This ensures that the network remains operational despite link failures.
  4. Downlink interfaces can be recovered by either removing the failed uplink interfaces from the group or disabling the link-state group entirely.
    • After uplink connectivity is restored, the downlink bringup delay timer stabilizes the transition of downlink interfaces to an active state. The default downlink bringup delay timer value is 60 seconds. The maximum configurable value is 600 seconds.

In a typical setup, servers connect to two switches (primary and secondary) using uplink and downlink interfaces.

If the primary switch loses connectivity, the system automatically switches traffic to the secondary switch, maintaining network availability

Configure Link-State Tracking

This section provides a step-by-step guide to configure Link-State Tracking on Cisco Nexus 9000 Series NX-OS devices.

Before you begin

Ensure that all interfaces intended for use in link-state groups are operational and not administratively shut down.

Procedure

SUMMARY STEPS

  1. Use the configure terminal command to enter global configuration mode.
  2. Use the link state group group-name command to create a link-state group and enable link-state tracking.
  3. Use the downlink bringup delay seconds command to configure the delay before downstream interfaces are brought back up after uplink connectivity is restored.
  4. Use the interface interface-id command to specify the interface or range of interfaces to configure.
  5. Use the link state group group-name type {uplink | downlink} command to assign the interface to a link-state group as an uplink or downlink.
  6. Use the end command to exit configuration mode.

DETAILED STEPS


Step 1

Use the configure terminal command to enter global configuration mode.

Example:

switch# configure terminal

Step 2

Use the link state group group-name command to create a link-state group and enable link-state tracking.

Example:

switch(config)# link state group <group-name>

To remove the entire link-state group configuration:

switch(config)# no link state group <group-name>

Replace <group-name> with the desired group name (e.g., group-1).

switch(config)# link state group group-1
            switch(config-link-state)#

Note

 

Group names can be a maximum of 64 characters long.

Step 3

Use the downlink bringup delay seconds command to configure the delay before downstream interfaces are brought back up after uplink connectivity is restored.

Example:

switch(config-link-state)# downlink bringup delay ?
            <1 - 600> Timer in seconds

To remove the downlink bringup delay timer configuration:

switch(config-link-state)# no downlink bringup delay

The default value is 60 seconds. The configurable range is 1 to 600 seconds.

switch(config-link-state)# downlink bringup delay 60

Step 4

Use the interface interface-id command to specify the interface or range of interfaces to configure.

Example:

switch(config)# interface <interface-id>

Replace <interface-id> with the specific interface or range of interfaces to configure (e.g., Ethernet1/1).

switch(config)# interface Ethernet1/1
            switch(config-if)#

Step 5

Use the link state group group-name type {uplink | downlink} command to assign the interface to a link-state group as an uplink or downlink.

Example:

switch(config-if)# link state group <group-name> type {uplink | downlink}

To remove an interface from a link-state group:

switch(config-if)# no link state group <group-name> type {uplink | downlink}

Replace <group-name> with the group name created earlier.

Use uplink for interfaces connected to distribution switches or routers.

switch(config-if)# link state group group-1 type uplink

Use downlink for interfaces connected to end devices like servers.

switch(config-if)# link state group group-1 type downlink

Note

 

A single link-state group can have a maximum of 64 uplink interfaces and 64 downlink interfaces, for a total of 128 interfaces.

Step 6

Use the end command to exit configuration mode.

Example:

switch(config-if)# end

Monitor the Link-State Tracking

To monitor and verify the configuration and status of Link-State Tracking, follow these steps:

Procedure

SUMMARY STEPS

  1. Use the show link state group all command to display detailed information about the link-state group.
  2. Use the show run int eth <port> command to display the running configuration of a specific interface and verify if it is part of an uplink or downlink group.
  3. Use the show system internal ethpm info interface eth <port> command to display detailed internal information about a specific interface, including its administrative and operational states, link state group membership, and other diagnostic data to verify its role as an uplink or downlink interface.
  4. Use the show system internal dme running-config all dn sys/linkstate command to display internal details about the link-state group configuration.
  5. Use the show interface brief command to display a summary of interface statuses, including link state.

DETAILED STEPS


Step 1

Use the show link state group all command to display detailed information about the link-state group.

Example:

switch# show link state group all
Link State Group: group-1
Status: Up
Uplink Interfaces: Eth1/1
Downlink Interfaces: Eth1/2
Number of times disabled: 2
Last disabled: Sat Mar 1 17:10:26 2025
Downlink Delay Timer: 60

Displays detailed information about the link-state group, including:

  • Group status (Up/Down/Pending)

  • Uplink and Downlink interfaces

  • Number of times the group was disabled

  • Last disabled timestamp

  • Downlink bringup delay timer

show link state group <name> displays detailed information about a specific group.

Step 2

Use the show run int eth <port> command to display the running configuration of a specific interface and verify if it is part of an uplink or downlink group.

Example:

switch# show run int eth 1/1
!Command: show running-config interface Ethernet1/1
!Running configuration last done at: Sat Mar 1 17:10:26 2025
!Time: Sat Mar 1 17:15:42 2025
version 10.4(4o)
Bios: version 01.07
interface Ethernet1/1
  link state group group-1 type uplink
  no shutdown

Step 3

Use the show system internal ethpm info interface eth <port> command to display detailed internal information about a specific interface, including its administrative and operational states, link state group membership, and other diagnostic data to verify its role as an uplink or downlink interface.

Example:

switch# show system internal ethpm info interface eth1/1
Ethernet1/1 - if_index: 0x1A000000
Backplane MAC address: d0:09:c8:63:65:90
Router MAC address:    d0:09:c8:63:65:8f

Admin Config Information:
  state(up), mode(trunk), speed(1 Gbps), duplex(Full), medium_db(0), fec(auto), port-type-fabric(not-fabric) port-type-external(not-external) dfe-adaptive-tuning (1)
  layer(L2), dce-mode(edge), description(LACP Link to Switch-B), transmit-reset-skip(0)
  mac-up-timer(0), max-bringup-timer(0), active-jitter-mgmt(0), media-type(none) link loopback(off)
  auto neg(on), auto mdix(on), beacon(off), num_of_si(0)
  config auto neg(on) openflow(0) switchport_isolated(0)
  medium(broadcast), snmp trap(on), MTU(1500),
  flowcontrol rx(off) tx(off), link debounce(100),link debounce(link-up 0)
  storm-control bcast:100.00% mcast:100.00% ucast:100.00%
  storm-control bcast level1:100.00% bcast level2:100.00%  mcast level1:100.00% mcast level2:100.00% ucast level1:100.00% uncast level2:100.00%
  storm-control pps bcast:4294967295 mcast:4294967295 ucast:4294967295
  storm-control mcast:200 ucast:200
   span mode(0 - not a span-destination)
  trans mode(not a trans-port)
  Flexlink mode(disabled), Active Interface(none), Backup Interface(none), cfg_instance(0)
  delay(1), bw(1000000), rate-mode(dedicated)
  eee(n/a), eee_lpi(Normal), eee_latency(Constant)
  fabricpath enforce (DCE Core)(0)
  load interval [1-3]: 30, 300, 0 (sec).
  pkt timestamping: state =0, ingress_source_id=0, egress_source_id=0 .
  Link-sync group id 0
  Priority Extend -1
  Ethertype 0x8100
  Slowdrain Congestion : mode core timeout[500], mode edge [500]
  Slowdrain Pause : mode core enabled [n] timeout[0]
  Slowdrain Pause : mode edge enabled [n] timeout[500]
  MAC-addr IPv6-extract:0
  Buffer Boost:0 Speed Group:0, MAC Learn: Enabled
  shut lan (disabled)
  virtual-ethernet-bridge (Disabled)
  link state group name: group-1
hash-mode gtp-inner-v4 (Disabled)

Displays detailed information about:

  • Internal port status and administrative configurations.

  • Information about the link state group, including whether the group name has been cleared.

  • Ensures that stale group information is not displayed by resetting the group name in the port configuration.

Step 4

Use the show system internal dme running-config all dn sys/linkstate command to display internal details about the link-state group configuration.

Example:

show system internal dme running-config all dn sys/linkstate
{
    "linkStateGroup": {
        "attributes": {
            "groupName": "group-1",
            "uplinkIntfList": ["eth1/1"],
            "downlinkIntfList": ["eth1/2"],
            "status": "up",
            "numDisabled": 2,
            "lastDisabledTimestamp": "2025-03-01T17:10:26"
        }
    }
}

Step 5

Use the show interface brief command to display a summary of interface statuses, including link state.

Example:

switch# show interface ethernet 1/1,ethernet 1/2 brief
--------------------------------------------------------------------------------
Ethernet        VLAN    Type Mode   Status  Reason                 Speed     Port
Interface                                                                    Ch #
--------------------------------------------------------------------------------
Eth1/2          --      eth  routed down    trackedPortDown          auto(D) --
Eth1/1          --      eth  routed down    Administratively down    auto(D) --