Skip to content

Instantly share code, notes, and snippets.

@dubcl
Last active June 29, 2017 21:57
Show Gist options
  • Save dubcl/0af63c80669956d5c1a6464ba667dcc6 to your computer and use it in GitHub Desktop.
Save dubcl/0af63c80669956d5c1a6464ba667dcc6 to your computer and use it in GitHub Desktop.
# apt-get install ifenslave
# echo "alias bond0 bonding" > /etc/modprobe.d/alias-bond.conf
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto eth0
allow-hotplug eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask 255.255.255.0
network xxx.xxx.xxx.0
broadcast xxx.xxx.xxx.255
gateway xxx.xxx.xxx.1
dns-nameservers 8.8.8.8
dns-search example.com
auto bond0
iface bond0 inet manual
bond_mode balance-tlb
bond_primary eth1
bond_slaves eth1 eth2
bond_miimon 100
bond_downdelay 400
bond_updelay 800
auto br1
iface br1 inet manual
bridge_ports bond0
bridge_stp off
bridge_fd 0.0
auto br2
iface br2 inet manual
bridge_ports eth3
bridge_stp off
bridge_fd 0.0
####################
# ALTERNATE CONFIG #
####################
auto br1
iface br1 inet manual
bridge_ports bond0
bridge_stp off
bridge_fd 0.0
pre-up ifup bond0
post-down ifdown bond0
iface bond0 inet manual
bond_slaves eth1 eth2
bond_primary eth1
bond_mode balance-tlb
bond_miimon 100
bond_downdelay 400
bond_updelay 800
####################
brctl show
bridge name bridge id STP enabled interfaces
br1 8000.0894ef3c19a2 no bond0
br2 8000.0894ef3c19a4 no eth3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment