Description

Junos device introduces up to negative 20% jitter to BGP keepalive interval.

Symptoms

RFC 1771 section 4.4 defines that BGP's keepalive interval is one third of hold time interval. As an example, keepalive interval is 10 seconds if hold time is set to 30 seconds. Junos device adds negative jitter on keepalive interval which can be up to 20% of the calculated keepalive interval. That is keepalive interval can vary from 8 seconds to 10 seconds.

### Reference ###
Sample topology

             <--------- eBGP --------->
   +--------+                          +--------+
   |   MX   |ge-0/0/0          ge-0/0/0|   MX   |
   |        |--------------------------|        |
   |        |10.0.0.1          10.0.0.2|        |
   +--------+                          +--------+



Capture Data : Calculated keepalive is 10 sec. (holdtime 30 sec)
--------------------------------------------------------------------------------
Delta Time       Source       Destination  Protocol  Length  Info
 0.000000000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
 9.709680000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
 9.239310000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
 9.207997000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
 9.380396000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
 9.322238000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
--------------------------------------------------------------------------------

* Actual keepalive interval is between 8 sec and 10 sec.


Capture Data : Calculated keepalive is 20 sec. (holdtime 60 sec)
--------------------------------------------------------------------------------
Delta Time       Source       Destination  Protocol  Length  Info
 0.000000000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
16.779650000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
18.185404000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
17.688160000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
18.397834000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
19.544023000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
--------------------------------------------------------------------------------

* Actual keepalive interval is between 16 sec and 20 sec.


Capture Data : Calculated keepalive is 40 sec. (holdtime 120 sec)
--------------------------------------------------------------------------------
Delta Time       Source       Destination  Protocol  Length  Info
 0.000000000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
35.419334000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
32.530278000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
33.401891000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
37.393427000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
37.644556000     10.0.0.1     10.0.0.2     BGP       107     KEEPALIVE Message
--------------------------------------------------------------------------------

* Actual keepalive interval is between 32 sec and 40 sec.

Solution

This is a designed behavior and part of specification.
The negative jitter helps to prevent congestion and works effectively as the number of BGP session is lager.