ubuntu nic card issue [closed]
-
28-05-2021 - |
Pergunta
I am trying to install NIC r8168 and it shows everything installed ok. It is a brand new NIC and the lights wont come on when I plug in a ethernet. The NIC is that is not working is eth0. Why does it show the r8168 driver being used by 0? My NIC model number is ST1000SPEX if anyone is wondering.
lsmod
Module Size Used by
r8168 215669 0
ifconfig
eth0 Link encap:Ethernet HWaddr 00:0a:cd:1e:0a:4a
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:43 Base address:0x2000
eth1 Link encap:Ethernet HWaddr 00:19:d1:1d:f6:7a
inet addr:192.168.1.83 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:d1ff:fe1d:f67a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:551467 errors:0 dropped:0 overruns:0 frame:0
TX packets:145219 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:409744342 (409.7 MB) TX bytes:12233173 (12.2 MB)
Interrupt:21 Memory:dfde0000-dfe00000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:280 errors:0 dropped:0 overruns:0 frame:0
TX packets:280 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:22608 (22.6 KB) TX bytes:22608 (22.6 KB)
Ubuntu 11.10 x64
Kernel 3.0.0-12-generic
Solução
I'm not sure what version of Ubuntu (or what kernel version) you're using, so I'm going to assume you're at least on the 2.6 kernel series.
I've had similar problems in the past, and what usually helps is downloading the latest version of the driver from the vendor's website. In this case, download Realtek's latest driver:
Realtek Gigabit NIC Driver Downloads
Scroll to the section titled "Unix (Linux)", and download the appropriate driver, which is most likely the one that says "LINUX driver for kernel 2.6.x and 2.4.x (Support x86 and x64)".
It will be a tarball, so you'll have to extract it on the command line and compile the driver:
$ tar xvf <whatever_the_name>.tar.gz
$ cd <whatever_directory_was_created_from_tarball>
$ more INSTALL
I wrote more INSTALL
because more than likely there is a file named "INSTALL" in there, and you should read it for specific instructions on how to install that particular driver on your platform. However, it more often than not will tell you to perform the following commands:
$ ./configure
... # a bunch of output
$ make
... # a bunch of compiler output
$ sudo make install
... # a bunch of copying of files to their appropriate places
Once the compile process is complete, it will SHOULD automatically unload and load the module for you. If not, do it yourself:
$ sudo modprobe -r r8168
$ sudo modprobe r8168
That should be it.