Skip to content

Instantly share code, notes, and snippets.

@Jerry-Fix
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save Jerry-Fix/9343037 to your computer and use it in GitHub Desktop.

Select an option

Save Jerry-Fix/9343037 to your computer and use it in GitHub Desktop.
Ubuntu&RHEL bonding network config template
# yum install ifenslave iputils
# apt-get install ifenslave
# cat /etc/modprobe.d/bonding.conf
alias bond0 bonding
options bonding mode=6 miimon=100 downdelay=200 updelay=200
Ubuntu
# cat /etc/network/interfaces
auto eth0
iface eth0 inet manual
bond-master bond0
auto eth1
iface eth1 inet manual
bond-master bond0
auto bond0
iface bond0 inet static
address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.254
dns-nameservers 192.168.1.254
bond-slaves none
#bond-mode 6
#bond-miimon 100
#bond-use_carrier 1
#bond-downdelay 200
#bond-updelay 200
#bond-lacp-rate 0
#bond-xmit_hash_policy layer2+3 # layer3-4 is not fully 802.3ad compliant
RHEL:
# cat ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.1.2
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
NM_CONTROLLER=no
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
NOZEROCONF=yes
# cat ifcfg-em1
DEVICE=em1
USERCTL=no
ONBOOT=yes
NM_CONTROLLER=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
NOZEROCONF=yes
# cat ifcfg-em2
DEVICE=em2
USERCTL=no
ONBOOT=yes
NM_CONTROLLER=no
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
NOZEROCONF=yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment