Unable to set a bridge over bonding on Debian

5,151

Solution 1

It was working fine for me also with bond-mode 5 (lacp) and the ip command suggested in one of the comments:

auto bond0
iface bond0 inet manual
    up ip link set up dev bond0
    slaves eth1 eth0
    bond-mode 4
    bond-miimon 100
    bond-lacp-rate 0

auto br0
iface br0 inet static
    address 192.168.162.235
    netmask 255.255.192.0
    gateway 192.168.150.254
    bridge_ports bond0
    bridge_stp off # switch on with more system like this
    bridge_maxage 0
    bridge_ageing 0

Anyway all credit goes to Michal Sokolowski.

Solution 2

This is working config from my server:

/etc/network/interfaces:

auto lo
iface lo inet loopback

auto bond0
iface bond0 inet manual
    up ifconfig bond0 0.0.0.0 up
    slaves eth1 eth0
    bond-mode 0
    bond-miimon 100
    bond-lacp-rate 0

auto br0
iface br0 inet static
    address 192.168.162.235
    netmask 255.255.192.0
    gateway 192.168.150.254
    bridge_ports bond0 vnet0
    bridge_stp off # switch on with more system like this
    bridge_maxage 0
    bridge_ageing 0
    bridge_ageing 0

Besides that you need to install:

 apt-get install bridge-utils ifenslave

Remove any bond module configuration from /etc/modprobe.d/

Share:
5,151

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin almost 2 years

    I have a Debian 8 Jessie machine with two interfaces (eth0 and eth1) bonded in balance-rr mode (aka 0). It works smoothly, but when I try to set up a bridge on it, it doesn't work.

    My /etc/network/interfaces

    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto bond0
    iface bond0 inet static
        slaves eth0 eth1
        bond-mode 0
        bond-miimon 100
        bond_downdelay 200
        bond_updelay 200
    
    auto br0
    iface br0 inet static
            address 192.168.20.20
            netmask 255.255.255.0
            gateway 192.168.20.1
            dns-nameservers 8.8.8.8
        bridge_ports bond0
        bridge_maxwait 0
        bridge_fd 0
        bridge_stp off
    

    Any clue? Thanks.

    • Michal Sokolowski
      Michal Sokolowski about 9 years
      Show us logs tail -f /var/log/messages /var/log/syslog /var/log/dmesg & and do service networking restart .
  • GnP
    GnP about 8 years
    +1 Note that OP's mistake was having the bond interface as static without an address. Also, you can replace the ifconfig with iproute2 (preferred): up ip link set up dev bond0.