routing-lab/lab001-openbgpd-ebgp/docker-compose.yml

118 lines
2.5 KiB
YAML

---
networks:
# Each of these networks is connected to one of the routers.
# These are the networks originated by their corresponding BGP routers.
as23_1:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: fd00:d0ca:23:1::/64
ip_range: fd00:d0ca:23:1::/96
as42_1:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: fd00:d0ca:42:1::/64
ip_range: fd00:d0ca:42:1::/96
as1337_1:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: fd00:d0ca:1337:1::/64
ip_range: fd00:d0ca:1337:1::/96
# Each of these network is used for direct peering between two AS.
as23_as42_1:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: fd00:d0ca:2342:1::/64
ip_range: fd00:d0ca:2342:1::/96
as23_as1337_1:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: fd00:d0ca:2313:1::/64
ip_range: fd00:d0ca:2313:1::/96
as42_as1337_1:
driver: bridge
enable_ipv6: true
ipam:
config:
- subnet: fd00:d0ca:4213:1::/64
ip_range: fd00:d0ca:4213:1::/96
services:
# The 3 eBGP routers
as23:
image: docker.io/openbgpd/openbgpd
volumes:
- ./as23/conf:/etc/bgpd
sysctls:
- net.ipv6.conf.all.forwarding=1 # Required order to actually forward packets
cap_add:
- NET_ADMIN # Required to add learned routes to the FIB
networks:
as23_1:
ipv6_address: fd00:d0ca:23:1::10
as23_as42_1:
ipv6_address: fd00:d0ca:2342:1::23
as23_as1337_1:
ipv6_address: fd00:d0ca:2313:1::23
as42:
image: docker.io/openbgpd/openbgpd
volumes:
- ./as42/conf:/etc/bgpd
sysctls:
- net.ipv6.conf.all.forwarding=1
cap_add:
- NET_ADMIN
networks:
as42_1:
ipv6_address: fd00:d0ca:42:1::10
as23_as42_1:
ipv6_address: fd00:d0ca:2342:1::42
as42_as1337_1:
ipv6_address: fd00:d0ca:4213:1::42
as1337:
image: docker.io/openbgpd/openbgpd
volumes:
- ./as1337/conf:/etc/bgpd
sysctls:
- net.ipv6.conf.all.forwarding=1
cap_add:
- NET_ADMIN
networks:
as1337_1:
ipv6_address: fd00:d0ca:1337:1::10
as23_as1337_1:
ipv6_address: fd00:d0ca:2313:1::1337
as42_as1337_1:
ipv6_address: fd00:d0ca:4213:1::1337
# The looking glass server
alice-lg:
build: ../images/alice-lg
volumes:
- ./alice-lg:/etc/alice-lg
network_mode: host