-
Notifications
You must be signed in to change notification settings - Fork 1
/
routing_instances.j2
31 lines (31 loc) · 995 Bytes
/
routing_instances.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
routing-instances {
{% for key,rt_inst in rt_instances.items() if key != "default" %}
{{key}} {
instance-type vrf;
routing-options {
multipath;
auto-export;
}
protocols {
evpn {
interconnect {
{% if rt_inst['vni_id'] <= 65535 %}
vrf-target target:{{rt_inst['vni_id']}}:1;
{% else %}
vrf-target target:{{rt_inst['vni_id']}}L:1;
{% endif %}
route-distinguisher {{local_addr}}:{{rt_inst['vlan_id']}};
}
ip-prefix-routes {
advertise direct-nexthop;
encapsulation vxlan;
vni {{rt_inst['vni_id']}};
}
}
}
route-distinguisher {{local_addr}}:{{rt_inst['vlan_id']}};
vrf-import vrf-import-to-{{key}};
vrf-export vrf-export-to-{{key}};
}
{% endfor %}
}