I have a sever with multiple network cards and I’m having trouble access exposed container ports from the vlan interface. Here is what the network looks like. I can successfully connect to the container on 127.0.0.1, 10.0.2.17 and 10.0.4.17 but not 10.0.3.17. I’m assuming it has something to do with multiple networks on the same card but I haven’t found a workaround. I ran into this issue with Kubernetes but tracked it down to the Docker level.
eth0,eth1
bond0 - 802.3ad
vlan14
ip 10.0.4.17
eth2,eth3
bond1 - active/backup
ip 10.0.2.17
vlan13
ip 10.0.3.17
And here I am doing a test.
ubuntu@cloudmgr1:~ sudo docker run -d --rm --name web-test -p 8888:8000 crccheck/hello-world
4e59fb70b77084496f16b118c59815cdc38b327413268e30466236106035a198
ubuntu@cloudmgr1:~ netstat -tln | grep 8888
tcp6 0 0 :::8888 :::* LISTEN
ubuntu@cloudmgr1:~$ curl 10.0.2.17:8888
Hello World
## .
## ## ## ==
## ## ## ## ## ===
/""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o _,/
\ \ _,'
`'--.._\..--''
ubuntu@cloudmgr1:~$ curl 10.0.3.17:8888
curl: (7) Failed to connect to 10.0.3.17 port 8888: No route to host
ubuntu@cloudmgr1:~$ curl 10.0.4.17:8888
Hello World
## .
## ## ## ==
## ## ## ## ## ===
/""""""""""""""""\___/ ===
~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
\______ o _,/
\ \ _,'
`'--.._\..--''