43 lines
1.1 KiB
Django/Jinja
43 lines
1.1 KiB
Django/Jinja
{% if shortname is defined and routers[shortname]['ipv4'] is defined %}
|
|
router id {{ routers[shortname]['ipv4'] }};
|
|
{% else %}
|
|
router id {{ router_id }};
|
|
{% endif %}
|
|
|
|
# Turn on global debugging of all protocols (all messages or just selected classes)
|
|
# debug protocols all;
|
|
# debug protocols { events, states };
|
|
|
|
# Turn on internal watchdog
|
|
watchdog warning 5 s;
|
|
watchdog timeout 30 s;
|
|
|
|
define myasn = {{ asn }};
|
|
{% if ipv4 is defined %}
|
|
define myipv4 = {{ ipv4 }};
|
|
{% endif %}
|
|
{% if ipv6 is defined %}
|
|
define myipv6 = {{ ipv6 }};
|
|
{% endif %}
|
|
|
|
{% for afi in afis %}
|
|
{% if afi == 4 and enable_ipv4 or afi == 6 %}
|
|
protocol kernel kernel{{ afi }} {
|
|
ipv{{ afi }} {
|
|
import none;
|
|
export filter {
|
|
if source = RTS_STATIC then reject; # Do not import our full network into the kernel, we only announce these to peers transits and sometimes customers.
|
|
{% if afi == 4 and ipv4 is defined or afi == 6 and ipv6 is defined %}
|
|
krt_prefsrc = myipv{{ afi }}; # prefer the loopback IP for outgoing connections.
|
|
{% endif %}
|
|
accept;
|
|
};
|
|
};
|
|
}
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
protocol device {
|
|
scan time 10;
|
|
}
|