Installation of Linux network card drivers

Source: Internet
Author: User
Tags rpmbuild

One. General idea of network card driver installation

1. First from the hardware installation, check the NIC itself failure

2. Check the NIC chip model (note that it is not a hardware brand)

    • Common NIC Chip with Intel Rc82545em/realtek 8139d/broadcom netxtreme/3com 3c940/sis900/via vt6105l
    • View this machine by command: LSPCI

3. Check if the system contains the corresponding model of the NIC driver

    • Catalog:/lib/modules/release/kernel/drivrs/net

4. Check that the NIC driver is loaded

    • Lsmod command to view the module information loaded by the current system
    • If the NIC is not loaded, use the [modprobe module file] command to load

    • insmod/rmmod [option] Module name or module file load/unload system module, similar to Modprobe function
    • depmod [Options] Module name: Analyzing the dependencies of loading modules

Two. Compiling and installing the NIC

Mode one: Rpm/source RPM driver package installation (with IBM X3650 server Broadcom NetXtreme II network adapter as an example)

    1. Download the corresponding Server model network card driver from the IBM official website, use USB stick and other tools to upload to Linux server, then compile
      1. RPM-IVH bnx2-<version>.src.rpm
      2. Cd/root/rpmbuild
      3. RPMBUILD-BB Specs/bnx2.spec
    2. Install the compiled driver package
      1. Cd/root/rpmbuild/rpms/x86_64
      2. RPM-IVH bnx2-<version>.x86_64.rpm
      3. After successful installation, the following path will be displayed:/lib/modules/<kernel_version>/extra/bnx2.ko
      4. Copy the generated module files to the directory:/lib/modules/<kernel_version>/kernel/drivers/net
    3. Load Driver
      1. Insmod
      2. Or: Modprobe bnx2
    4. See if the NIC driver module is loaded
      1. Lsmod | grep bnx2 If the Bnx2 module is included in the command output, indicating that the NIC driver was successfully compiled
    5. Activate the network card to see the network card status
      1. Ifconfig eth0 up (NIC device name, eth0 for example)
      2. Ifconfig-a

Mode two: Source code driver package installation method (Take Realtek rtl8168/8111 Nic as an example)

    1. Download the source code package from the Realtek website, then the Linux system, create a directory, extract the source code package into this directory.
      1. Mkdir/temp
      2. Cd/temp
      3. Tar jxvf r8168-8.aaa.bb.tar.bz2
    2. Compile and install the source code
      1. CD R8168.AAA.BB
      2. Make clean modules
      3. Make install
      4. DEPMOD-A//Check the dependencies between modules
      5. Insmod./src/r8168.ko//Load r8168 module
      6. Lsmod | grep r8168//Check whether the 8168 module is loaded

Installation of Linux network card drivers

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.