BGP Router Manager templates for Voneus core and aggregation infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

{{ "groups"|progress }} {
{%- set re_groups = [] %}
{%- for interface, subinterfaces in device|get_interfaces|subinterfaces(".") %}
{%- if '@' in interface.name %}
{%- set re = interface.name.split("@")[1] %}
{%- do re_groups.append( re ) %}
{%- set interface_name = interface.name.split("@")[0] %}
{%- set interface_context = interface.tags|get_netbox_tags_contexts|contexts_merge_last %}
{{ re }} {
system {
host-name {{ re }}.{{ device.name }};
services {
ssh;
}
}
interfaces {
{{ interface_name}} {
unit 0 {
family inet {
{%- for address in interface|get_addresses %}{% if address|ipv4 %}
address {{ address.address }};
{%- endif %}{%- endfor %}
}
}
}
}
}
{%- endif %}
{%- endfor %}
rfc-5735 {
routing-options {
martians {
128.0.0.0/16 orlonger allow;
191.255.0.0/16 orlonger allow;
223.255.255.0/24 orlonger allow;
}
}
routing-instances {
<*> {
routing-options {
martians {
128.0.0.0/16 orlonger allow;
191.255.0.0/16 orlonger allow;
223.255.255.0/24 orlonger allow;
}
}
}
}
}
}
apply-groups [ {% for re in re_groups %}{{ re }} {% endfor %}rfc-5735 ];