Files
mans-net-clab/mans-net.clab.yml
2025-07-30 00:02:25 +02:00

275 lines
9.8 KiB
YAML

# p2p links
# 2001:DB8:0001::/48
# IXP LANs
# 2001:DB8:0002::/48
## Frys-IX
## 2001:DB8:0002:1::/64
## LocIX NL
## 2001:DB8:0002:2::/64
# My ASN: 65000
# My prefix 2001:DB8:5000::/48
## loopbacks
## 2001:DB8:5000::/64
## clients drortr1
## 2001:DB8:5000:11::/64
## clients wiertr1
## 2001:DB8:5000:12::/64
## clients amsrtr1
## 2001:DB8:5000:13::/64
name: mans-net
topology:
nodes:
### BRIDGES ###
br-frysix:
kind: bridge
br-locix:
kind: bridge
### MY ROUTERS ###
drortr1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:DB8:5000::1/128 dev loop0"
- "ip link set loop0 up"
# eth1 to wiertr1 - no ip
- "ip address add dev eth2 2001:DB8:5000:11::/64" # to server1
- "ip address add dev eth3 2001:DB8:0001:0001::/127" # to servperso1
- "ip address add dev eth5 2001:DB8:2:1::100/64" # to LocIX
wiertr1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:DB8:5000::2/128 dev loop0"
- "ip link set loop0 up"
# eth1 to drortr1 - no ip
- "ip address add dev eth2 2001:DB8:5000:12::/64" # to server2
amsrtr1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:DB8:5000::3/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth3 2001:DB8:5000:13::/64" # to server3
- "ip address add dev eth5 2001:DB8:0001:0004::/127" # to coloclue1
- "ip address add dev eth6 2001:DB8:0002:0002::100/64" # to Frys-IX
### MY SERVERS ###
server1:
kind: linux
image: praqma/network-multitool:latest
exec:
- "ip address add dev eth1 2001:DB8:5000:11::11/64"
- "ip -6 route del default"
- "ip -6 route add default via 2001:db8:5000:11::"
server2:
kind: linux
image: praqma/network-multitool:latest
exec:
- "ip address add dev eth1 2001:DB8:5000:12::11/64"
- "ip -6 route del default"
- "ip -6 route add default via 2001:db8:5000:12::"
server3:
kind: linux
image: praqma/network-multitool:latest
exec:
- "ip address add dev eth1 2001:DB8:5000:13::11/64"
- "ip -6 route del default"
- "ip -6 route add default via 2001:db8:5000:13::"
### TRANSITS ###
servperso1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4519::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0001:0001::1/127" # to drortr1
- "ip address add dev eth2 2001:DB8:0001:0002::/127" # to randomtransit1
randomtransit1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4518::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0001:0002::1/127" # to servperso1
- "ip address add dev eth2 2001:DB8:0001:0003::/127" # to coloclue1
- "ip address add dev eth3 2001:DB8:0001:0006::/127" # to coloclue1
randomtier2:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4520::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0001:0006::1/127" # to randomtransit1
- "ip addr add 2001:db8:4520:1234::/64 dev eth2"
- "ip link set eth2 up"
randomcustomer:
kind: linux
image: praqma/network-multitool:latest
exec:
- "ip address add dev eth1 2001:DB8:4520:1234::11/64"
- "ip -6 route del default"
- "ip -6 route add default via 2001:DB8:4520:1234::"
coloclue1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4517::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0001:0004::1/127" # to amsrtr1
- "ip address add dev eth2 2001:DB8:0001:0005::1/127" # to peer5
- "ip address add dev eth3 2001:DB8:0001:0003::1/127" # to randomtransit1
- "ip address add dev eth6 2001:DB8:0002:0002::1/64" # to Frys-IX
# Routeservers
locix1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "ip address add dev eth1 2001:DB8:0002:0001::11/64"
locix2:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "ip address add dev eth1 2001:DB8:0002:0001::12/64"
frys-ix1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "ip address add dev eth1 2001:DB8:0002:0002::11/64"
frys-ix2:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "ip address add dev eth1 2001:DB8:0002:0002::12/64"
# Peers
peer1:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4512::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0002:0001::101/64" # to LocIX
peer2:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4513::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0002:0001::102/64" # to LocIX
- "ip address add dev eth2 2001:DB8:0002:0002::102/64" # to Frys-IX
peer3:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4514::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0002:0001::103/64" # to LocIX
- "ip address add dev eth2 2001:DB8:0002:0002::103/64" # to Frys-IX
peer4:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4515::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0002:0002::104/64" # to Frys-IX
peer5:
kind: linux
image: ghcr.io/srl-labs/bird:2.13.1
binds:
- config/__clabNodeName__/bird.conf:/etc/bird.conf:ro
exec:
- "sysctl -w net.ipv6.conf.all.forwarding=1"
- "ip link add name loop0 type dummy"
- "ip addr add 2001:db8:4516::/128 dev loop0"
- "ip link set loop0 up"
- "ip address add dev eth1 2001:DB8:0001:0005::/127" # to coloclue1
- "ip address add dev eth2 2001:DB8:0002:0002::105/64" # to Frys-IX
links:
- endpoints: ["drortr1:eth1", "wiertr1:eth1"]
- endpoints: ["drortr1:eth2", "server1:eth1"]
- endpoints: ["drortr1:eth3", "servperso1:eth1"]
- endpoints: ["drortr1:eth4", "amsrtr1:eth1"]
- endpoints: ["wiertr1:eth2", "server2:eth1"]
- endpoints: ["wiertr1:eth3", "amsrtr1:eth2"]
- endpoints: ["amsrtr1:eth3", "server3:eth1"]
- endpoints: ["servperso1:eth2", "randomtransit1:eth1"]
- endpoints: ["randomtransit1:eth3", "randomtier2:eth1"]
- endpoints: ["randomtransit1:eth2", "coloclue1:eth3"]
- endpoints: ["randomtier2:eth2", "randomcustomer:eth1"]
- endpoints: ["coloclue1:eth1", "amsrtr1:eth5"]
- endpoints: ["coloclue1:eth2", "peer5:eth1"]
# Frys-IX
- endpoints: ["frys-ix1:eth1", "br-frysix:eth80"]
- endpoints: ["frys-ix2:eth1", "br-frysix:eth81"]
- endpoints: ["amsrtr1:eth6", "br-frysix:eth82"]
- endpoints: ["peer2:eth2", "br-frysix:eth83"]
- endpoints: ["peer3:eth2", "br-frysix:eth84"]
- endpoints: ["peer4:eth1", "br-frysix:eth85"]
- endpoints: ["peer5:eth2", "br-frysix:eth86"]
# LocIX
- endpoints: ["locix1:eth1", "br-locix:eth90"]
- endpoints: ["locix2:eth1", "br-locix:eth91"]
- endpoints: ["drortr1:eth5", "br-locix:eth92"]
- endpoints: ["peer1:eth1", "br-locix:eth93"]
- endpoints: ["peer2:eth1", "br-locix:eth94"]
- endpoints: ["peer3:eth1", "br-locix:eth95"]