Hi, thanks for this great post. I am currently setting up a docker dev env which contains seven containers. Unfortunately, we have a "special" corporate intranet. Both of NAT and transparent network doesn't work under this intranet. If I use NAT, I can't access any outside resource from the container. For transparent network, the company network has port security which limit at most two MAC address per port, so only one of seven containers can get the ip address from the network at same time. So I came to L2Bridge.
My goal is: Outbound connectivity (Internet access)
I did setup follow the guide. This is the host network info.
PS C:\Users\212616592> ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : G6CR726W911E
Primary Dns Suffix . . . . . . . : "company sensitive"
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : "company sensitive"
Ethernet adapter vEthernet (NATSwitch):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : 00-15-5D-B5-1A-07
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 172.21.21.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter vEthernet (Ethernet):
Connection-specific DNS Suffix . : "company sensitive"
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #4
Physical Address. . . . . . . . . : C8-D3-FF-BE-B1-D9
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.189.181.26(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Lease Obtained. . . . . . . . . . : Wednesday, April 29, 2020 7:34:25 PM
Lease Expires . . . . . . . . . . : Monday, May 4, 2020 7:34:21 AM
Default Gateway . . . . . . . . . : 10.189.180.1
DHCP Server . . . . . . . . . . . : 10.69.64.200
DNS Servers . . . . . . . . . . . : 10.220.220.220
10.220.220.221
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter vEthernet (cbr0_ep):
Connection-specific DNS Suffix . : "company sensitive"
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #5
Physical Address. . . . . . . . . : 00-15-5D-F8-BD-3F
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 10.189.181.2(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.189.181.1
DNS Servers . . . . . . . . . . . : 10.220.220.220
10.220.220.221
NetBIOS over Tcpip. . . . . . . . : Enabled
Connection-specific DNS Suffix Search List :
logon.ds.ge.com
Ethernet adapter vEthernet (Default Switch):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #2
Physical Address. . . . . . . . . : 00-15-5D-5B-08-C3
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 172.17.102.177(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.240
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter vEthernet (nat):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #3
Physical Address. . . . . . . . . : 00-15-5D-93-BA-2C
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 172.19.192.1(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Enabled
This is the docker netwoker info:
Microsoft Windows [Version 10.0.18362.778]
(c) 2019 Microsoft Corporation. All rights reserved.
C:\>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : 886fafbe55b5
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : company sensitive
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . : company sensitive
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
Physical Address. . . . . . . . . : 00-15-5D-F8-B9-E3
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::7113:574e:2920:63d3%4(Preferred)
IPv4 Address. . . . . . . . . . . : 10.189.181.62(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.189.181.1
DHCPv6 IAID . . . . . . . . . . . : 67114333
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-26-3D-C8-A3-00-15-5D-F8-B9-E3
DNS Servers . . . . . . . . . . . : 10.220.220.220
10.220.220.221
NetBIOS over Tcpip. . . . . . . . : Disabled
This is result when tried to access outsite resource from the container:
C:\>curl https://platform.cloud.coveo.com
curl: (6) Could not resolve host: platform.cloud.coveo.com
One hint which I found: my host ip is 192.168.181.26,default gateway is 192.168.180.1. It's a different pattern. Could you please explain how should I change the settings?
PS: This set up did work in my home network which has same ip/gateway patten.