-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlab1.clab.yaml
61 lines (54 loc) · 1.54 KB
/
lab1.clab.yaml
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
# Define the containerlab topology named "basic"
name: lab1
prefix: ""
# Define default settings for nodes in the topology
topology:
# Specify the default kind
defaults:
kind: linux
# Specify the defaults for each kind
kinds:
nokia_srlinux:
type: ixrd1
image: ghcr.io/nokia/srlinux:23.10.1
linux:
image: akpinar/alpine:latest
group: server
# Define individual nodes in the topology
nodes:
# Routers
router1:
kind: nokia_srlinux
mgmt-ipv4: 172.20.20.11 # Management IPv4 address for s1
router2:
kind: nokia_srlinux
mgmt-ipv4: 172.20.20.12
router3:
kind: nokia_srlinux
mgmt-ipv4: 172.20.20.13
# Servers
host1:
exec:
- ip addr add 192.168.1.11/24 dev eth1
- ip route replace default via 192.168.1.1 dev eth1
host2:
exec:
- ip addr add 192.168.2.11/24 dev eth1
- ip route replace default via 192.168.2.1 dev eth1
host3:
exec:
- ip addr add 192.168.3.11/24 dev eth1
- ip route replace default via 192.168.3.1 dev eth1
# Define links between nodes
links:
# Router to router links
- endpoints: ["router1:e1-11", "router2:e1-12"]
- endpoints: ["router2:e1-11", "router3:e1-12"]
- endpoints: ["router3:e1-11", "router1:e1-12"]
# Router to host links
- endpoints: ["router1:e1-21", "host1:eth1"]
- endpoints: ["router2:e1-21", "host2:eth1"]
- endpoints: ["router3:e1-21", "host3:eth1"]
# Define management subnet information
mgmt:
ipv4-subnet: 172.20.20.0/24