exit: consolidate IPv4 and IPv6 address families
In BGP router configuration for default and inside VRFs.
This commit is contained in:
parent
3b3e759cc1
commit
d667a38553
|
@ -37,18 +37,8 @@ router bgp {{ asn.asn }}
|
||||||
neighbor {{ iface }} bfd 3 150 150
|
neighbor {{ iface }} bfd 3 150 150
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
address-family ipv4 unicast
|
{% for family in ['ipv4', 'ipv6'] %}
|
||||||
redistribute connected route-map loopback
|
address-family {{ family }} unicast
|
||||||
|
|
||||||
neighbor fabric soft-reconfiguration inbound
|
|
||||||
neighbor fabric route-map fabric->default in
|
|
||||||
neighbor fabric route-map default->fabric out
|
|
||||||
|
|
||||||
import vrf outside
|
|
||||||
import vrf route-map default-import
|
|
||||||
exit-address-family
|
|
||||||
|
|
||||||
address-family ipv6 unicast
|
|
||||||
redistribute connected route-map loopback
|
redistribute connected route-map loopback
|
||||||
|
|
||||||
neighbor fabric activate
|
neighbor fabric activate
|
||||||
|
@ -60,6 +50,7 @@ router bgp {{ asn.asn }}
|
||||||
import vrf route-map default-import
|
import vrf route-map default-import
|
||||||
exit-address-family
|
exit-address-family
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
address-family l2vpn evpn
|
address-family l2vpn evpn
|
||||||
advertise-all-vni
|
advertise-all-vni
|
||||||
advertise-default-gw
|
advertise-default-gw
|
||||||
|
@ -144,27 +135,8 @@ router bgp {{ asn.asn }} vrf inside
|
||||||
neighbor {{ iface }}.2 bfd 3 150 150
|
neighbor {{ iface }}.2 bfd 3 150 150
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
address-family ipv4 unicast
|
{% for family in ['ipv4', 'ipv6'] %}
|
||||||
neighbor peerlink.2 soft-reconfiguration inbound
|
address-family {{ family }} unicast
|
||||||
neighbor peerlink.2 route-map peer.2->me in
|
|
||||||
neighbor peerlink.2 route-map me->peer.2 out
|
|
||||||
|
|
||||||
neighbor firewall allowas-in 1
|
|
||||||
neighbor firewall soft-reconfiguration inbound
|
|
||||||
neighbor firewall route-map inside->firewall out
|
|
||||||
{% for iface in ifaces_firewall %}
|
|
||||||
neighbor {{ iface }}.2 route-map firewall-{{ loop.index }}->inside in
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
redistribute connected route-map loopback-inside
|
|
||||||
{% for vrf in inside_vrfs %}
|
|
||||||
import vrf {{ vrf }}
|
|
||||||
{% endfor %}
|
|
||||||
import vrf default
|
|
||||||
import vrf route-map inside-import
|
|
||||||
exit-address-family
|
|
||||||
|
|
||||||
address-family ipv6 unicast
|
|
||||||
neighbor peerlink.2 activate
|
neighbor peerlink.2 activate
|
||||||
neighbor peerlink.2 soft-reconfiguration inbound
|
neighbor peerlink.2 soft-reconfiguration inbound
|
||||||
neighbor peerlink.2 route-map peer.2->me in
|
neighbor peerlink.2 route-map peer.2->me in
|
||||||
|
@ -186,25 +158,15 @@ router bgp {{ asn.asn }} vrf inside
|
||||||
import vrf route-map inside-import
|
import vrf route-map inside-import
|
||||||
exit-address-family
|
exit-address-family
|
||||||
|
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
{% for vrf in vrfs.values() | selectattr('name', 'in', inside_vrfs) %}
|
{% for vrf in vrfs.values() | selectattr('name', 'in', inside_vrfs) %}
|
||||||
router bgp {{ asn.asn }} vrf {{ vrf.name }}
|
router bgp {{ asn.asn }} vrf {{ vrf.name }}
|
||||||
bgp bestpath as-path multipath-relax
|
bgp bestpath as-path multipath-relax
|
||||||
|
|
||||||
address-family ipv4 unicast
|
{% for family in ['ipv4', 'ipv6'] %}
|
||||||
redistribute connected
|
address-family {{ family }} unicast
|
||||||
import vrf inside
|
|
||||||
{% if vrf.custom_fields.imports %}
|
|
||||||
{% for import in vrf.custom_fields.imports %}
|
|
||||||
import vrf {{ import.name }}
|
|
||||||
{% endfor %}
|
|
||||||
import vrf route-map {{ vrf.name }}-import
|
|
||||||
{% else %}
|
|
||||||
import vrf route-map office-import
|
|
||||||
{% endif %}
|
|
||||||
exit-address-family
|
|
||||||
|
|
||||||
address-family ipv6 unicast
|
|
||||||
redistribute connected
|
redistribute connected
|
||||||
import vrf inside
|
import vrf inside
|
||||||
{% if vrf.custom_fields.imports %}
|
{% if vrf.custom_fields.imports %}
|
||||||
|
@ -218,6 +180,7 @@ router bgp {{ asn.asn }} vrf {{ vrf.name }}
|
||||||
exit-address-family
|
exit-address-family
|
||||||
|
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
# Prefix lists.
|
# Prefix lists.
|
||||||
ip prefix-list default permit 0.0.0.0/0
|
ip prefix-list default permit 0.0.0.0/0
|
||||||
|
|
Loading…
Reference in a new issue