How To Create A Transparent Network For Windows Containers

In this article about Windows Containers, I’ll show you how I to create a Transparent Network that will make Windows Containers available on my direct physical Network.

Windows Containers comes with 5 Network types on Transparent Network Is the most popular network configuration because It allows us to use Containers like Virtual Machines.

Before making any changes, I’ll review the current networks configured on the host using the command below:

Docker network ls

To create a Transparent Network on a DHCP-enabled network,  I’ll use the command below,  For non-DHCP enabled to continue to the Non-DHCP section later on.

Note: Make sure you use lower case name only

docker network create -d transparent tlan

To place a VM in the new LAN I’ll run the cmdlet below assuming I have DHCP enabled on the LAN.

docker run -it --network=tlan microsoft/nanoserver

If DHCP Is not enabled on the network, Use the command below to create the Transparent Network:

docker network create -d transparent --subnet=10.99.38.0/24 --gateway=10.99.38.1 tlan2

Once the Network Is created, I’ll create a Container with a static IP address Inside the container.

docker run -it --network=tlan2 --ip 10.99.38.99 microsoft/nanoserver

Leave a Reply