aldosusanto
Posts: 1
Joined: Fri Feb 28, 2020 11:07 am

Always trying to connect to wifi, but never connects, ping 8.8.8.8 results in “connect: network is unreachable”

Fri Feb 28, 2020 11:11 am

I just bought a Raspberry Pi 4 which uses linux as its operating system.
I was just trying to browse the internet using my phone hotspot when the connection suddenly drops, I can't access any other webpages on chromium with message "ERR_NAME_RESOLUTION_FAILED"

I also noticed that the wifi logo (at the top right) keeps on showing the connecting animation (where the signal goes from the circle to the last bar at the top), it might indicate that my device is not connected to the network.

Also, when I tried to do ping 8.8.8.8, here is the response:

Code: Select all

connect: Network is unreachable
While with ping google.com:

Code: Select all

ping: google.com: Temporary failure in name resolution
I have been trying several guides such as changing the resolv.conf to 8.8.8.8 or changing the dhcpcd.conf file but to no avail.

Am I missing something here? I am new to Linux or Raspeberry Pi in general so any help would be appreciated. Thank you. Here are some command results

cat /etc/resolv.conf:

Code: Select all

# Generated by resolvconf
    nameserver 192.168.43.1
ifconfig (wlan0 part):

Code: Select all

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 10.243.132.27 netmask 255.0.0.0 broadcast 10.255.255.255
    ether dc:a6:32:4c:ba:36 txqueuelen 1000 (Ethernet)
    RX packets 4 bytes 496 (496.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 429 bytes 95691 (93.4 KiB)
    TX errors 0 dropped 0 overrunes 0 carrier 0 collisions 0

User avatar
topguy
Posts: 6527
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Always trying to connect to wifi, but never connects, ping 8.8.8.8 results in “connect: network is unreachable”

Fri Feb 28, 2020 2:15 pm

it might indicate that my device is not connected to the network.
How did you configure WiFi and what kind of device is it connecting to ?

If you have a name server on 192.168... and an IP on 10.243.. it seems a bit unusual.
What does "ip route" command say ?

User avatar
B.Goode
Posts: 10356
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Always trying to connect to wifi, but never connects, ping 8.8.8.8 results in “connect: network is unreachable”

Fri Feb 28, 2020 2:33 pm

Always trying to connect to wifi, but never connects, ping 8.8.8.8 results in “connect: network is unreachable”


For clarification, although stating the obvious for many -

The second problem is most likely a direct consequence of the first.

Without a connection to an Access Point on your local network your RPi has no means of communication with other hosts on the wider Internet.


Solve the problem of associating with a WiFi hotspot first.

Return to “Beginners”