LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1237|回复: 3

slackware10.1下怎么配置双网卡绑定啊

[复制链接]
发表于 2005-9-22 10:26:40 | 显示全部楼层 |阅读模式
我有一台双intel网卡的机器,现在想玩双网卡绑定的实验,可是网上的文章都是介绍redhat下做的,slackware的文档真难找啊
发表于 2005-9-22 18:20:18 | 显示全部楼层
一样的。不分版本。下面是我在dell 2850上。4块e1000.
升级内核到2.4.31编好网卡绑定模块bond。
>需要手工做的。1.编辑/etc/modules.conf加入下面两行alias bond0 bonding
>options bond0 miimon=100 mode=0
>
>2.编辑起动文件加入下面几行
ifconfig bond0 192.168.3.29 netmask 255.255.255.0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
ifenslave bond0 eth2
ifenslave bond0 eth3
>route add default gw 192.168.3.198
>重起后dmesg看到以下信息即说明已生效
>Ethernet Channel Bonding Driver: v2.6.0 (January 14, 2004)
>bonding: MII link monitoring set to 100 ms
>bonding: bond0: enslaving eth0 as an active interface with a down link.
>bonding: bond0: enslaving eth1 as an active interface with a down link.
>e1000: eth0: e1000_watchdog: NIC Link is Up 100 Mbps Full Duplex
>bonding: bond0: enslaving eth2 as an active interface with a down link.
>bonding: bond0: enslaving eth3 as an active interface with a down link.
>bonding: bond0: link status definitely up for interface eth0.
>执行lsmod 可以看到 lsmod
>Module                  Size  Used by    Not tainted
>bonding                57640   1  (autoclean)
>ifconfig -a会看到bond0     Link encap:Ethernet  HWaddr 00:14:22:0E:08:57  
>          inet addr:192.168.3.29  Bcast:192.168.3.255  Mask:255.255.255.0
>          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
>          RX packets:2026 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:285 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:0
>          RX bytes:309303 (302.0 Kb)  TX bytes:80531 (78.6 Kb)
>
>eth0      Link encap:Ethernet  HWaddr 00:14:22:0E:08:57  
>          inet addr:192.168.3.29  Bcast:192.168.3.255  Mask:255.255.255.0
>          UP BROADCAST NOTRAILERS RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
>          RX packets:2026 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:285 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:309303 (302.0 Kb)  TX bytes:80531 (78.6 Kb)
>          Base address:0xecc0 Memory:dfae0000-dfb00000
>
>eth1      Link encap:Ethernet  HWaddr 00:14:22:0E:08:58  
>          inet addr:192.168.3.29  Bcast:192.168.3.255  Mask:255.255.255.0
>          UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
>          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>          Base address:0xdcc0 Memory:df8e0000-df900000
>
>eth2      Link encap:Ethernet  HWaddr 00:04:23:B9:F8:86  
>          inet addr:192.168.3.29  Bcast:192.168.3.255  Mask:255.255.255.0
>          UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
>          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>          Base address:0xccc0 Memory:df5e0000-df600000
>
>eth3      Link encap:Ethernet  HWaddr 00:04:23:B9:F8:87  
>          inet addr:192.168.3.29  Bcast:192.168.3.255  Mask:255.255.255.0
>          UP BROADCAST SLAVE MULTICAST  MTU:1500  Metric:1
>          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>          collisions:0 txqueuelen:1000
>          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
>          Base address:0xcc80 Memory:df5c0000-df5e0000
>
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-9-23 12:57:02 | 显示全部楼层
我已经做成功了,谢谢!!!
不过我的slackware系统里没有ifenslave,只好自己编译了一个
#cd /usr/src/linux/Documentation/networking
#gcc -O2 -s -o ifenslave ifenslave.c
#cp  ifenslave /sbin/
回复 支持 反对

使用道具 举报

发表于 2005-9-24 00:18:48 | 显示全部楼层
太酷了!
多谢,我回头也试验一下。
这样是不是四条线那个断了都没有关系,只要有一条保持连接?
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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