110 lines
2.2 KiB
Django/Jinja
110 lines
2.2 KiB
Django/Jinja
router id {{ bird_router_id }};
|
|
|
|
log syslog all;
|
|
log "{{ bird_log_file }}" { debug, trace, remote, warning, error, auth, fatal, bug };
|
|
|
|
protocol device { scan time 5; }
|
|
protocol direct { ipv6; }
|
|
|
|
protocol kernel {
|
|
ipv6 { export none; };
|
|
scan time 15;
|
|
}
|
|
|
|
protocol kernel {
|
|
ipv4;
|
|
scan time 15;
|
|
}
|
|
|
|
protocol static announcev6 {
|
|
ipv6;
|
|
description "Static v6 Routes";
|
|
{% for route in bird_static_routes_v6 %}
|
|
{% if route.blackhole | default(false) %}
|
|
route {{ route.prefix }} blackhole;
|
|
{% else %}
|
|
route {{ route.prefix }} via {{ route.via }};
|
|
{% endif %}
|
|
{% endfor %}
|
|
}
|
|
|
|
protocol static announcev4 {
|
|
ipv4;
|
|
description "Static v4 Routes";
|
|
{% for route in bird_static_routes_v4 %}
|
|
{% if route.blackhole | default(false) %}
|
|
route {{ route.prefix }} blackhole;
|
|
{% else %}
|
|
route {{ route.prefix }} via {{ route.via }};
|
|
{% endif %}
|
|
{% endfor %}
|
|
}
|
|
|
|
protocol static {
|
|
ipv6;
|
|
}
|
|
|
|
protocol static {
|
|
ipv4;
|
|
}
|
|
|
|
filter rt_importv4 {
|
|
accept;
|
|
}
|
|
|
|
filter rt_importv6 {
|
|
accept;
|
|
}
|
|
|
|
filter rt_nothanks {
|
|
{% for prefix in bird_reject_prefixes_v6 %}
|
|
if (net ~ [ {{ prefix }} ]) then reject;
|
|
{% endfor %}
|
|
accept;
|
|
}
|
|
|
|
filter sbehop {
|
|
gw = {{ bird_sbehop_gateway }};
|
|
accept;
|
|
}
|
|
|
|
filter brt_importv6 {
|
|
reject;
|
|
}
|
|
|
|
filter rt_export {
|
|
if (proto = "announcev4") then accept;
|
|
if (proto = "announcev6") then accept;
|
|
reject;
|
|
}
|
|
|
|
{% for session in bird_bgp_sessions %}
|
|
protocol bgp {{ session.name }} {
|
|
local {{ session.local_address }} as {{ session.local_as }};
|
|
neighbor {{ session.neighbor_address }} as {{ session.neighbor_as }};
|
|
multihop {{ session.multihop | default(255) }};
|
|
{{ session.address_family | default('ipv6') }} {
|
|
{% if session.import_limit is defined %}
|
|
import limit {{ session.import_limit }};
|
|
{% endif %}
|
|
{% if session.export_limit is defined %}
|
|
export limit {{ session.export_limit }};
|
|
{% endif %}
|
|
{% if session.import_filter is defined %}
|
|
import filter {{ session.import_filter }};
|
|
{% else %}
|
|
import none;
|
|
{% endif %}
|
|
{% if session.export_filter is defined %}
|
|
export filter {{ session.export_filter }};
|
|
{% else %}
|
|
export none;
|
|
{% endif %}
|
|
{% if session.graceful_restart | default(false) %}
|
|
graceful restart on;
|
|
{% endif %}
|
|
};
|
|
}
|
|
|
|
{% endfor %}
|