ESP32Ping
ESP32Ping copied to clipboard
Pinging hosts on other subnets doesn't work
Hi, I'm trying to ping an host in a different subnet but ping ever fails, the ping from my PC works normally, any hint?
thanks in advance
Are you getting your IP from a DHCP server or setting it manually?
You can check if your gateway is set correctly.
If you're using hostnames for pinging you could ping to the actual IP of the host on the other subnet first, if that works it coud be that DNS was not set properly.
Does the gateway between the two subnets know about the subnet you're coming from? Check the routing table.
Did you add a static route on your PC? You could move that to the router.
hi Simon,
all the IPs are static, all the protocols that the device uses works, the esp32 is working at 100% (MQTT, FTP, HTTP ecc) . I can ping the device but the device can't ping me.
I'm pinging IP addresses not host names
the 2 subnets in question are these: xxx.xxx.30.8 - 255.255.255.248 and xxx.xxx.20.17 - 255.255.255.240
the routing is managed by others but everything on the network works well
Seems a library issues, may be from the original ping.h? I can't find nothing.
tnx
I've seen that it's not that I can't ping hosts outside my subnet but that regardless of the host's position on the network, ping works on some hosts and doesn't on others. By a fatality all the hosts I had tried on the other subnet were unresponsive and those on my subnet did. I have now tried with other hosts and noticed this behavior. It seems that ping works on some hosts and not on others.
It would be interesting to get a packet capture on the gateway. Comparing successful pings and replies <-> hosts on the other subnet to unsuccessful pings. What is going on? Does the gateway do NAT? Are there firewall rules defined for FORWARDING?