实现linux操作系统的多网卡绑定
几种模式
mode=0 (round-robin)
mode=1 (active-backup)
mode=2 (balance-xor)
mode=3 (broadcast)
1. 首先需要彻底关闭NetworlManger 服务,否则会和bond网卡冲突
chkconfig NetworlMangeroff
modprobe bonding 调用
modinfo bonding 查看内存当中加载的模块
2 进入 /etc/sysconfig/network-scripts 文件下
编辑 ifcfg-eth0
vim ifcfg-eth0
编辑 ifcfg-eth1
vim ifcfg-eth1
3
建立编辑ifcfg-bond0文件
cp ifcfg-eth0 ifcfg-bond0
vim ifcfg-bond0
4 编辑模块的配置文件
vim /etc/modprobe.conf
5 放入开机脚本
编辑 /etc/rc.local
vim /etc/rc.local
6 重启计算机
Init 6
7 查看内核当中的网卡绑定
Ifconfig |less
cat /proc/net/bonding/bond0
模式0
模式1
编辑 /etc/modprobe.conf
cat /proc/net/bonding/bond0