[bgp]: Fix isolate/unisolate command for ipv6 peers (#3183)

* Fix isolate/unisolate command for ipv6 peers
This commit is contained in:
pavel-shirshov 2019-07-18 16:34:26 -07:00 committed by GitHub
parent 6e37e23006
commit 7af546908f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 0 deletions

View File

@ -10,7 +10,13 @@ exit $?
configure terminal configure terminal
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
{% for neighbor_addr in BGP_NEIGHBOR %} {% for neighbor_addr in BGP_NEIGHBOR %}
{% if neighbor_addr | ipv4 %}
neighbor {{ neighbor_addr }} route-map ISOLATE out neighbor {{ neighbor_addr }} route-map ISOLATE out
{% else %}
address-family ipv6
neighbor {{ neighbor_addr }} route-map ISOLATE out
exit-address-family
{% endif %}
{% endfor %} {% endfor %}
exit exit
exit exit

View File

@ -10,7 +10,13 @@ exit $?
configure terminal configure terminal
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
{% for neighbor_ip in BGP_NEIGHBOR %} {% for neighbor_ip in BGP_NEIGHBOR %}
{% if neighbor_ip | ipv4 %}
no neighbor {{ neighbor_ip }} route-map ISOLATE out 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 %} {% endfor %}
exit exit
exit exit

View File

@ -10,7 +10,13 @@ exit $?
configure terminal configure terminal
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
{% for neighbor_addr in BGP_NEIGHBOR %} {% for neighbor_addr in BGP_NEIGHBOR %}
{% if neighbor_addr | ipv4 %}
neighbor {{ neighbor_addr }} route-map ISOLATE out neighbor {{ neighbor_addr }} route-map ISOLATE out
{% else %}
address-family ipv6
neighbor {{ neighbor_addr }} route-map ISOLATE out
exit-address-family
{% endif %}
{% endfor %} {% endfor %}
exit exit
exit exit

View File

@ -10,7 +10,13 @@ exit $?
configure terminal configure terminal
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }} router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
{% for neighbor_ip in BGP_NEIGHBOR %} {% for neighbor_ip in BGP_NEIGHBOR %}
{% if neighbor_ip | ipv4 %}
no neighbor {{ neighbor_ip }} route-map ISOLATE out 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 %} {% endfor %}
exit exit
exit exit