I initially had a problem where ping google.com results in

ping:unknown host google.com.

After following the guide below which instructed to uninstall and reinstall resolvconf, now I can no longer reinstall resolvconf because the network doesn't work. I believe I can resolve this by downloading it from the url directly but realized that there's a deeper issue where ping returns

connect: Network is unreachable

How can I resolve this? My settings in /etc/network/interface

    iface eth0 inet static

ifconfig output:

eth0     Link encap:Ethernet MWaddr f0:76:ic:ed:04:61
         inet addr: Bcast: Mask:

         UP BROADCAST MULTICAST MTU:1500 Metric:1
         RX packets:0 errors:0 dropped:0 ovveruns:0 frame:0
         collisions:0 txqueuelen:1000
         RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo       Link encap:Local Loopback
         inet addr: Mask:
         inet6 addr: ::1/128 Scope:Host
         UP LOOPBACK RUNNING MTU:65536 Metric:1
         RX packets:256 errors:0 dropped:0 overruns:0 frame:0
         RX packets:256 errors:0 dropped:0 overruns:0 carrier:0 
         collisionns:0 txqueueien:1
         RX bytes:10944 (18.9KB) TX bytes:18944 (18.9 KB)

ip route output:

default via dev eth0 onlink linkdown dev etho proto kernel scope link src linkdown dev eth0 scope link metric 1000 linkdown

"ping: unknown host google.com" but IPs works fine

  • 1
    I believe google public DNS is and, yours had – Jim Apr 30 at 3:21
  • Sorry that was a typo in my question! I have in the file (edited) – lusi Apr 30 at 3:24
  • 2
    I don't think your interface configuration is valid - AFAIK the address needs to be in the same subnet as the default gateway - see does the gateway have to be on the subnet? – steeldriver Apr 30 at 3:33
  • I tried to extrapolate from this answer which suggests different gateway from address askubuntu.com/questions/415023/… – lusi Apr 30 at 3:38
  • Also the first lines in /etc/network/interfaces are '''auto lo iface lo inet loopback''' and before I changed anything these were the only lines. I don't understand how networking works very well, so I just added the eth0 configuration but am not sure that's what you're supposed to do. – lusi Apr 30 at 3:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.