Gert
Posts: 171
Joined: Wed Oct 24, 2012 10:19 pm

Can't see the internet from RPI

Mon Aug 05, 2013 7:08 am

Hi All,

I changed ISP and deployed a new modem and router on my home network.
Now the RPI no longer sees the internet. It saw it before the change.
For the heck of it I can't find out what's wrong.

All PCs on my network behind the router can browse the net fine.
I.e. in a cmd window pin google.com does the expected thing.

All PCs talk find to the RPI. I am actually using it as headless workstation and communicate with it via VNC and SSH. All this works fine. The PCs actually receive a samba share from the RPI fine.

The RPI has a static IP. (Easier to run external access to it via port forwarding)
I did the documented edits to /etc/network/interfaces + /etc/resolv.conf + reboot.

On the RPI I can ping the other PC in the home network OK (192.168...)
ifconfig returns the expected information for eth0.
Static addr. is OK, Bcast, and Mask, too.

Still ping google.com gives 'connect: Network is unreachable'

Where next to debug?

Thanks,
Gert

itimpi
Posts: 1090
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: Can't see the internet from RPI

Mon Aug 05, 2013 8:00 am

What is the output of the 'ifconfig' command on the Pi? It sounds as if the gateway address may not be found? Also is name server address defined? It can also be worth doing a 'ipconfig' command from a command prompt on the PC to get comparable output for the PC that works.

Gert
Posts: 171
Joined: Wed Oct 24, 2012 10:19 pm

Re: Can't see the internet from RPI

Mon Aug 05, 2013 4:54 pm

Hi itimpi,

Thank you for your comment.
The i[f,p]config looks clean.

Name server is a good question.
In resolv.conf I have the IP address of the router 192.168.11.1 (in my case)
In the router I have the DNS entries from my service provider.
I believe the router is supposed to communicate DNS info to the RPI, right?

But it may be an idea to enter DNS pointer in the RPI. Which file would that be to edit?

Thanks,
Gert

drgeoff
Posts: 10916
Joined: Wed Jan 25, 2012 6:39 pm

Re: Can't see the internet from RPI

Mon Aug 05, 2013 8:47 pm

1. Do the other PCs have static IP addresses or do they use DHCP?

2. On the RPi what responses do you get to the following three commands?

Code: Select all

ping bbc.co.uk
and

Code: Select all

ping 212.58.251.195
and

Code: Select all

nslookup bbc.co.uk
Quis custodiet ipsos custodes?

Gert
Posts: 171
Joined: Wed Oct 24, 2012 10:19 pm

Re: Can't see the internet from RPI

Tue Aug 06, 2013 4:03 am

Hi drgeoff,

Thank you for taking a look at the issue.
drgeoff wrote:1. Do the other PCs have static IP addresses or do they use DHCP?
The other PCs all have DHCP. Some other devices ( VOIP & cameras ) have static so that port forwarding in the router is simpler.
drgeoff wrote:2. On the RPi what responses do you get to the following three commands?

Code: Select all

ping bbc.co.uk
and

Code: Select all

ping 212.58.251.195
and

Code: Select all

nslookup bbc.co.uk

Code: Select all

root@raspberrypi:~# ping bbc.co.uk
connect: Network is unreachable

root@raspberrypi:~# ping 212.58.251.195
connect: Network is unreachable

root@raspberrypi:~# nslookup bbc.co.uk
bash: nslookup: command not found
root@raspberrypi:~# 

Example from another PC:

Code: Select all

C:\Documents and Settings>ping bbc.co.uk

Pinging bbc.co.uk [212.58.251.195] with 32 bytes of data:

Reply from 212.58.251.195: bytes=32 time=175ms TTL=108
Reply from 212.58.251.195: bytes=32 time=173ms TTL=108
Reply from 212.58.251.195: bytes=32 time=172ms TTL=108
Reply from 212.58.251.195: bytes=32 time=172ms TTL=108

Ping statistics for 212.58.251.195:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 172ms, Maximum =  175ms, Average =  173ms

C:\Documents and Settings\>ping 212.58.251.195

Pinging 212.58.251.195 with 32 bytes of data:

Reply from 212.58.251.195: bytes=32 time=171ms TTL=108
Reply from 212.58.251.195: bytes=32 time=172ms TTL=108
Reply from 212.58.251.195: bytes=32 time=173ms TTL=108
Reply from 212.58.251.195: bytes=32 time=174ms TTL=108

Ping statistics for 212.58.251.195:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 171ms, Maximum =  174ms, Average =  172ms

C:\Documents and Settings>nslookup
Default Server:  nrcns.sanjose.ca.sanfran.comcast.net
Address:  68.87.76.178
PC pinging the RPI

Code: Select all

C:\Documents and Settings>ping 192.168.11.170

Pinging 192.168.11.170 with 32 bytes of data:

Reply from 192.168.11.170: bytes=32 time<10ms TTL=64
Reply from 192.168.11.170: bytes=32 time<10ms TTL=64
Reply from 192.168.11.170: bytes=32 time<10ms TTL=64
Reply from 192.168.11.170: bytes=32 time<10ms TTL=64

Ping statistics for 192.168.11.170:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum =  0ms, Average =  0ms
RPI pinging the PC

Code: Select all

root@raspberrypi:~# ping 192.168.11.102
PING 192.168.11.102 (192.168.11.102) 56(84) bytes of data.
64 bytes from 192.168.11.102: icmp_req=1 ttl=128 time=0.580 ms
64 bytes from 192.168.11.102: icmp_req=2 ttl=128 time=0.538 ms
Could this be something in the router?

Cheers,
Gert

Gert
Posts: 171
Joined: Wed Oct 24, 2012 10:19 pm

Re: Can't see the internet from RPI

Tue Aug 06, 2013 6:52 am

Hi All,

The issue is fixed.

1. There was a typo in /etc/network/interfaces where I had not updated the gateway line to the new LAN base address. That fixed access to the internet and achieved visibility of the RPI from the outside. (ping)

2. In the AT&T DSL modem/router which I had before I had translated incoming port 8000 into the RPI LAN IP address with port 80 for http. The Linksys WRT54G router that I used with the new ISP provider did not support port translation. (At least I was unable to get it to work) so the RPI listening on port 80 did not answer to requests on port 8000. Changing the nginx config to listen on 8000 fixed that.

Cheers,
Gert

Return to “Troubleshooting”