双网卡绑定

双网卡绑定
两块或以上物理网卡:
[root@myrhel ~]# ifconfig -a


[root@myrhel ~]# lspci |grep Eth
02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
02:05.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)


关闭NetworkManager
[root@myrhel ~]# service NetworkManager stop
Stopping NetworkManager daemon: [  OK  ]
开机不启动NetworkManager
[root@myrhel ~]# chkconfig NetworkManager off


主卡配置文件:
cd /etc/sysconfig/network-scripts/


cp ifcfg-eth0 ifcfg-bond0


vim ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
DNS1=192.168.0.254
GATEWAY=192.168.0.254
IPADDR=192.168.0.123
NETMASK=255.255.255.0
ONBOOT=yes
BONDING_OPTS="mode=1 miimon=100"   //mode  模式0 轮循  模式1 主备份  模式3 广播 模式4 802.3ad 链路聚合  miiloon=100 每100毫秒检查一次网卡状态

vim ifcfg-eth0 物理卡1配置文件
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
cat ifcfg-eth1 物理卡2配置文件
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes

cd /etc/modprobe.d/
touch bonding.conf
  vim bonding.conf 逻辑卡bond0的内核模块驱动
alias bond0 bonding


service network restart                 重启网络

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值