Containers and DHCP Assigned IP


mifronte

Recommended Posts

Yes, dynamic assignment is possible. You'll need to configure an address range used by the DHCP service of Docker itself.

 

Go to Docker Settings, stop the Docker service and enable advanced view. Select a range which does not conflict with the DHCP service of your router as Docker is unaware of any other DHCP service.

 

Link to comment
  • 4 years later...

Had the same issue here: 

I'd definitely get behind a solution on this as well.  Previously, ASUS router was able to see Docker IP's running on macvlan with no issues on vanilla Debian.

 

 

Side note:  some of my containers actually register their DHCP address with my DHCP service external to Unraid...but only 3 containers total.  The rest follow the behavior above of not registering with external DHCP.  The containers that work are PiHole DOT-DOH, Whoogle, and The Lounge.  Not sure why those are different than any other container...but they registered with my external DHCP service and I was able to reserve a permanent lease for them.

Edited by devnet
Link to comment
On 3/6/2022 at 5:00 AM, devnet said:

I'd definitely get behind a solution on this as well. 

...then make yourself heard in the feature request above, so it doesn't go unnoticed ;-)

 

On 3/6/2022 at 5:00 AM, devnet said:

 

Previously, ASUS router was able to see Docker IP's running on macvlan with no issues on vanilla Debian.

It is different, whether these routers did actually hand out an IP by dhcp-request or simply track outbound internet traffic going through it, as a gateway. Many SoHo routers just do the 2nd thing, which is of course convenient to the user, as it creates a list of all hosts (as every host will connect to the internet eventually).

 

On 3/6/2022 at 5:00 AM, devnet said:

Side note:  some of my containers actually register their DHCP address with my DHCP service external to Unraid...but only 3 containers total.  The rest follow the behavior above of not registering with external DHCP. 

Reason for that is, that the "standard" for a Docker is just a container of a single App inside, hence the maintainer does not care to embed (and run) a dhcp-client inside (which will make acquiring an IP from an external dhcp server work, when using macvlans). But a few actually do host and run a dhcp-client, as you noticed.

  • Thanks 1
Link to comment
  • 5 months later...

ah very disappointing to learn its not possible to do this natively, i also would have loved to have my own external router handle all the DHCP requests and not do a half-way house of multiple non-aware DHCP servers. 

 

I'm still very likely to purchase at the end of the month but this would definitely help towards tipping my over the edge :D

 

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.