Network card driver in linux

How do I install a network driver on Linux?

I want to use eth0 driver, but my network card is UNCLAIMED. I use Killer e2200 Gigabit Ethernet controller. Please tell me how to install the Networkdriver and how to use eth0 .

3 Answers 3

If you have installed OS and you want to run Network Card as new hardware, you must ask the vendor for network drivers. Usually network drivers come with source pakage of kernel modules. You must compile driver module for you kernel.

    install «build essential» utilites

$ sudo apt-get install build-essential 
$ ./configure $ make $ sudo make install 

After installation you can load just compiled module by enter command:

$ sudo insmod your_module.so $ ifconfig eth0 up 

The latest network devices usually take a while to work their way into the Linux kernel. All drivers are usually built into big distributions like Debian (or Ubuntu) and Centos.

The other answer answers here give great detail on how to compile the driver module and insert it — if you look at the Linux source code, you can «grep» your device name in the /drivers/net directory eg.

grep -ri e2200 /usr/src/linux*/drivers/net/ 
grep -ri killer /usr/src/linux*/drivers/net/ 

It might yield something like:

drivers/net/dsa/Kconfig: tristate "Qualcomm Atheros QCA8K Ethernet switch family support" drivers/net/dsa/Kconfig: This enables support for the Qualcomm Atheros QCA8K Ethernet drivers/net/ethernet/atheros/Makefile:# Makefile for the Atheros network device drivers. drivers/net/ethernet/atheros/Kconfig:# Atheros device configuration drivers/net/ethernet/atheros/Kconfig:config NET_VENDOR_ATHEROS drivers/net/ethernet/atheros/alx/Makefile:obj-$(CONFIG_ALX) += alx.o drivers/net/ethernet/atheros/alx/Makefile:alx-objs := main.o ethtool.o hw.o drivers/net/ethernet/qualcomm/Kconfig: This enables support for the Qualcomm Atheros QCA7000. drivers/net/ethernet/qualcomm/Kconfig: tristate "Qualcomm Atheros QCA7000 SPI support" drivers/net/wireless/ath/ath9k/Kconfig: bool "Atheros bluetooth coexistence support" drivers/net/wireless/ath/ath9k/Kconfig: tristate "Atheros 802.11n wireless cards support" drivers/net/wireless/ath/ath9k/Kconfig: Atheros IEEE 802.11n AR5008, AR9001 and scan support" drivers/net/wireless/ath/Kconfig: bool "Atheros/Qualcomm devices" drivers/net/wireless/ath/Kconfig: For information on all Atheros wireless drivers visit: drivers/net/wireless/ath/ar5523/Kconfig: tristate "Atheros AR5523 wireless driver support" drivers/net/wireless/ath/carl9170/Kconfig: This is the mainline driver for the Atheros "otus" 802.11n USB devices. drivers/net/wireless/ath/ath10k/Kconfig: tristate "Atheros 802.11ac wireless cards support" drivers/net/wireless/ath/ath10k/Kconfig: Atheros IEEE 802.11ac family of chipsets. drivers/net/wireless/ath/ath6kl/Makefile:# Copyright (c) 2004-2011 Atheros Communications Inc. drivers/net/wireless/ath/ath6kl/Makefile:# Copyright (c) 2011-2012 Qualcomm Atheros, Inc. drivers/net/wireless/ath/wcn36xx/Kconfig: Qualcomm Atheros WCN3660 and WCN3680 mobile chipsets. drivers/net/wireless/ath/ath5k/Kconfig: bool "Atheros 5xxx AHB bus support" drivers/net/wireless/ath/ath5k/Kconfig: This adds support for WiSoC type chipsets of the 5xxx Atheros drivers/net/wireless/ath/ath5k/Kconfig: bool "Atheros 5xxx PCI bus support" drivers/net/wireless/ath/ath5k/Kconfig: This adds support for PCI type chipsets of the 5xxx Atheros 

I’ve trimmed some lines for brevity. But the module names are the same as the directory before Kconfig, so you can check if it is active with lsmod:

Читайте также:  Install all dependencies linux

Sometimes my intel drivers for my onboard Wi-Fi dies, then I have to remove and re-add it:

rmmod iwlmvm modprobe iwlmvm 

Then magically it works again. I still need to contribute this fix to the NetworkManager project.

If this returns «alx», then the driver is already loaded:

If not, you’re out of luck. You can manage the interface with the «ifconfig» or «ip link» commands:

Newer Linuxes don’t use «eth» as interface names any more.

So I grepped my kernel tree for «killer» and «e2200» and couldn’t find anything. Then I did a web search, and found out that is is an Atheros device, and similar to the «alx» driver. Someone updated the driver to work with your card, lucky you. If there are enough cards like that out in the world, or he upstreamed it, all you have to do is to update Linux and it will just work.

Welcome to Linux! No go out and buy some older hardware that someone has already made free drivers for. 🙂

Источник

How to find network card driver name and version on Linux

Question: An Ethernet network interface card is attached to my Linux box, and I would like to know which network adapter driver is installed for the NIC hardware. Is there a way to find out the name and version of a network card driver for my network card?

For network interface card (NIC) hardware to operate properly, you need a suitable device driver for the NIC hardware (e.g., ixgbe driver for Intel NICs). A NIC device driver implements a hardware-independent common interface between the Linux kernel and the NIC, so that packets can be moved between the kernel and the NIC. While some drivers may be statically built in the kernel, most drivers for modern NICs are dynamically loaded as kernel modules.

Читайте также:  Linux sdk source code

When you are troubleshooting a NIC hardware problem, one thing you can do is to check whether a correct network adapter driver is installed properly. In this case, you need to know which kernel module is your NIC driver.

There are several ways to find the name/version of an Ethernet card driver on Linux.

Method One: dmesg

The first method is to to check dmesg messages. Since the kernel loads necessary hardware drivers during boot, dmesg output should tell if an Ethernet card driver is installed.

The above output shows that a driver named tg3 is loaded in the kernel.

If you want to know more detail about this driver (e.g., driver version), you can use modinfo command.

If dmesg does not print any information about Ethernet driver, that means no suitable network device driver is available on your system.

Method Two: ethtool

The second method is to use the ethtool command. To find out the driver name for an interface eth0 , run the following.

Method Three: lshw

Another useful tool for NIC driver information is lshw . Type the following command to get detailed information about available Ethernet card(s) and their driver.

In the lshw output, look for the capabilities line, and examine driver and driverversion in the line.

If no suitable NIC driver is installed on your system, the driver field will remain empty.

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Читайте также:  Games on linux console

Источник

Оцените статью
Adblock
detector