From 902ad1357a848ca3dcd37ba3219c779b25cfbd29 Mon Sep 17 00:00:00 2001 From: judyjoseph <53951155+judyjoseph@users.noreply.github.com> Date: Wed, 17 Mar 2021 23:14:38 -0700 Subject: [PATCH] To decrease the Connect Retry Timer from default value which is 120sec to 10 sec. (#7087) Why I did it It was observed that on a multi-asic DUT bootup, the BGP internal sessions between ASIC's was taking more time to get ESTABLISHED than external BGP sessions. The internal sessions was coming up almost exactly 120 secs later. In multi-asic platform the bgp dockers ( which is per ASIC ) on switch start are bring brought up around the same time and they try to make the bgp sessions with neighbors (in peer ASIC's) which may be not be completely up. This results in BGP connect fail and the retry happens after 120sec which is the default Connect Retry Timer How I did it Add the command to set the bgp neighboring session retry timer to 10sec for internal bgp neighbors. --- .../docker-fpm-frr/frr/bgpd/templates/internal/instance.conf.j2 | 1 + .../tests/data/internal/instance.conf/result_back_v4.conf | 1 + .../tests/data/internal/instance.conf/result_back_v6.conf | 1 + .../tests/data/internal/instance.conf/result_front_v4.conf | 1 + .../tests/data/internal/instance.conf/result_front_v6.conf | 1 + 5 files changed, 5 insertions(+) diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/internal/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/internal/instance.conf.j2 index e0e23b7f60..59781d024a 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/internal/instance.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/internal/instance.conf.j2 @@ -4,6 +4,7 @@ neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} neighbor {{ neighbor_addr }} timers 3 10 + neighbor {{ neighbor_addr }} timers connect 10 ! {% if neighbor_addr | ipv4 %} address-family ipv4 diff --git a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v4.conf b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v4.conf index fc7b82a64a..df8db8311f 100644 --- a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v4.conf +++ b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v4.conf @@ -4,6 +4,7 @@ neighbor 10.10.10.10 remote-as 555 neighbor 10.10.10.10 description remote_peer neighbor 10.10.10.10 timers 3 10 + neighbor 10.10.10.10 timers connect 10 address-family ipv4 neighbor 10.10.10.10 peer-group INTERNAL_PEER_V4 neighbor 10.10.10.10 route-map FROM_BGP_INTERNAL_PEER_V4 in diff --git a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v6.conf b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v6.conf index 74cececad9..a300edb0e5 100644 --- a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v6.conf +++ b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_back_v6.conf @@ -4,6 +4,7 @@ neighbor fc::10 remote-as 555 neighbor fc::10 description remote_peer neighbor fc::10 timers 3 10 + neighbor fc::10 timers connect 10 address-family ipv6 neighbor fc::10 peer-group INTERNAL_PEER_V6 neighbor fc::10 route-map FROM_BGP_INTERNAL_PEER_V6 in diff --git a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v4.conf b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v4.conf index 95eb985b15..f848ebd457 100644 --- a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v4.conf +++ b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v4.conf @@ -4,6 +4,7 @@ neighbor 10.10.10.10 remote-as 555 neighbor 10.10.10.10 description remote_peer neighbor 10.10.10.10 timers 3 10 + neighbor 10.10.10.10 timers connect 10 address-family ipv4 neighbor 10.10.10.10 peer-group INTERNAL_PEER_V4 neighbor 10.10.10.10 next-hop-self force diff --git a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v6.conf b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v6.conf index a4a4648e48..09c021b919 100644 --- a/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v6.conf +++ b/src/sonic-bgpcfgd/tests/data/internal/instance.conf/result_front_v6.conf @@ -4,6 +4,7 @@ neighbor fc::10 remote-as 555 neighbor fc::10 description remote_peer neighbor fc::10 timers 3 10 + neighbor fc::10 timers connect 10 address-family ipv6 neighbor fc::10 peer-group INTERNAL_PEER_V6 neighbor fc::10 next-hop-self force