bird: export static routes to bgp

This commit is contained in:
Astro 2017-01-20 00:30:22 +01:00
parent d3783f251f
commit cf6e8efddf
2 changed files with 10 additions and 0 deletions

View File

@ -33,11 +33,16 @@ protocol ospf ZW4 {
} }
{%- if pillar.get('bgp') %} {%- if pillar.get('bgp') %}
protocol static {
route 172.20.72.0/21 unreachable;
}
protocol bgp { protocol bgp {
local as {{ pillar['bgp']['asn'] }}; local as {{ pillar['bgp']['asn'] }};
import all; import all;
{%- for host, neighbor in pillar['bgp']['peers-inet'].items() %} {%- for host, neighbor in pillar['bgp']['peers-inet'].items() %}
neighbor {{ host }} as {{ neighbor.asn }}; neighbor {{ host }} as {{ neighbor.asn }};
{%- endfor %} {%- endfor %}
export where source=RTS_STATIC;
} }
{%- endif %} {%- endif %}

View File

@ -33,11 +33,16 @@ protocol ospf ZW6 {
} }
{%- if pillar.get('bgp') %} {%- if pillar.get('bgp') %}
protocol static {
route fd23:42:c3d2:500::/56 unreachable;
}
protocol bgp { protocol bgp {
local as {{ pillar['bgp']['asn'] }}; local as {{ pillar['bgp']['asn'] }};
import all; import all;
{%- for host, neighbor in pillar['bgp']['peers-inet6'].items() %} {%- for host, neighbor in pillar['bgp']['peers-inet6'].items() %}
neighbor {{ host }} as {{ neighbor.asn }}; neighbor {{ host }} as {{ neighbor.asn }};
{%- endfor %} {%- endfor %}
export where source=RTS_STATIC;
} }
{%- endif %} {%- endif %}