30b6668b7d
1. Made the command next-hop-self force only applicable on back-end asic bgp. This is done so that BGPL iBGP session running on backend can send e-BGP learn nexthop. Back end asic FRR is able to recursively resolve the eBGP nexthop in its routing table since it knows about all the connected routes advertise from front end asic. 2. Made all front-end asic bgp use global loopback ip (Loopback0) as router id and back end asic bgp use Loopbacl4096 as ruter-id and originator id for Route-Reflector. This is done so that routes learnt by external peer do not see Loopback4096 as router id in show ip bgp <route-prerfix> output. 3. To handle above change need to pass Loopback4096 from BGP manager for jinja2 template generation. This was missing and this change/fix is needed for this also https://github.com/Azure/sonic-buildimage/blob/master/dockers/docker-fpm-frr/frr/bgpd/templates/dynamic/instance.conf.j2#L27 4. Enhancement to add mult_asic specific bgpd template generation unit test cases.
37 lines
1.2 KiB
Django/Jinja
37 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
|
|
!
|
|
{% 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
|
|
!
|