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

lusi
  • 1
  • 1
    I believe google public DNS is 8.8.8.8 and 8.8.4.4, yours had 8.8.8.4. – Liso Apr 30 '19 at 03:21
  • Sorry that was a typo in my question! I have 8.8.4.4 in the file (edited) – lusi Apr 30 '19 at 03: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 '19 at 03:33
  • I tried to extrapolate from this answer which suggests different gateway from address https://askubuntu.com/questions/415023/connect-network-is-unreachable-ping – lusi Apr 30 '19 at 03: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 '19 at 03:43
  • @lusi You can't extrapolate IP addresses. They have to be configured according to the rest of your network. – vidarlo Apr 30 '19 at 05:07
  • I meant extrapolating from which IP address in the ip route output corresponded to each line in the interface file. I'm honestly not very familiar with networking so don't know how to configure it based on my network – lusi Apr 30 '19 at 05:28
  • The configuration of your network interface eth0 it is not applied, your configuration IP for eth0 is 10.34.160.0 which is not a valid address ip 10.34.160.0 and 10.34.160.255 are not usable in a /32 subnet also the gateway have to be in the same subnet. At the moment the configuration of your network interface is the gateway address and as default as himself, with this config you cannot go no were – AtomiX84 Apr 30 '19 at 06:55

0 Answers0