Categories
Network Virtualization

OpenMediaVault / Debian network configuration for bonding/lacp and vlan

This is an example of an network configuration on my OpenMediaVault server. It takes two network interfaces (eth3 and rename3) and bonds them together using LACP. On top off this bond i have created three bridges. br1 witch is for untagged traffic and. br641 and 642 for vlan tagged traffic on vlan 641 and 642 respectively. br1/br641/br642 are all attached to the host and is configured for dhcp. they can also be attached to virtual machines.

Reboot or run systemctl restart networking.service after changes has been made.

Running systemctl restart networking.service  on an KVM host will crash the virtual machines attached to any of the bridges forcing you to manually restart them.

This is the entire /etc/network/interfaces

[code language="bash"]
# The loopback network interface
auto lo
iface lo inet loopback

# I350-T2
# bonding network interfaces eth3 and rename3
# bond-mode 4 is lacp so you must enable it on your switch too.
auto bond1
iface bond1 inet manual
 pre-down ip -4 addr flush dev $IFACE
 bond-slaves eth3 rename3
 bond-mode 4
 bond-miimon 100
 bond-downdelay 200
 bond-updelay 200
 bond_xmit_hash_policy layer2+3
 bond_lacp_rate fast

# this is the first bridge this is the untagged vlan
auto br1
iface br1 inet dhcp
 bridge_ports bond1
 bridge_stp off
 bridge_fd 0
 bridge_maxwait 0

# This is the configuration for vlan 641
auto bond1.641
iface bond1.641 inet manual
 vlan-raw-device bond1

auto br641
iface br641 inet dhcp
 bridge_ports bond1.641
 bridge_stp off
 bridge_fd 0
 bridge_maxwait 0

# This is the configuration for vlan 642
auto bond1.642
iface bond1.642 inet manual
 vlan-raw-device bond1

auto br642
iface br642 inet dhcp
 bridge_ports bond1.642
 bridge_stp off
 bridge_fd 0
 bridge_maxwait 0
[/code]