Configure and Verify BFD on Nexus 9000: Step-by-Step - 夜莺博客

Configure and Verify BFD on Nexus 9000: Step-by-Step

Bidirectional Forwarding Detection (BFD) is the difference between a routing protocol converging in seconds and failing over in milliseconds, but getting the session parameters and verification right on NX-OS requires more than flipping a feature switch. This guide follows Cisco TAC's official procedure to enable BFD globally, tune timers, bind it to OSPF/EIGRP/BGP, and — most importantly — verify the sessions with the correct show commands, counters and packet captures. The examples are based on NX-OS 10.3(4a) on Nexus 9000 switches, and the same flow applies to other NX-OS data center platforms.

Enable the BFD Feature

BFD must be enabled before it can be configured on interfaces and protocols:

SW1(config)# feature bfd

Configure Global and Interface BFD Timers

Global parameters are inherited by all sessions; per-interface settings override them:

SW1(config)# bfd interval 500 min_rx 500 multiplier 3
SW1(config)# interface vlan 20
SW1(config-if)# bfd interval 500 min_rx 500 multiplier 3
SW1(config-if)# no ip redirects
SW1(config-if)# no ipv6 redirects

The min_tx and msec range is 50–999 ms (default 50), and the multiplier ranges from 1 to 50 (default 3). Always disable ICMP redirects on BFD-enabled interfaces.

Bind BFD to Routing Protocols

BFD on OSPF

SW1(config)# router ospf 1
SW1(config-router)# bfd
SW1(config)# interface vlan 10
SW1(config-if)# ip ospf bfd

BFD on EIGRP

SW1(config)# router eigrp 2
SW1(config-router)# bfd
SW1(config)# interface vlan 20
SW1(config-if)# ip eigrp 2 bfd

BFD on BGP (Multihop)

SW1(config)# router bgp 65001
SW1(config-router)# address-family ipv4 unicast
SW1(config-router)# neighbor 192.168.3.1
SW1(config-router-neighbor)# bfd multihop
SW1(config-router-neighbor)# update-source loopback30

Specifying multihop or singlehop determines the session type; without a keyword, directly connected peers default to singlehop.

Verify BFD Sessions

Confirm neighbors are automatically detected and inspect session state:

show bfd neighbors
show bfd neighbors interface lo30 details

Details show the registered protocol, echo function usage, holdown timers, and RX/TX counters. Use sh bfd clients to list which protocols registered sessions, and show system internal bfd sess-store interface vlan 10 for session store details.

Understanding BFD Down Reasons

Syslog reasons tell you exactly why a session dropped:

%BFD-5-SESSION_STATE_DOWN: BFD session ... Reason: Path Down.
... Reason: Echo Function Failed.
... Reason: Neighbor Signaled Session Down.
... Reason: Control Detection Time Expired.

An Echo Function Failed with the echo function enabled, for example, points to the forwarding path rather than the control plane.

Packet-Level Verification with Ethanalyzer

Capture BFD control and echo traffic on the inband interface (UDP port 3785):

SW1# ethanalyzer local interface inband display-filter "udp.port==3785" limit-captured-frames 0

For a BGP multihop session, filter on the loopback IPs and look for BFD Control packets alternating between both neighbors every ~250 ms.

For related NX-OS/IOS XR practice, check our guides on troubleshooting input drops in Cisco IOS XR and interface CRC error troubleshooting.

原文链接:https://www.cisco.com/c/en/us/support/docs/switches/nexus-9000-series-switches/221944-configure-and-verify-bfd-on-nexus-9000-s.html