# 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 ::1/128
    vrf-table auto

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

auto TENANT_G
iface TENANT_G
    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 vxlan48
iface vxlan48
    vxlan-mcastgrp-map 1000=224.0.0.2 1500=224.0.0.2 1600=224.0.0.2 1700=224.0.0.2 1800=229.0.0.1 2000=229.0.0.1 3000=224.0.0.2
    bridge-vlan-vni-map 100=1000 150=1500 160=1600 170=1700 180=1800 200=2000 300=3000
    bridge-learning off

auto vlan619_l3
iface vlan619_l3
    vrf TENANT_A
    vlan-raw-device br_l3vni
    vlan-id 619

auto vlan625_l3
iface vlan625_l3
    vrf TENANT_G
    vlan-raw-device br_l3vni
    vlan-id 625

auto vxlan99
iface vxlan99
    vxlan-mcastgrp-map 104001=224.0.0.2 104007=224.0.0.2
    bridge-vlan-vni-map 619=104001 625=104007
    bridge-learning off

auto br_default
iface br_default
    bridge-ports vxlan48
    bridge-vlan-aware yes
    bridge-vids 100 150 160 170 180 200 300
    bridge-pvid 1
    bridge-stp yes
    bridge-mcsnoop no

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