Networks Training

  • About
  • My Books
  • IP Tools
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • Tech News
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / General Networking / The Most Important Border Gateway Protocol (BGP) Timers Explained

The Most Important Border Gateway Protocol (BGP) Timers Explained

Edited By Lazaros Agapidis

Border Gateway Protocol or BGP is a routing protocol that uses timers as part of its operation.  Various timers perform different functions, and some are used for very specialized operations that are unique to BGP.

bgp timers

In this article, we’ll be exploring some of the most common timers used for BGP as well as some less familiar ones that help to support BGP’s many functions.

Table of Contents

Toggle
  • Timers for Fundamental BGP Operation
    • Hold Down Timer
    • Keepalive Timer
  • Additional BGP Timers
    • ConnectRetryTimer
    • MinASOriginationInterval
    • MinRouteAdvertisementIntervalTimer (MRAI timer)
  • Related BGP Feature Timers
    • Route Refresh Timer
    • Route Flap Damping Timers
    • Delay Timer and Idle Timer
  • BGP Timer Best Practices
  • Conclusion
  • Useful Links:
    • Related Posts

Timers for Fundamental BGP Operation

The two fundamental timers that BGP uses when establishing BGP peerings and exchanging routing information are the hold down and the keepalive timers.

Hold Down Timer

This timer sets the time period that a BGP router will wait for a keepalive message from its peer before considering the connection as failed.  

If the hold time expires without receiving a keepalive message, the BGP session is torn down.  The default value for the hold timer is typically 180 seconds which is three times the default keepalive timer value.

Keepalive Timer

This timer controls how frequently BGP keepalive messages are sent to BGP peers. Keepalive messages are used to maintain the connection and ensure that the link between the BGP peers is alive.

If a BGP router doesn’t receive a keepalive message within the time period defined by the hold down timer, it assumes that the connection has failed. The default value for the keepalive timer is typically 60 seconds.

Additional BGP Timers

The hold down and keepalive timers are the two fundamental BGP timers used for maintaining BGP peers. 

However, there are three more timers that are inherent to BGP’s primary finite state machine (FSM) operation.

Using the names as they appear in the official RFC, these timers are: ConnectRetryTimer, MinASOriginationInterval, and MinRouteAdvertisementIntervalTimer.  These are briefly described below:

ConnectRetryTimer

This timer is used in the BGP connection establishment process. This timer controls the interval between successive attempts by a BGP router to establish a TCP connection with a BGP peer.

MORE READING:  What is Asymmetric Routing - Causes and Problems in Networks

MinASOriginationInterval

The MinASOriginationInterval timer controls the minimum time interval between successive advertisements of routes that have the same Autonomous System (AS) path.

This is particularly relevant when BGP routers are originating or re-announcing routes.  This helps limit the frequency with which updates are sent by a BGP router, thereby minimizing the processing load on other BGP routers and limiting the potential for route flapping.

It contributes to overall BGP stability and efficiency.

MinRouteAdvertisementIntervalTimer (MRAI timer)

The MRAI timer specifies the minimum amount of time that must elapse between subsequent route advertisements to a particular BGP peer.

This timer can be set for both eBGP and iBGP sessions.  Like the previous timer, its purpose is to limit the frequency of updates and contribute to BGP stability.

Related BGP Feature Timers

Besides the fundamental operation of BGP and its FSM, there are other features and capabilities that BGP has to further refine how routes are advertised and how traffic is routed.  These other features leverage additional timers to make them work. 

Route Refresh Timer

This timer is associated with the Route Refresh capability in BGP. It controls the frequency at which routing updates are requested from a BGP peer.

This capability allows a BGP speaker to request a re-advertisement of all the routes from a peer, which can be useful for clearing routing table inconsistencies without resetting the entire BGP session.

Route Flap Damping Timers

Route flap damping is a mechanism used in BGP networks to reduce the instability caused by routes that are constantly changing state (flapping).

It involves timers that control penalties and suppressions applied to routes that flap too frequently.  These timers include the penalty timer, suppress limit timer, reuse limit timer, maximum suppress time, and half-life timer.

Delay Timer and Idle Timer

These are two timers used within the context of BGP Graceful Restart.  The delay timer controls the delay before BGP starts re-establishing sessions after a restart, and the idle timer defines the period a router should wait for End-of-RIB markers, which are special BGP messages used to signal the completion of the initial routing table transfer between BGP peers.

MORE READING:  12 Best Computer Networking Books for Beginners & Experts

BGP Timer Best Practices

All of these timers play a vital role in the operation of BGP.  They are all typically assigned a default value that is generally suitable for most network scenarios and operations. 

However, most of these are adjustable to accommodate specialized scenarios.  Here are some general guidelines to keep in mind when and if adjusting the values of these timers:

  • Understand Network Requirements: Before adjusting any timer, thoroughly analyze the specific requirements of your network. Factors such as network size, topology, and stability should guide your adjustments.
  • Avoid Too Short Timers: Setting timers too short, especially the keepalive and hold down timers, can lead to unnecessary session resets due to minor network interruptions. This can cause instability in the network.
  • Balance Stability with Responsiveness: While longer timers can provide stability, they might also delay the detection of downed links or peers. Strive for a balance where the timers are short enough for timely reaction to changes but long enough to avoid instability.
  • Customize Based on Peer Type: Consider different timer settings for different types of BGP peers (e.g., internal vs. external). External peers might require different timer settings compared to internal peers due to different network conditions.
  • Consistency Across Peers: Ensure consistency in timer settings among BGP peers where possible. This helps in predictable and uniform behavior across the network.
  • Incremental Adjustments: Make incremental changes to timers and monitor the impact before making further adjustments. Sudden and significant changes can lead to unforeseen issues.
  • Use Vendor Recommendations: Consult with your network equipment vendor for recommendations on timer settings. They often provide guidelines based on extensive testing and experience.
  • Prioritize Network Stability: Always prioritize network stability over aggressive tuning. Conservative settings are typically preferable in a production environment.
  • Keep Default Values: Whenever possible, use the default timer values. Change these values only when it is absolutely necessary.

Conclusion

BGP timers play a vital role in maintaining BGP sessions and ensuring the robustness of the routing process by timely detection of failed peers and minimizing unnecessary traffic due to keepalive messages. Proper configuration of these timers is key to optimizing BGP performance and reliability.

Useful Links:

  • https://datatracker.ietf.org/doc/html/rfc4271#page-90 – Section 10 of the BGP RFC that describes BGP timers.
  • https://datatracker.ietf.org/doc/html/rfc2918 – Route Refresh RFC describing the feature operation and timers
  • https://datatracker.ietf.org/doc/html/rfc4724 – Graceful Restart RFC describing feature operation and timers
  • https://datatracker.ietf.org/doc/html/rfc2439 – Route Flap Damping RFC describing feature operation and timers
Spread the love

Related Posts

  • Difference Between Routers and Switches in TCP/IP Networks
  • 11 Different Types of IP Addresses Used in Computer Networks
  • Compare and Contrast Network Topologies (Star, Mesh, Bus, Hybrid etc)
  • 11 Networking Companies Like Cisco (Competitors)
  • What is a Wildcard Mask – All About Wildcard Masks Used in Networking

Filed Under: General Networking

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

By subscribing to our email list you will be receiving technical tutorials and industry news from time-to-time. You can unsubscribe at any time.

About Lazaros Agapidis

Lazaros Agapidis is a Telecommunications and Networking Specialist with over twenty years of experience.
He works primarily with IP networks, VoIP, Wi-Fi, and 5G, has extensive experience in training professionals for Cisco certifications, and his expertise extends into telecommunications services and infrastructure from both an enterprise and a service provider perspective.
In addition to his numerous vendor certifications, Lazaros has a solid online presence as an expert in his field, having worked in both public and private sectors within North America and in Europe.
He has enjoyed sharing his practical experiences in writing as well as through engaging online training.
LinkedIn: Lazaros Agapides

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this site

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2026 | Privacy Policy | Terms and Conditions | Contact | Amazon Disclaimer | Delivery Policy