SauronTheWatcher
Posts: 2
Joined: Sat Oct 10, 2015 12:10 pm

Network issues - Wifi - Network unreachable

Sat Oct 10, 2015 12:20 pm

Hi all, I've had a look around online but I seem to have a strange issue that I haven't found on other posts.

I've connected my Pi via Wifi but I'm unable to ping 8.8.8.8 and access any site gives me "cannot resolve hostname(Urlhere)". I navigated to my /etc/resolv.conf file to find that it was empty. I proceeded to add in the following:

Code: Select all

nameserver 8.8.8.8
nameserver 8.8.4.4
Once I rebooted the Pi, the file had been wiped again (I tried again but I had the same issue). I've also tried route -n and recieved the following information:

Code: Select all

Destination 192.168.1.0 
gateway 0.0.0.0
genmask 255.255.255.0
flags U
Metric 303
Ref 0
Use 0
User iface wlan0
I attempted to set the default gateway but that created a new IP route with other information missing.

Has anyone seen this sort of issue before? I find the file wiping strange as I've not noticed that on any other post

SauronTheWatcher
Posts: 2
Joined: Sat Oct 10, 2015 12:10 pm

Re: Network issues - Wifi - Network unreachable

Sat Oct 10, 2015 8:21 pm

Update:

So I've fixed the issue (only a temp fix). It seems that the gateway isn't being set and i'm having to manually set the DNS. Editing the resolv.conf file with 8.8.8.8 and setting the gateway to 192.168.1.1 gets the Pi online.

I'm looking into possibly giving the Pi a static IP address that will allow me to setup all the required info and solve these problems. Does anyone have any idea why this could be happening? I have to edit the file and set the gateway each time the system is restarted/shutdown

mbtpani
Posts: 3
Joined: Sun Feb 28, 2016 5:36 am

Re: Network issues - Wifi - Network unreachable

Sun Feb 28, 2016 5:54 am

Hi,

I'm facing same issue, could you please let me know in which file i have to edit and update the gateway IP , i know about adding the name server in resolve.conf and don;t have idea of adding gateway.

Thanks
M Bala

Return to “Troubleshooting”