12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- {% if dn_peers is defined %}{% for item in dn_peers %}
- {% if not item.enabled %}/*{% endif %}
- protocol bgp {{ item.name }} from {{ item.template }} {
- neighbor {{ item.neighbor }} as {{ item.neighbor_asn }};
- {% if item.bfd is defined and item.bfd %}
- bfd graceful;
- {% endif %}
- {% if item.gtsm is defined and item.gtsm %}
- ttl security on;
- {% endif %}
- {% if item.password is defined %}
- password "{{ item.password }}";
- {% endif %}
- {% if 'ipv4' in item.protocols %}
- ipv4 {
- import {% if item.restrict is defined and item.restrict %}filter { if (bgp_path.last != bgp_path.first) then reject; {% else %}where {% endif %}
- dn42_import_filter({{ item.bgp_communities.latency }},{{ item.bgp_communities.bandwidth }},{{ item.bgp_communities.encryption }});
- {% if item.restrict is defined and item.restrict %}};{% endif %}
- export {% if item.restrict is defined and item.restrict %}filter { bgp_community.add((65535, 65283)); {% else %}where {% endif %}
- dn42_export_filter({{ item.bgp_communities.latency }},{{ item.bgp_communities.bandwidth }},{{ item.bgp_communities.encryption }});
- {% if item.restrict is defined and item.restrict %}};{% endif %}
- };
- {% endif %}
- {% if 'ipv6' in item.protocols %}
- ipv6 {
- import {% if item.restrict is defined and item.restrict %}filter { if (bgp_path.last != bgp_path.first) then reject; {% else %}where {% endif %}
- dn42_import_filter({{ item.bgp_communities.latency }},{{ item.bgp_communities.bandwidth }},{{ item.bgp_communities.encryption }});
- {% if item.restrict is defined and item.restrict %}};{% endif %}
- export {% if item.restrict is defined and item.restrict %}filter { bgp_community.add((65535, 65283)); {% else %}where {% endif %}
- dn42_export_filter({{ item.bgp_communities.latency }},{{ item.bgp_communities.bandwidth }},{{ item.bgp_communities.encryption }});
- {% if item.restrict is defined and item.restrict %}};{% endif %}
- };
- {% endif %}
- }
- {% if not item.enabled %}*/{% endif %}
- {% endfor %}{% endif %}
|