diff --git a/dockers/docker-fpm-frr/isolate.j2 b/dockers/docker-fpm-frr/isolate.j2 index cfcd023ea1..9d19f9f409 100755 --- a/dockers/docker-fpm-frr/isolate.j2 +++ b/dockers/docker-fpm-frr/isolate.j2 @@ -10,7 +10,13 @@ exit $? configure terminal router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} {% for neighbor_addr in BGP_NEIGHBOR %} +{% if neighbor_addr | ipv4 %} neighbor {{ neighbor_addr }} route-map ISOLATE out +{% else %} + address-family ipv6 + neighbor {{ neighbor_addr }} route-map ISOLATE out + exit-address-family +{% endif %} {% endfor %} exit exit diff --git a/dockers/docker-fpm-frr/unisolate.j2 b/dockers/docker-fpm-frr/unisolate.j2 index 2a0780745d..abd6a912c0 100755 --- a/dockers/docker-fpm-frr/unisolate.j2 +++ b/dockers/docker-fpm-frr/unisolate.j2 @@ -10,7 +10,13 @@ exit $? configure terminal router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} {% for neighbor_ip in BGP_NEIGHBOR %} +{% if neighbor_ip | ipv4 %} no neighbor {{ neighbor_ip }} route-map ISOLATE out +{% else %} + address-family ipv6 + no neighbor {{ neighbor_ip }} route-map ISOLATE out + exit-address-family +{% endif %} {% endfor %} exit exit diff --git a/dockers/docker-fpm-quagga/isolate.j2 b/dockers/docker-fpm-quagga/isolate.j2 index cfcd023ea1..9d19f9f409 100755 --- a/dockers/docker-fpm-quagga/isolate.j2 +++ b/dockers/docker-fpm-quagga/isolate.j2 @@ -10,7 +10,13 @@ exit $? configure terminal router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} {% for neighbor_addr in BGP_NEIGHBOR %} +{% if neighbor_addr | ipv4 %} neighbor {{ neighbor_addr }} route-map ISOLATE out +{% else %} + address-family ipv6 + neighbor {{ neighbor_addr }} route-map ISOLATE out + exit-address-family +{% endif %} {% endfor %} exit exit diff --git a/dockers/docker-fpm-quagga/unisolate.j2 b/dockers/docker-fpm-quagga/unisolate.j2 index 2a0780745d..abd6a912c0 100755 --- a/dockers/docker-fpm-quagga/unisolate.j2 +++ b/dockers/docker-fpm-quagga/unisolate.j2 @@ -10,7 +10,13 @@ exit $? configure terminal router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} {% for neighbor_ip in BGP_NEIGHBOR %} +{% if neighbor_ip | ipv4 %} no neighbor {{ neighbor_ip }} route-map ISOLATE out +{% else %} + address-family ipv6 + no neighbor {{ neighbor_ip }} route-map ISOLATE out + exit-address-family +{% endif %} {% endfor %} exit exit