0

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 8.8.8.8 returns

connect: Network is unreachable

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

    iface eth0 inet static
        address 10.34.160.0
        netmask 255.255.255.0
        network 10.34.160.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
        dns-nameservers 8.8.8.8 8.8.4.4

ifconfig output:

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

         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:127.0.0.7 Mask:255.0.0.0
         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 10.30.32.1 dev eth0 onlink linkdown
10.34.32.0/24 dev etho proto kernel scope link src 10.34.32.1 linkdown
169.254.0.0/16 dev eth0 scope link metric 1000 linkdown

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

  • 1
    I believe google public DNS is 8.8.8.8 and 8.8.4.4, yours had 8.8.8.4. – Jim Apr 30 at 3:21
  • Sorry that was a typo in my question! I have 8.8.4.4 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.