Dual NIC: eth0, eth1
VLan: vlan316
bond: Bind NIC eth0 and eth1 as bond1
There are three commonly used
mode = 0: load balancing mode, automatic backup, but need to "Switch" support.
mode = 1: automatic backup mode, wherein if a line break, the other line will be automatically backup.
mode = 6: load balancing mode, automatic backup.
First, the installation packages associated Vlan
# apt-get install vlan ifenslave
Second, load modules
# modprobe 8021q
# echo "8021q" >> /etc/modules
# echo "bonding" >>/etc/modules
Third, the configuration bond
# Vim / etc / network / interfaces add the following:
auto bond1
iface bond1 inet manual
bond-mode 1
bond-miimon 100
bond_xmit_hash_policy layer2+3
bond_lacp_rate slow
slaves eth0 eth1
Fourth, and bind IP configuration Vlan
#vim / etc / network / interfaces add the following:
auto vlan314
iface vlan314 inet static
vlan_raw_device bond1
address 10.172.1.226
netmask 255.255.255.224
#添加路由
up ip route add 114.114.114.114 via 10.172.1.254
down ip route del 114.114.114.114 via 10.172.1.254
Reproduced in: https: //my.oschina.net/kztxt/blog/3057872