provider: clab

plugin: [ files ]

defaults.device: iol
defaults.devices.iol.clab.image: iol:17.12.01
defaults.devices.ioll2.clab.image: ioll2:iol-l2-17.12.01

addressing:
  mgmt:
    ipv4: 192.168.200.0/24

nodes:
  - name: host1
    id: 150
    image: alpine:latest
    device: linux
    config.inline: |
      ip route add 8.0.0.0/8 via 100.10.10.1 dev eth1
      ip route add 185.15.0.0/16 via 100.10.10.1 dev eth1
      ip route add 95.15.0.0/16 via 100.10.10.1 dev eth1
      ip route add 195.15.0.0/16 via 100.10.10.1 dev eth1

  - name: sw1
    device: ioll2
    role: bridge

  - name: r1
    id: 2
    module: [ gateway, bgp, ospf ]

  - name: r2
    id: 3
    module: [ gateway, bgp, ospf ]
  
  - name: isp-01
    module: [ bgp ]

  - name: isp-02
    module: [ bgp ]

  - name: isp-03
    module: [ bgp ]
  
  - name: google
    module: [ bgp ]

gateway:
  protocol: vrrp
  id: 1

bgp:
  advertise_loopback: false
  community: []
  as_list:
    100:
      members: [ r1, r2 ]
    200:
      members: [ isp-01 ]
    300:
      members: [ isp-02 ]
    400:
      members: [ isp-03 ]
    1000:
      members: [ google ]

links:
  - bridge: sw1
    prefix: 100.10.10.0/24
    host1:
    r1:
      gateway.vrrp.group: 1
      gateway.vrrp.priority: 110
      bgp:
        advertise: true
    r2:
      gateway.vrrp.group: 1
      gateway.vrrp.priority: 100
      bgp:
        advertise: true
  - prefix: 172.18.1.0/31
    r1:
    r2:
  - prefix: 185.16.10.2/31
    r1:
    isp-01:
  - prefix: 95.16.10.2/31
    r2:
    isp-02:
  - prefix: 185.16.10.4/31
    isp-01:
    isp-02:
  - prefix: 185.16.10.6/31
    isp-01:
    google:
  - prefix: 95.16.10.4/31
    isp-02:
    isp-03:
  - prefix: 195.16.10.2/31
    isp-03:
    google:
  - prefix: 185.15.0.0/16
    isp-01:
  - prefix: 95.15.0.0/16
    isp-02:
  - prefix: 195.15.0.0/16
    isp-03:
  - prefix: 8.0.0.0/8
    google: