2023-04-22 15:59:08 +02:00
|
|
|
{% if peering["bgp_mp"] == True %}
|
2023-01-16 18:01:23 +01:00
|
|
|
protocol bgp dn42_{{peering["MNT"][:-4].lower()}}_{{peering["ASN"][-4:]}} from dnpeers {
|
2023-04-22 15:59:08 +02:00
|
|
|
neighbor {{peering["ipv6ll"] or peering["ipv4"] or peering["ipv6"]}} as {{peering["ASN"]}};
|
2023-01-21 11:29:30 +01:00
|
|
|
interface {% if peering['ASN'].__len__() >=6 %}"dn42_{{peering['ASN'][-6:]}}"{% else %}"dn42_{{peering['asn']}}"{% endif %};
|
2022-12-21 21:21:57 +01:00
|
|
|
passive off;
|
|
|
|
|
|
|
|
ipv4 {
|
|
|
|
{# TODO: implement pinging peer for bgp-communities
|
|
|
|
#import where dn42_import_filter(x,y,z);
|
|
|
|
#export where dn42_export_filter(x,y,z);
|
|
|
|
#}
|
|
|
|
extended next hop {% if peering["bgp_enh"] %}on{%else%}off{%endif%};
|
|
|
|
};
|
|
|
|
ipv6 {
|
|
|
|
{# TODO: implement pinging peer for bgp-communities
|
|
|
|
#import where dn42_import_filter(x,y,z);
|
|
|
|
#export where dn42_export_filter(x,y,z);
|
|
|
|
#}
|
2024-04-23 17:29:23 +02:00
|
|
|
extended next hop off;
|
2022-12-21 21:21:57 +01:00
|
|
|
};
|
|
|
|
};
|
2023-04-22 15:59:08 +02:00
|
|
|
{% elif peering["bgp_mp"] == False %}
|
2023-01-16 18:01:23 +01:00
|
|
|
protocol bgp dn42_{{peering["MNT"][:-4].lower()}}_{{peering['ASN'][-4:]}}_4 from dnpeers {
|
2022-12-21 21:21:57 +01:00
|
|
|
neighbor {{peering["ipv4"]}} as {{peering["ASN"]}};
|
2024-04-23 17:29:23 +02:00
|
|
|
interface {% if peering['ASN'].__len__() >=6 %}"dn42_{{peering['ASN'][-6:]}}"{% else %}"dn42_{{peering['asn']}}"{% endif %};
|
2022-12-21 21:21:57 +01:00
|
|
|
passive off;
|
|
|
|
#import where dn42_import_filter(x,y,z);
|
|
|
|
#export where dn42_export_filter(x,y,z);
|
|
|
|
};
|
|
|
|
|
2023-01-16 18:01:23 +01:00
|
|
|
protocol bgp dn42_{{peering["MNT"][:-4].lower()}}_{{peering['ASN'][-4:]}}_6 from dnpeers {
|
2024-04-23 17:29:23 +02:00
|
|
|
neighbor {% peering["ipv6"] != None %}{{peering["ipv6"]}}{% else %}{{peering["ipv6ll"]}}{% endif %} as {{peering["ASN"]}};
|
|
|
|
interface {% if peering['ASN'].__len__() >=6 %}"dn42_{{peering['ASN'][-6:]}}"{% else %}"dn42_{{peering['asn']}}"{% endif %};
|
2022-12-21 21:21:57 +01:00
|
|
|
passive off;
|
|
|
|
#import where dn42_import_filter(x,y,z);
|
|
|
|
#export where dn42_export_filter(x,y,z);
|
|
|
|
}
|
|
|
|
{%endif%}
|