dell-R720服务器(Centos6.5)双网卡绑定

分类:CentOS教程 阅读:81749 次

系统环境:

操作系统:Centos 6.5 x64

服务器:Dell R720

操作步骤:

1、从DELL官网下载网卡驱动

Bcom_LAN_14.1.0_LinuxR5S10_DKMS_A01.tar.gz(网卡驱动)

dkms-2.2.0.3-1.noarch.rpm (dkms)

2、安装驱动

#rpm -ivh dkms-2.2.0.3-1.noarch.rpm

#tar zxvf Bcom_LAN_14.1.0_LinuxR5S10_DKMS_A01.tar.gz

#cd Bcom_LAN_14.1.0_LinuxR5S10_DKMS_A01/NetXtremeII

#rpm -ivh betxtreme-2-5.0.17-1.dkms.noarch.rpm

3.驱动安装后输入下面命令检查模块是否加载,如果没有就手动加载

#lsmod |grep bnx2 查看是否加载

#modprobe bnx2 手动加载

#lsmod |grep bnx2 再次查看是否加载

4.如果重启后服务器不自动加载,那么修改:

# vi /etc/rc.local(在最后添加)

ifenslave bond0 em1 em2

5.配置网卡(注意先备份各网卡配置信息)

1)备份:#cp ifcfg-em1 ifcfg-em1.bak

#cp ifcfg-em1 ifcfg-em2.bak

2)然后修改各网卡信息

#cp ifcfg-em1 ifcfg-bond0

#cat ifcfg-bond0(ip根据实际情况而定)

BOOTPROTO=none

DEVICE=bond0

ONBOOT=yes

IPADDR=192.168.104.188

NETMASK=255.255.255.0

GATEWAY=192.168.104.1

USERCTL=no

TYPE=Ethernet

IPV6INIT=no

#cat ifcfg-em1

BOOTPROTO=none

DEVICE=em1

ONBOOT=yes

MASTER=bond0

SLAVE=yes

USERCTL=no

TYPE=Ethernet

IPV6INIT=no

#cat ifcfg-em2

BOOTPROTO=none

DEVICE=em2

ONBOOT=yes

MASTER=bond0

SLAVE=yes

USERCTL=no

TYPE=Ethernet

IPV6INIT=no

6.修改配置信息

#vi /etc/modprobe.d/disk.conf 在最后一行添加如下:

alias bond0 bonding

options bond0 mode=1 (0为负载,1为冗余) miimon=100(每100ms检查一次链路状态)

7.检查内存中是否有bonding模块。如果没有则命令添加

#lsmod |grep bonding

#modprobe bonding

8.关闭NetworkManager 服务

#service NetworkManager stop

#chkconfig NetworkManager off

9.重启网络服务

#service network restart

或者:#ifconfig em1 up

#ifconfig em2 up

#ifconfig bond0 up

10.检查是否成功

1)ifconfig 成功的话显示的内容是bond0和em1、em2网卡的MAC地址是一样的

2)# cat /proc/net/bonding/bond0

Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: fault-tolerance (active-backup)

Primary Slave: None

Currently Active Slave: eth0 // eth0主模式

MII Status: up

MII Polling Interval (ms): 100

Up Delay (ms): 0

Down Delay (ms): 0

Slave Interface: em1

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:0c:29:c9:6d:18

Slave queue ID: 0

Slave Interface: em2

MII Status: up

Speed: 1000 Mbps

Duplex: full

Link Failure Count: 0

Permanent HW addr: 00:0c:29:c9:6d:22

Slave queue ID: 0