Skip to content

Instantly share code, notes, and snippets.

@roflmao
Created November 26, 2014 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roflmao/1b615120d6bddbe0821a to your computer and use it in GitHub Desktop.
Save roflmao/1b615120d6bddbe0821a to your computer and use it in GitHub Desktop.
#eth0 is manually configured, and slave to the "bond0" bonded NIC
auto eth0
iface eth0 inet manual
bond-master bond0
bond-primary eth0
#eth1 ditto, thus creating a 2-link bond.
auto eth1
iface eth1 inet manual
bond-master bond0
# bond0 is the bonding NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
auto bond0
iface bond0 inet static
address 192.168.1.10
gateway 192.168.1.1
netmask 255.255.255.0
bond-mode active-backup
bond-miimon 100
bond-slaves none
@ingardm
Copy link

ingardm commented Nov 26, 2014

auto bond0 eth0 eth1 lo

allow-hotplug bond0 eth0 eth1 lo

iface lo inet loopback

iface eth0 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down
bond-master bond0

iface eth1 inet manual
pre-up ifconfig $IFACE up
post-down ifconfig $IFACE down
bond-master bond0

iface bond0 inet static
address 10.0.30.25
network 10.0.0.0
netmask 255.255.0.0
gateway 10.0.0.2
dns-nameservers 10.0.50.111
dns-search site-000.jotta.no
bond-lacp-rate slow
bond-mode 802.3ad
bond-updelay 200
bond-miimon 100
bond-downdelay 200
bond-xmit-hash-policy layer3+4
bond-slaves none
bond-primary-reselect always

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment