How to Configure Bridge on Bond With NetworkManager

How to Configure Bridge on Bond With NetworkManager
Photo by Adrien CÉSARD / Unsplash

Setting up a Linux bridge on a bonded interface improves network reliability and performance. Bonding combines multiple network interfaces into one for better speed and failover protection, while a Linux bridge acts like a virtual switch, connecting devices or virtual machines.

In this guide, you’ll learn how to create a Linux bridge over a bonded interface, ensuring a stable and efficient network setup. Let’s get started!

Network Diagram

eth0 ---|
        | --+-- bond0 --+-- br0
eth1 ---|

Create bridge

nmcli connection add type bridge \
    ifname br0 \
    ipv4.method manual \
    ipv4.addresses 192.168.0.40/24 \
    ipv4.gateway 192.168.0.1 \
    ipv4.dns "192.168.0.1" \
    ipv6.method ignore \
    ipv6.never-default true \
    bridge.stp no \
    con-name br0

I use a static IP address for my bridge. You will need to adjust the settings to match your needs.

Create bond

nmcli connection add type bond \
    ifname bond0 \
    bond.options "mode=active-backup" \
    ipv4.method disabled \
    ipv4.never-default true \
    ipv6.method ignore \
    ipv6.never-default true \
    802-3-ethernet.mtu 1500 \
    con-name bond0 \
    master br0

Add slaves to bond

nmcli connection add type ethernet ifname eth0 con-name eth0 master bond0
nmcli connection add type ethernet ifname eth1 con-name eth1 master bond0