|
@ -426,6 +426,65 @@ |
|
|
then reject; |
|
|
then reject; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
policy-statement AGGREGATION-import { |
|
|
|
|
|
term 40 { |
|
|
|
|
|
from { |
|
|
|
|
|
{% for prefix in 'accept-ipv4-32-from-aggregation'|get_netbox_tagged_prefixes %}{% if prefix.prefix|ipv4 %} |
|
|
|
|
|
route-filter {{ prefix.prefix }} prefix-length-range /32-/32; |
|
|
|
|
|
{% endif %}{% endfor %} |
|
|
|
|
|
{% for prefix in 'accept-ipv4-32-from-aggregation'|get_netbox_tagged_aggregates %}{% if prefix.prefix|ipv4 %} |
|
|
|
|
|
route-filter {{ prefix.prefix }} prefix-length-range /32-/32; |
|
|
|
|
|
{% endif %}{% endfor %} |
|
|
|
|
|
} |
|
|
|
|
|
then accept; |
|
|
|
|
|
} |
|
|
|
|
|
term 61 { |
|
|
|
|
|
from { |
|
|
|
|
|
{% for prefix in 'accept-ipv6-40-48-from-aggregation'|get_netbox_tagged_prefixes %}{% if prefix.prefix|ipv6 %} |
|
|
|
|
|
route-filter {{ prefix.prefix }} prefix-length-range /40-/48; |
|
|
|
|
|
{% endif %}{% endfor %} |
|
|
|
|
|
{% for prefix in 'accept-ipv6-40-48-from-aggregation'|get_netbox_tagged_aggregates %}{% if prefix.prefix|ipv6 %} |
|
|
|
|
|
route-filter {{ prefix.prefix }} prefix-length-range /40-/48; |
|
|
|
|
|
{% endif %}{% endfor %} |
|
|
|
|
|
} |
|
|
|
|
|
then accept; |
|
|
|
|
|
} |
|
|
|
|
|
term 62 { |
|
|
|
|
|
from { |
|
|
|
|
|
{% for prefix in 'accept-ipv6-48-52-from-aggregation'|get_netbox_tagged_prefixes %}{% if prefix.prefix|ipv6 %} |
|
|
|
|
|
route-filter {{ prefix.prefix }} prefix-length-range /48-/52; |
|
|
|
|
|
{% endif %}{% endfor %} |
|
|
|
|
|
{% for prefix in 'accept-ipv6-48-52-from-aggregation'|get_netbox_tagged_aggregates %}{% if prefix.prefix|ipv6 %} |
|
|
|
|
|
route-filter {{ prefix.prefix }} prefix-length-range /48-/52; |
|
|
|
|
|
{% endif %}{% endfor %} |
|
|
|
|
|
} |
|
|
|
|
|
then accept; |
|
|
|
|
|
} |
|
|
|
|
|
then reject; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
policy-statement AGGREGATION-export { |
|
|
|
|
|
term 4 { |
|
|
|
|
|
from { |
|
|
|
|
|
route-filter 0.0.0.0/0 exact; |
|
|
|
|
|
} |
|
|
|
|
|
then { |
|
|
|
|
|
next-hop self; |
|
|
|
|
|
accept; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
term 6 { |
|
|
|
|
|
from { |
|
|
|
|
|
route-filter ::/0 exact; |
|
|
|
|
|
} |
|
|
|
|
|
then { |
|
|
|
|
|
next-hop self; |
|
|
|
|
|
accept; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
then reject; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
{% for community in ''|get_bgp_communities %} |
|
|
{% for community in ''|get_bgp_communities %} |
|
|
community {{ community.slug }} members {% if " " in community.value %}[ {{ community.value }} ]{% else %}{{ community.value }}{% endif %};{% endfor %} |
|
|
community {{ community.slug }} members {% if " " in community.value %}[ {{ community.value }} ]{% else %}{{ community.value }}{% endif %};{% endfor %} |
|
|
|
|
|
|
|
@ -438,6 +497,8 @@ |
|
|
as-path FAELIX-DEPREFER "41495 .*"; |
|
|
as-path FAELIX-DEPREFER "41495 .*"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
as-list AGGREGATION members[ {% for asn in 'aggregation-linknet'|get_netbox_tagged_asns %}{{ asn.asn }} {% endfor %}]; |
|
|
|
|
|
|
|
|
{% for asn in asns_requiring_prefixes|unique %} |
|
|
{% for asn in asns_requiring_prefixes|unique %} |
|
|
{% set prefixes = asn|get_prefixes_for_asn %} |
|
|
{% set prefixes = asn|get_prefixes_for_asn %} |
|
|
policy-statement AS{{ asn }}-import-IPv4 { |
|
|
policy-statement AS{{ asn }}-import-IPv4 { |
|
|