3

I am having a problem with my Raspberry Pi, I cannot ping my pi from any other host in the LAN unless the pi ping that host first.

But all along my Pi is still connected to the LAN (I can access pi from the internet, both via ssh and its webserver).

So apparently the pi is still connected to the network, only no other hosts could see it (unless other host being pinged first).

lsusb of the pi:

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 05e3:0612 Genesys Logic, Inc.
Bus 001 Device 007: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter
Bus 001 Device 006: ID 0bc2:5021 Seagate RSS LLC FreeAgent GoFlex USB 2.0

ifconfig of the pi:

 eth0      Link encap:Ethernet  HWaddr b8:27:eb:b7:26:0e
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2027 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2027 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:167652 (163.7 KiB)  TX bytes:167652 (163.7 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:0e:e8:d4:5d:39
          inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5530026 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7664344 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:829572684 (791.1 MiB)  TX bytes:550946250 (525.4 MiB)

Here are the output of dmesg.

[Sat Aug  3 06:55:13 2013] wlan0: deauthenticated from c8:d7:19:b0:e3:ac (Reason: 7)
[Sat Aug  3 06:55:13 2013] cfg80211: Calling CRDA to update world regulatory domain
[Sat Aug  3 06:55:16 2013] wlan0: authenticate with c8:d7:19:b0:e3:ac
[Sat Aug  3 06:55:16 2013] wlan0: send auth to c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:16 2013] wlan0: authenticated
[Sat Aug  3 06:55:16 2013] rt73usb 1-1.2.1:1.0: wlan0: disabling HT as WMM/QoS is not supported
[Sat Aug  3 06:55:16 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:16 2013] wlan0: RX AssocResp from c8:d7:19:b0:e3:ac (capab=0x411 status=0 aid=1)
[Sat Aug  3 06:55:16 2013] wlan0: associated
[Sat Aug  3 06:55:23 2013] wlan0: deauthenticated from c8:d7:19:b0:e3:ac (Reason: 7)
[Sat Aug  3 06:55:23 2013] cfg80211: Calling CRDA to update world regulatory domain
[Sat Aug  3 06:55:26 2013] wlan0: authenticate with c8:d7:19:b0:e3:ac
[Sat Aug  3 06:55:26 2013] wlan0: send auth to c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:26 2013] wlan0: authenticated
[Sat Aug  3 06:55:26 2013] rt73usb 1-1.2.1:1.0: wlan0: disabling HT as WMM/QoS is not supported
[Sat Aug  3 06:55:26 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:26 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 2/3)
[Sat Aug  3 06:55:26 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 3/3)
[Sat Aug  3 06:55:27 2013] wlan0: association with c8:d7:19:b0:e3:ac timed out
[Sat Aug  3 06:55:28 2013] wlan0: authenticate with c8:d7:19:b0:e3:ac
[Sat Aug  3 06:55:28 2013] wlan0: send auth to c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:28 2013] wlan0: authenticated
[Sat Aug  3 06:55:28 2013] rt73usb 1-1.2.1:1.0: wlan0: disabling HT as WMM/QoS is not supported
[Sat Aug  3 06:55:28 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:28 2013] wlan0: RX AssocResp from c8:d7:19:b0:e3:ac (capab=0x411 status=0 aid=1)
[Sat Aug  3 06:55:28 2013] wlan0: associated
[Sun Aug  4 07:33:27 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:33:32 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:33:43 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:34:05 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:34:48 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:36:15 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 13:44:23 2013] ip_tables: (C) 2000-2006 Netfilter Core Team

and no iptables rule.

Why does it kept getting deauthenticated? It happened several time, I just cut the dmesg output.

The weird thing is the Pi has to ping another host first, if the other host want to ping (let alone connect) to the Pi.

Have any one had similiar issues? any suggestion? Thank You before.

Edit 1: Ok, so I tried dnsmasq and wireshark...here goes. 1. Dnsmasq didn't help (I thought it would,dang!).... 2. wireshark shows arp request, but no answer from the Raspberry Pi, but any other arp request to any other hosts worked just fine.

So i tried arping on the first host while tcpdumping on the raspberry pi (and another host at the same time - ubuntulaptop), filtering arp request.

No arp packet reach the Raspberry Pi, but the ubuntulaptop receive the packet.

arp requests are broadcast messages right? So is the problem is on the router (linksys E1200)? The E1200 also has the Raspberry Pi with a static ip (while other devices have dynamic IPs). Or, is it because I port forward some traffic to the Raspberry Pi?

And one more thing, this problem happens randomly (or is it?). If it is the router, why would it happen randomly?

Next thing I will try to disable the port forwarding.

  • How did you configure your router? Did you use port forwarding for ssh and http, or did you setup the Pi as a DMZ? – Gerben Aug 4 '13 at 15:00
  • Port forward. I am port forwarding http and ssh server. – simonsays Aug 4 '13 at 15:39
  • It sounds like a networking issue to me... Does it work when you take the port forward off? Do other devices on the network act as expected? If the answer is yes to both, then it's your router. – Butters Aug 7 '13 at 20:30
  • added some detail, I will try to disable port forward next. – simonsays Aug 9 '13 at 2:32
  • @simonsays It is definitely an interesting issue... Let us know what happens with the port forward off. Also for future reference you can tag comments with (@username) and that user will be notified there is a new comment for them.. It is pure luck I saw your comment and update. – Butters Aug 9 '13 at 2:56
1

From my tests with a similar setup (pi networked via USB wifi) I can confirm your observations in the edit. At some point no arp request packets reach the pi, while other devices can see them. The pi can still send them and receive replies, that's how a pinged host can learn the address of the pi.

I suspect the pi stops seeing all broadcast packets maybe due to some power saving gone wrong, but I haven't tested that. Could also be that a different wifi dongle (with different driver) helps.

For me it always works after a reboot of the pi, or after a fresh re-association on the wireless network. Like so:

$ wpa_cli reassociate

I have that as an hourly cron job and it seem to makes the situation better for now.

0

I had pretty much the same problem. Could not ping raspberry pi from my PC unless I first pinged my PC from the raspberry pi. For me the root cause turned out to be the fact that I had OpenVPN (with IPredator) running. Once I exited that application everything worked fine.

0

I had this problem as well.

Once I pinged my laptop from the pi I could also ping the pi from the laptop. If I waited 60 seconds and then tried to ping the pi again, it still worked. If I waited 120 seconds instead, I could no longer ping the pi. At that point I had to once again ping my laptop from the pi.

As soon as I could ping the Pi I could also connect to it using ssh.

Both the laptop and the Pi was on wifi. Putting the Pi on a wired connection instead fixed the pinging/ssh issue.

Keeping the wifi, but configuring my router to put the Pi IP-address in a DMZ I could ssh to the Pi using it's new IP (same IP as whatismyip.com reports from any computer on the LAN).

So it looked like a router issue, not a Raspberry issue.

The final resolution to the problem was to install a custom firmware (dd-wrt) on the router. After that I've had no more ping/ssh problems with the Pi. The router in question is a Netgear Nighthawk R7000.

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.