dn42-ansible/ext-peer.bgp.conf.j2

44 lines
1.4 KiB
Text
Raw Normal View History

{% if item.mp|default(true) %}
protocol bgp dn42_{{ item['remotename'] }} from dnpeers {
2025-01-20 06:09:11 +00:00
neighbor {{ item['remote_llv6'] }} % {% if item.ifacename is defined %}{{ item.ifacename }}{% else %}'dn42{{ item['remotename'] }}'{% endif %} as {{ item['asn'] }};
2024-12-25 09:43:27 +00:00
{% if item.extmsg|default(true) %}
enable extended messages on;
{% endif %}
{% if item.hostadv|default(true) %}
advertise hostname on;
{% endif %}
{% if item['needs_v4']|default(true) %}
{% if item['enh']|default(true) %}
ipv4 {
extended next hop on;
};
{% endif %}
ipv6 {
extended next hop on;
};
{% endif %}
}
{% else %}
{% if item.needs_v4|default(true) %}
protocol bgp dn42_{{ item['remotename'] }}_v4 from dnpeers {
neighbor {{ item['remote_unicastv4'] }} % {% if item.ifacename is defined %}{{ item.ifacename }}{% else %}'dn42{{ item['remotename'] }}'{% endif %} as {{ item['asn'] }};
{% if item.extmsg|default(true) %}
enable extended messages on;
{% endif %}
{% if item.hostadv|default(true) %}
advertise hostname on;
{% endif %}
}
{% endif %}
{% if item.needs_v6|default(true) %}
protocol bgp dn42_{{ item['remotename'] }}_v6 from dnpeers {
neighbor {{ item['remote_llv6'] }} % {% if item.ifacename is defined %}{{ item.ifacename }}{% else %}'dn42{{ item['remotename'] }}'{% endif %} as {{ item['asn'] }};
{% if item.extmsg|default(true) %}
enable extended messages on;
{% endif %}
{% if item.hostadv|default(true) %}
advertise hostname on;
{% endif %}
}
{% endif %}
{% endif %}