# 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 12.12.12.12/32
    vxlan-local-tunnelip 12.12.12.12

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 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 vni1000
iface vni1000
    bridge-access 100
    bridge-learning off
    vxlan-mcastgrp 224.0.0.2
    vxlan-id 1000

auto vni1500
iface vni1500
    bridge-access 150
    bridge-learning off
    vxlan-mcastgrp 224.0.0.2
    vxlan-id 1500

auto vni1600
iface vni1600
    bridge-access 160
    bridge-learning off
    vxlan-mcastgrp 224.0.0.2
    vxlan-id 1600

auto vni1700
iface vni1700
    bridge-access 170
    bridge-learning off
    vxlan-mcastgrp 224.0.0.2
    vxlan-id 1700

auto vni1800
iface vni1800
    bridge-access 180
    bridge-learning off
    vxlan-mcastgrp 229.0.0.1
    vxlan-id 1800

auto vni2000
iface vni2000
    bridge-access 200
    bridge-learning off
    vxlan-mcastgrp 229.0.0.1
    vxlan-id 2000

auto vni3000
iface vni3000
    bridge-access 300
    bridge-learning off
    vxlan-mcastgrp 224.0.0.2
    vxlan-id 3000

auto vni104001
iface vni104001
    bridge-access 926
    bridge-learning off
    vxlan-mcastgrp 224.0.0.2
    vxlan-id 104001

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

auto vni104007
iface vni104007
    bridge-access 805
    bridge-learning off
    vxlan-mcastgrp 224.0.0.2
    vxlan-id 104007

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

auto br_default
iface br_default
    bridge-ports vni1000 vni1500 vni1600 vni1700 vni1800 vni2000 vni3000
    bridge-vlan-aware yes
    bridge-vids 100 150 160 170 180 200 300
    bridge-pvid 1
    bridge-stp yes
    bridge-mcsnoop no
    mstpctl-forcevers rstp

auto br_l3vni
iface br_l3vni
    bridge-ports vni104001 vni104007
    bridge-vlan-aware yes
