# 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 eth0
iface eth0
    address 192.168.0.15/24
    gateway 192.168.0.2
    ip-forward off
    ip6-forward off
    vrf mgmt

auto swp4
iface swp4
    bridge-access 99
    link-speed 10000
    link-autoneg off

auto swp5
iface swp5
    mstpctl-portbpdufilter yes
    mstpctl-bpduguard yes
    mstpctl-portadminedge yes
    mstpctl-portautoedge no
    mstpctl-portnetwork yes
    mstpctl-portrestrrole yes
    link-speed 10000
    link-autoneg off

auto swp6
iface swp6
    bridge-vids 201 202 203
    link-speed 10000
    link-autoneg off

auto vlan200
iface vlan200
    address 20.0.0.1/24
    vlan-raw-device br0
    vlan-id 200

auto vlan100
iface vlan100
    vlan-raw-device b0r
    vlan-id 100

auto vlan200.20
iface vlan200.20

auto vxlan60
iface vxlan60
    bridge-vlan-vni-map 200=200
    bridge-learning off

auto vxlan62
iface vxlan62
    bridge-vlan-vni-map 100=100
    bridge-learning off

auto br0
iface br0
    bridge-ports swp4 swp6 vxlan60
    bridge-vlan-aware yes
    bridge-vids 200
    bridge-pvid 1
    bridge-stp no
    bridge-mcsnoop no
    mstpctl-forcevers rstp

auto b0r
iface b0r
    bridge-ports vxlan62
    bridge-vlan-aware yes
    bridge-vids 100
    bridge-pvid 1
    bridge-stp no
    bridge-mcsnoop no
    mstpctl-forcevers rstp
