Ethernet connection not working in ubuntu 14.04.1 LTS

9,083

If you have networking and can ping by IP address or hosts listed in your /etc/hosts file, but can't browse to websites, it sounds like improper DNS resolution. Some quick tests:

$ ls -l /etc/resolv.conf 
lrwxrwxrwx 1 root root 29 Apr 23 09:44 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
$ cat /etc/resolv.conf 
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 8.8.8.9

If you don't have a name server listed, there are several ways to add it. See below or just search this wiki for "dns-nameservers". If you do have a nameserver listed, you can test it.

$ dig +short @8.8.8.8 www.ubuntu.com
91.189.89.103

Two quick ways to add a DNS server if using NetworkManager and/or DHCP:

  1. Restart the NetworkManager (with fingers crossed)

    $ sudo restart network-manager

  2. Edit /etc/dhcp/dhclient.conf and add a prepend line -- there's a sample line for you to uncomment and edit. Then restart NetworkManager.

    #prepend domain-name-servers 127.0.0.1; prepend domain-name-servers 8.8.8.8 8.8.8.9;

Share:
9,083

Related videos on Youtube

swapnesh
Author by

swapnesh

#SOreadytohelp In love with MEAN & MERN stack, ex was LAMP. Feel free to contact me at- [email protected]

Updated on September 18, 2022

Comments

  • swapnesh
    swapnesh over 1 year

    I am facing weird issue with my ethernet connection. Its showing connected but when I hit something in the browser it won't though its connecting via wifi to other networks but not with the wired cable though its showing the symbol up and down for the connection establishment but still the Internet not working. Let me know the other areas where I need to dig in.

    FYI- I tested the same wire on windows with same configuration and Internet is working. I replaced some numbers from inet address with X here.

    Following are my inspection results -

    Command - ifconfig -a

    eth0      Link encap:Ethernet  HWaddr e0:db:55:b0:90:91  
              inet addr:192.168.X.X  Bcast:192.168.X.XXX  Mask:255.255.255.0
              inet6 addr: fe80::e2db:55ff:feb0:9091/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:46 errors:0 dropped:0 overruns:0 frame:0
              TX packets:406 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:4376 (4.3 KB)  TX bytes:44764 (44.7 KB)
    
    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:65536  Metric:1
              RX packets:3458 errors:0 dropped:0 overruns:0 frame:0
              TX packets:3458 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:252271 (252.2 KB)  TX bytes:252271 (252.2 KB)
    
    ppp0      Link encap:Point-to-Point Protocol  
              inet addr:100.66.241.233  P-t-P:10.64.64.64  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
              RX packets:6454 errors:0 dropped:0 overruns:0 frame:0
              TX packets:5424 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:3 
              RX bytes:5439485 (5.4 MB)  TX bytes:502462 (502.4 KB)
    
    wlan0     Link encap:Ethernet  HWaddr f8:2f:a8:c0:8b:6d  
              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:19 
    

    Command- dmesg | grep eth0

    grep eth0

    Command - sudo dhclient -r & sudo dhclient eth0

    dhclient

    I also restarted my network manager as suggested HERE

    • Abhinay
      Abhinay over 9 years
      Is this issue fixed yet ?