How to install the NIC driver in CentOS

Source: Internet
Author: User
My centos5.5 NIC driver is r8169, and the latest driver is r8168 on the official website. This makes me feel weird. doesn't r8169 represent the driver version, or r8169 is not officially developed. Just in case. The following describes how to replace the NIC driver instance in centos5.5. 1. view the Nic model and machine number of digits. 1. view the Nic model. in linux, run the following command to view the NIC driver information: [root @ localhostzhangy] #

My centos 5.5 NIC driver is r8169, and the latest driver is r8168 on the official website. This makes me feel weird. doesn't r8169 represent the driver version, or r8169 is not officially developed. Just in case. The following describes how to replace the NIC driver instance in centos5.5.

1. view the Nic model and machine count

1. view the Nic model

In linux, run the following command to view the current NIC driver information;


[Root @ localhost zhangy] # lspci | grep-I eth

. 0 Ethernet controller: Realtek semiconduco., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)


2. view the machine count

The driver must distinguish whether the system is a 32-bit system or a 64-bit system. Therefore, you can know the number of digits of the operating system through the following linux commands;


[Root @ localhost ~] # Uname-

Linux localhost. localdomain 2.6.18-308.13.1.el5PAE #1 SMP Tue Aug 21 17:50:26 EDT 2012 i686 i686 i386 GNU/Linux


Check your NIC driver before downloading it. if it is the latest, you do not need to reinstall it.


[Root @ localhost zhangy] # ethtool-I eth0

Driver: r8169

Version: 2.3LK-1-NAPI

Firmware-version:

Bus-info:. 0


RTL8111/8168B is the network card model, so you can find the network card driver model to find the official website, and then download the latest network card driver, the driver is divided into 64-bit and 32-bit, i386, i686 is a 32-bit machine, and x86_64 indicates a 64-bit machine. do not select the wrong driver.

2. download and install the driver

1. extract


[Root @ localhost download] # tar jxvf r8168-8.032.00.tar.bz2


2. Installation


[Root @ localhost r8168-8.032.00] # make & make install


If the following error is reported:

Make-C/lib/modules/2.6.18-308.2.el5pae/build SUBDIRS =/home/zhangy/r8168-8.032.00/src INSTALL_MOD_DIR = kernel/drivers/net modules_install
Make: ***/lib/modules/2.6.18-308.8.2.el5PAE/build: the file or directory does not exist. Stop.
Make: *** [install] error 2

The kernel source code is not installed. Install the kernel source code


[Root @ localhost r8168-8.032.00] # yum install kernel-xen-devel kernel \
> Kernel-PAE-devel kernel-headers


After installation, you must restart the machine. Otherwise, the following operation will fail. FATAL: Module r8168 not found will be reported.


[Root @ localhost r8168-8.032.00] # depmod-

[Root @ localhost r8168-8.032.00] # modprobe r8168


Edit the configuration file/etc/modprobe. cof. If alias eth0 r8168 is not added before, change it to alias eth0 r8168.

Check whether the driver is loaded. if the following content is displayed, the driver is successfully installed.


[Root @ localhost r8168-8.032.00] # lsmod | grep r8168
R8168 231132 0


You must restart the machine and use ethtool to view the driver. The following is a new driver.


[Root @ localhost ~] # Ethtool-I eth0

Driver: r8168

Version: 8.032.00-NAPI

Firmware-version:

Bus-info:. 0


When I checked the information on the internet, someone said that I had to reconfigure the network after updating the NIC driver, but I did not reconfigure the network because the network configuration file had not changed, the network is also normal.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.