[FrontPage] [TitleIndex] [WordIndex

This is a read-only archived version of wiki.centos.org

Realtek RTL8100E/RTL8101E/RTL8102E-GR NIC

All CentOS versions released after June 2008 include proper drivers for these chipsets so all the below information is obsolete. If run a recent CentOS version and you encounter issues with a Realtek wired network card, please consider installing the driver provided by Realtek and distributed as kmod by the ElRepo 3rd party repository. See https://wiki.centos.org/AdditionalResources/Repositories for details.


Starting with Centos 5.2 the stock kernel offers support for this chipset via the r8169 driver. If possible please consider using Centos 5.2 instead of any of the methods described below. However apparently the driver only works for some revisions of the network cards. For the problematic cases one of the methods described below must be used.

<<TableOfContents: execution failed [Argument "maxdepth" must be an integer value, not "[1]"] (see also the log)>>

1. Hardware

Any of the following 10/100M Fast Ethernet PCI Express NICs:

The r8101 driver is known to work on:

Realtek PCI-Express NIC Described here: Realtek RTL8100E/8101E/8102E-GR Datasheet

According to the chip manufacturer this driver supports some of the chips which previously required the r1000 driver ( which as of version r1000_v1.06 is only maintained for kernel 2.4 and most important does not always work correctly with the new chipsets. Therefore on the above mentioned hardware please always try to use the newer r8101 driver instead of r1000).

2. Problem

Correct driver is not included with the standard CentOS 4.5, 5.0 and 5.1 distributions.

3. Output of `lspci -v`

On an ECS 945GCT-M/133

02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E PCI Express Fast Ethernet controller (rev 01)
        Subsystem: Elitegroup Computer Systems Unknown device 8136
        Flags: bus master, fast devsel, latency 0, IRQ 177
        I/O ports at e800 [size=256]
        Memory at febff000 (64-bit, non-prefetchable) [size=4K]
        Expansion ROM at febc0000 [disabled] [size=128K]
        Capabilities: [40] Power Management version 2
        Capabilities: [48] Vital Product Data
        Capabilities: [50] Message Signalled Interrupts: 64bit+ Queue=0/1 Enable-
        Capabilities: [60] Express Endpoint IRQ 0
        Capabilities: [84] Vendor Specific Information

4. Solutions

There are a few ways to get the driver.

(1) Download and install the r8101 driver from Realtek's website at: Realtek Driver Download

Some direct links (newer versions might be available -- use the above link to check):

(2) As an alternative and simpler method, a dkms-enabled driver package can be downloaded from wolfy's site. Please follow the instructions available at http://wiki.centos.org/Repositories/RPMForge to install and activate the RPMForge repository. After that you can use the instructions from this quick install guide to install the package.

(3) As yet another alternative method, the driver may be downloaded as a kABI tracking kmod RPM package from the ELRepo repository (thanks to Alan for contributing these packages). Select the kmod package that matches your kernel and install it with:

rpm -ivh kmod-r8101*.rpm

This method offers the advantage of not requiring the driver to be compiled or rebuilt upon a kernel update and should work seamlessly across kernel updates via the weak-updates mechanism.

5. List of packages needed to install r1000/r8168/r8101

ArtWork/WikiDesign/icon-admonition-info.png

This section does not apply to the kmod packaged driver from solution (3) above.

Here is the full list of packages which must be installed in order to compile the driver from source.

Centos 5

Centos 4

Centos 3

Repository

Observation

binutils

binutils

binutils

standard

(1)

gcc

gcc

gcc

standard

(1)

glibc-devel

glibc-devel

glibc-devel

standard

(1)

glibc-headers

glibc-headers

glibc-headers

standard

(1)

kernel-headers

glibc-kernheaders

glibc-kernheaders

standard

(1)

kernel-devel

kernel-devel

kernel-source

standard

(1) (2)

make

make

make

standard

(1)

dkms

dkms

dkms

RPMForge

(3)

(1) standard = Base + Updates repositories.

(2)

(3) Only needed if installing dkms-r8101. You can check the state of the module any time using the command dkms status. The most interesting states are: added (the module has been successfully registered with the dkms system, but it has not been compiled) and installed (the module has also been successfully compiled).

6. Remotely Updating the Kernel

ArtWork/WikiDesign/icon-admonition-info.png

This section does not apply to the kmod packaged driver from solution (3) above.

When a NIC driver isn't included in the kernel, updating the kernel remotely can be a problem. A few extra steps can make this possible.

  1. Install the new kernel. Either from RPM or compiling a custom kernel. If installing from RPM, the associated kernel-devel package will also need to be installed.

  2. Do not reboot. The NIC driver hasn't been added to the new kernel yet. Rebooting now means an inactive NIC and a visit to the console.

  3. Go to the src directory of the r8101 source. Edit Makefile.

  4. Change the line
    KVER           := $(shell uname -r)
    to your newly installed kernel version. For example:
    KVER           := 2.6.22.9-MyCustomKernel
  5. Go back to the top directory of the r8168 source and recompile and install the driver:
    make all;

    This will overwrite any existing r8101.ko driver. If you want to keep the older driver, rename the existing file before compiling the new driver.

  6. Confirm that the driver was copied to the right place. For example:
    find /lib/modules/2.6.22.9-MyCustomKernel -name r8101.ko

    If you have two copies present, use modinfo to identify the older driver and delete or rename it before rebooting.

  7. Run:
    depmod -a 2.6.22.9-MyCustomKernel
  8. Update your bootloader configuration (usually /boot/grub/grub.conf) and reboot.

Note: if you install the above mentioned dkms-r8101 package and leave the dkms-autoinstaller service enabled, steps 3-7 will be performed automatically after you boot with a new kernel, provided you have updated the corresponding kernel-headers (kernel-devel/kernel-source) package. So basically all you would have to do is

  1. install dkms-r8101
  2. upgrade kernel
  3. make sure the dkms-autoinstaller service is active
  4. reboot


2023-09-11 07:19