-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlab.j2
More file actions
59 lines (51 loc) · 1.34 KB
/
lab.j2
File metadata and controls
59 lines (51 loc) · 1.34 KB
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
---
# author: {{ labauthor }}
name: {{ labname }}
prefix: {{ labprefix }}
mgmt:
network: lacnog_mng
ipv4_subnet: 100.64.0.0/24
ipv6_subnet: 2001:db8::/64
mtu: 9216
external-access: false
topology:
nodes:
# mysocketio:
# kind: mysocketio
# image: ghcr.io/hellt/mysocketctl:0.5.0
# binds:
# - .mysocketio_token:/root/.mysocketio_token
bridge-domain:
kind: bridge
{%- for spine in range(1, spines + 1) %}
spine{{ spine }}:
kind: linux
image: {{ image_name_frrouting }}
binds:
- working-configs/spine{{ spine }}:/etc/frr:rw
{%- endfor %}
{%- for leaf in range(1, leafs + 1) %}
leaf{{ leaf }}:
kind: linux
image: {{ image_name_frrouting }}
# publish:
# - tcp/22
binds:
- working-configs/leaf{{ leaf }}:/etc/frr:rw
host{{ leaf }}:
kind: linux
image: {{ image_name_host }}
# publish:
# - tcp/22
{%- endfor %}
links:
{%- for leaf in range(1, leafs + 1) %}
{%- for value_a in range(1, spines + 1) %}
- endpoints: ["spine{{ value_a }}:eth{{ leaf }}", "leaf{{ leaf }}:eth{{ value_a }}"]
{%- endfor %}
- endpoints: ["leaf{{ leaf }}:eth4", "bridge-domain:eth{{ leaf + 10}}"]
{%- endfor %}
#
{%- for leaf in range(1, leafs + 1) %}
- endpoints: ["leaf{{ leaf }}:eth3", "host{{ leaf }}:eth1"]
{%- endfor %}