diff --git a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 index 4a4f06b0d0f2..a29569191651 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/bgpd.main.conf.j2 @@ -14,7 +14,7 @@ ipv6 prefix-list PL_LoopbackV6 permit {{ get_ipv6_loopback_address(LOOPBACK_INTE {% endif %} ! ! -{% if DEVICE_METADATA['localhost']['type'] == 'InternalFrontend' %} +{% if DEVICE_METADATA['localhost']['sub_role'] == 'FrontEnd' %} route-map HIDE_INTERNAL permit 10 set community local-AS ! @@ -62,7 +62,7 @@ router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} {% endblock vlan_advertisement %} ! ! -{% if DEVICE_METADATA['localhost']['type'] == 'InternalFrontend' %} +{% if DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} redistribute connected route-map HIDE_INTERNAL {% endif %} ! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/general/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/general/instance.conf.j2 index 7abeabba0a77..148cfa390e01 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/general/instance.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/general/instance.conf.j2 @@ -16,13 +16,13 @@ {% if neighbor_addr | ipv4 %} address-family ipv4 neighbor {{ neighbor_addr }} peer-group PEER_V4 -{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %} +{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} neighbor {{ neighbor_addr }} route-map FROM_BGP_PEER_V4_INT in {% endif %} {% elif neighbor_addr | ipv6 %} address-family ipv6 neighbor {{ neighbor_addr }} peer-group PEER_V6 -{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %} +{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} neighbor {{ neighbor_addr }} route-map FROM_BGP_PEER_V6_INT in {% endif %} {% endif %} @@ -34,6 +34,9 @@ {% if bgp_session['nhopself'] | int != 0 %} neighbor {{ neighbor_addr }} next-hop-self {% endif %} +{% if 'ASIC' in bgp_session['name'] %} + neighbor {{ neighbor_addr }} next-hop-self force +{% endif %} ! {% if bgp_session["asn"] == bgp_asn and CONFIG_DB__DEVICE_METADATA['localhost']['type'] == "SpineChassisFrontendRouter" %} address-family l2vpn evpn diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/general/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/general/peer-group.conf.j2 index 551274902de8..8c02eeacbdb4 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/general/peer-group.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/general/peer-group.conf.j2 @@ -6,6 +6,9 @@ address-family ipv4 {% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %} neighbor PEER_V4 allowas-in 1 +{% endif %} +{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} + neighbor PEER_V4 route-reflector-client {% endif %} neighbor PEER_V4 soft-reconfiguration inbound neighbor PEER_V4 route-map FROM_BGP_PEER_V4 in @@ -14,6 +17,9 @@ address-family ipv6 {% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'ToRRouter' %} neighbor PEER_V6 allowas-in 1 + {% endif %} +{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} + neighbor PEER_V6 route-reflector-client {% endif %} neighbor PEER_V6 soft-reconfiguration inbound neighbor PEER_V6 route-map FROM_BGP_PEER_V6 in diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/general/policies.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/general/policies.conf.j2 index 0c7b17c207bc..c545cf272892 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/general/policies.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/general/policies.conf.j2 @@ -15,7 +15,7 @@ route-map FROM_BGP_PEER_V6 permit 100 ! route-map TO_BGP_PEER_V6 permit 100 ! -{% if CONFIG_DB__DEVICE_METADATA['localhost']['type'] == 'InternalBackend' %} +{% if CONFIG_DB__DEVICE_METADATA['localhost']['sub_role'] == 'BackEnd' %} route-map FROM_BGP_PEER_V4_INT permit 2 set originator-id {{ loopback0_ipv4 | ip }} !