RHEL配置多网卡9步精通

系统
通过详细的10个步骤,逐步的演示了RHEL配置多网卡的操作。并且进行了详细的解释和分析RHEL绑定多网卡的操作过程。

RHEL配置多网卡利用bonding可以实现将多张物理网卡绑定成一个虚拟的接口,这个虚拟的接口可以看作一个正常的网络接口,可以用这个接口为单位来进行网络通讯。

1、RHEL配置多网卡添加bonding driver,2.4.12以上的kernel默认都提供了。

如果没有,可以如下操作:

1)、make menuconfig,找到Bonding driver support

2)、install内核和模块

2、RHEL配置多网卡添加alias bond0 bonding到/etc/modprobe.conf,这样我们配置bond0接口的时候,bonding driver就会自动载入。

3、RHEL配置多网卡在/etc/sysconfig/network-scripts目录配置bond0,文件名为ifcfg-bond0。

内容如下

DEVICE=bond0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.248
GATEWAY=192.168.1.1

4、配置eth3,如下,eth4类似
DEVICE=eth3
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none

5、RHEL配置多网卡模块参数。
只用了
◆miimon:对link监控的周期,单位是ms,默认为0,建议为100
◆mode:bonding的策略,只要有负载均衡(0);主备(1)等
还有诸如arp_interval,max_bonds等参数

6、配置模块参数,我的配置如下
◆options bond0 miimon=100 mode=1

7、重启服务器,用ifconfig可以看到bond0

8、查看bond0状态
more /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: eth3
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth3
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:0c:76:26:2b:3d
Slave Interface: eth4
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:10:b5:b4:56:84

9、最后
1)、我本来想使用模式0,但是工作起来有些异常,发现同网段服务器的ping值在3-10ms之间,还伴随着丢包,如果用了模式1,ping值就会小于1ms,稳定而不丢包,不知道为什么。
2)、第一次使用的时候,如果用ping,可以看到(DUP!)的提示,应该是正常的,原因是:
This is not due to an error in the bonding driver, rather, it is a side effect of how many switches update their MAC forwarding tables. Initially, the switch does not associate the MAC address in the packet with a particular switch port, and so it may send the traffic to all ports until its MAC forwarding table is updated. Since the interfaces attached to the bond may occupy multiple ports on a single switch, when the switch (temporarily) floods the traffic to all ports, the bond device receives multiple copies of the same packet (one per slave device).

3)、也可以用ifenslave来实现RHEL配置多网卡

笔者在此文利用了10步骤来讲述了RHEL配置多网卡的操作过程。

【编辑推荐】

  1. RHEL 5.4实测:RHCE DNS搭建(1)
  2. RHEL 5中配置NIS服务器端及客户端(1)
  3. 红帽推集成虚拟化技术的RHEL Linux 5
  4. RHEL5下搭建DNS服务器
  5. RHEL5.4发布 红帽终极杀手锏
责任编辑:赵杰 来源: 博客园
相关推荐

2009-12-07 17:24:43

RHEL无线网卡

2009-10-10 15:54:55

RHEL 4配置Pos

2010-09-06 13:30:47

无线网卡

2023-05-24 11:56:06

RHEL 9DHCP服务器

2009-10-12 12:45:36

RHEL5 Squid

2020-11-18 10:06:18

Linux多网卡路由

2010-04-12 15:29:07

网卡配置

2011-04-22 14:22:01

RedHat网卡

2009-12-21 10:40:24

无线路由连接设置

2009-10-12 13:41:00

RHEL 内核

2009-10-21 16:40:43

Oracle用户表空间

2011-01-18 09:41:21

Linux网卡

2022-05-24 11:00:00

开源红帽RHEL 9

2022-11-17 09:52:12

RHEL 9Node.js

2009-08-26 16:56:49

Oracle访问Syb

2010-04-21 17:56:22

Unix网卡配置

2011-02-15 10:09:40

SELinuxRHEL5Web服务器

2022-06-11 17:55:02

RHEL 9系统运维

2022-04-22 21:13:49

AlmaLinuxLinuxLinux 发行版

2010-03-05 15:14:55

Ubuntu网络配置
点赞
收藏

51CTO技术栈公众号