I had a customer today who brought in a laptop and wanted to switch over to Ubuntu linux. I always try to go the extra mile for people who want to convert to Linux. After installing Ubuntu 10.04 LTS, I rebooted and to my dismay the wired (eth0) interface was not working. I always run into wireless problems with Linux but its pretty rare that a wired interface doesn’t work. Below I show the fairly simple fix.
First, here is the lspci output:
- root@ubuntu:~$ lspci | grep 8139
- 01:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
As we can see the modules are loaded:
- root@ubuntu:~$ lsmod | grep 8139
- 8139too 31616 0
- 8139cp 27520 0
- mii 13440 2 8139too,8139cp
Looking at dmesg it apears every thing is ok:
- root@ubuntu:~$ dmesg | grep 8139
- [ 3.631942] 8139cp: 10/100 PCI Ethernet driver v1.3 (Mar 22, 2004)
- [ 4.280361] 8139cp 0000:01:07.0: This (id 10ec:8139 rev 10) is not an 8139C+ compatible chip
- [ 4.280368] 8139cp 0000:01:07.0: Try the "8139too" driver instead.
- [ 4.284116] 8139too Fast Ethernet driver 0.9.28
- [ 4.284423] 8139too 0000:01:07.0: PCI INT A -> Link[APC3] -> GSI 18 (level, high) -> IRQ 18
- [ 4.285237] eth0: RealTek RTL8139 at 0xc400, 00:40:95:30:62:5e, IRQ 18
- [ 4.285240] eth0: Identified 8139 chip type 'RTL-8139C'
And even more oddly, the interface is listed in iwconfig:
- root@ubuntu:~$ ifconfig -a
- eth0 Link encap:Ethernet HWaddr 00:40:95:30:62:5e
- 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:18 Base address:0xc400
But what was happening was the interface would never get a address via dhcp and I also could not connect to the internet even when I set the IP statically.
Turns out there were some issues with auto setting the links speed.
Using the mii-tool to force set the speed worked:
- root@ubuntu:~$ mii-tool eth0 -F 10baseT-FD
- root@ubuntu:~$ rmmod 8139too
- root@ubuntu:~$ modprobe 8139too
(Obviously you need to add sudo to those commands if you are not root)
After that my eth0 interface worked great and the settings also survived a reboot so once you set it once you should be good after that.
thx a lot! been searching for a solution for months! i have a AMILO A1650G and now evrything works with ubuntu 10.04
Hello ozzz,
Glad you found this article on our site helpful. Thanks for taking the time to leave feedback. We hope that you will find other articles on our site helpful as well. We are also writing new articles on a daily basis.
Thanks.
alex
Thanks a lot! I stumbled on your page before trying a reinstall, so you saved me a lot of aggravation.
Hello Pratik,
No problem! Glad the article saved you the hassle of reinstalling! Thanks for taking the time to post feedback.
Thanks.
alex
After 3 days of painful troubleshooting, i stumbled across this article. i did a fresh ubuntu 10.04 install, which left me with an internet connection but couldn’t actually load any websites or use the update manager. This solution solved all of that, thank you so much for posting this.
Hello G,
Awesome! It is always nice to hear when an article on our site resolves issues that people are having! Thanks for leaving feedback!
Thanks.
alex
Hi Alex,
I too have spent alwhile looking for a solution to this, and it looked promising with your clear explanation of it. However, I get
SIOCGMIIPHY ON 'eth0' failed: Invalid argument
after the
line. Would you know what’s going on?sudo mii-tool eth0 -F 10baseT-FD
Thanks,
Paul
Hello Paul,
I would think there are a couple things that could be wrong. First it may be that for some reason mii-tool doesn’t like the NIC you have installed for one reason or another. I would double check your default route, the configuration of the NIC itself, and verify the NIC works without issue in another computer. When it gets down to issues like the one you are stating above it is hard to troubleshoot without physical access to the computer so unfortunately I am not going to be a ton of help.
Once you get it figured let us know what it was so others that run into the same issue will find resolution when reading this article.
Thanks.
alex
Hello.
I have exactly the same problem, but, after doing your steps, it appears “connection established”, nevertheless, i can’t load any website.
I have been recommended this website by the forum http://ubuntuforums.org/showthread.php?p=10364656#post10364656
where i am trying to solve my problem too, in case you need more information.
Thank you.
Hi adriat,
You may need to do some research on the link speed of your ethernet card? What is the card listed as in lspci?
Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)
The only other thing that may be happening is if some other wifi modules are loading and preventing it from working. I would remove network modules which are driver related one by one until it works.
How i know what modules i have? My computer can’t connect via wifi
Greetings,
I am having a similar problem. However, I am curious about the ‘grep 8139’ command. What makes you chose that number?
For my case it gave noting, so I just lspci and I looked up for the relevant line:
03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX (rev 02)
How would this change my next steps?
Thanks.
while eth0 installation time shows this error “Ignoring unknown interface eth0=eth0”. i installed ubuntu 9.10 desktop edition . plz any one help me . i am waiting for u r replay…..
Thank you so much … you stopped the gray hair from taking over … thanks again
Dear Purehate,
I had the same issue with an installation of Ubuntu Server 12.04 LTS i386 on a Lenovo ideacentre. Your commands fix the problmes. Many Thanks for your post.