8

I have an issue with my Ubuntu 14.04. I am able to connect to wireless networks without any problems, but when I am in my Dorm Room, I cannot connect to my wired Internet connection. It works fine under Windows by just using DHCP settings, but it does not seem to be working under Ubuntu. It just says that it has no connection.

Any ideas?

Results for

ifconfig -a

eth0      Link encap:Ethernet  Hardware Adresse f4:6d:04:1f:7d:69  
          UP BROADCAST MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:40 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:28 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000 
          RX-Bytes:5370 (5.3 KB)  TX-Bytes:5511 (5.5 KB)

lo        Link encap:Lokale Schleife  
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6-Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:65536  Metrik:1
          RX-Pakete:4804 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:4804 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:0 
          RX-Bytes:403965 (403.9 KB)  TX-Bytes:403965 (403.9 KB)

wlan0     Link encap:Ethernet  Hardware Adresse 48:5d:60:95:45:2d  
          UP BROADCAST MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:952361 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:527740 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000 
          RX-Bytes:1424038871 (1.4 GB)  TX-Bytes:61999960 (61.9 MB)

and

netstat -rn

Kernel-IP-Routentabelle
Ziel            Router          Genmask         Flags   MSS Fenster irtt Iface

This is when my laptop has the ethernet cable connected. I just get the same message I would get if I had the cable disconnected. So I do net even get an IP Adress from DHCP Server. The results posted are without wireless connected, since I only have a wired connection in my Dorm room.

5
  • Define "cannot connect to my wired Internet connection"? When you have wireless working, plug in wired ethernet and post results of ifconfig -a and netstat -rn
    – meccooll
    Jul 1, 2014 at 5:19
  • Hi meccooll, I have posted the results for you. I cannot have wireless working and ehternet cable at the same time. Where I only have ethernet I do not have wirelss and other way around. Jul 6, 2014 at 19:09
  • 3
    do sudo dhclient -r and then sudo dhclient eh0 then check if you got an IP with ifconfig -a
    – meccooll
    Jul 6, 2014 at 19:26
  • Hey meccooll, sorry for the long wait here, I actually was not able to recheck on this issue for a while. I tried what you described, but the second command just seems to be taking a long time(I aborted after two minutes). If I may add, I found a pretty weird work around. I have a router lying around and it was possible to get an ip-adress from that router when I connected it to my laptop. Unplugging it and then plugging my ethernet cable back in left me with my internet working just fine. Jul 22, 2014 at 20:08
  • sounds like a router problem for some reason it wasn't giving out IP addresses
    – meccooll
    Jul 23, 2014 at 7:12

2 Answers 2

3

From my experience a few months ago, doing a

    sudo service network-manager restart

fixed my unstable and unreliable internet connection on Ubuntu 14.04. I also updated my kernel version.

By "no connection" do you mean no internet access or you're not being allocated an IP address from the DHCP server at all?

1
  • I do not even get an IP Adress. It is in the same state it would be if no cable was connected at all. restarting the network manager did not work :( Jun 30, 2014 at 16:24
1

Try typing sudo vi /etc/network/interfaces. Now use the vi editor to edit the following text.

It should look like this:

auto lo
iface lo inet loopback
~
~
...

Now add to it so it looks like this:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

ignore the ~'s while doing this. To edit the file in vi press i (insert). To save and exit, press the <esc> key then type :wq. You should be able to connect via Ethernet now.

3
  • Better use nano or so to edit if you do not know vi - there are some more keys you need if you want to use vi/vim. Oct 7, 2014 at 10:40
  • 1
    you can use even gedit in Ubuntu Jun 24, 2015 at 17:08
  • on ubuntu and kubuntu 14.04 I'm also able to connect to wireless internet connections, and unable to connect to wired internet connections (the machines are a desktop and a laptop) both list a "Wired Connection 1" in under the wired network connections. I've been using Linux for 8 years, and it's always been that wired connections automatically worked, just plug the eithernet in. Nowadays it's the reverse, the wireless works, but the wired connections require expertise to setup. Why?
    – user12711
    Jan 27, 2016 at 1:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.