1 编辑/etc/modprobe.conf
在/etc/modprobe.conf里加入如下两行:
alias bond0 bonding
options bond0 mode=1 miimon=100 use_carrier=0
2 创建bond0虚拟设备
vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=192.168.68.150
GATEWAY=192.168.68.254
3 配置 eth0 eth1
vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
vim /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
4 重启系统
转载于:https://www.cnblogs.com/ruiy/p/bonding.html
本文详细介绍了如何在Linux系统中通过编辑modprobe配置文件、创建bond0虚拟设备以及配置eth0、eth1网卡来实现双网卡绑定,从而达到冗余与负载均衡的目的。
220

被折叠的 条评论
为什么被折叠?



