Ping doesn't work in overlay network

I wanted to prepare my hosts and make an overlay network. I simply followed the official guide. Everything could be successfully done but when it comes to ping the other container it doesn’t work.

host1

/ # ping -c 2 alpine2
PING alpine2 (10.0.1.18): 56 data bytes

--- alpine2 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

host2
I run a not detached alpine container here to test the other way.

/ # ping -c 2 alpine1
PING alpine1 (10.0.1.14): 56 data bytes

--- alpine1 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

This what I get. Both hosts can ping each other. What could be the root of the issue?

Are you sure all the ports are enabled on the hosts? how did you create the overlay network and how did you start the container? Please, share commands and anything that you used to create the network and the test containers. I know you wrote you followed the official guide, but the only way to be sure you ran every required command if you share everything you did.

I almost forgot, but also share what operating system you are using and how you installed Docker.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.