This repository has been archived by the owner on Oct 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtemplate.j2
72 lines (71 loc) · 1.42 KB
/
template.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
system {
domain-name poc-nl.jnpr.net;
name-server {
8.8.8.8;
8.8.4.4;
}
services {
ssh;
telnet;
netconf {
ssh;
}
}
login {
retry-options {
minimum-time 40;
}
}
}
interfaces {
{% for neighbor in neighbors %}
{{ neighbor.interface }} {
unit 0 {
description "{{ neighbor.name }}";
family inet {
address {{ neighbor.local_ip }}/31;
}
}
}
{% endfor %}
}
protocols {
bgp {
group underlay {
import bgp-in;
export bgp-out;
type external;
local-as {{ local_asn }};
multipath multiple-as;
{% for neighbor in neighbors %}
neighbor {{ neighbor.peer_ip }} {
peer-as {{ neighbor.asn }};
}
{% endfor %}
}
}
lldp {
{% for neighbor in neighbors %}
interface "{{ neighbor.interface }}";
{% endfor %}
}
}
routing-options {
router-id {{ loopback }};
forwarding-table {
export bgp-ecmp;
}
}
policy-options {
policy-statement bgp-ecmp {
then {
load-balance per-packet;
}
}
policy-statement bgp-in {
then accept;
}
policy-statement bgp-out {
then accept;
}
}