双网卡BONDING实验不成功,请指教

gdy1039 2009-03-14 11:17:41

,电脑是window xp, VMWARE6.5+redhat 4
做BONDING测试,一直不成功,请大家指点一下好吗?

[root@GDY ~]# uname -a
Linux GDY 2.6.9-5.EL #1 Wed Jan 5 19:22:18 EST 2005 i686 athlon i386 GNU/Linux

[root@GDY ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

[root@GDY ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

[root@GDY ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.15.12
NETMASK=255.255.255.0
NETWORK=192.168.15.0
BROADCAST=192.168.15.255
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

[root@GDY ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
IPADDR=192.168.15.12
NETMASK=255.255.255.0
NETWORK=192.168.15.0
BROADCAST=192.168.15.255
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

[root@GDY ~]# cat /etc/modprobe.conf
alias eth0 vmnics
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsih
alias snd-card-0 snd-ens1371
options snd-card-0 index=0
install snd-ens1371 /sbin/modprobe --ignore-install snd-ens1371 && /usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-ens1371 { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-ens1371
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
alias eth1 vmnics
# Added by VMware Tools
install pcnet32 /sbin/modprobe -q --ignore-install vmxnet;/sbin/modprobe -q --ignore-install pcnet32 $CMDLINE_OPTS;/bin/true
alias char-major-14 es1371
alias bond0 bonding
options bond0 mode=1 miimon=100

[root@GDY ~]# ifconfig bond0 192.168.15.12 up
[root@GDY ~]# ifenslave bond0 eth0 eth1
[root@GDY ~]# ifconfig
bond0 Link encap:Ethernet HWaddr 00:0C:29:34:E0:4B
inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:120 (120.0 b) TX bytes:0 (0.0 b)

eth0 Link encap:Ethernet HWaddr 00:0C:29:34:E0:4B
inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1 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:60 (60.0 b) TX bytes:0 (0.0 b)
Interrupt:10 Base address:0x2024

eth1 Link encap:Ethernet HWaddr 00:0C:29:34:E0:4B
inet addr:192.168.15.12 Bcast:192.168.15.255 Mask:255.255.255.0
UP BROADCAST RUNNING NOARP SLAVE MULTICAST MTU:1500 Metric:1
RX packets:1 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:60 (60.0 b) TX bytes:0 (0.0 b)
Interrupt:11 Base address:0x20a4

[root@GDY ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.0 (January 14, 2004)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:34:e0:4b

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:34:e0:55
[root@GDY ~]#

********************************************************************************

以上是我的配置,现在问题来了,就是当我在虚拟机上断开ETH0后,网络马上就会PING不通,如果只断开eth1,会时通时断
bonding对于断网没有任何返应,我试过mii-tool直接说不支持(可能因为1000M的关系吧),
ethtool没这么直接,ethtool也不能正确检测网络状态
以下是我断开ETH0之后一些信息
[root@GDY ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v2.6.0 (January 14, 2004)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up #注意这里,状态还是连接的
Link Failure Count: 0
Permanent HW addr: 00:0c:29:34:e0:4b

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:29:34:e0:55
[root@GDY ~]# ethtool eth0
Settings for eth0:
Supported ports: [ ]
Supported link modes:
Supports auto-negotiation: No
Advertised link modes: Not reported
Advertised auto-negotiation: No
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Link detected: yes #注意这里,状态还是连接的
[root@GDY ~]# mii-tool
SIOCGMIIPHY on 'eth0' failed: Operation not supported
SIOCGMIIPHY on 'eth1' failed: Operation not supported
no MII interfaces found
[root@GDY ~]#


*********************************************
我的问题:
1:我的配置有问题吗?出在哪里?
2:我试过ARP模式也不行,改换以下配置后启动bond0,网络跟本不通,为什么呢?
options bond0 mode=1 miimon=100
换成-->
options bond0 mode=1 arp_interval=300 arp_ip_target=192.168.15.1


谢谢各位


...全文
267 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

19,613

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧