rendered paste body# The loopback network interface
auto lo
iface lo inet loopback
# The external network interface assumes that eth0 and eth1 are the bond0
auto bond0
iface bond0 inet manual
pre-up ifconfig bond0 up
post-up ifenslave bond0 eth0 eth1 && echo eth0 > /sys/class/net/bond0/bonding/primary
pre-down ifenslave -d bond0 eth0 eth1
post-down ifconfig bond0 down
# primary network interface with xenbr0 bridge
auto xenbr0
iface xenbr0 inet static
bridge_ports bond0
bridge_stp off
bridge_fd 0
pre-up /usr/local/scripts/wait-for-file -t 90 /sys/class/net/eth0
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
# secondary network interface assumes that eth1 and eth2 are the bond1 without bridge
auto bond1
iface bond1 inet static
address 192.168.2.1
netmask 255.255.255.0
post-up ifenslave bond1 eth2 eth3 && echo eth2 > /sys/class/net/bond1/bonding/primary
pre-down ifenslave -d bond1 eth2 eth3