您的位置:首页 > 运维架构 > Linux

Centos 双网卡绑定

2016-03-24 00:00 549 查看
[root
@Study ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=none USERCTL=no MASTER=bond0 SLAVE=yes [root
@Study ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 ONBOOT=yes BOOTPROTO=none USERCTL=no MASTER=bond0 SLAVE=yes [root
@Study ~]# [root
@Study ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 ONBOOT=yes BOOTPROTO=none IPADDR=192.168.61.101 NETMASK=255.255.255.0 GATEWAY=192.168.61.2 [root
@Study ~]# 这时候网卡绑定还没有生效,需要进行模块加载 [root@root ~]# cd /etc/modprobe.d/ 切换到modprobe.d目录下 [root@root ~modprobe.d]#vi dist.conf #加载bonding模块,对外虚拟网络接口设备为bond0,在最后加入以下2行 alias bond0 bonding options bond0 mode=6 miimon=100 模式6,为发送接收都能自动的负载均衡 模式1 为,active/standby 模式
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: