How to install a Network card in linux
The Easy way
RedHat/Fedora distributions of linux ships with Kudzu a device detection program which runs during systems initialization (/etc/rc.d/init.d/kudzu). This can detect a newly installed NIC and load the appropriate driver. Then use the program /usr/sbin/netconfig to configure the IP address and network settings. The configuration will be stored so that it will be utilized upon system boot.
The Manual method
Run the command
# update-pciids
By using lshal , lsmod and lspci we get the detail property of the hardware. To find the name of the network adapter Enter:
*Note : we have to install gcc and kernel-devel pakage in RHEL 5
lspci -v | grep Ethernet -A 1
- Move the base driver tar file to the directory of your choice. For example, use ‘/home/username/e1000′ or ‘/usr/local/src/e1000′.
- Untar/unzip the archive, where <x.x.x> is the version number for the driver tar file: tar zxf e1000-<x.x.x>.tar.gz
- Change to the driver src directory, where <x.x.x> is the version number for the driver tar: cd e1000-<x.x.x>/src/
- Compile the driver module: make install The binary will be installed as: /lib/modules/<KERNEL VERSION>/kernel/drivers/net/e1000/e1000.[k]o The install location listed above is the default location. This may differ for various Linux distributions.
- Load the module using either the insmod or modprobe command: modprobe e1000 insmod e1000 Note that for 2.6 kernels the insmod command can be used if the full path to the driver module is specified. For example: insmod /lib/modules/<KERNEL VERSION>/kernel/drivers/net/e1000/e1000.ko With 2.6 based kernels also make sure that older e1000 drivers are removed from the kernel, before loading the new module:rmmod e1000; modprobe e1000
- Assign an IP address to the interface by entering the following, where <x> is the interface number: ifconfig eth<x> <IP_address>
- Verify that the interface works. Enter the following, where <IP_address> is the IP address for another machine on the same subnet as the interface that is being tested: ping <IP_address>
- To find the driver version: Type ethtool -i <ethx> where <ethx> is the Ethernet port . Reads the driver name and version .
Example for the first Ethernet port, eth0
# ethtool -i eth0