I have an issue which may not be of high priority as there is obviously a workaround but something which may be a potential bug that I could log. I've search for similar topics but I have not found a similar one so I'm creating a new post.
Background: SSH into Pi 2 with Raspbian v4.1.6-v7+ #810. Pi only has WiFi with chipset 8188EU connected via USB and some GPIO pins connected. Pi has a power supply of 5V 2A.
Issue: Able to successfully SSH via public IP address where the router is port forwarded to a static local IP address.
However, fail to SSH via local IP address when in LAN.
Interesting observations:
1. This occurs randomly but usually during the evening.
2. Sometimes, the local IP address may be resolved on it's own after multiple tries and I could ping/SSH locally, otherwise the Pi needs to be restarted. During the multiple tries, Pi becomes slow. I have Apache running and sometimes I am not able to load the website hosted/website takes too long to load.
3. The router R/ARP table sometimes do not contain the static IP address configured in Pi. When it doesn't, I am still able to log in via SSH through public IP address.
4. When SSH via public IP, a ping to the router (192.168.1.1) or any other hosts gives time outs.
5.
Hypothesis of root cause of issue:
It may be due to the WiFi chipset (I've been a stingy bastard - 3 AUD on eBay) due to high drop rates in wlan0.
I plan to buy a new WiFi USB (any cheap recommendations) to just test it put, but before I do, I wanted to see what else I can do based on your suggestions first to solve this issue.
Any help appreciated.
Cheers!
Logs:
When logged in via public IP address:
pi@raspberrypi ~ $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether b8:27:eb:2c:67:7c brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:0b:81:9b:9e:ce brd ff:ff:ff:ff:ff:ff
inet 192.168.1.52/24 brd 192.168.1.255 scope global wlan0
valid_lft forever preferred_lft forever
inet 192.168.1.15/24 brd 192.168.1.255 scope global secondary wlan0
valid_lft forever preferred_lft forever
pi@raspberrypi ~ $ ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:2c:67:7c
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:65536 Metric:1
RX packets:58 errors:0 dropped:0 overruns:0 frame:0
TX packets:58 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5264 (5.1 KiB) TX bytes:5264 (5.1 KiB)
wlan0 Link encap:Ethernet HWaddr 00:0b:81:9b:9e:ce
inet addr:192.168.1.52 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:54652 errors:0 dropped:3031 overruns:0 frame:0
TX packets:27384 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7599662 (7.2 MiB) TX bytes:12225250 (11.6 MiB)
pi@raspberrypi ~ $ ping 192.168.1.52
PING 192.168.1.52 (192.168.1.52) 56(84) bytes of data.
64 bytes from 192.168.1.52: icmp_req=1 ttl=64 time=0.169 ms
64 bytes from 192.168.1.52: icmp_req=2 ttl=64 time=0.139 ms
64 bytes from 192.168.1.52: icmp_req=3 ttl=64 time=0.136 ms
^C
--- 192.168.1.52 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.136/0.148/0.169/0.014 ms
pi@raspberrypi ~ $ ping 192.168.1.15
PING 192.168.1.15 (192.168.1.15) 56(84) bytes of data.
64 bytes from 192.168.1.15: icmp_req=1 ttl=64 time=0.133 ms
64 bytes from 192.168.1.15: icmp_req=2 ttl=64 time=0.118 ms
^C
--- 192.168.1.15 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.118/0.125/0.133/0.013 ms
====================================================================================
when ping and SSH via local IP:
MacBook-Pro:~ kwc$ ping 192.168.1.52
PING 192.168.1.52 (192.168.1.52): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
Request timeout for icmp_seq 3
^C
--- 192.168.1.52 ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss
MacBook-Pro:~ kwc$ ssh pi@192.168.1.52
ssh: connect to host 192.168.1.52 port 22: Operation timed out
