How to coordinate Static IPs between the container and the router??


btrcp2000

Recommended Posts

For once I am posting without something being currently broken, just a general "best practices" question.  Most of my dockers were set up before there was the option to have static IPs set at the container level.  Never bothered to understand it, but its apparently recommended for the AdGuard Docker so I may as well figure it out.

 

In the past I have had Unifi deal with assigning Static IPs for actual devices like the unraid server itself.  If I am going to start using the containers, do I need to be sure I am using IPs outside Unifi's DHCP range, or does it not matter?  If the container has its own, can the DHCP process assign the same one to something else? 

 

thanks

 

 

Link to comment

Yes, its best to have a range of IPs for dockers that is outside of the Unifi's DHCP range.

You can customize the docker network (by default named eth0/br0) and have it use IPs in the desired range (instead of the whole subnet as by default)

 

FYI: Docker assigns containers IPs using a self-contained IPAM which does not coordinate with any external system like DHCP servers, etc. Docker does not attempt to check to see if the IP has been allocated and just picks the next available number.

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.