apiVersion: netweave.io/v1
kind: Topology
metadata:
  name: spine-leaf-bgp-evpn
  description: 2-spine / 3-leaf fabric with eBGP underlay.
  requester:
    name: Melih
    email: melih@example.com
devices:
  - hostname: spine-01
    type: l3-switch
    role: spine
    interfaces:
      - { name: Lo0, kind: loopback, ipv4: 10.255.0.1/32 }
      - { name: Eth1/1, kind: l3, ipv4: 10.1.1.0/31 }
      - { name: Eth1/2, kind: l3, ipv4: 10.1.1.2/31 }
      - { name: Eth1/3, kind: l3, ipv4: 10.1.1.4/31 }
    protocols:
      bgp:
        asn: 65000
        router_id: 10.255.0.1
        neighbors:
          - { peer: 10.1.1.1, remote_as: 65101 }
          - { peer: 10.1.1.3, remote_as: 65102 }
          - { peer: 10.1.1.5, remote_as: 65103 }
  - hostname: spine-02
    type: l3-switch
    role: spine
    interfaces:
      - { name: Lo0, kind: loopback, ipv4: 10.255.0.2/32 }
      - { name: Eth1/1, kind: l3, ipv4: 10.2.1.0/31 }
      - { name: Eth1/2, kind: l3, ipv4: 10.2.1.2/31 }
      - { name: Eth1/3, kind: l3, ipv4: 10.2.1.4/31 }
    protocols:
      bgp:
        asn: 65000
        router_id: 10.255.0.2
        neighbors:
          - { peer: 10.2.1.1, remote_as: 65101 }
          - { peer: 10.2.1.3, remote_as: 65102 }
          - { peer: 10.2.1.5, remote_as: 65103 }
  - hostname: leaf-01
    type: l3-switch
    role: leaf
    interfaces:
      - { name: Lo0, kind: loopback, ipv4: 10.255.1.1/32 }
      - { name: Eth1/49, kind: l3, ipv4: 10.1.1.1/31 }
      - { name: Eth1/50, kind: l3, ipv4: 10.2.1.1/31 }
    protocols:
      bgp:
        asn: 65101
        router_id: 10.255.1.1
        neighbors:
          - { peer: 10.1.1.0, remote_as: 65000 }
          - { peer: 10.2.1.0, remote_as: 65000 }
  - hostname: leaf-02
    type: l3-switch
    role: leaf
    interfaces:
      - { name: Lo0, kind: loopback, ipv4: 10.255.1.2/32 }
      - { name: Eth1/49, kind: l3, ipv4: 10.1.1.3/31 }
      - { name: Eth1/50, kind: l3, ipv4: 10.2.1.3/31 }
    protocols:
      bgp:
        asn: 65102
        router_id: 10.255.1.2
        neighbors:
          - { peer: 10.1.1.2, remote_as: 65000 }
          - { peer: 10.2.1.2, remote_as: 65000 }
  - hostname: leaf-03
    type: l3-switch
    role: leaf
    interfaces:
      - { name: Lo0, kind: loopback, ipv4: 10.255.1.3/32 }
      - { name: Eth1/49, kind: l3, ipv4: 10.1.1.5/31 }
      - { name: Eth1/50, kind: l3, ipv4: 10.2.1.5/31 }
    protocols:
      bgp:
        asn: 65103
        router_id: 10.255.1.3
        neighbors:
          - { peer: 10.1.1.4, remote_as: 65000 }
          - { peer: 10.2.1.4, remote_as: 65000 }
links:
  - { a: { device: spine-01, interface: Eth1/1 }, b: { device: leaf-01, interface: Eth1/49 }, type: l3 }
  - { a: { device: spine-01, interface: Eth1/2 }, b: { device: leaf-02, interface: Eth1/49 }, type: l3 }
  - { a: { device: spine-01, interface: Eth1/3 }, b: { device: leaf-03, interface: Eth1/49 }, type: l3 }
  - { a: { device: spine-02, interface: Eth1/1 }, b: { device: leaf-01, interface: Eth1/50 }, type: l3 }
  - { a: { device: spine-02, interface: Eth1/2 }, b: { device: leaf-02, interface: Eth1/50 }, type: l3 }
  - { a: { device: spine-02, interface: Eth1/3 }, b: { device: leaf-03, interface: Eth1/50 }, type: l3 }
