| Electronics > Beginners |
| Raspberry PI networking issue - no response to ARP requests |
| << < (4/4) |
| TomS_:
--- Quote from: WaveyDipole on January 22, 2018, 04:59:40 pm ---Do all devices have the same gateway address set (i.e. the router)? --- End quote --- Gateway doesnt matter when all devices are in the same subnet. They can all have different or no gateway and they will still be able to talk. Gateway only matters when you need to reach destinations beyond the local subnet, e.g. the Internet, or if you had a larger more complex network with multiple subnets. |
| paulca:
You can gateway the local subnet if you want. route add host 192.168.0.254 via dev eth0 route add net 192.168.0.0/24 via 192.168.0.254 Though why you would want to do that.... I suppose it allows you to firewall LAN<->LAN communications within a subnet. From memory of trying this, it might be a bit more tricky than the above route commands suggest. |
| tinalee:
I had this issue with two units (Rasperry pi Zero-W) Using built in wifi wlan0. It seems to be a definate bug. I have tried different wifi drivers and my only solution was to write a script that checks the arp cache every few seconds, identifies resovled IPs, inturn then attempts a ping to each. For any that do not respond, that arp entry is then deleted and re-PINGed. Not had issue since, now several weeks. It seems that the ARP mechanism is getting stuck when devices go stale. The above workaround is the only solution i have found. I hope this helps others because it was doing my head in. Here is my probably not so elegant script as a guide: (Change filename obviously to where you want to store temporary ARP output) --- Code: --- #!/bin/sh filename="/mnt/sdcard/tmp/arp-entries.txt" while true; do arp -n > "$filename" while read -r line || [ -n "$line" ]; do name=$(echo "$line" | tr -d '\r') if echo $name | grep "wlan"; then name=$(echo $name | cut -d " " -f1) ping -c1 $name > /dev/null if [ $? != 0 ]; then # PING failed, force re-ARP # echo "Failed" arp -d $name ping -c1 $name > /dev/null fi fi done < "$filename" sleep 120 done --- End code --- |
| paulca:
This is interesting. Thanks for the idea. In my case I ran an RJ-45 cable into the living room, so both PIs are on a wired connection now. I'm moving house (hopefully) in a month or so, so I may have to run a PI on a wifi connection, although I think the main use case can be covered with an ESP8266 which in my experience have been completely bullet proof reliable in terms of holding their Wifi connection and re-establishing it if the access point goes down. I even replaced the access point completely with a new one, set the SID and PSK key to the same values and the ESPs just carried on working. |
| Navigation |
| Message Index |
| Previous page |