免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3262 | 回复: 10

[网络管理] 双网卡绑定的问题,头大! [复制链接]

论坛徽章:
0
发表于 2012-06-21 15:54 |显示全部楼层
需求eth0 eth1绑定实现fail over,可是设置了半天始终不行,只要一拔掉eth0网络立刻断掉
好像eth1压根没起上作用
# uname -a
Linux redhat1.tools.com 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
#more ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
BROADCAST=192.168.0.255
IPADDR=192.168.0.190
NETMASK=255.255.255.0
ONBOOT=yes
#GATEWAY=192.168.0.15
TYPE=Ethemet
USERCTL=no
bonding_ops="mode=1 miimon=100"

# more ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

# more ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no

# more bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 200

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: 1
Permanent HW addr: 00:1a:64:dc:45:18

Slave Interface: eth1
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:1a:64:dc:45:1a
[root@redhat1 bonding]# pwd
/proc/net/bonding

论坛徽章:
0
发表于 2012-06-21 15:56 |显示全部楼层
# more modprobe.conf
alias eth0 bnx2
alias eth1 bnx2
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptsas
alias scsi_hostadapter2 ata_piix
alias scsi_hostadapter3 lpfc
alias bond0 bonding
options bond0 miimon=100 mode=1
[root@redhat1 etc]# pwd
/etc

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
发表于 2012-06-21 16:10 |显示全部楼层
绑定设定有问题。看看此贴 http://bbs.chinaunix.net/thread-3754507-1-1.html

论坛徽章:
0
发表于 2012-06-21 16:12 |显示全部楼层
我有写啊
#more ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
BROADCAST=192.168.0.255
IPADDR=192.168.0.190
NETMASK=255.255.255.0
ONBOOT=yes
#GATEWAY=192.168.0.15
TYPE=Ethemet
USERCTL=no
bonding_ops="mode=1 miimon=100"

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
发表于 2012-06-21 16:17 |显示全部楼层
cat /proc/net/bonding/bond0

贴出结果

论坛徽章:
0
发表于 2012-06-21 16:20 |显示全部楼层
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 200

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: 1
Permanent HW addr: 00:1a:64:dc:45:18

Slave Interface: eth1
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:1a:64:dc:45:1a
[root@redhat1 etc]#

论坛徽章:
0
发表于 2012-06-21 16:21 |显示全部楼层
ifconfig -a
bond0     Link encap:Ethernet  HWaddr 00:1A:64C:45:18  
          inet addr:192.168.0.190  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21a:64ff:fedc:4518/64 Scope:Link
          UP BROADCAST RUNNING MASTER MULTICAST  MTU:1500  Metric:1
          RX packets:14339 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5296 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1523319 (1.4 MiB)  TX bytes:528981 (516.5 KiB)

eth0      Link encap:Ethernet  HWaddr 00:1A:64C:45:18  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:9424 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5290 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:761484 (743.6 KiB)  TX bytes:528597 (516.2 KiB)
          Interrupt:233 Memory:f2000000-f2012100

eth1      Link encap:Ethernet  HWaddr 00:1A:64C:45:18  
          UP BROADCAST RUNNING SLAVE MULTICAST  MTU:1500  Metric:1
          RX packets:4915 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:761835 (743.9 KiB)  TX bytes:384 (384.0 b)
          Interrupt:193 Memory:f4000000-f4012100

论坛徽章:
13
技术图书徽章
日期:2014-04-29 14:15:42IT运维版块每日发帖之星
日期:2015-12-12 06:20:00IT运维版块每日发帖之星
日期:2015-08-30 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-08-02 06:20:002015年亚洲杯之澳大利亚
日期:2015-04-03 15:03:12申猴
日期:2015-03-20 09:00:292015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15季节之章:冬
日期:2015-01-20 17:08:47双子座
日期:2014-11-21 16:30:31技术图书徽章
日期:2014-07-11 16:29:08
发表于 2012-06-21 16:30 |显示全部楼层
把模式修改为6,然后将重启网络服务,测试看看

论坛徽章:
0
发表于 2012-06-21 16:40 |显示全部楼层
没用,测试了,不行,一样的结果
eth1还是起不到作用

论坛徽章:
0
发表于 2012-06-21 16:41 |显示全部楼层
我在网上看到有人说linux下的接管时间会比较长,有多长?是这个原因吗?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP