github.com/cilium/cilium@v1.16.2/contrib/containerlab/bgp-cplane-dev-dual/topo.yaml (about) 1 name: bgp-cplane-dev-dual 2 topology: 3 nodes: 4 # A simple BGP router that peers with Cilium with eBGP. 5 router0: 6 kind: linux 7 image: frrouting/frr:v8.4.0 8 cmd: bash 9 exec: 10 - ip addr add 10.0.1.1/24 dev net0 11 - ip addr add 10.0.2.1/24 dev net1 12 - ip addr add 10.0.3.1/24 dev net2 13 - sysctl net.ipv6.conf.all.forwarding=1 14 - ip addr add fd00:10:0:1::1/64 dev net0 15 - ip addr add fd00:10:0:2::1/64 dev net1 16 - ip addr add fd00:10:0:3::1/64 dev net2 17 - ip route add blackhole 10.0.0.0/8 18 - ip route add blackhole fd00::/16 19 # Boiler plate to make FRR work 20 - touch /etc/frr/vtysh.conf 21 - touch /var/log/frr.log 22 - chown frr:frr /var/log/frr.log 23 - sed -i -e 's/bgpd=no/bgpd=yes/g' /etc/frr/daemons 24 - /usr/lib/frr/frrinit.sh start 25 - >- 26 vtysh -c 'conf t' 27 -c 'log file /var/log/frr.log' 28 -c 'debug bgp neighbor-events' 29 -c 'debug bgp updates' 30 -c 'debug bgp zebra' 31 -c 'router bgp 65000' 32 -c ' bgp bestpath as-path multipath-relax' 33 -c ' no bgp ebgp-requires-policy' 34 -c ' bgp default ipv6-unicast' 35 -c ' bgp router-id 10.0.0.1' 36 -c ' neighbor CILIUM peer-group' 37 -c ' neighbor CILIUM remote-as external' 38 -c ' neighbor fd00:10:0:1::2 peer-group CILIUM' 39 -c ' neighbor fd00:10:0:2::2 peer-group CILIUM' 40 -c '!' 41 # Server with Cilium. It shares netns with kind node. 42 server0: 43 kind: linux 44 image: nicolaka/netshoot:v0.11 45 network-mode: container:bgp-cplane-dev-dual-control-plane 46 exec: 47 - ip addr add 10.0.1.2/24 dev net0 48 - ip addr add fd00:10:0:1::2/64 dev net0 49 # These static routes are needed because Cilium cannot import routes currently. 50 - ip route add 10.0.0.0/8 via 10.0.1.1 dev net0 51 - ip route add fd00::/16 via fd00:10:0:1::1 dev net0 52 # Server with Cilium. It shares netns with kind node. 53 server1: 54 kind: linux 55 image: nicolaka/netshoot:v0.11 56 network-mode: container:bgp-cplane-dev-dual-worker 57 exec: 58 - ip addr add 10.0.2.2/24 dev net0 59 - ip addr add fd00:10:0:2::2/64 dev net0 60 # These static routes are needed because Cilium cannot import routes currently. 61 - ip route add 10.0.0.0/8 via 10.0.2.1 dev net0 62 - ip route add fd00::/16 via fd00:10:0:2::1 dev net0 63 # Server without Cilium. Useful for testing connectivity. 64 server2: 65 kind: linux 66 image: nicolaka/netshoot:v0.11 67 exec: 68 - ip addr add 10.0.3.2/24 dev net0 69 - ip addr add fd00:10:0:3::2/64 dev net0 70 # These static routes are needed because this node doesn't have a BGP router. 71 - ip route add 10.0.0.0/8 via 10.0.3.1 dev net0 72 - ip route add fd00::/16 via fd00:10:0:3::1 dev net0 73 links: 74 - endpoints: ["router0:net0", "server0:net0"] 75 - endpoints: ["router0:net1", "server1:net0"] 76 - endpoints: ["router0:net2", "server2:net0"]