autopeering/nodes/templates/bgp-peer.template.conf

36 lines
No EOL
1.1 KiB
Text

{% if peering["bgp_mp"] %}
protocol bgp dn42_{{peering["MNT"][:-4].lower()}} from dnpeers {
neighbor {{peering["ipv6ll"]}} as {{peering["ASN"]}};
interface "dn42_{{peering['MNT'][:-4].lower()}}";
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);
#}
extended next hop {% if peering["bgp_enh"] %}on{%else%}off{%endif%};
};
};
{%else%}
protocol bgp dn42_{{peering["MNT"][:-4].lower()}}_4 from dnpeers {
neighbor {{peering["ipv4"]}} as {{peering["ASN"]}};
passive off;
#import where dn42_import_filter(x,y,z);
#export where dn42_export_filter(x,y,z);
};
protocol bgp dn42_{{peering["MNT"][:-4].lower()}}_6 from dnpeers {
neighbor {{peering["ipv6"]}} as {{peering["ASN"]}};
passive off;
#import where dn42_import_filter(x,y,z);
#export where dn42_export_filter(x,y,z);
}
{%endif%}