Docker Community Forums

Share and learn in the Docker community.

4 containers running on 2 interfaces and 2 IP alias interfaces - only 2 are responding

aws
amazonwebservices
docker

(Xpl0iter) #1

Hi,
I have the following set up.

eth0 - IP00 - Docker00
eth0:1 - IP01 - Docker01
eth1 - IP10 - Docker10
eth1:1 - IP11 - Docker11

eth0 and eth1 are real interfaces and eth0:1 and eth1:1 are interfaces with IP aliases.

All the 4 containers are having nginx servers running on them.
Now once everything is set up, only IP00 and IP01 are accessible. Both the others are timing out when trying to connect to.

I know there would be the issue of asynchronous routing because we have more than one default gateway.
So I have given the needed IP rules and routes to make this set up work. Here after seeing docker containers are not working, I tried testing the same set up with apache.
So I created 4 virtual hosts, all 4 associated with the four IP addresses we have,. Now I configured each virtual host to use different document root to check if everything works or not.

Here is the document root set up,

IP00 - /var/www/eth0/index.html
IP01 - /var/www/eth00/index.html
IP10 - /var/www/eth1/index.html
IP11 - /var/www/eth11/index.html

Here after this is set up when I try to access these IPs, all the corresponding webpages are being shown in the correct order. So I think the ip routes and rules are working fine and there is some issue with the docker set up.

Can someone please help me to figure out the issue.?

Thanks,
defiant