# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*.intf

auto lo
iface lo inet loopback
    address 10.0.0.11/32
    clagd-vxlan-anycast-ip 10.1.0.12
    vxlan-local-tunnelip 10.0.0.11

auto mgmt
iface mgmt
    address 127.0.0.1/8
    address ::1/128
    vrf-table auto

auto TENANT_A
iface TENANT_A
    address 127.0.0.1/8
    address ::1/128
    vrf-table auto

auto eth0
iface eth0 inet dhcp
    ip-forward off
    ip6-forward off
    vrf mgmt

auto peerlink
iface peerlink
    bond-slaves swp49 swp50
    bond-mode 802.3ad
    bond-lacp-bypass-allow no

auto peerlink.4094
iface peerlink.4094
    clagd-peer-ip linklocal
    clagd-backup-ip 192.168.10.1
    clagd-sys-mac 44:38:39:ff:00:0c
    clagd-args --initDelay 180
    clagd-debug off

auto bond1
iface bond1
    bond-slaves swp1
    bond-mode 802.3ad
    bond-lacp-bypass-allow no
    clag-id 1
    bridge-access 10

auto vlan10
iface vlan10
    address 192.168.10.1/24
    address-virtual 00:00:5e:00:01:12 192.168.10.254/24
    vrf TENANT_A
    vlan-raw-device br_default
    vlan-id 10

auto vni16773161
iface vni16773161
    bridge-access 41
    bridge-learning off
    vxlan-port 4242
    vxlan-id 16773161

auto vni16777214
iface vni16777214
    bridge-access 4094
    bridge-learning off
    vxlan-port 4242
    vxlan-id 16777214

auto vni42
iface vni42
    bridge-access 42
    bridge-learning off
    vxlan-port 4242
    vxlan-id 42

auto vni10010
iface vni10010
    bridge-access 10
    bridge-learning on
    vxlan-port 4242
    vxlan-id 10010

auto vni10011
iface vni10011
    bridge-access 11
    bridge-learning off
    vxlan-mcastgrp 224.0.0.0
    vxlan-port 4242
    vxlan-id 10011

auto vni104001
iface vni104001
    bridge-access 4033
    bridge-learning off
    vxlan-port 4242
    vxlan-id 104001

auto vlan4033_l3
iface vlan4033_l3
    vrf TENANT_A
    vlan-raw-device br_default
    address-virtual 44:38:39:ff:00:0c
    vlan-id 4033

auto br_default
iface br_default
    bridge-ports peerlink bond1 vni16773161 vni16777214 vni42 vni10010 vni10011 vni104001
    bridge-vlan-aware yes
    bridge-vids 41 4094 42 10 11
    bridge-pvid 1
    bridge-stp yes
    bridge-mcsnoop no
