QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 431|回复: 0

原创:在RedHat Linux 8.0环境中实现双网卡绑定

[复制链接]
发表于 2003-11-24 18:27:41 | 显示全部楼层 |阅读模式
环境:
OS: redhat 8.0

1. #cd /etc/sysconfig/network-scripts
# cp ifcfg-eth0 ifcfg-bond0
----------------------------------------------------------------

2 #vi ifcfg-bond0
将第一行改成 DEVICE=bond0
----------------------------------------------------------------

3 # vi /etc/modules.conf
加入两行
alias bond0 bonding
options bond0 miimon=100 mode=1

----------------------------------------------------------------

4 # vi /etc/rc.d/rc.local
加入两行
ifenslave bond0 eth0 eth1
route add -net 192.168.0.0 netmask 255.255.255.0 bond0

----------------------------------------------------------------

5 reboot

重启会看见:
................
Bringing up interface bond0 OK
Bringing up interface eth0 OK
Bringing up interface bond1 OK

----------------------------------------------------------------

6. 检查:
#netstat -r
192.168.0.0 255.255.255.0 0 40 0 0 bond0
192.168.0.0 255.255.255.0 0 40 0 0 eth0
192.168.0.0 255.255.255.0 0 40 0 0 eth1
这时候看看你的网卡后面的灯, 他们闪的频率是一样的.OK.
当#ifdown eth0 时, 转换有5-6秒的延时.
----------------------------------------------------------------
注意:
如果网络不通需要从启bind
# ifdown bind0
#ifup bind0
网卡绑定用在vncserver 或scp中就不灵了

祝大家绑定成功!!!!有问题多交流.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-9-30 17:36 , Processed in 0.043151 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表