New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a new network creation driver option (disable_gatewaydns) for t… #2021

Merged
merged 1 commit into from Dec 13, 2017

Conversation

Projects
None yet
5 participants
@soccerGB
Contributor

soccerGB commented Nov 21, 2017

…he Windows driver

Signed-off-by: Cheng-mean Liu soccerl@microsoft.com

This new disable_gatewaydns option provides a way for a client to create a network instance without any gateway IP added into the DNS list for all of its endpoints.

Usage of disable_gatewaydns:
When set as true, the Windows network driver will skip the addition of the gateway IP into the DNS list.
When not specified, the default setting for disable_gatewaydns is false, that is, it will always add gateway IP into an endpoint's DNS list unless an endpoint was created specifically with an existing epOption.DisableDNS option.

Example usage:
docker network create -d nat --gateway 172.8.128.1 --subnet 172.8.128.0/20 -o com.docker.network.windowsshim.dnsservers=4.4.4.4,8.8.8.8 -o com.docker.network.windowsshim.disable_gatewaydns=true mynat

Added a new network creation driver option (disable_gatewaydns) for t…
…he Windows driver

Signed-off-by: Cheng-mean Liu <soccerl@microsoft.com>
@codecov-io

This comment has been minimized.

Show comment
Hide comment
@codecov-io

codecov-io Nov 21, 2017

Codecov Report

❗️ No coverage uploaded for pull request base (master@460ac8f). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2021   +/-   ##
=========================================
  Coverage          ?   38.85%           
=========================================
  Files             ?      137           
  Lines             ?    27374           
  Branches          ?        0           
=========================================
  Hits              ?    10637           
  Misses            ?    15439           
  Partials          ?     1298

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 460ac8f...884eaa0. Read the comment docs.

codecov-io commented Nov 21, 2017

Codecov Report

❗️ No coverage uploaded for pull request base (master@460ac8f). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2021   +/-   ##
=========================================
  Coverage          ?   38.85%           
=========================================
  Files             ?      137           
  Lines             ?    27374           
  Branches          ?        0           
=========================================
  Hits              ?    10637           
  Misses            ?    15439           
  Partials          ?     1298

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 460ac8f...884eaa0. Read the comment docs.

@msabansal

This comment has been minimized.

Show comment
Hide comment
@msabansal

msabansal Nov 23, 2017

Contributor

LGTM

Contributor

msabansal commented Nov 23, 2017

LGTM

@aserdean

This comment has been minimized.

Show comment
Hide comment
@aserdean

aserdean Dec 8, 2017

Thanks a lot for the patch!

It would be nice to mention this change require Windows version 1709 to work.

PS C:\> docker network create -d nat --gateway 172.8.128.1 --subnet 172.8.128.0/20 -o com.docker.network.windowsshim.dnsservers=4.4.4.4,8.8.8.8 -o com.docker.network.windowsshim.disable_gatewaydns=true mynat

PS C:\> docker run --network mynat microsoft/windowsservercore:1709 ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : dce0a7aa7c75
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : localdomain

Ethernet adapter vEthernet (Ethernet):

   Connection-specific DNS Suffix  . : localdomain
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #5
   Physical Address. . . . . . . . . : 00-15-5D-BA-33-0B
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::4c22:564:797d:206e%29(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.8.130.38(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 172.8.128.1
   DNS Servers . . . . . . . . . . . : 4.4.4.4
                                       8.8.8.8
   NetBIOS over Tcpip. . . . . . . . : Disabled

PS C:\> docker run --network mynat --dns 8.8.4.4 --dns-search github.com microsoft/windowsservercore:1709 ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : ef87f28a77b9
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : github.com

Ethernet adapter vEthernet (Ethernet):

   Connection-specific DNS Suffix  . : localdomain
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #5
   Physical Address. . . . . . . . . : 00-15-5D-BA-30-68
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::7dc7:584c:d593:40fd%29(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.8.141.101(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 172.8.128.1
   DNS Servers . . . . . . . . . . . : 8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Disabled

This fully fixes: moby/moby#30260 , docker/for-win#397 .

Tested-by: Alin Gabriel Serdean aserdean@cloudbasesolutions.com

LGTM

cc @mavenugo

aserdean commented Dec 8, 2017

Thanks a lot for the patch!

It would be nice to mention this change require Windows version 1709 to work.

PS C:\> docker network create -d nat --gateway 172.8.128.1 --subnet 172.8.128.0/20 -o com.docker.network.windowsshim.dnsservers=4.4.4.4,8.8.8.8 -o com.docker.network.windowsshim.disable_gatewaydns=true mynat

PS C:\> docker run --network mynat microsoft/windowsservercore:1709 ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : dce0a7aa7c75
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : localdomain

Ethernet adapter vEthernet (Ethernet):

   Connection-specific DNS Suffix  . : localdomain
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #5
   Physical Address. . . . . . . . . : 00-15-5D-BA-33-0B
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::4c22:564:797d:206e%29(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.8.130.38(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 172.8.128.1
   DNS Servers . . . . . . . . . . . : 4.4.4.4
                                       8.8.8.8
   NetBIOS over Tcpip. . . . . . . . : Disabled

PS C:\> docker run --network mynat --dns 8.8.4.4 --dns-search github.com microsoft/windowsservercore:1709 ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : ef87f28a77b9
   Primary Dns Suffix  . . . . . . . :
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : github.com

Ethernet adapter vEthernet (Ethernet):

   Connection-specific DNS Suffix  . : localdomain
   Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter #5
   Physical Address. . . . . . . . . : 00-15-5D-BA-30-68
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::7dc7:584c:d593:40fd%29(Preferred)
   IPv4 Address. . . . . . . . . . . : 172.8.141.101(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.240.0
   Default Gateway . . . . . . . . . : 172.8.128.1
   DNS Servers . . . . . . . . . . . : 8.8.4.4
   NetBIOS over Tcpip. . . . . . . . : Disabled

This fully fixes: moby/moby#30260 , docker/for-win#397 .

Tested-by: Alin Gabriel Serdean aserdean@cloudbasesolutions.com

LGTM

cc @mavenugo

@fcrisciani

This comment has been minimized.

Show comment
Hide comment
@fcrisciani

fcrisciani Dec 13, 2017

Member

LGTM

Member

fcrisciani commented Dec 13, 2017

LGTM

@fcrisciani fcrisciani merged commit 808500d into docker:master Dec 13, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
dco-signed All commits are signed

fcrisciani added a commit to fcrisciani/docker that referenced this pull request Dec 14, 2017

Libnetwork vendoring
Windows fixes:
docker/libnetwork#1916
docker/libnetwork#2014
docker/libnetwork#2021

Fix for veth leak on daemon crash
Cleanup networkDB logic for node management

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>

@fcrisciani fcrisciani referenced this pull request Dec 14, 2017

Closed

Libnetwork vendoring #35792

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment