[bgp]: align the bgp templates with new minigraph for multi NPU platforms (#4488)
- change the references to 'type' field to 'sub_role' - change the references to 'InternalFrontend' and 'InternalBackend' to 'FrontEnd' and 'BackEnd' respectively - add a statement to reflect route-reflector for backend asics - add a change to set "next-hop-self force" configuration for internal BGP session in multi asic platform. Signed-off-by: Arvindsrinivasan Lakshmi Narasimhan <arlakshm@microsoft.com>
This commit is contained in:
parent
767bc5c8c0
commit
2db87669c2
@ -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 %}
|
||||
!
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 }}
|
||||
!
|
||||
|
Reference in New Issue
Block a user