Containers on two hosts on different subnets cannot talk to each other


Here’s the scenario I have:

  • One AWS VPC with CIDR block Any host in the VPC can talk to any host regardless of subnet.
  • One host in public subnet
  • One host in private subnet
  • Both hosts can ping each other without any problems

I deployed a container to each host, but the containers can’t talk to each other. When I tried to do a ping, it hangs.

Any suggestions would be appreciated.


Are you sure they are able to talk over UDP ports 500 and 4500? Also, can you spin up 2 containers on each host? There is a known networking issue that sometimes networking doesn’t get set up when you have only 1 container.

Hi Denise,

Thanks for your response. I couldn’t figure out the exact problem, but after removing and adding back the hosts to rancher, I’m able to ping the containers correctly. It may be related to the issue described on the rancher issue you mentioned.