How to assign IP address to windows server containers when we create network with binding physical interface

Expected behavior

Able to create transparent network that binds to physical networks and still support static IP assignment to the containers.

I noticed that one drawback when you bind the physical interface to docker transparent network, it always expects this physical interface handles DHCP. We cannot assign static IP address to containers nor we can provide the subnet range to network itself.

I do not have DHCP for this Physical network it is connected to TOR dumb switches and do not plan to create a DHCP server. I have containers in other machines connected to same switch which I need to connect to. Any ideas how can I do that ?

Actual behavior

docker network create -d transparent --subnet=172.18.0.0/24 -o com.docker.network.windowsshim.interface=“nic1” new_ns2
Error response from daemon: HNS failed with error : The object already exists.

docker run -itd --name test --net new_ns --ip 172.18.0.1 microsoft/nanoserver
b0db602b5f57b65a5d5128913b094c6ee7e6aaf0da29b4490b422f5a09122452
C:\Program Files\Docker\docker.exe: Error response from daemon: User specified IP address is supported only when connecting to networks with user configured subnets.

Information

PS C:\Users\Administrator> docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 1
Server Version: 17.03.1-ee-3
Storage Driver: windowsfilter
Windows:
Logging Driver: json-file
Plugins:
Volume: local
Network: l2bridge l2tunnel nat null overlay transparent
Swarm: inactive
Default Isolation: process
Kernel Version: 10.0 14393 (14393.1358.amd64fre.rs1_release.170602-2252)
Operating System: Windows Server 2016 Datacenter
OSType: windows
Architecture: x86_64
CPUs: 6
Total Memory: 15.91 GiB
Name: A115
ID: PU6E:JJMN:32FX:GOJT:EQHU:VZIS:25EX:S4AY:32KJ:KQDE:JVW3:NJM4
Docker Root Dir: C:\ProgramData\docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
PS C:\Users\Administrator> docker version
Client:
Version: 17.03.1-ee-3
API version: 1.27
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64

Server:
Version: 17.03.1-ee-3
API version: 1.27 (minimum version 1.24)
Go version: go1.7.5
Git commit: 3fcee33
Built: Thu Mar 30 19:31:22 2017
OS/Arch: windows/amd64
Experimental: false

Steps to reproduce the behavior

  1. …docker network create -d transparent --subnet=172.18.0.0/24 -o com.docker.network.windowsshim.interface=“nic1” new_ns See the HNS error here

  2. …docker run -itd --name test --net new_ns --ip 172.18.0.1 microsoft/nanoserver