Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinging hosts on other subnets doesn't work #42

Open
DavideTurra opened this issue Jun 4, 2023 · 4 comments
Open

Pinging hosts on other subnets doesn't work #42

DavideTurra opened this issue Jun 4, 2023 · 4 comments

Comments

@DavideTurra
Copy link

DavideTurra commented Jun 4, 2023

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

@shmoun
Copy link

shmoun commented Jun 4, 2023

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.

@DavideTurra
Copy link
Author

DavideTurra commented Jun 4, 2023

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

@DavideTurra
Copy link
Author

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.

@shmoun
Copy link

shmoun commented Jun 7, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants