免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1345 | 回复: 3
打印 上一主题 下一主题

[网络管理] redhat bonding 问题求助 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-11-25 13:51 |只看该作者 |倒序浏览
1台服务器很多个网卡,用其中4个网口做两个bonding,分别是bond0和bond1,两个网口做bond0,两个网口做bond1,都是mode=1的模式,但是实际配置完成之后,连在bond0的两个网口都可以ping通共享的ip,但bond1的两个网口都ping不通。
请问各位有在一台服务器上配过两个ip bonding的情况吗?
  1. 1.        Set config file
  2. Notes: Please back the ifcfg-ethx before change them.
  3. ---Create bonding  file
  4. /etc/sysconfig/network-scripts/ifcfg-bond0
  5. [root@sca network-scripts]# more ifcfg-bond0
  6. DEVICE=bond0
  7. BOOTPROTO=none
  8. BROADCAST=147.128.20.239
  9. IPADDR=147.128.20.238
  10. NETMASK=255.255.255.224
  11. NETWORK=147.128.20.224
  12. ONBOOT=yes
  13. TYPE=Ethernet
  14. GATEWAY=147.128.20.225
  15. USERCTL=no

  16. --Modify eth2
  17. /etc/sysconfig/network-scripts/ifcfg-eth2
  18. [root@sca network-scripts]# more ifcfg-eth2
  19. DEVICE=eth2
  20. BOOTPROTO=none
  21. ONBOOT=yes
  22. MASTER=bond0
  23. SlAVE=yes
  24. USERCTL=no

  25. Notes: can not
  26. ---Modify eth3
  27. /etc/sysconfig/network-scripts/ifcfg-eth3
  28. [root@sca network-scripts]# more ifcfg-eth3
  29. DEVICE=eth3
  30. #HWADDR=AC:16:2D:89:FE:63
  31. BOOTPROTO=none
  32. ONBOOT=yes
  33. USERCTL=no
  34. MASTER=bond0
  35. SLAVE=yes

  36. 2.        Modify modprobe related files and mount bonding
  37. Create a file /etc/modprobe.d/bond0.conf
  38. [root@sca modprobe.d]# more bond0.conf
  39. alias bond0 bonding
  40. options bonding mode=1 miimon=200

  41. 3.        Mount the bonding module
  42. [root@sca modprobe.d]# modprobe bonding
  43. Check file content:
  44. [root@sca bonding]# more /sys/class/net/bond0/bonding/mode
  45. active-backup 1
  46. [root@sca bonding]# lsmod | grep bonding
  47. bonding               125610  0
  48. ipv6                  322029  161 bonding,ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6

  49. 4.        Stop NetworkManager, this step is very import.
  50. It will down eth0,eth1 and bonding configuration will take effect after restart network service.
  51. [root@sca bonding]# service NetworkManager stop
  52. Stopping NetworkManager daemon:                            [  OK  ]

  53. 5.        Restart network
  54. [root@sca bonding]# service network restart
复制代码

论坛徽章:
0
2 [报告]
发表于 2014-11-25 13:55 |只看该作者
还有一个问题,就是直连这两个网口ping这个bonding的ip可行吗?

论坛徽章:
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
3 [报告]
发表于 2014-11-25 14:14 |只看该作者
在一个服务器配置多个bonding很常见的

关于你配置的文件,建议看看官方的手册,不同版本的配置稍微有点点不同

如果一个可用,一个不可用,用交换的方式试试,比如拔掉其中一个bonding的两个网卡的网线,看看另外一个

论坛徽章:
0
4 [报告]
发表于 2015-02-27 16:29 |只看该作者
数据量不大,用mode1比0和6合适吧?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP