Networking for Windows Server containers
The concept of networking with Windows Server containers is similar in function to VMs. A virtual network adapter (vNIC) is attached to a container, which connects to a Hyper-V virtual switch (vSwitch). There are five networking drivers, or modes, that can be created through Docker to support Windows; these are as follows:
- L2bridge network driver
- L2tunnel network driver
- NAT network driver
- Overlay network driver
- Transparent network driver
Further details on each of these can be found in the following Microsoft documentation article: https://docs.microsoft.com/en-gb/virtualization/windowscontainers/container-networking/network-drivers-topologies.
Depending on the physical network and host networking requirements, the one that best suits your needs should be chosen.
You can run the docker network ls
command to list the available networks.
NAT is the default network type that’s created the first time...