-
Notifications
You must be signed in to change notification settings - Fork 10
/
topo.yaml
97 lines (74 loc) · 2.13 KB
/
topo.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: bgp-cplane-demo
topology:
nodes:
spine0:
kind: linux
image: vyos/vyos:1.2.8
cmd: /sbin/init
binds:
- /lib/modules:/lib/modules
spine1:
kind: linux
image: vyos/vyos:1.2.8
cmd: /sbin/init
binds:
- /lib/modules:/lib/modules
leaf0:
kind: linux
image: vyos/vyos:1.2.8
cmd: /sbin/init
binds:
- /lib/modules:/lib/modules
leaf1:
kind: linux
image: vyos/vyos:1.2.8
cmd: /sbin/init
binds:
- /lib/modules:/lib/modules
# brctl addbr br-leaf0
# ifconfig br-leaf0 up
br-leaf0:
kind: bridge
# brctl addbr br-leaf1
# ifconfig br-leaf1 up
br-leaf1:
kind: bridge
server1:
kind: linux
image: burlyluo/nettoolbox:latest
network-mode: container:control-plane
exec:
- ip addr add 192.168.5.10/24 dev net0
- ip route replace default via 192.168.5.1
server2:
kind: linux
image: burlyluo/nettoolbox:latest
network-mode: container:worker
exec:
- ip addr add 192.168.5.11/24 dev net0
- ip route replace default via 192.168.5.1
server3:
kind: linux
image: burlyluo/nettoolbox:latest
network-mode: container:worker2
exec:
- ip addr add 192.168.8.10/24 dev net0
- ip route replace default via 192.168.8.1
server4:
kind: linux
image: burlyluo/nettoolbox:latest
network-mode: container:worker3
exec:
- ip addr add 192.168.8.11/24 dev net0
- ip route replace default via 192.168.8.1
links:
- endpoints: ["br-leaf0:br-leaf0-net0", "server1:net0"]
- endpoints: ["br-leaf0:br-leaf0-net1", "server2:net0"]
- endpoints: ["br-leaf1:br-leaf1-net0", "server3:net0"]
- endpoints: ["br-leaf1:br-leaf1-net1", "server4:net0"]
- endpoints: ["leaf0:eth1", "spine0:eth1"]
- endpoints: ["leaf0:eth2", "spine1:eth1"]
- endpoints: ["leaf0:eth3", "br-leaf0:br-leaf0-net2"]
- endpoints: ["leaf1:eth1", "spine0:eth2"]
- endpoints: ["leaf1:eth2", "spine1:eth2"]
- endpoints: ["leaf1:eth3", "br-leaf1:br-leaf1-net2"]