Skip to content
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

MAC Address changes after container restart even with ip specified. #37662

Open
Umer-Javaid opened this issue Aug 17, 2018 · 0 comments
Open

Comments

@Umer-Javaid
Copy link

In reference to github/docker/for-win/#2399
I have created a microsoft/dotnet-framework:4.7.2-runtime container using docker for windows. Each time the container restarts a new MAC address is assigned to it even though I have explicitly specified IP-Address at the creation.

Expected behavior

MAC address should not change after container restart when IP-Address is specified explicitly.

Actual behavior

MAC address changes after each restart.

PS C:\> docker create --name=testContainer --net=transNet1 --ip=10.2.0.251 microsoft/dotnet-framework:4.7.2-runtime
e041405ce6ec21cb28e87923d8ca919919f1f38b9246332fbabaf32be25ba4ab
PS C:\> docker start testContainer
testContainer
PS C:\> docker inspect --format='{{range .NetworkSettings.Networks}}{{println .MacAddress}}{{end}}' testContainer
00:15:5d:71:18:58

PS C:\> docker stop testContainer
testContainer
PS C:\> docker start testContainer
testContainer
PS C:\> docker inspect --format='{{range .NetworkSettings.Networks}}{{println .MacAddress}}{{end}}' testContainer
00:15:5d:71:1e:f4

Information

  • Windows Version:
  Platform ServicePack Version      VersionString
  -------- ----------- -------      -------------
  Win32NT             10.0.14393.0 Microsoft Windows NT 10.0.14393.0
  • Docker for Windows Version:
  Client:
   Version:      18.03.1-ee-2
   API version:  1.37
   Go version:   go1.10.2
   Git commit:   ebbcd7e
   Built:        Tue Jul 10 21:32:32 2018
   OS/Arch:      windows/amd64
   Experimental: false
  
  Server:
   Engine:
   Version:      18.03.1-ee-2
   API version:  1.37 (minimum version 1.24)
   Go version:   go1.10.2
   Git commit:   ebbcd7e
   Built:        Tue Jul 10 21:49:06 2018
   OS/Arch:      windows/amd64
   Experimental: false

Steps to reproduce the behavior

  1. docker pull microsoft/dotnet-framework:4.7.2-runtime
  2. Create a container with explicit IP-Address specified
  3. Start the container
  4. Inspect the container to see MAC-Address
  5. Stop the container and then start again
  6. Inspect the container again to see MAC-Address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants