1

I have a server with two network adapters. I configured bonding and it works. Here's the working configuration:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
bond-master bond0
bond-primary eth0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
bond-mode balance-rr
bond-miimon 100
bond-slaves none
address 192.168.1.2
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.13

I try to add a bridge, but then, the machine loses connectivity.

I tried:

For example, the following configuration doesn't work:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
bond-mode balance-rr
bond-miimon 100
bond-slaves none

auto br0
iface br0 inet static
bridge_ports bond0
bridge_maxwait 0
bridge_fd 0
post-up ifup bond0
post-down ifdown bond0
address 192.168.1.2
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.13

What else can I try to make it work?

Arseni Mourzenko
  • 2,275
  • 5
  • 28
  • 41

2 Answers2

0

It somehow works by:

  • Removing any post-up/pre-down/pre-up/post-down,

  • Adding the IP address, gateway, netmask and nameserver for both br0 and bond0.

During the boot, I consecutively see the following messages from /etc/init/failsafe.conf:

  • Waiting for network configuration...

  • Waiting up to 60 more seconds for network configuration...

  • Booting system without full network configuration...

but once the boot is finished, the machine appears to be connected to the network.

The final configuration looks like:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
bond-mode balance-rr
bond-miimon 100
bond-slaves none
address 192.168.1.2
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.13

auto br0
iface br0 inet static
bridge_ports bond0
bridge_maxwait 0
bridge_fd 0
post-up ifup bond0
post-down ifdown bond0
address 192.168.1.2
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.13
Arseni Mourzenko
  • 2,275
  • 5
  • 28
  • 41
  • With my experience on Ubuntu 12.04 LTS server, the way it starts network services isn't really compatible with bonding. Ubuntu seems to bring up the interfaces on quite random order, which makes it fail quite often with bonded interfaces. I don't know if this issue has been fixed in 14.04 LTS though. – Tero Kilkanen Jun 22 '14 at 20:49
0
iface x inet static

Brings up interface only if there are ip configuration. To bring up interface without ip configuration you must use:

iface x inet manual

So fix your configuration to:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual
bond-master bond0

auto eth1
iface eth1 inet manual
bond-master bond0

auto bond0
iface bond0 inet manual
bond-mode balance-rr
bond-miimon 100
bond-slaves none

auto br0
iface br0 inet static
bridge_ports bond0
bridge_maxwait 0
bridge_fd 0
post-up ifup bond0
post-down ifdown bond0
address 192.168.1.2
gateway 192.168.1.1
netmask 255.255.255.0
dns-nameservers 192.168.1.13
ryci.us
  • 21
  • 1