# 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
    vxlan-local-tunnelip 10.0.0.11

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

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

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

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

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

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

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

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

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

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

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

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

auto vxlan48
iface vxlan48
    vxlan-mcastgrp-map 1000=224.0.0.1 1001=224.0.0.2 1004=224.0.0.4
    bridge-vlan-vni-map 41=1041 42=1042 1000=1000 1001=1001 1004=1004
    mtu 8000
    bridge-learning off
    vxlan-ageing 43

auto vlan926_l3
iface vlan926_l3
    vrf TENANT_A
    vlan-raw-device br_l3vni
    vlan-id 926

auto vlan41_l3
iface vlan41_l3
    vrf ANTENT_A
    vlan-raw-device br_l3vni
    vlan-id 41

auto vlan316_l3
iface vlan316_l3
    vrf TENANT_B
    vlan-raw-device br_l3vni
    vlan-id 316

auto vlan2572_l3
iface vlan2572_l3
    vrf TENANT_C
    vlan-raw-device br_l3vni
    vlan-id 2572

auto vlan780_l3
iface vlan780_l3
    vrf TENANT_D
    vlan-raw-device br_l3vni
    vlan-id 780

auto vlan1982_l3
iface vlan1982_l3
    vrf TENANT_E
    vlan-raw-device br_l3vni
    vlan-id 1982

auto vlan2343_l3
iface vlan2343_l3
    vrf TENANT_F
    vlan-raw-device br_l3vni
    vlan-id 2343

auto vlan805_l3
iface vlan805_l3
    vrf TENANT_G
    vlan-raw-device br_l3vni
    vlan-id 805

auto vxlan99
iface vxlan99
    bridge-vlan-vni-map 926=104001 41=105002 316=104002 2572=104003 780=104004 1982=104005 2343=104006 805=104007
    mtu 8000
    bridge-learning off
    vxlan-ageing 43

auto br_default
iface br_default
    bridge-ports bond1 vxlan48
    bridge-vlan-aware yes
    bridge-vids 41 42 1000 1001 1004 10
    bridge-pvid 1
    bridge-stp yes
    bridge-mcsnoop no
    mstpctl-forcevers rstp

auto br_l3vni
iface br_l3vni
    bridge-ports vxlan99
    bridge-vlan-aware yes
