Long story short, I need a docker container to be able to talk to network devices outside of the docker host by routing and not NATed. If you use a bridged nework, any traffic bound for outside of docker gets NATed as it leaves the docker host. I have some apps that have issues with NAT. Ideally I wanted the containers to be directly exposed on the same physical network as the host. You can do this by creating a network of type “host” but this is not supported on Windows. This is exactly what I want to achieve or the next best thing.
The next best thing is the IPvlan. The documenation here (notice I am referring to the layer 3 type) heavily implies that once a container is attached to a correctly configured ipvlan network it should be able to communicate with the outside world. However, I cannot get this to work. So either the documentation is wrong, or it is unsupported in Window Docker.
Note: I can get two containers to talk to each other through the same IPvlan network which have been assigned to different subnets (I did the example in the doc linked above). In this case the docker host does route traffic correctly. Again though, they cannot talk outside on the host, but if you look at the diagrams it is implied that it is possible; and there is a statement near the end of the section stating:
In order to ping the containers from a remote Docker host or the container be able to ping a remote host, the remote host or the physical network in between need to have a route pointing to the host IP address of the container’s Docker host eth interface.
This is bog standard networking and is expected. So you need to configure routes on your “external” network to tell them that to get to the containers they must route through the docker host. I have added these routes but it still does not work.
Can anyone advise if I have missed something according to the docs?
Can anyone confirm if they have ever had this working using Docker Windows? prefrebly a DEV.
Is there any of the way I can achieve what I want to avoid NATting traffic to my containers in Windows?
thanks,