- Install Open vSwitch
apt update
apt install openvswitch-switch -y
- Define LACP Bond
cat >> /etc/network/interfaces <<'EOF'
auto bond0
iface bond0 inet manual
ovs_type OVSBond
ovs_bridge vmbr0
ovs_bonds eno1 eno2
ovs_options bond_mode=balance-tcp lacp=active other_config:lacp-time=fast
EOF
- Configrue Switch Side (Huawei Example)
interface Eth-Trunk10
description to-pve-node1
port link-type trunk
undo port trunk allow-pass vlan 1
port trunk allow-pass vlan 10 to 4094
mode lacp
interface GigabitEthernet0/0/1
description uplink-1
eth-trunk 10
interface GigabitEthernet0/0/2
description uplink-2
eth-trunk 10
- Create Management VLAN Interface
cat >> /etc/network/interfaces <<'EOF'
auto mgmt
iface mgmt inet static
address 10.10.10.11/24
gateway 10.10.10.1
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=10
EOF
- Define the OVS Bridge
cat >> /etc/network/interfaces <<'EOF'
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports bond0 mgmt
EOF
- Complete /etc/network/interfaces
# Loopback
auto lo
iface lo inet loopback
# Physical NICs
auto eno1
iface eno1 inet manual
auto eno2
iface eno2 inet manual
# Bond
auto bond0
iface bond0 inet manual
ovs_type OVSBond
ovs_bridge vmbr0
ovs_bonds eno1 eno2
ovs_options bond_mode=balance-tcp lacp=active other_config:lacp-time=fast
# Management VLAN
auto mgmt
iface mgmt inet static
address 10.10.10.11/24
gateway 10.10.10.1
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options tag=10
# Bridge
auto vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports bond0 mgmt