bgpd: Modernise BGP defaults for MRAI and connect time
Quagga uses historic BGP defaults for its minimum route advertisement
interval (MRAI) timers, and its ConnectRetry timer. It uses 30s and
5s for the eBGP and iBGP MRAIs, and 120s for the ConnectRetry timer.
These values are quite high, and delay convergence and session
establishment, and are unlikely to be desirable in modern networks.
The MRAI can, without a doubt, be significantly reduced. The optimal
MRAI is related to the size of the network, its diameter in terms of
BGP propagation latency particularly. Prior research suggests values
of 5s to 15s for Internet BGP, as reasonably conservative values.
Further, other implementations have long shipped with 1s or even 0s
MRAI values.
A too low MRAI, e.g. a 0 MRAI, can greatly increase the number of
BGP messages a speaker sends, and hence the bandwidth and even CPU it
might use. I.e. some MRAI is better than no MRAI, with current BGP,
or it is prone to excessive - even extreme - chattiness.
The ConnectRetry timer default also should be set much lower.
Lowering the MRAI had previously been suggested by:
"Lower the default MRAI timer for iBGP peers to 0
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>"
* bgpd/bgpd.h: Set defaults to:
- 3s for the eBGP MRAI
- 1s for iBGP MRAI (lower, but non-0, would be nice for this)
- 5s for the ConnectRetry timer
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index a4c608d..0c13156 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -754,10 +754,9 @@
#define BGP_INIT_START_TIMER 1
#define BGP_DEFAULT_HOLDTIME 180
#define BGP_DEFAULT_KEEPALIVE 60
-#define BGP_DEFAULT_EBGP_ROUTEADV 30
-#define BGP_DEFAULT_IBGP_ROUTEADV 5
-#define BGP_CLEAR_CONNECT_RETRY 20
-#define BGP_DEFAULT_CONNECT_RETRY 10
+#define BGP_DEFAULT_EBGP_ROUTEADV 3
+#define BGP_DEFAULT_IBGP_ROUTEADV 1
+#define BGP_DEFAULT_CONNECT_RETRY 5
/* BGP default local preference. */
#define BGP_DEFAULT_LOCAL_PREF 100