-3

I have a Raspberry Pi 2 here, using ssh and VNC to remotely access the internet whenever the RasPi detects WiFi, and this works with my static IP connecting to the router, but not to the Interwebs. I also tried android USB Internet tether and this also didn't work. When I connect to a TV using HDMI and stop using a static IP the internet works fine. I think my static ip configuration is blocking my Internet options.

TL;DR: I want to access WiFi with a static IP configured.

I have been trying this more than 2 weeks.

  • Please edit your question and include the contents of /etc/network/interfaces and the output of the fconfig command when configured for a static IP. You may also want to check the related links on the right as they may already include a solution to your problem. – Steve Robillard Oct 5 '15 at 4:56
  • Please edit your question and add the output of ping 8.8.8.8 and ping google.com I think I know the problem. – Patrick Cook Oct 7 '15 at 2:32
1

Really simple, if I've guessed right. I had this exact same problem when setting up a static IP with Wifi. You need to define your dns-nameservers if you are going to you a static IP address and not dhcpd. Simply add this to your `/etc/network/interfaces' file:

dns-nameservers 8.8.8.8


Quick how-to, just in case:

sudo nano /etc/network/interfaces then find the line below your main block that should look something like this:

address 172.16.0.16
netmask 255.255.255.0
gateway 172.16.0.1

and add dns-nameservers 8.8.8.8 right below it.

So it should look similar but not exactly like:

address 172.16.0.16
netmask 255.255.255.0
gateway 172.16.0.1
dns-nameservers 8.8.8.8
0
  1. (undo whatever it is you did to set a static ip on your pi)
  2. Log into your router's UI
  3. Configure a static IP for your PI from there

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.