sonic-buildimage/dockers/docker-fpm-frr/frr/bgpd/templates/internal/instance.conf.j2
judyjoseph 9d9503e1fe
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.
2021-03-17 23:14:38 -07:00

38 lines
1.2 KiB
Django/Jinja

!
! template: bgpd/templates/internal/instance.conf.j2
!
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
neighbor {{ neighbor_addr }} peer-group INTERNAL_PEER_V4
!
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
neighbor {{ neighbor_addr }} next-hop-self force
neighbor {{ neighbor_addr }} route-map FROM_BGP_INTERNAL_PEER_V4 in
{% endif %}
!
{% elif neighbor_addr | ipv6 %}
address-family ipv6
neighbor {{ neighbor_addr }} peer-group INTERNAL_PEER_V6
!
{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %}
neighbor {{ neighbor_addr }} next-hop-self force
neighbor {{ neighbor_addr }} route-map FROM_BGP_INTERNAL_PEER_V6 in
{% endif %}
{% endif %}
!
{% if 'rrclient' in bgp_session and bgp_session['rrclient'] | int != 0 %}
neighbor {{ neighbor_addr }} route-reflector-client
{% endif %}
!
!
neighbor {{ neighbor_addr }} activate
exit-address-family
!
! end of template: bgpd/templates/internal/instance.conf.j2
!