network/salt/bird/bird6.conf

48 lines
1.2 KiB
Plaintext

router id {{ pillar['hosts-inet']['core'][salt['grains.get']('id')] }};
protocol kernel {
scan time 10;
import none;
export all;
}
protocol device {
scan time 10;
}
protocol ospf ZW6 {
area 0 {
networks {
fd23:42:c3d2:500::/56;
};
{%- for iface, ips in salt['grains.get']('ip_interfaces').items() %}
{%- set subnet = pillar['subnets-inet6'].get(iface) %}
{%- if iface == 'core' or iface == 'br-core' %}
interface "{{ iface }}" {
};
{%- elif subnet %}
stubnet {{ subnet }} {};
{%- endif %}
{%- endfor %}
{%- if pillar['ospf'].get('stubnets-inet6') %}
{%- for stubnet in pillar['ospf']['stubnets-inet6'] %}
stubnet {{ stubnet }} {};
{%- endfor %}
{%- endif %}
};
}
{%- if pillar.get('bgp') %}
protocol static {
route fd23:42:c3d2:500::/56 unreachable;
}
protocol bgp {
local as {{ pillar['bgp']['asn'] }};
import all;
{%- for host, neighbor in pillar['bgp']['peers-inet6'].items() %}
neighbor {{ host }} as {{ neighbor.asn }};
{%- endfor %}
export where source=RTS_STATIC;
}
{%- endif %}