CCNA 200-301

CCNP Enterprise

CCNP Security

CCIE Enterprise Lab

CCIE Security Lab

CCNP Service Provider

CCNP Data Center

CCNP Collaboration

CCIE DC Lab

Border Gateway Protocol (BGP) relies on periodic heartbeat messages and countdown timers to verify neighbor reachability and detect broken paths. When peering over complex wide-area networks or internal backbones, verifying that both routers agree on acceptable timer intervals is essential for routing stability.

Whether you are auditing existing sessions, adjusting convergence speeds, or investigating unexpected session flaps, understanding how Cisco routers display, negotiate, and enforce BGP timers gives you direct control over your routing health. This guide covers how to inspect active and configured timers on Cisco IOS and IOS-XE devices, how timer negotiation functions, how to apply configuration templates, how to troubleshoot hold-time drops, and when to choose BFD over aggressive timer tuning.


Frequently Asked Questions About Cisco BGP Timers and Negotiation

What are the default BGP keepalive and hold time values on Cisco routers?

By default, Cisco IOS, IOS-XE, and IOS-XR use a Keepalive interval of 60 seconds and a Hold Time of 180 seconds. The hold time defines the maximum duration (in seconds) that a router will wait to receive a BGP message (such as a KEEPALIVE or UPDATE) from a peer before declaring the neighbor dead and tearing down the peering session. Following the standard RFC 4271 specification, Cisco sets the hold time to exactly three times the keepalive interval.

How do Cisco routers negotiate BGP timers during session establishment?

When two BGP routers initiate a TCP connection (port 179) and transition to the OpenSent state, each router transmits a BGP OPEN message containing its locally configured hold time. During the exchange:
1. Both peers inspect the proposed hold time in the received OPEN message.
2. The peers select the smaller (minimum) value between the two proposals as the negotiated session hold time.
3. The keepalive interval is dynamically calculated by dividing the negotiated hold time by three (or by adopting the locally configured keepalive if it is already smaller).

For instance, if Router A configures timers bgp 10 30 and Router B uses default timers (60 180), both routers converge on an active hold time of 30 seconds and an active keepalive interval of 10 seconds.

What happens if a BGP peer advertises a hold time of zero?

If either router advertises a hold time of 0 in its OPEN message, timer tracking is disabled entirely. The session will never expire due to missed heartbeats, and periodic keepalive packets are not transmitted. This setting is sometimes used in specific lab or virtualized topologies, but it is not recommended for production environments because dead peer links cannot be detected at Layer 3 without lower-layer link triggers.

What is the Cisco minimum hold time feature?

Cisco routers allow you to configure a minimum acceptable hold time (min-holdtime). If a remote peer proposes a hold time that is strictly less than the local router’s configured min-holdtime, the local router rejects the session and sends a BGP NOTIFICATION message with Error Code 2 (OPEN Message Error), Subcode 6 (Unacceptable Hold Time). This prevents misconfigured external peers from forcing an unsustainably low hold time on your control plane.


Step-by-Step Guide: How to Verify Active BGP Timers on Cisco CLI

To inspect your current BGP timers, execute these steps from privileged EXEC mode (Router#).

Step 1: Identify the Peer IP and Operational Status

Before drilling into timer details, confirm the neighbor address and ensure the session is in the Established state:

Router# show ip bgp summary

Look for your target neighbor IP in the output table and verify that the State/PfxRcd column shows a numeric prefix count rather than an active transition state such as Idle, Active, or Connect.

Step 2: Run the Detailed Neighbor Inspection Command

Execute the show ip bgp neighbors command, specifying the peer IP address:

Router# show ip bgp neighbors 192.0.2.2

(Note: On modern IOS-XE and address-family-aware configurations, show bgp ipv4 unicast neighbors 192.0.2.2 provides equivalent output).

Step 3: Locate the Active and Configured Timer Section

Within the first 25 lines of the command output, identify the block detailing hold time and keepalives:

BGP neighbor is 192.0.2.2,  remote AS 65001, external link
  BGP version 4, remote router ID 192.0.2.2
  BGP state = Established, up for 04:12:38
  Last read 00:00:14, last write 00:00:18, hold time is 180, keepalive interval is 60 seconds
  Configured hold time is 180, keepalive interval is 60 seconds
  Minimum holdtime from neighbor is 0 seconds

Step 4: Filter Output for Quick Audits

If you are auditing multiple peers or want an immediate snapshot without reading full neighbor statistics, pipe the output through an include filter:

Router# show ip bgp neighbors 192.0.2.2 | include [Hh]old [Tt]ime|[Kk]eepalive|Last read

This filter returns the exact lines showing the active negotiated values, the locally configured values, and the countdown since the last packet was processed.


Cisco Command Reference: show ip bgp neighbors Timer Fields

This section provides technical field specifications for timer-related parameters displayed in the Cisco IOS / IOS-XE command line output for show ip bgp neighbors [ip-address].

Syntax

show ip bgp neighbors [ip-address]
show bgp [ipv4 | ipv6] unicast neighbors [ip-address]

Output Field Definitions

Field NameData TypeDescription
hold time is <seconds>IntegerThe active, negotiated hold time governing the current session. If no BGP message arrives before this timer reaches zero, the peering drops.
keepalive interval is <seconds>IntegerThe active interval at which the local Cisco router transmits periodic KEEPALIVE frames to the neighbor.
Configured hold time is <seconds>IntegerThe hold time configured locally in the router configuration under the BGP process or neighbor statement.
Configured keepalive interval is <seconds>IntegerThe keepalive interval configured locally prior to negotiation.
Minimum holdtime from neighbor is <seconds>IntegerThe configured threshold representing the lowest hold time value this router will accept from the peer during OPEN negotiation.
Last read <hh:mm:ss>Time formatTime elapsed since the local router last received and processed any valid BGP message from this neighbor.
Last write <hh:mm:ss>Time formatTime elapsed since the local router last generated and sent a BGP message to this neighbor over the TCP socket.

Cisco BGP Timers Configuration Command Templates

To change BGP timers from their defaults, you can apply settings globally across all neighbors or target a specific peer. Use the templates below.

Template 1: Global BGP Process Timers

Applies default timer parameters to all neighbors configured under the BGP autonomous system that do not have an explicit per-neighbor override.

! Enter global configuration mode
configure terminal

router bgp <LOCAL_ASN>
 ! Syntax: timers bgp <keepalive> <holdtime> [min-holdtime]
 timers bgp 10 30 20
 exit

end
write memory

Template 2: Per-Neighbor BGP Timers

Overrides global process timers for a specific peer. This is commonly required when connecting to internet service providers or public exchange points with mandatory timer policies.

configure terminal

router bgp <LOCAL_ASN>
 ! Configure peer-specific timers
 neighbor <NEIGHBOR_IP> timers <KEEPALIVE> <HOLDTIME> [MIN_HOLDTIME]

 ! Example: 5-second keepalive, 15-second hold time, 10-second minimum acceptable
 neighbor 192.0.2.2 timers 5 15 10
 exit

end
write memory

Template 3: Peer-Session Template (BGP Dynamic Templates)

For modern enterprise deployments using BGP peer templates on Cisco IOS-XE, configure timers inside a reusable session template:

configure terminal

router bgp <LOCAL_ASN>
 template peer-session CORE_PEER_SESSION
  timers 10 30 20
 exit-peer-session

 neighbor <NEIGHBOR_IP> inherit peer-session CORE_PEER_SESSION
 exit

end
write memory

Note: Changing timers on an active neighbor causes the BGP peering session to reset as the routers exchange new OPEN messages to renegotiate values.


Troubleshooting Guide: Diagnosing “BGP Hold Timer Expired” Errors

When a neighbor drops due to missed heartbeats, Cisco IOS outputs the following syslog message:

%BGP-5-ADJCHANGE: neighbor 192.0.2.2 Down - BGP Notification sent
%BGP-3-NOTIFICATION: sent to neighbor 192.0.2.2 4/0 (hold timer expired) 0 bytes

This error indicates that the local router failed to receive any BGP packet from the peer for the duration of the negotiated hold time window. Follow this sequential diagnostic path to isolate the root cause.

+-------------------------------------------------------------+
|          Syslog: BGP Hold Timer Expired (Notification 4/0)   |
+-------------------------------------------------------------+
                              |
                              v
+-------------------------------------------------------------+
| Step 1: Check Control Plane & CPU Health                     |
| Command: show processes cpu sorted | exclude 0.00           |
| Is the BGP Router or IP Input process starved (>90% CPU)?   |
+-------------------------------------------------------------+
            |                               |
           YES                             NO
            |                               |
            v                               v
 [Mitigate CPU Spikes]       +--------------------------------+
                             | Step 2: Check MTU / PMTUD Drops|
                             | Ping with DF bit set:          |
                             | ping <peer> size 1500 df-bit   |
                             +--------------------------------+
                                            |
                         +------------------+------------------+
                         |                                     |
                       FAILS                                PASSES
                         |                                     |
                         v                                     v
               [Fix Path MTU Mismatch]       +---------------------------------+
                                             | Step 3: Inspect Drops / CoPP    |
                                             | - show interface (CRC/overruns) |
                                             | - show policy-map control-plane |
                                             +---------------------------------+
                                                               |
                                                               v
                                                 [Review Drops on TCP 179]

Step 1: Check Control Plane and CPU Utilization

BGP runs in user space as a control-plane process. If the route processor experiences high CPU utilization, it may fail to process incoming keepalive packets or starve the BGP scheduler:

Router# show processes cpu sorted | exclude 0.00

Inspect the output for processes like BGP Router, IP Input, or high interrupt percentages (CPU utilization for five seconds: X%/Y%). If interrupt overhead is high, investigate switching loops, broadcast storms, or transit traffic hitting the CPU.

Step 2: Test Path MTU Discovery (PMTUD) and Large Frame Drops

A classic cause of intermittent hold-timer expiration is an MTU mismatch along the transit path. Small BGP KEEPALIVE frames (19 bytes) traverse the link without issue, but large BGP UPDATE frames exceeding the link MTU are dropped silently if Path MTU Discovery is broken.

  1. Test ping packets with the Don’t Fragment (DF) bit enabled across the peering path:
    text
    Router# ping 192.0.2.2 size 1500 df-bit
  2. If large packets drop, reduce your BGP neighbor maximum segment size or enable PMTUD:
    ios
    Router(config)# router bgp <LOCAL_ASN>
    Router(config-router)# neighbor 192.0.2.2 path-mtu-discovery

Step 3: Inspect Physical Layer Drops and Queue Exhaustion

Check the transit interface connecting to the peer for input drops, overruns, or frame errors:

Router# show interface GigabitEthernet0/0/1 | include drops|errors|overrun

High input queue drops or cyclic redundancy check (CRC) errors indicate physical-layer corruption or interface congestion, which causes bursts of dropped TCP segments that prevent keepalives from being acknowledged in time.

Step 4: Verify Control Plane Policing (CoPP)

Control Plane Policing policies protect the route processor from denial-of-service traffic. If your CoPP policy restricts TCP port 179 traffic too aggressively, incoming keepalives will be discarded during traffic surges:

Router# show policy-map control-plane | section BGP|tcp

Ensure the class-map matching BGP permits sufficient bandwidth to absorb transient routing updates without dropping standard control-plane heartbeats.


Architectural Tuning: Aggressive BGP Timers vs. BFD for Fast Convergence

To accelerate link-failure detection, network engineers often consider lowering BGP timers to aggressive intervals (e.g., timers bgp 1 3). However, doing so places a heavy burden on the router’s main CPU. A superior alternative on enterprise hardware is Bidirectional Forwarding Detection (BFD).

The following comparison table breaks down the operational trade-offs between tuning standard BGP timers and offloading failure detection to BFD.

Evaluation CriteriaAggressive BGP Timers (e.g., 1s / 3s)Bidirectional Forwarding Detection (BFD)
Typical Failover Detection3 to 9 seconds50 to 300 milliseconds (sub-second)
CPU Processing LocationRoute Processor (Software Control Plane)Offloaded to Line Cards / ASIC Hardware Plane
Control Plane OverheadHigh; each peer requires CPU-scheduled packet generationMinimal; keepalives are managed by microcode engines
False-Positive Flap RiskHigh; temporary CPU spikes (>85%) can cause session dropsExtremely low; independent of route-processor load
Multi-Protocol ReusabilityNone (applies only to the specific BGP session)High; a single BFD session can trigger OSPF, BGP, and static routes
WAN Link ScalabilityPoor; fails to scale beyond dozens of peersHigh; supports hundreds of concurrent microsecond sessions
Configuration ComplexitySimple (neighbor <ip> timers 1 3)Moderate (requires BFD enabled on interface + neighbor fall-over)
Recommended Use CaseLegacy platforms lacking BFD support; third-party EBGPData centers, core backbones, and enterprise edge routers

Enabling BFD for BGP on Cisco Routers

When sub-second convergence is required, leave BGP timers at their stable defaults (60 180) to prevent false-positive teardowns, and delegate rapid link checking to BFD:

configure terminal

! Enable BFD on the physical interface
interface GigabitEthernet0/0/1
 bfd interval 100 min_rx 100 multiplier 3
 exit

! Attach BFD tracking to the BGP neighbor
router bgp <LOCAL_ASN>
 neighbor 192.0.2.2 fall-over bfd
 exit

end

With this architecture, BFD detects forwarding failures in 300 milliseconds (100ms x 3) and signals the local BGP process to tear down the peering instantly, eliminating the need to expose the control plane to aggressive 1-second BGP keepalive polling.


Conclusion

Inspecting BGP timers on a Cisco router requires looking beyond basic session uptime to evaluate both negotiated and configured values. Using show ip bgp neighbors <ip> and targeted pipe filters, you can immediately identify the active hold time, verify that timer negotiation arrived at the expected interval, and confirm that the session is healthy. When lower convergence times are required, deploy BFD rather than aggressively reducing BGP keepalives to achieve sub-second recovery while protecting your router’s control plane.

Please follow and like us:
Last modified: November 16, 2026

Author

Comments

Write a Reply or Comment

Your email address will not be published.