| 论坛注册| 加入收藏 | 设为首页| RSS
Google
您当前的位置:首页 > Linux频道 > Linux入门与提高 > 安装与配置

CentOS双网卡bond绑定

时间:2008-02-15 10:11:54  来源:Linux联盟收集整理  作者:
新建文件:/etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0 YeWLinux联盟
ONBOOT=yes YeWLinux联盟
BOOTPROTO=static YeWLinux联盟
IPADDR=192.168.7.242 YeWLinux联盟
NETMASK=255.255.255.0 YeWLinux联盟
NETWORK=192.168.7.0 YeWLinux联盟
BROADCAST=192.168.7.255
GATEWAY=192.168.7.1 
修改网卡配置文件:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes YeWLinux联盟
BOOTPROTO=static YeWLinux联盟
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
ONBOOT=yes YeWLinux联盟
BOOTPROTO=static YeWLinux联盟
修改/etc/modprobe.conf,在最后面加入以下两行:
alias bond0 bonding YeWLinux联盟
options bond0 miimon=100 mode=0
修改/etc/rc.d/rc.local,在最后面加入以下行:
ifenslave bond0 eth0 eth1
 
设置完成后重起启动。
 
说明:
miimon=100
miimon 是指多久時間要檢查網路一次,單位是ms(毫秒)
這邊的100,是100ms,即是0.1秒 YeWLinux联盟
意思是假設其中有一條網路斷線,會在0.1秒內自動備援
mode 共有七種(0~6) YeWLinux联盟
mode=0:平衡負載模式,有自動備援,但需要"Switch"支援及設定。 YeWLinux联盟
mode=1:自動備援模式,其中一條線若斷線,其他線路將會自動備援。 YeWLinux联盟
mode=6:平衡負載模式,有自動備援,不需要"Switch"支援及設定。 YeWLinux联盟
也就是一般的Switching Hub就可以了!
来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目更新
栏目热门