-
Notifications
You must be signed in to change notification settings - Fork 55
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 defining doesn't work #1
Comments
Ah, looks like this is due to the fact that Docker only assigns the requested MAC address when moving the interface into the container. |
Can we make another flag to define MAC for DHCP client? |
Not necessary, I've updated Let me know if this fixes the issue for you! |
Ok, thanks! I will check this in a few hours |
Everething is working fine, man you incredible!!! I tried to setup this for 2 weeks) |
Glad it helped 😄 |
Hi, I cannot get it working with self-compiled docket-net-dhcp (including the fix in pull request #43). I specified "mac_address" in the docker-compose file, but it's not used. Any ideas how to fix it? Thanks a lot for your help! EDIT: I found the solution here to work with a newer docker version. The MAC address is now defined in the networks section. It should look like this for docker-net-dhcp:
|
I tried to start container with predefined MAC address to setup static DHCP lease for container:
docker run --rm -ti --network shared-net --mac-address 66:5e:28:93:6f:60 alpine
In container MAC address defines successfully:
But on my router it shows another MAC:
5e:f0:e1:a0:7d:17
for lease with this IP:192.168.28.101
.I think that DHCP client that runs on host using random MAC every time.
And new random MAC is used when container created/restarts.
Or I can set static IP address, but I don't know how to do this with this docker network driver.
What I'm want to do is to connect docker container to linux bridge managed by systemd-networkd and set IP address to it. And I don't want to use pipework script for this because when host/container restarts it needs to be executed again.
The text was updated successfully, but these errors were encountered: