Skip to content

Commit

Permalink
[bgp]: Reduce bgp connect retry timer to 10 seconds (sonic-net#7169)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
shi-su authored and Carl Keene committed Aug 7, 2021
1 parent 2b5d3c3 commit 293360a
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
or (bgp_session['holdtime'] is defined and bgp_session['holdtime'] | int != 180) %}
neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] | default("60") }} {{ bgp_session['holdtime'] | default("180") }}
{% endif %}
neighbor {{ neighbor_addr }} timers connect 10
!
{% 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' %}
neighbor {{ neighbor_addr }} shutdown
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 5 30
neighbor 10.10.10.10 timers connect 10
neighbor 10.10.10.10 shutdown
address-family ipv4
neighbor 10.10.10.10 peer-group PEER_V4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
neighbor fc::10 remote-as 555
neighbor fc::10 description remote_peer
neighbor fc::10 timers 5 30
neighbor fc::10 timers connect 10
neighbor fc::10 shutdown
address-family ipv6
neighbor fc::10 peer-group PEER_V6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!
neighbor 10.10.10.10 remote-as 555
neighbor 10.10.10.10 description remote_peer
neighbor 10.10.10.10 timers connect 10
address-family ipv4
neighbor 10.10.10.10 peer-group PEER_V4
neighbor 10.10.10.10 activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!
neighbor fc00::2 remote-as 555
neighbor fc00::2 description remote_peer
neighbor fc00::2 timers connect 10
address-family ipv6
neighbor fc00::2 peer-group PEER_V6
neighbor fc00::2 activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!
neighbor 10.10.10.10 remote-as 555
neighbor 10.10.10.10 description remote_peer
neighbor 10.10.10.10 timers connect 10
address-family ipv4
neighbor 10.10.10.10 peer-group PEER_V4
neighbor 10.10.10.10 activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!
neighbor 10.10.10.10 remote-as 555
neighbor 10.10.10.10 description remote_peer
neighbor 10.10.10.10 timers connect 10
neighbor 10.10.10.10 shutdown
address-family ipv4
neighbor 10.10.10.10 peer-group PEER_V4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
!
neighbor 10.10.10.10 remote-as 555
neighbor 10.10.10.10 description remote_peer
neighbor 10.10.10.10 timers connect 10
address-family ipv4
neighbor 10.10.10.10 peer-group PEER_V4
neighbor 10.10.10.10 activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 5 180
neighbor 10.10.10.10 timers connect 10
address-family ipv4
neighbor 10.10.10.10 peer-group PEER_V4
neighbor 10.10.10.10 activate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 60 240
neighbor 10.10.10.10 timers connect 10
address-family ipv4
neighbor 10.10.10.10 peer-group PEER_V4
neighbor 10.10.10.10 activate
Expand Down

0 comments on commit 293360a

Please sign in to comment.