# 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

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
    bridge-learning off
    link-speed 10000
    link-autoneg off

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

auto vlan400
iface vlan400
    vlan-raw-device swp4
    vlan-id 400

auto vlan200.20
iface vlan200.20

auto swp2.42
iface swp2.42
    address 42.42.42.42/24

auto br_default
iface br_default
    bridge-vlan-aware yes
    bridge-vids 1 200
    bridge-pvid 1
    bridge-stp yes
    bridge-mcsnoop no
    mstpctl-forcevers rstp

auto br0
iface br0
    bridge-ports swp4 swp6
    bridge-vlan-aware yes
    bridge-vids 201 202 203 204
    bridge-pvid 42
    bridge-stp no
    mstpctl-treeprio 8192
    bridge-mcsnoop no
    mstpctl-forcevers stp

auto br1
iface br1
    bridge-ports swp5
    hwaddress 08:00:27:00:c7:77
    bridge-vlan-aware yes
    bridge-vids 1 2 3 4
    bridge-pvid 84
    bridge-stp no
    mstpctl-treeprio 4096
    bridge-mcsnoop no
    mstpctl-forcevers rstp

auto swp2
iface swp2
