# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5)

# The primary network interface
auto eth0
iface eth0
    address 192.168.0.15/24
    gateway 192.168.0.2
    vrf mgmt

#Enabling Mgmt VRF interface
auto mgmt
iface mgmt
    address 127.0.0.1/8
    address ::1/128
    vrf-table auto

auto lo
iface lo
    address 27.0.0.11/32
    address 2001:c15c:d06:f00d::b/128
    alias BGP un-numbered Use for Vxlan Src Tunnel
    clagd-vxlan-anycast-ip 36.0.0.11
auto swp1
iface swp1
    link-speed 10000
    link-duplex full
    link-autoneg off

auto swp2
iface swp2
    link-speed 10000
    link-duplex full
    link-autoneg off

auto swp3
iface swp3
    link-speed 10000
    link-duplex full
    link-autoneg off

auto swp4
iface swp4
    link-speed 10000
    link-duplex full
    link-autoneg off

auto swp5
iface swp5
    link-speed 10000
    link-duplex full
    link-autoneg off

auto swp6
iface swp6
    link-speed 10000
    link-duplex full
    link-autoneg off

auto swp7
iface swp7
    link-speed 10000
    link-duplex full
    link-autoneg off

auto swp8
iface swp8
    link-speed 10000
    link-duplex full
    link-autoneg off

auto uplink-1
iface uplink-1
        bond-slaves swp1 swp2
        bond-mode 802.3ad
        bond-min-links 1
        bond-lacp-rate 1
        mtu  9202
    alias Local Node/s TORC11 and Ports swp1 swp2 <==> Remote  Node/s MSP1 and Ports swp1 swp2

auto uplink-2
iface uplink-2
        bond-slaves swp3 swp4
        bond-mode 802.3ad
        bond-min-links 1
        bond-lacp-rate 1
        mtu  9202
    alias Local Node/s TORC11 and Ports swp3 swp4 <==> Remote  Node/s MSP2 and Ports swp1 swp2

auto peerlink-3
iface peerlink-3
        bond-slaves swp5 swp6
        bond-mode 802.3ad
        bond-min-links 1
        bond-lacp-rate 1
        mtu  9202
    alias Local Node/s TORC11 and Ports swp5 swp6 <==> Remote  Node/s TORC12 and Ports swp5 swp6

auto peerlink-3.4094
iface peerlink-3.4094
    address 169.254.0.9/30
         mtu 9202
         alias clag and vxlan communication primary path
    clagd-priority 4096
    clagd-sys-mac 44:38:39:ff:ff:01
    clagd-peer-ip 169.254.0.10
    clagd-args --vm --initDelay 30 --redirect2Enable False --debug 0x0
    # post-up sysctl -w net.ipv4.conf.peerlink-3/4094.accept_local=1
    clagd-backup-ip 27.0.0.12
    clagd-debug off

auto hostbond4
iface hostbond4
        bond-slaves swp7
        bond-mode 802.3ad
        bond-min-links 1
        bond-lacp-rate 1
        mtu  9152
    alias Local Node/s TORC11 and Ports swp7 <==> Remote  Node/s HOSTD11 and Ports swp1
    clag-id 1
    bridge-pvid 1000

auto hostbond5
iface hostbond5
        bond-slaves swp8
        bond-mode 802.3ad
        bond-min-links 1
        bond-lacp-rate 1
        mtu  9152
    alias Local Node/s TORC11 and Ports swp8 <==> Remote  Node/s HOSTD12 and Ports swp1
    clag-id 2
    bridge-pvid 1002

auto vx-1000
iface vx-1000
    vxlan-id 1000
    bridge-access 1000
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto vx-1002
iface vx-1002
    vxlan-id 1002
    bridge-access 1002
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto vx-1004
iface vx-1004
    vxlan-id 1004
    bridge-access 1004
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto vx-1006
iface vx-1006
    vxlan-id 1006
    bridge-access 1006
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto vx-1008
iface vx-1008
    vxlan-id 1008
    bridge-access 1008
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto vx-4001
iface vx-4001
    vxlan-id 4001
    bridge-access 4001
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto vx-4002
iface vx-4002
    vxlan-id 4002
    bridge-access 4002
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto vx-4003
iface vx-4003
    vxlan-id 4003
    bridge-access 4003
    vxlan-local-tunnelip 27.0.0.11
    bridge-learning off
    bridge-arp-nd-suppress on
         mstpctl-portbpdufilter yes
         mstpctl-bpduguard  yes
         mtu 9152

auto bridge
iface bridge
    bridge-vlan-aware yes
    bridge-ports vx-1000 vx-1002 vx-1004 vx-1006 vx-1008 vx-4001 vx-4002 vx-4003 peerlink-3 hostbond4 hostbond5
    bridge-stp on
    bridge-vids 1000 1002 1004 1006 1008
    bridge-pvid 1

auto vrf1
iface vrf1
    vrf-table auto

auto vlan1000
iface vlan1000
    address 45.0.0.4/24
    address 2001:fee1::4/64
    vlan-id 1000
    vlan-raw-device bridge
    address-virtual 00:00:5e:00:01:01 45.0.0.1/24 2001:fee1::1/64
    vrf vrf1

auto vlan1002
iface vlan1002
    address 45.0.2.4/24
    address 2001:fee1:0:2::4/64
    vlan-id 1002
    vlan-raw-device bridge
    address-virtual 00:00:5e:00:01:01 45.0.2.1/24 2001:fee1:0:2::1/64
    vrf vrf1

auto vrf2
iface vrf2
    vrf-table auto

auto vlan1004
iface vlan1004
    address 45.0.4.4/24
    address 2001:fee1:0:4::4/64
    vlan-id 1004
    vlan-raw-device bridge
    address-virtual 00:00:5e:00:01:01 45.0.4.1/24 2001:fee1:0:4::1/64
    vrf vrf2

auto vlan1006
iface vlan1006
    address 45.0.6.4/24
    address 2001:fee1:0:6::4/64
    vlan-id 1006
    vlan-raw-device bridge
    address-virtual 00:00:5e:00:01:01 45.0.6.1/24 2001:fee1:0:6::1/64
    vrf vrf2

auto vrf3
iface vrf3
    vrf-table auto

auto vlan1008
iface vlan1008
    address 45.0.8.4/24
    address 2001:fee1:0:8::4/64
    vlan-id 1008
    vlan-raw-device bridge
    address-virtual 00:00:5e:00:01:01 45.0.8.1/24 2001:fee1:0:8::1/64
    vrf vrf3

auto vlan4001
iface vlan4001
    vlan-id 4001
    vlan-raw-device bridge
    address-virtual 44:38:39:ff:ff:01
    vrf vrf1

auto vlan4002
iface vlan4002
    vlan-id 4002
    vlan-raw-device bridge
    address-virtual 44:38:39:ff:ff:01
    vrf vrf2

auto vlan4003
iface vlan4003
    vlan-id 4003
    vlan-raw-device bridge
    address-virtual 44:38:39:ff:ff:01
    vrf vrf3

auto swp8.3000
iface swp8.3000
    vrf vrf2

auto swp8.4000
iface swp8.4000
    vrf vrf1

