diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/router.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/router.j2 index e0eacb4a7b79..a04d1090f4c4 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/router.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/router.j2 @@ -9,6 +9,10 @@ {% if is_storage_device is not defined or is_storage_device | length == 0 %} {% set is_storage_device = "false" %} {% endif %} +{% set is_ai_device = CONFIG_DB__DEVICE_METADATA['localhost']['ai_device'] %} +{% if is_ai_device is not defined or is_ai_device | length == 0 %} +{% set is_ai_device = "false" %} +{% endif %} {% if neighbor_deployment_id is not defined or neighbor_deployment_id | length == 0 %} {% set neighbor_deployment_id = 0 %} {% endif %} @@ -34,6 +38,8 @@ {% include path_template % "v4.tor.frontend" %} {% elif neighbor_type == 'BackEndLeafRouter' and is_storage_device == 'true' and device_type == 'BackEndToRRouter' %} {% include path_template % "v4.tor.storage.backend" %} +{% elif neighbor_type == 'BackEndLeafRouter' and is_ai_device == 'true' and device_type == 'BackEndToRRouter' %} +{% include path_template % "v4.tor.ai.backend" %} {% elif neighbor_type == 'ToRRouter' %} {% include path_template % "v4.tor.backend" %} {% else %} @@ -47,6 +53,8 @@ {% include path_template % "v4.leaf.tor.tycoon" %} {% elif neighbor_type == 'BackEndToRRouter' and is_storage_device == 'true' and device_type == 'BackEndLeafRouter' %} {% include path_template % "v4.leaf.storage.backend" %} +{% elif neighbor_type == 'BackEndToRRouter' and is_ai_device == 'true' and device_type == 'BackEndLeafRouter' %} +{% include path_template % "v4.leaf.ai.backend" %} {% else %} {% include path_template % "v4.leaf.tor.all" %} {% endif %} @@ -86,6 +94,12 @@ {% elif device_type in ['ToRRouter', 'BackEndToRRouter'] %} {% if deployment_id is defined and deployment_id == '26' %} {% include path_template % "v6.tor.rotterdam" %} +{% elif neighbor_type == 'BackEndToRRouter' and is_ai_device == 'true' %} +{% include path_template % "v6.tor.frontend" %} +{% elif neighbor_type == 'BackEndLeafRouter' and is_ai_device == 'true' and device_type == 'BackEndToRRouter' %} +{% include path_template % "v6.tor.ai.backend" %} +{% elif neighbor_type == 'ToRRouter' and is_ai_device == 'true' %} +{% include path_template % "v6.tor.backend" %} {% else %} {% include path_template % "v6.tor" %} {% endif %} @@ -99,6 +113,8 @@ {% include path_template % "v6.leaf.tor.dnsagg" %} {% elif neighbor_deployment_id is defined and neighbor_deployment_id == '21' %} {% include path_template % "v6.leaf.tor.dnsagg" %} +{% elif neighbor_type == 'BackEndToRRouter' and is_ai_device == 'true' and device_type == 'BackEndLeafRouter' %} +{% include path_template % "v6.leaf.ai.backend" %} {% else %} {% include path_template % "v6.leaf.tor.all" %} {% endif %} diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 new file mode 100644 index 000000000000..dd16cef31e63 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 @@ -0,0 +1,17 @@ +! +! template: bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 +! + neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} + neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} + neighbor {{ neighbor_addr }} peer-group BE_TIER0_V4 +! +{% if need_to_set_timers %} +{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} +{% endif %} +! +{% if need_to_shutdown %} + neighbor {{ neighbor_addr }} shutdown +{% endif %} +! +! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 new file mode 100644 index 000000000000..df9ecb1b7025 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER0_V4 peer-group + address-family ipv4 unicast + neighbor BE_TIER0_V4 activate + neighbor BE_TIER0_V4 soft-reconfiguration inbound + neighbor BE_TIER0_V4 route-map FROM_BE_TIER0_V4 in + neighbor BE_TIER0_V4 route-map TO_BE_TIER0_V4 out + neighbor BE_TIER0_V4 send-community + neighbor BE_TIER0_V4 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 new file mode 100644 index 000000000000..fd8cb969a9cd --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 @@ -0,0 +1,9 @@ +! +! template: bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER0_V4 permit 10 +! +route-map FROM_BE_TIER0_V4 permit 10 +! +! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 new file mode 100644 index 000000000000..ff23dc2c6610 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 @@ -0,0 +1,17 @@ +! +! template: bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 +! + neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} + neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} + neighbor {{ neighbor_addr }} peer-group BE_TIER1_V4 +! +{% if need_to_set_timers %} +{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} +{% endif %} +! +{% if need_to_shutdown %} + neighbor {{ neighbor_addr }} shutdown +{% endif %} +! +! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 new file mode 100644 index 000000000000..4cd48417ecb3 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER1_V4 peer-group + address-family ipv4 unicast + neighbor BE_TIER1_V4 activate + neighbor BE_TIER1_V4 soft-reconfiguration inbound + neighbor BE_TIER1_V4 route-map FROM_BE_TIER1_V4 in + neighbor BE_TIER1_V4 route-map TO_BE_TIER1_V4 out + neighbor BE_TIER1_V4 send-community + neighbor BE_TIER1_V4 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 new file mode 100644 index 000000000000..9e1e6cfa6ea4 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 @@ -0,0 +1,9 @@ +! +! template: bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER1_V4 permit 10 +! +route-map FROM_BE_TIER1_V4 permit 10 +! +! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 index a7e909b6439d..e3b83a2bb31c 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 @@ -2,7 +2,11 @@ ! template: bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 ! ip prefix-list DEFAULT_IPV4 permit 0.0.0.0/0 +{% if is_ai_device == "true" %} +ip prefix-list BE_LOOPBACKS seq 5 deny 172.16.0.0/12 le 32 +{% else %} ip prefix-list BE_LOOPBACKS seq 5 deny 172.16.0.0/16 le 32 +{% endif %} ip prefix-list BE_LOOPBACKS seq 15 permit 0.0.0.0/0 ge 32 ! route-map FROM_FE_TIER0_V4 permit 10 @@ -16,4 +20,4 @@ route-map TO_FE_TIER0_V4 permit 10 route-map TO_FE_TIER0_V4 deny 100 ! ! end of template: bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 -! +! \ No newline at end of file diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.frontend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.frontend/policy.conf.j2 index 1146029fcc92..397fc579cae2 100644 --- a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.frontend/policy.conf.j2 +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v4.tor.frontend/policy.conf.j2 @@ -2,7 +2,11 @@ ! template: bgpd/templates/msft.general/v4.tor.frontend/policy.conf.j2 ! ip prefix-list DEFAULT_IPV4 permit 0.0.0.0/0 +{% if is_ai_device == "true" %} +ip prefix-list BE_LOOPBACKS seq 5 deny 172.16.0.0/12 le 32 +{% else %} ip prefix-list BE_LOOPBACKS seq 5 deny 172.16.0.0/16 le 32 +{% endif %} ip prefix-list BE_LOOPBACKS seq 15 permit 0.0.0.0/0 ge 32 ! route-map TO_BE_TIER0_V4 permit 10 diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 new file mode 100644 index 000000000000..79e4f85193bb --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 @@ -0,0 +1,17 @@ +! +! template: bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 +! + neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} + neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} + neighbor {{ neighbor_addr }} peer-group BE_TIER0_V6 +! +{% if need_to_set_timers %} +{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} +{% endif %} +! +{% if need_to_shutdown %} + neighbor {{ neighbor_addr }} shutdown +{% endif %} +! +! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 new file mode 100644 index 000000000000..d01c633e37cb --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER0_V6 peer-group + address-family ipv6 unicast + neighbor BE_TIER0_V6 activate + neighbor BE_TIER0_V6 soft-reconfiguration inbound + neighbor BE_TIER0_V6 route-map FROM_BE_TIER0_V6 in + neighbor BE_TIER0_V6 route-map TO_BE_TIER0_V6 out + neighbor BE_TIER0_V6 send-community + neighbor BE_TIER0_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 new file mode 100644 index 000000000000..48b745e8322a --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 @@ -0,0 +1,9 @@ +! +! template: bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER0_V6 permit 10 +! +route-map FROM_BE_TIER0_V6 permit 10 +! +! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 new file mode 100644 index 000000000000..05a947976c16 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 @@ -0,0 +1,17 @@ +! +! template: bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 +! + neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} + neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} + neighbor {{ neighbor_addr }} peer-group BE_TIER1_V6 +! +{% if need_to_set_timers %} +{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} +{% endif %} +! +{% if need_to_shutdown %} + neighbor {{ neighbor_addr }} shutdown +{% endif %} +! +! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 new file mode 100644 index 000000000000..0642046f49ca --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER1_V6 peer-group + address-family ipv6 unicast + neighbor BE_TIER1_V6 activate + neighbor BE_TIER1_V6 soft-reconfiguration inbound + neighbor BE_TIER1_V6 route-map FROM_BE_TIER1_V6 in + neighbor BE_TIER1_V6 route-map TO_BE_TIER1_V6 out + neighbor BE_TIER1_V6 send-community + neighbor BE_TIER1_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 new file mode 100644 index 000000000000..18df0e28082a --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 @@ -0,0 +1,9 @@ +! +! template: bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER1_V6 permit 10 +! +route-map FROM_BE_TIER1_V6 permit 10 +! +! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 new file mode 100644 index 000000000000..a61621ccf8bd --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 @@ -0,0 +1,17 @@ +! +! template: bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 +! + neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} + neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} + neighbor {{ neighbor_addr }} peer-group FE_TIER0_V6 +! +{% if need_to_set_timers %} +{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} +{% endif %} +! +{% if need_to_shutdown %} + neighbor {{ neighbor_addr }} shutdown +{% endif %} +! +! end of template: bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 new file mode 100644 index 000000000000..3b320f2e5d90 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 +! + neighbor FE_TIER0_V6 peer-group + address-family ipv6 unicast + neighbor FE_TIER0_V6 activate + neighbor FE_TIER0_V6 soft-reconfiguration inbound + neighbor FE_TIER0_V6 route-map FROM_FE_TIER0_V6 in + neighbor FE_TIER0_V6 route-map TO_FE_TIER0_V6 out + neighbor FE_TIER0_V6 send-community + neighbor FE_TIER0_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 new file mode 100644 index 000000000000..bff34a915126 --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 +! +ipv6 prefix-list DEFAULT_IPV6 permit any +ipv6 prefix-list BE_LOOPBACKS_V6 seq 5 deny ::1/128 +ipv6 prefix-list BE_LOOPBACKS_V6 seq 15 permit ::/0 ge 128 +! +route-map FROM_FE_TIER0_V6 permit 10 + match ipv6 address prefix-list DEFAULT_IPV6 +! +route-map FROM_FE_TIER0_V6 deny 100 +! +route-map TO_FE_TIER0_V6 permit 10 + match ipv6 address prefix-list BE_LOOPBACKS_V6 +! +route-map TO_FE_TIER0_V6 deny 100 +! +! end of template: bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 +! \ No newline at end of file diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 new file mode 100644 index 000000000000..4c96799c336a --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 @@ -0,0 +1,17 @@ +! +! template: bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 +! + neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }} + neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }} + neighbor {{ neighbor_addr }} peer-group BE_TIER0_V6 +! +{% if need_to_set_timers %} +{# neighbor {{ neighbor_addr }} timers {{ bgp_session['keepalive'] }} {{ bgp_session['holdtime'] }} #} +{% endif %} +! +{% if need_to_shutdown %} + neighbor {{ neighbor_addr }} shutdown +{% endif %} +! +! end of template: bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 new file mode 100644 index 000000000000..ab4028ad9b3c --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 +! + neighbor BE_TIER0_V6 peer-group + address-family ipv6 unicast + neighbor BE_TIER0_V6 activate + neighbor BE_TIER0_V6 soft-reconfiguration inbound + neighbor BE_TIER0_V6 route-map FROM_BE_TIER0_V6 in + neighbor BE_TIER0_V6 route-map TO_BE_TIER0_V6 out + neighbor BE_TIER0_V6 send-community + neighbor BE_TIER0_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 +! diff --git a/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 new file mode 100644 index 000000000000..b2b89bf5cf1e --- /dev/null +++ b/dockers/docker-fpm-frr/frr/bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 +! +ipv6 prefix-list DEFAULT_IPV6 permit any +ipv6 prefix-list BE_LOOPBACKS_V6 seq 5 deny ::1/128 +ipv6 prefix-list BE_LOOPBACKS_V6 seq 15 permit ::/0 ge 128 +! +route-map TO_BE_TIER0_V6 permit 10 + match ipv6 address prefix-list DEFAULT_IPV6 +! +route-map TO_BE_TIER0_V6 deny 100 +! +route-map FROM_BE_TIER0_V6 permit 10 + match ipv6 address prefix-list BE_LOOPBACKS_V6 +! +route-map FROM_BE_TIER0_V6 deny 100 +! +! end of template: bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v4.leaf.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v4.leaf.ai.backend.json new file mode 100644 index 000000000000..91fec7cdc007 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v4.leaf.ai.backend.json @@ -0,0 +1,19 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndLeafRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device", + "admin_status": "down" + }, + "neighbor_addr": "11.11.11.11" +} \ No newline at end of file diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v4.tor.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v4.tor.ai.backend.json new file mode 100644 index 000000000000..1527b61e94ec --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v4.tor.ai.backend.json @@ -0,0 +1,19 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndLeafRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device", + "admin_status": "down" + }, + "neighbor_addr": "11.11.11.11" +} \ No newline at end of file diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.leaf.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.leaf.ai.backend.json new file mode 100644 index 000000000000..79f3105bd37e --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.leaf.ai.backend.json @@ -0,0 +1,19 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndLeafRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device", + "admin_status": "down" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.ai.backend.json new file mode 100644 index 000000000000..d9f434615b75 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.ai.backend.json @@ -0,0 +1,19 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndLeafRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device", + "admin_status": "down" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.backend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.backend.aidevice.json new file mode 100644 index 000000000000..e3fd84c5161a --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.backend.aidevice.json @@ -0,0 +1,19 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "ToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device", + "admin_status": "down" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.frontend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.frontend.aidevice.json new file mode 100644 index 000000000000..60388379b4ab --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/param_v6.tor.frontend.aidevice.json @@ -0,0 +1,19 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "ToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device", + "admin_status": "down" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v4.leaf.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v4.leaf.ai.backend.conf new file mode 100644 index 000000000000..3e95da9e9c9d --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v4.leaf.ai.backend.conf @@ -0,0 +1,14 @@ +! +! template: bgpd/templates/general/instance.conf.j2 +! +! template: bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 +! + neighbor 11.11.11.11 remote-as 11111 + neighbor 11.11.11.11 description neig_device + neighbor 11.11.11.11 peer-group BE_TIER0_V4 + neighbor 11.11.11.11 shutdown +! +! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/instance.conf.j2 +! +! end of template: bgpd/templates/general/instance.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v4.tor.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v4.tor.ai.backend.conf new file mode 100644 index 000000000000..9fb0704db852 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v4.tor.ai.backend.conf @@ -0,0 +1,14 @@ +! +! template: bgpd/templates/general/instance.conf.j2 +! +! template: bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 +! + neighbor 11.11.11.11 remote-as 11111 + neighbor 11.11.11.11 description neig_device + neighbor 11.11.11.11 peer-group BE_TIER1_V4 + neighbor 11.11.11.11 shutdown +! +! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/instance.conf.j2 +! +! end of template: bgpd/templates/general/instance.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.leaf.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.leaf.ai.backend.conf new file mode 100644 index 000000000000..8706ac430fc8 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.leaf.ai.backend.conf @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/general/instance.conf.j2 +! +! template: bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 +! + neighbor fc00::15 remote-as 11111 + neighbor fc00::15 description neig_device + neighbor fc00::15 peer-group BE_TIER0_V6 +! + neighbor fc00::15 shutdown +! +! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/instance.conf.j2 +! +! end of template: bgpd/templates/general/instance.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.ai.backend.conf new file mode 100644 index 000000000000..ff85a3e0fd9f --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.ai.backend.conf @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/general/instance.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 +! + neighbor fc00::15 remote-as 11111 + neighbor fc00::15 description neig_device + neighbor fc00::15 peer-group BE_TIER1_V6 +! + neighbor fc00::15 shutdown +! +! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/instance.conf.j2 +! +! end of template: bgpd/templates/general/instance.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.backend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.backend.aidevice.conf new file mode 100644 index 000000000000..63a4c4f34d4c --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.backend.aidevice.conf @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/general/instance.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 +! + neighbor fc00::15 remote-as 11111 + neighbor fc00::15 description neig_device + neighbor fc00::15 peer-group FE_TIER0_V6 +! + neighbor fc00::15 shutdown +! +! end of template: bgpd/templates/msft.general/v6.tor.backend/instance.conf.j2 +! +! end of template: bgpd/templates/general/instance.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.frontend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.frontend.aidevice.conf new file mode 100644 index 000000000000..3925b960453f --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/instance.conf/result_v6.tor.frontend.aidevice.conf @@ -0,0 +1,15 @@ +! +! template: bgpd/templates/general/instance.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 +! + neighbor fc00::15 remote-as 11111 + neighbor fc00::15 description neig_device + neighbor fc00::15 peer-group BE_TIER0_V6 +! + neighbor fc00::15 shutdown +! +! end of template: bgpd/templates/msft.general/v6.tor.frontend/instance.conf.j2 +! +! end of template: bgpd/templates/general/instance.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v4.leaf.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v4.leaf.ai.backend.json new file mode 100644 index 000000000000..814dfbd8918a --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v4.leaf.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndLeafRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "11.11.11.11" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v4.tor.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v4.tor.ai.backend.json new file mode 100644 index 000000000000..54f11b02e3b8 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v4.tor.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndLeafRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "11.11.11.11" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.leaf.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.leaf.ai.backend.json new file mode 100644 index 000000000000..1c8fd8fd656a --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.leaf.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndLeafRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.ai.backend.json new file mode 100644 index 000000000000..bc74801550cc --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndLeafRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.backend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.backend.aidevice.json new file mode 100644 index 000000000000..e0424cec5bfe --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.backend.aidevice.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "ToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.frontend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.frontend.aidevice.json new file mode 100644 index 000000000000..d472e0a1f553 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/param_v6.tor.frontend.aidevice.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "ToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v4.leaf.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v4.leaf.ai.backend.conf new file mode 100644 index 000000000000..94901437d3b9 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v4.leaf.ai.backend.conf @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/general/peer-group.conf.j2 +! +! template: bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER0_V4 peer-group + address-family ipv4 unicast + neighbor BE_TIER0_V4 activate + neighbor BE_TIER0_V4 soft-reconfiguration inbound + neighbor BE_TIER0_V4 route-map FROM_BE_TIER0_V4 in + neighbor BE_TIER0_V4 route-map TO_BE_TIER0_V4 out + neighbor BE_TIER0_V4 send-community + neighbor BE_TIER0_V4 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/peer-group.conf.j2 +! +! end of template: bgpd/templates/general/peer-group.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v4.tor.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v4.tor.ai.backend.conf new file mode 100644 index 000000000000..b34052528b75 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v4.tor.ai.backend.conf @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/general/peer-group.conf.j2 +! +! template: bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER1_V4 peer-group + address-family ipv4 unicast + neighbor BE_TIER1_V4 activate + neighbor BE_TIER1_V4 soft-reconfiguration inbound + neighbor BE_TIER1_V4 route-map FROM_BE_TIER1_V4 in + neighbor BE_TIER1_V4 route-map TO_BE_TIER1_V4 out + neighbor BE_TIER1_V4 send-community + neighbor BE_TIER1_V4 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/peer-group.conf.j2 +! +! end of template: bgpd/templates/general/peer-group.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.leaf.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.leaf.ai.backend.conf new file mode 100644 index 000000000000..1ac92f2125df --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.leaf.ai.backend.conf @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/general/peer-group.conf.j2 +! +! template: bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER0_V6 peer-group + address-family ipv6 unicast + neighbor BE_TIER0_V6 activate + neighbor BE_TIER0_V6 soft-reconfiguration inbound + neighbor BE_TIER0_V6 route-map FROM_BE_TIER0_V6 in + neighbor BE_TIER0_V6 route-map TO_BE_TIER0_V6 out + neighbor BE_TIER0_V6 send-community + neighbor BE_TIER0_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/peer-group.conf.j2 +! +! end of template: bgpd/templates/general/peer-group.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.ai.backend.conf new file mode 100644 index 000000000000..777fa3301688 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.ai.backend.conf @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/general/peer-group.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 +! + neighbor BE_TIER1_V6 peer-group + address-family ipv6 unicast + neighbor BE_TIER1_V6 activate + neighbor BE_TIER1_V6 soft-reconfiguration inbound + neighbor BE_TIER1_V6 route-map FROM_BE_TIER1_V6 in + neighbor BE_TIER1_V6 route-map TO_BE_TIER1_V6 out + neighbor BE_TIER1_V6 send-community + neighbor BE_TIER1_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/peer-group.conf.j2 +! +! end of template: bgpd/templates/general/peer-group.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.backend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.backend.aidevice.conf new file mode 100644 index 000000000000..4780dbcb5dcc --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.backend.aidevice.conf @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/general/peer-group.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 +! + neighbor FE_TIER0_V6 peer-group + address-family ipv6 unicast + neighbor FE_TIER0_V6 activate + neighbor FE_TIER0_V6 soft-reconfiguration inbound + neighbor FE_TIER0_V6 route-map FROM_FE_TIER0_V6 in + neighbor FE_TIER0_V6 route-map TO_FE_TIER0_V6 out + neighbor FE_TIER0_V6 send-community + neighbor FE_TIER0_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.tor.backend/peer-group.conf.j2 +! +! end of template: bgpd/templates/general/peer-group.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.frontend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.frontend.aidevice.conf new file mode 100644 index 000000000000..cefc1bbe7fc6 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/peer-group.conf/result_v6.tor.frontend.aidevice.conf @@ -0,0 +1,19 @@ +! +! template: bgpd/templates/general/peer-group.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 +! + neighbor BE_TIER0_V6 peer-group + address-family ipv6 unicast + neighbor BE_TIER0_V6 activate + neighbor BE_TIER0_V6 soft-reconfiguration inbound + neighbor BE_TIER0_V6 route-map FROM_BE_TIER0_V6 in + neighbor BE_TIER0_V6 route-map TO_BE_TIER0_V6 out + neighbor BE_TIER0_V6 send-community + neighbor BE_TIER0_V6 maximum-prefix 12000 90 warning-only + exit-address-family +! +! end of template: bgpd/templates/msft.general/v6.tor.frontend/peer-group.conf.j2 +! +! end of template: bgpd/templates/general/peer-group.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.leaf.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.leaf.ai.backend.json new file mode 100644 index 000000000000..814dfbd8918a --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.leaf.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndLeafRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "11.11.11.11" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.ai.backend.json new file mode 100644 index 000000000000..54f11b02e3b8 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndLeafRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "11.11.11.11" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.backend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.backend.aidevice.json new file mode 100644 index 000000000000..c913341c2015 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.backend.aidevice.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "ToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "11.11.11.11" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.frontend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.frontend.aidevice.json new file mode 100644 index 000000000000..318c1c4e5139 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v4.tor.frontend.aidevice.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "ToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "11.11.11.11" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.leaf.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.leaf.ai.backend.json new file mode 100644 index 000000000000..1c8fd8fd656a --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.leaf.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndLeafRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.ai.backend.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.ai.backend.json new file mode 100644 index 000000000000..bc74801550cc --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.ai.backend.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndLeafRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.backend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.backend.aidevice.json new file mode 100644 index 000000000000..e0424cec5bfe --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.backend.aidevice.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "BackEndToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "ToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.frontend.aidevice.json b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.frontend.aidevice.json new file mode 100644 index 000000000000..d472e0a1f553 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/param_v6.tor.frontend.aidevice.json @@ -0,0 +1,18 @@ +{ + "CONFIG_DB__DEVICE_METADATA": { + "localhost": { + "type": "ToRRouter", + "ai_device": "true" + } + }, + "CONFIG_DB__DEVICE_NEIGHBOR_METADATA": { + "neig_device": { + "type": "BackEndToRRouter" + } + }, + "bgp_session": { + "asn": "11111", + "name": "neig_device" + }, + "neighbor_addr": "fc00::15" +} diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.leaf.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.leaf.ai.backend.conf new file mode 100644 index 000000000000..a42714bfa744 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.leaf.ai.backend.conf @@ -0,0 +1,13 @@ +! +! template: bgpd/templates/general/policies.conf.j2 +! +! template: bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER0_V4 permit 10 +! +route-map FROM_BE_TIER0_V4 permit 10 +! +! end of template: bgpd/templates/msft.general/v4.leaf.ai.backend/policy.conf.j2 +! +! end of template: bgpd/templates/general/policies.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.ai.backend.conf new file mode 100644 index 000000000000..e95694be70b2 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.ai.backend.conf @@ -0,0 +1,13 @@ +! +! template: bgpd/templates/general/policies.conf.j2 +! +! template: bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER1_V4 permit 10 +! +route-map FROM_BE_TIER1_V4 permit 10 +! +! end of template: bgpd/templates/msft.general/v4.tor.ai.backend/policy.conf.j2 +! +! end of template: bgpd/templates/general/policies.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.backend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.backend.aidevice.conf new file mode 100644 index 000000000000..dbf382505605 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.backend.aidevice.conf @@ -0,0 +1,23 @@ +! +! template: bgpd/templates/general/policies.conf.j2 +! +! template: bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 +! +ip prefix-list DEFAULT_IPV4 permit 0.0.0.0/0 +ip prefix-list BE_LOOPBACKS seq 5 deny 172.16.0.0/12 le 32 +ip prefix-list BE_LOOPBACKS seq 15 permit 0.0.0.0/0 ge 32 +! +route-map FROM_FE_TIER0_V4 permit 10 + match ip address prefix-list DEFAULT_IPV4 +! +route-map FROM_FE_TIER0_V4 deny 100 +! +route-map TO_FE_TIER0_V4 permit 10 + match ip address prefix-list BE_LOOPBACKS +! +route-map TO_FE_TIER0_V4 deny 100 +! +! end of template: bgpd/templates/msft.general/v4.tor.backend/policy.conf.j2 +! +! end of template: bgpd/templates/general/policies.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.frontend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.frontend.aidevice.conf new file mode 100644 index 000000000000..1abd911cbba2 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v4.tor.frontend.aidevice.conf @@ -0,0 +1,23 @@ +! +! template: bgpd/templates/general/instance.conf.j2 +! +! template: bgpd/templates/msft.general/v4.tor.frontend/policy.conf.j2 +! +ip prefix-list DEFAULT_IPV4 permit 0.0.0.0/0 +ip prefix-list BE_LOOPBACKS seq 5 deny 172.16.0.0/12 le 32 +ip prefix-list BE_LOOPBACKS seq 15 permit 0.0.0.0/0 ge 32 +! +route-map TO_BE_TIER0_V4 permit 10 + match ip address prefix-list DEFAULT_IPV4 +! +route-map TO_BE_TIER0_V4 deny 100 +! +route-map FROM_BE_TIER0_V4 permit 10 + match ip address prefix-list BE_LOOPBACKS +! +route-map FROM_BE_TIER0_V4 deny 100 +! +! end of template: bgpd/templates/msft.general/v4.tor.frontend/policy.conf.j2 +! +! end of template: bgpd/templates/general/instance.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.leaf.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.leaf.ai.backend.conf new file mode 100644 index 000000000000..f2951f68e10a --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.leaf.ai.backend.conf @@ -0,0 +1,13 @@ +! +! template: bgpd/templates/general/policies.conf.j2 +! +! template: bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER0_V6 permit 10 +! +route-map FROM_BE_TIER0_V6 permit 10 +! +! end of template: bgpd/templates/msft.general/v6.leaf.ai.backend/policy.conf.j2 +! +! end of template: bgpd/templates/general/policies.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.ai.backend.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.ai.backend.conf new file mode 100644 index 000000000000..a3c835002826 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.ai.backend.conf @@ -0,0 +1,13 @@ +! +! template: bgpd/templates/general/policies.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 +! +route-map TO_BE_TIER1_V6 permit 10 +! +route-map FROM_BE_TIER1_V6 permit 10 +! +! end of template: bgpd/templates/msft.general/v6.tor.ai.backend/policy.conf.j2 +! +! end of template: bgpd/templates/general/policies.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.backend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.backend.aidevice.conf new file mode 100644 index 000000000000..43311a87630d --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.backend.aidevice.conf @@ -0,0 +1,23 @@ +! +! template: bgpd/templates/general/policies.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 +! +ipv6 prefix-list DEFAULT_IPV6 permit any +ipv6 prefix-list BE_LOOPBACKS_V6 seq 5 deny ::1/128 +ipv6 prefix-list BE_LOOPBACKS_V6 seq 15 permit ::/0 ge 128 +! +route-map FROM_FE_TIER0_V6 permit 10 + match ipv6 address prefix-list DEFAULT_IPV6 +! +route-map FROM_FE_TIER0_V6 deny 100 +! +route-map TO_FE_TIER0_V6 permit 10 + match ipv6 address prefix-list BE_LOOPBACKS_V6 +! +route-map TO_FE_TIER0_V6 deny 100 +! +! end of template: bgpd/templates/msft.general/v6.tor.backend/policy.conf.j2 +! +! end of template: bgpd/templates/general/policies.conf.j2 +! diff --git a/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.frontend.aidevice.conf b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.frontend.aidevice.conf new file mode 100644 index 000000000000..2c12ee50f859 --- /dev/null +++ b/src/sonic-bgpcfgd/tests/data/msft.general/policies.conf/result_v6.tor.frontend.aidevice.conf @@ -0,0 +1,23 @@ +! +! template: bgpd/templates/general/policies.conf.j2 +! +! template: bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 +! +ipv6 prefix-list DEFAULT_IPV6 permit any +ipv6 prefix-list BE_LOOPBACKS_V6 seq 5 deny ::1/128 +ipv6 prefix-list BE_LOOPBACKS_V6 seq 15 permit ::/0 ge 128 +! +route-map TO_BE_TIER0_V6 permit 10 + match ipv6 address prefix-list DEFAULT_IPV6 +! +route-map TO_BE_TIER0_V6 deny 100 +! +route-map FROM_BE_TIER0_V6 permit 10 + match ipv6 address prefix-list BE_LOOPBACKS_V6 +! +route-map FROM_BE_TIER0_V6 deny 100 +! +! end of template: bgpd/templates/msft.general/v6.tor.frontend/policy.conf.j2 +! +! end of template: bgpd/templates/general/policies.conf.j2 +!