一、驱动下载地址:
下载地址1:
下载地址2:
http://fichiers.touslesdrivers.com/34178/alx-linux-v2.0.0.6.rar
二、安装步骤:
1.获取网卡名称:
[root@master ~]# lspci | grep Ethernet
00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-V (rev 04)
02:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 10)
2.修改CentOS-Base.repo文件(yum rar包需要):
[root@master ~]# vi /etc/yum.repos.d/CentOS-Base.repo
在文件末尾加入:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
2.yum软件包:
[root@master ~]# yum -y install pciutils rar make gcc gcc-c++ kernel-devel
[root@master ~]# rpm -ivh http://elrepo.org/linux/elrepo/el6/x86_64/RPMS/elrepo-release-6-5.el6.elrepo.noarch.rpm
[root@master ~]# yum --enablerepo=elrepo-testing install kmod-alx
[root@master ~]# cd /lib/modules/2.6.32-358.el6.x86_64
3.修改链接目录:
[root@master 2.6.32-358.el6.x86_64]# rm -rf build
[root@master 2.6.32-358.el6.x86_64]# ln -s ../../../usr/src/kernels/2.6.32-358.18.1.el6.x86_64 build
[root@master 2.6.32-358.el6.x86_64]# cd ..
[root@master modules]# ln -s 2.6.32-358.el6.x86_64 2.6.32-358.18.1.el6.x86_64
4.编译安装驱动:
[root@master modules]# cd
[root@master ~]# mkdir alx-linux-v2.0.0.6
[root@master ~]# mv alx-linux-v2.0.0.6.rar alx-linux-v2.0.0.6/
[root@master ~]# cd alx-linux-v2.0.0.6
[root@master alx-linux-v2.0.0.6]# rar x alx-linux-v2.0.0.6.rar
[root@master alx-linux-v2.0.0.6]# make
[root@master alx-linux-v2.0.0.6]# make install
4.添加alx.ko驱动:
[root@master alx-linux-v2.0.0.6]# cd /lib/modules/2.6.32-358.el6.x86_64
[root@master 2.6.32-358.el6.x86_64]# echo "alx.ko" >> modules.networking
[root@master 2.6.32-358.el6.x86_64]# modprobe alx
[root@master 2.6.32-358.el6.x86_64]# lsmod | grep alx
alx 90622 0
[root@master 2.6.32-358.el6.x86_64]# cd
[root@master ~]# reboot
其他:
双网卡情况要注意路由选择:
添加静态路由:
route add default gw IP
删除静态路由:
route del default gw IP