Skip to content

Commit 293360a

Browse files
shi-suCarl Keene
authored and
Carl Keene
committed
[bgp]: Reduce bgp connect retry timer to 10 seconds (sonic-net#7169)
The default bgp connect retry timer is 120 seconds. A reconnection will happen 120 seconds if the initial connection fails. This PR aims to allow a more frequent retry.
1 parent 2b5d3c3 commit 293360a

File tree

10 files changed

+10
-0
lines changed

10 files changed

+10
-0
lines changed

dockers/docker-fpm-frr/frr/bgpd/templates/general/instance.conf.j2

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
or (bgp_session['holdtime'] is defined and bgp_session['holdtime'] | int != 180) %}
99
neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] | default("60") }} {{ bgp_session['holdtime'] | default("180") }}
1010
{% endif %}
11+
neighbor {{ neighbor_addr }} timers connect 10
1112
!
1213
{% if 'admin_status' in bgp_session and bgp_session['admin_status'] == 'down' or 'admin_status' not in bgp_session and 'default_bgp_status' in CONFIG_DB__DEVICE_METADATA['localhost'] and CONFIG_DB__DEVICE_METADATA['localhost']['default_bgp_status'] == 'down' %}
1314
neighbor {{ neighbor_addr }} shutdown

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_all_v4.conf

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
neighbor 10.10.10.10 remote-as 555
55
neighbor 10.10.10.10 description remote_peer
66
neighbor 10.10.10.10 timers 5 30
7+
neighbor 10.10.10.10 timers connect 10
78
neighbor 10.10.10.10 shutdown
89
address-family ipv4
910
neighbor 10.10.10.10 peer-group PEER_V4

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_all_v6.conf

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
neighbor fc::10 remote-as 555
55
neighbor fc::10 description remote_peer
66
neighbor fc::10 timers 5 30
7+
neighbor fc::10 timers connect 10
78
neighbor fc::10 shutdown
89
address-family ipv6
910
neighbor fc::10 peer-group PEER_V6

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_base_v4.conf

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!
44
neighbor 10.10.10.10 remote-as 555
55
neighbor 10.10.10.10 description remote_peer
6+
neighbor 10.10.10.10 timers connect 10
67
address-family ipv4
78
neighbor 10.10.10.10 peer-group PEER_V4
89
neighbor 10.10.10.10 activate

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_base_v6.conf

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!
44
neighbor fc00::2 remote-as 555
55
neighbor fc00::2 description remote_peer
6+
neighbor fc00::2 timers connect 10
67
address-family ipv6
78
neighbor fc00::2 peer-group PEER_V6
89
neighbor fc00::2 activate

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_l2vpn.conf

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!
44
neighbor 10.10.10.10 remote-as 555
55
neighbor 10.10.10.10 description remote_peer
6+
neighbor 10.10.10.10 timers connect 10
67
address-family ipv4
78
neighbor 10.10.10.10 peer-group PEER_V4
89
neighbor 10.10.10.10 activate

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_shutdown_1.conf

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!
44
neighbor 10.10.10.10 remote-as 555
55
neighbor 10.10.10.10 description remote_peer
6+
neighbor 10.10.10.10 timers connect 10
67
neighbor 10.10.10.10 shutdown
78
address-family ipv4
89
neighbor 10.10.10.10 peer-group PEER_V4

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_shutdown_2.conf

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
!
44
neighbor 10.10.10.10 remote-as 555
55
neighbor 10.10.10.10 description remote_peer
6+
neighbor 10.10.10.10 timers connect 10
67
address-family ipv4
78
neighbor 10.10.10.10 peer-group PEER_V4
89
neighbor 10.10.10.10 activate

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_timers_1.conf

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
neighbor 10.10.10.10 remote-as 555
55
neighbor 10.10.10.10 description remote_peer
66
neighbor 10.10.10.10 timers 5 180
7+
neighbor 10.10.10.10 timers connect 10
78
address-family ipv4
89
neighbor 10.10.10.10 peer-group PEER_V4
910
neighbor 10.10.10.10 activate

src/sonic-bgpcfgd/tests/data/general/instance.conf/result_timers_2.conf

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
neighbor 10.10.10.10 remote-as 555
55
neighbor 10.10.10.10 description remote_peer
66
neighbor 10.10.10.10 timers 60 240
7+
neighbor 10.10.10.10 timers connect 10
78
address-family ipv4
89
neighbor 10.10.10.10 peer-group PEER_V4
910
neighbor 10.10.10.10 activate

0 commit comments

Comments
 (0)