Jump to content

How does a router's DHCP interact with Docker containers configured in br0 networking mode?


pkun
Go to solution Solved by Vr2Io,

Recommended Posts

I first plug my unRAID machine into the router and the router's DHCP assigns it 10.0.0.6. In my router configuration portal, indeed I see that my machine is assigned 10.0.0.6 in the attached devices list.

 

Running some containers in bridge mode and configuring port mappings allow me to access the containers' services through the LAN using 10.0.0.6:<port>. For example, Jellyfin is accessible through 10.0.0.6:8096.

 

Now, I add another container (pihole) and configure this to run on the custom network br0, assigning it a static IP address of 10.0.0.24. If I then check the attached devices list on my router configuration page, I see that my unRAID machine is now assigned 10.0.0.24, and yet Jellyfin is still accessible through 10.0.0.6:8096! How is this possible if as far as the router is concerned, there is no device with an IP address of 10.0.0.6?

 

*Router model: NETGEAR WAX204

Link to comment
  • Solution

Because docker network have IPVLAN and MACVLAN mode, in IPVLAN mode, all containers use same MAC address ( real interfaces's MAC address ). Most consumer network equipment will list / count device by MAC address ones only, so you will got either one of IP's with same MAC address instead same MAC address with different IP.

Edited by Vr2Io
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.

×
×
  • Create New...