# Tres áreas en línea para ver qué cruza de una a otra:
#
#    área 1            área 0            área 2
#  x1 ---- abr1 ---- core ---- abr2 ---- y1
#
# abr1 y abr2 son area border routers. x1 e y1 tienen LAN simuladas con interfaces
# dummy, para poder apagarlas sin tocar los enlaces.
#
# Con ABR1_CONF=frr-range.conf, abr1 arranca resumiendo el área 1 en un solo prefijo.
name: w05-areas
mgmt:
  network: redes-w05-areas
  ipv4-subnet: 172.90.5.128/26
  ipv6-subnet: 3fff:172:90:5:2::/80
topology:
  defaults:
    kind: linux
    image: redes-router
    exec:
      - ip route del default
      - ip -6 route del default
      - sysctl -w net.ipv6.conf.all.disable_ipv6=1
  nodes:
    x1:
      binds: [x1/frr.conf:/etc/frr/frr.conf:ro]
      exec:
        - ip route del default
        - ip -6 route del default
        - sysctl -w net.ipv6.conf.all.disable_ipv6=1
        - ip link add lan1 type dummy
        - ip link add lan2 type dummy
        - ip link set lan1 up
        - ip link set lan2 up
    abr1:
      binds: [abr1/${ABR1_CONF:=frr.conf}:/etc/frr/frr.conf]
    core:
      binds: [core/frr.conf:/etc/frr/frr.conf:ro]
    abr2:
      binds: [abr2/frr.conf:/etc/frr/frr.conf:ro]
    y1:
      binds: [y1/frr.conf:/etc/frr/frr.conf:ro]
      exec:
        - ip route del default
        - ip -6 route del default
        - sysctl -w net.ipv6.conf.all.disable_ipv6=1
        - ip link add lan1 type dummy
        - ip link set lan1 up
  links:
    - endpoints: ["x1:eth1", "abr1:eth1"]
      mtu: 1500
    - endpoints: ["abr1:eth2", "core:eth1"]
      mtu: 1500
    - endpoints: ["core:eth2", "abr2:eth1"]
      mtu: 1500
    - endpoints: ["abr2:eth2", "y1:eth1"]
      mtu: 1500
