Solved - Ubuntu 16.04 lts bonding with IEEE 802.3ad Dynamic Link Aggregation
Situation
Dell PowerEdge 2950 running NextCloud Server over Ubuntu 16.04 lts with unstable bonded 802.3ad dynamic link aggregation network with intermittent running timeouts and boot errors.
Troubleshooting
Past a myriad of server side configuration testing (thanks to George for the support) the intermittent network problem persisted. A compatibility issue was deduced between the builtin Broadcom and the pci Intel nics when bonded in Ubuntu 16.04 lts.
Hardware Solution
Two dual Intel pci nics were installed on the 2950 riser pci slots, nvram cleared and the builtin broadcom were disabled from bios. This was done to favor bandwidth i.e. 4 (1Gb) nics instead of the 2 (1Gb) builtin interfaces.
Server Solution
There are conflicting bonding configuration suggestions for Ubuntu 16.04 lts and this is what worked for me.
1. Ran ifconfig -a
to get hold of the new interface bios and dev names
borgf003@CLD01:~$ ifconfig -a
..........
enp10s0f0 Link encap:Ethernet HWaddr 00:15:17:4a:94:26
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:5161 errors:0 dropped:0 overruns:0 frame:0
TX packets:361 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:809816 (809.8 KB) TX bytes:31274 (31.2 KB)
Interrupt:17 Memory:fdae0000-fdb00000
enp10s0f1 Link encap:Ethernet HWaddr 00:15:17:4a:94:26
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:11440 errors:0 dropped:0 overruns:0 frame:0
TX packets:167 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1963591 (1.9 MB) TX bytes:20970 (20.9 KB)
Interrupt:18 Memory:fdaa0000-fdac0000
enp14s0f0 Link encap:Ethernet HWaddr 00:15:17:4a:94:26
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:4769 errors:0 dropped:4 overruns:0 frame:0
TX packets:3294 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:582742 (582.7 KB) TX bytes:1546925 (1.5 MB)
Interrupt:16 Memory:fd6e0000-fd700000
enp14s0f1 Link encap:Ethernet HWaddr 00:15:17:4a:94:26
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:3910 errors:0 dropped:1 overruns:0 frame:0
TX packets:2548 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:497874 (497.8 KB) TX bytes:838297 (838.2 KB)
Interrupt:17 Memory:fd6a0000-fd6c0000
..........
2. As I had bonding preconfigured before I ran sudo apt install --reinstall ifenslave
3. Checked if bonding is loaded at boot sudo nano /etc/modules
loop
lp
bonding
NOTE: I remove rtc as it is depreciated in 16.04 lts and I like a clean boot
4. Stopped networking in my case I use sudo /etc/init.d/networking stop
5. Edited the interfaces /etc/network/interfaces with the bond as follows. Note that you need to change the interfaces name with yours, including the ips
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto enp10s0f0
iface enp10s0f0 inet manual
bond-master bond0
# The second network interface
auto enp10s0f1
iface enp10s0f1 inet manual
bond-master bond0
# The third network interface
auto enp14s0f0
iface enp14s0f0 inet manual
bond-master bond0
# The forth network interface
auto enp14s0f1
iface enp14s0f1 inet manual
bond-master bond0
# The bond master network interface
auto bond0
iface bond0 inet static
address xxx.xxx.xxx.xxx
netmask xxx.xxx.xxx.xxx
network xxx.xxx.xxx.xxx
broadcast xxx.xxx.xxx.xxx
gateway xxx.xxx.xxx.xxx
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers xxx.xxx.xxx.xxx
dns-search yourdomain.com
bond-mode 4
bond-miimon 100
bond-slaves all
6. Reloaded the kernel bond module sudo modprobe bonding
7. Created a bonding configuration /etc/modprobe.d/bonding.conf
with
alias bond0 bonding
options bonding mode=4 miimon=100 lacp_rate=1
8. Restarted the network, in my case I use sudo /etc/init.d/networking restart
9. Checked the bond cat /proc/net/bonding/bond0
10. Reboot to see if all holds up!
Best Answer
you need to put script to up/down interface to your
/etc/network/interface
fileubuntu is debian and this should helps you
Click here for Debian Networking Configuration
Bringing up an interface without an IP address
To create a network interface without an IP address at all use the manual method and use pre-up and post-down commands to bring the interface up and down.