Page 1 of 1

[SOLVED] Can't ping from non-Pi computer

Posted: Mon Dec 08, 2014 6:54 am
by abishur
I have a laptop running Mint 17 and Windows 7 and two Pis, a model B connected via a wired ethernet connection and a model A connected wirelessly.

I can ping and SSH into the Model B from any computer on the network, but I can only SSH into the Model A from the Model B! Additionally, the router (which is providing a DHCP address to the Model A) can ping the Model A, and I can try to ping the model A by hostname from the laptop but despite it resolving the IP address it doesn't get a response.

I have tried connecting my laptop to a wired ethernet connection thinking that maybe there was an issue with communicating between two wireless devices on my router, I've tried giving the model A a static IP address. No matter what I do for some reason the Model A will only respond when I communicate from another pi.


Edit: The solution appears to be that either wpa_supplicant or the drives used for my wifi adapter needed to be updated, doing a sudo apt-get update && sudo apt-get upgrade did the trick

Re: Can't ping from non-Pi computer

Posted: Mon Dec 08, 2014 9:48 am
by DougieLawson
What firewall do you have in your router? Is it restricting local machines?
What firewall options do you have on your RPi? iptables -L -n should show what's defined.
What options did you pick for your home network in Windows? Have you defined your home network as a trusted private network?
Control panel --> System & security --> Windows firewall.

Can't ask about Mac/OSX because I've never used it. But, I'd guess it will also have a software firewall.

Re: Can't ping from non-Pi computer

Posted: Mon Dec 08, 2014 10:31 am
by aTao
try tracert, or is it traceroute on Windows.

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 4:27 am
by abishur
The firewall on the router only restricts inbound traffic coming in the WAN port

I have the firewall on the windows machine turned off completely

I get the error message

Code: Select all

ERROR: could not insert 'ip_tables': Operation not permitted
iptables v1.4.14: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
when I run iptables -L -n

Mint 17 is a linux distro :lol: I refuse to have an Apple product in my home. :ugeek:

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 4:29 am
by abishur
aTao wrote:try tracert, or is it traceroute on Windows.
tracert (windows) fails just like ping with no hops

running traceroute (linux) from the pi that can communicate with it does a show a single hop straight to my destination address.

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 7:57 am
by rpdom
At this stage I'd start carefully scrutinising IP addresses and netmasks for typos.

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 12:09 pm
by aTao
abishur wrote: running traceroute (linux) from the pi that can communicate with it does a show a single hop straight to my destination address.
Wot no router.


That sounds very wrong. I am surprised there is no router showing in there...

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 2:32 pm
by abishur
rpdom wrote:At this stage I'd start carefully scrutinising IP addresses and netmasks for typos.
I can guarantee that the netmasks and IP addresses in use are correct, they were provided with dhcp (I have also tried making the IP addresses static and yes the netmask and address were correct then also).

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 2:33 pm
by abishur
aTao wrote:
abishur wrote: running traceroute (linux) from the pi that can communicate with it does a show a single hop straight to my destination address.
Wot no router.


That sounds very wrong. I am surprised there is no router showing in there...
I'm using an Actiontec MI424WR router, not sure why it doesn't show the router in the middle, it is the one providing IP addresses.

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 3:58 pm
by rpdom
If the systems are all on the same subnet then there is no routing involved. The router will be acting as a switch and be invisible at the IP level.

It will only show as a "hop" if routing outside the subnet.

Or have I got it wrong and these systems are on different subnets?

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 4:47 pm
by aTao
rpdom wrote:If the systems are all on the same subnet then there is no routing involved. The router will be acting as a switch and be invisible at the IP level.

It will only show as a "hop" if routing outside the subnet.

Or have I got it wrong and these systems are on different subnets?
My bad. Router dosent show up.

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 4:56 pm
by aTao
things to try.

plug your RPi B in as the RPI A was (ie WiFi). ping from PC
replace network as was.
get a fresh copy of rasbian on the RPi A do as little as possible to get it connected via WiFi
from RPi A ping RPi B and PC

Re: Can't ping from non-Pi computer

Posted: Wed Dec 10, 2014 5:13 pm
by Dutch_Master
One advantage of the RPi is that it's easy to swap OS's. Swap the SD card of the Model A with the one of Model B, then see if you can connect to either from the laptop. Report your findings :)

Re: Can't ping from non-Pi computer

Posted: Sat Dec 13, 2014 7:32 pm
by abishur
Okay, I tried to swap pis and the problem persisted. I'll try a fresh install and see if that clears things up. I'm starting to wonder if it's the Wi-Fi adapter I'm using....

Re: Can't ping from non-Pi computer

Posted: Sat Dec 13, 2014 8:27 pm
by abishur
I did a fresh install of raspbian and I'm still having the same problem. The router can ping the model A, the Model B can ping the Model A, but no other device on the network can ping the model A!

I've also removed the wireless adapter as a possible failure point, I've previously used this adapter on a pi and was able to remote into it without any problems, though I suppose a driver update in a more recent version of raspbian could be causing issues? :?:

Re: Can't ping from non-Pi computer

Posted: Sat Dec 13, 2014 8:35 pm
by DougieLawson
What are the other devices running (Windows, linux, OSX, somethng else)? What software firewalls are running on them?
Have you configured your LAN network as "private & trusted" on Windows?

Does your router/switch/hub/access point have any controls for ICMP packets?

Re: Can't ping from non-Pi computer

Posted: Sat Dec 13, 2014 8:40 pm
by abishur
DougieLawson wrote:What are the other devices running (Windows, linux, OSX, somethng else)? What software firewalls are running on them?
Have you configured your LAN network as "private & trusted" on Windows?

Does your router/switch/hub/access point have any controls for ICMP packets?
I've tried using window and linux firewalls disabled in both of them. Router does not control ICMP packets.

Re: Can't ping from non-Pi computer

Posted: Sat Dec 13, 2014 8:46 pm
by abishur
Additional network information

my interfaces file

Code: Select all

  GNU nano 2.2.6         File: /etc/network/interfaces                          

auto lo

iface lo inet loopback
#iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

iface home inet dhcp
my wpa_supplicant file (with some redaction ;) )

Code: Select all

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid="nope"
psk="yeahRight!"
proto=RSN
key_mgmt=WPA-PSK
pairwise=TKIP
id_str="home"
auth_alg=OPEN
}

Re: Can't ping from non-Pi computer

Posted: Sat Dec 13, 2014 8:54 pm
by abishur
I think it just got solved! After installing it fresh I just did the apt-get update/upgrade and during the process I noticed it did an upgrade to wpa_conf. As soon as it was done, lo and behold I was able to ping the pi directly.

Which makes sense, back when I previously used this wifi adapter with the pi, I didn't bother using WPA supplicant and just had all my info right there in the interfaces file.

Edit: Just noticed it also did an update to BRCM80211 which I believe covers the chipset being used by my wifi adatper. Regardless I'm now happily communicating with the pi, thanks guys!