网卡如何做bond6
网卡绑定就是多张网卡逻辑上作为一张网卡用。可分为,负载均衡绑定和冗余绑定两种。
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=em1
HWADDR=44:A8:42:25:7C:FE
BOOTPROTO=none
ONBOOT=yes
SLAVE=yes
MASTER=bond0
TYPE=Ethernet
vi /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=em4
HWADDR=44:A8:42:25:7D:01
BOOTPROTO=none
ONBOOT=yes
SLAVE=yes
MASTER=bond0
TYPE=Ethernet
vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
IPADDR=119.169.4.44
NETMASK=255.255.255.224
GATEWAY=119.169.4.62
TYPE=Ethernet
vi /etc/modprobe.d/dist.conf 在最后添加下面2行
alias bond0 bonding
options bond0 miimon=100 mode=6
也可以用下面的命令添加
sed -i '$a alias bond0 bonding' /etc/modprobe.d/dist.conf
sed -i '$a options bond0 miimon=100 mode=6' /etc/modprobe.d/dist.conf