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)
- 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
- RPM-IVH bnx2-<version>.src.rpm
- Cd/root/rpmbuild
- RPMBUILD-BB Specs/bnx2.spec
- Install the compiled driver package
- Cd/root/rpmbuild/rpms/x86_64
- RPM-IVH bnx2-<version>.x86_64.rpm
- After successful installation, the following path will be displayed:/lib/modules/<kernel_version>/extra/bnx2.ko
- Copy the generated module files to the directory:/lib/modules/<kernel_version>/kernel/drivers/net
- Load Driver
- Insmod
- Or: Modprobe bnx2
- See if the NIC driver module is loaded
- Lsmod | grep bnx2 If the Bnx2 module is included in the command output, indicating that the NIC driver was successfully compiled
- Activate the network card to see the network card status
- Ifconfig eth0 up (NIC device name, eth0 for example)
- Ifconfig-a
Mode two: Source code driver package installation method (Take Realtek rtl8168/8111 Nic as an example)
- Download the source code package from the Realtek website, then the Linux system, create a directory, extract the source code package into this directory.
- Mkdir/temp
- Cd/temp
- Tar jxvf r8168-8.aaa.bb.tar.bz2
- Compile and install the source code
- CD R8168.AAA.BB
- Make clean modules
- Make install
- DEPMOD-A//Check the dependencies between modules
- Insmod./src/r8168.ko//Load r8168 module
- Lsmod | grep r8168//Check whether the 8168 module is loaded
Installation of Linux network card drivers