github.com/cilium/cilium@v1.16.2/contrib/containerlab/bgp-cplane-dev-v4/topo.yaml (about)

     1  name: bgp-cplane-dev-v4
     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        - ip route add blackhole 10.0.0.0/8 
    14        # Boiler plate to make FRR work
    15        - touch /etc/frr/vtysh.conf
    16        - touch /var/log/frr.log
    17        - chown frr:frr /var/log/frr.log
    18        - sed -i -e 's/bgpd=no/bgpd=yes/g' /etc/frr/daemons
    19        - /usr/lib/frr/frrinit.sh start
    20        - >-
    21          vtysh -c 'conf t'
    22          -c 'log file /var/log/frr.log'
    23          -c 'debug bgp neighbor-events'
    24          -c 'debug bgp updates'
    25          -c 'debug bgp zebra'
    26          -c 'router bgp 65000'
    27          -c '  bgp bestpath as-path multipath-relax'
    28          -c '  no bgp ebgp-requires-policy'
    29          -c '  bgp router-id 10.0.0.1'
    30          -c '  neighbor CILIUM peer-group'
    31          -c '  neighbor CILIUM remote-as external'
    32          -c '  neighbor 10.0.1.2 peer-group CILIUM'
    33          -c '  neighbor 10.0.2.2 peer-group CILIUM'
    34          -c '!'
    35      # Server with Cilium. It shares netns with kind node.
    36      server0:
    37        kind: linux
    38        image: nicolaka/netshoot:v0.11
    39        network-mode: container:bgp-cplane-dev-v4-control-plane
    40        exec:
    41        - ip addr add 10.0.1.2/24 dev net0
    42        # This static route is needed because Cilium cannot import routes currently.
    43        - ip route add 10.0.0.0/8 via 10.0.1.1 dev net0
    44      # Server with Cilium. It shares netns with kind node.
    45      server1:
    46        kind: linux
    47        image: nicolaka/netshoot:v0.11
    48        network-mode: container:bgp-cplane-dev-v4-worker
    49        exec:
    50        - ip addr add 10.0.2.2/24 dev net0
    51        # This static route is needed because Cilium cannot import routes currently.
    52        - ip route add 10.0.0.0/8 via 10.0.2.1 dev net0
    53      # Server without Cilium. Useful for testing connectivity.
    54      server2:
    55        kind: linux
    56        image: nicolaka/netshoot:v0.11
    57        exec:
    58        - ip addr add 10.0.3.2/24 dev net0
    59        # This static route is needed because this node doesn't have a BGP router.
    60        - ip route add 10.0.0.0/8 via 10.0.3.1 dev net0
    61    links:
    62    - endpoints: ["router0:net0", "server0:net0"]
    63    - endpoints: ["router0:net1", "server1:net0"]
    64    - endpoints: ["router0:net2", "server2:net0"]