-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathstp_example.yaml
63 lines (59 loc) · 1.59 KB
/
stp_example.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
---
# Based on https://sunnynetwork.wordpress.com/2017/02/06/lab-37-linux-bridge-with-linux-containers-lxc/
#
# host11 --- vnet-br0 - vnet-veth0 --- vnet-veth1 - vnet-br1 --- host22
# | |
# vnet-veth2 vnet-veth4
# | |
# | |
# | |
# vnet-veth3 ---- vnet-br2 --- vnet-veth5 --- |
# |
# host33
switches: 3
veths:
# Peer should only be defined once for a veth pair. But each veth needs a bridge to attach to.
# Enabling STP can be done per vnet-br. It doesn't matter to duplicate, as the operation is idempotent
vnet-veth0:
peer: vnet-veth1
bridge: vnet-br0
stp: true
vnet-veth1:
bridge: vnet-br1
stp: true
vnet-veth2:
peer: vnet-veth3
bridge: vnet-br0
vnet-veth3:
bridge: vnet-br2
stp: true
vnet-veth4:
peer: vnet-veth5
bridge: vnet-br1
vnet-veth5:
bridge: vnet-br2
machines:
host11:
type: host
interfaces:
eth1:
ipv4: 10.0.1.1/24
ipv6: fd00:12::1/64
mac: 00:00:00:00:00:11
bridge: 0
host22:
type: host
interfaces:
eth2:
ipv4: 10.0.1.2/24
ipv6: fd00:12::2/64
mac: 00:00:00:00:00:22
bridge: 1
host33:
type: host
interfaces:
eth3:
ipv4: 10.0.1.3/24
ipv6: fd00:12::3/64
mac: 00:00:00:00:00:33
bridge: 2