How to Set Rancher OS to Provide Local IPs to Docker Containers?

Status
Not open for further replies.

theprez

Explorer
Joined
Oct 18, 2014
Messages
72
Hey All -

So my network is configured in the 192.168.0.0/24 subnet and everything connects to a Untangle box for content filtering and ultimately into a Ubiquiti Switch and USG Pro.

It appears there's some Rancher OS magic going on that I don't seem to follow - from what I can tell, Rancher OS will obtain a random DHCP IP within the 192.168.0.X subnet, but any containers apparently grab their own IP out of a different subnet. This causes the untangle content filter to go nuts and it causes the Ubiquiti equipment not to see it from a QoS and display perspective in the single pane of glass.

How do I have docker/Rancher OS allocate a real 192.168.0.X IP to any container?

P.S. - I know you can route specific ports to the Rancher Host IP but that's not what I'm trying to accomplish.

Thanks
 
Joined
Apr 9, 2015
Messages
1,258
I would suggest hitting the Rancher OS forums for this, we have a few people here using it but they have a whole lot more who deal with it on a regular basis.

https://forums.rancher.com/
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
You can't do that without the host playing along, which basically implies one virtual NIC per container, which Rancher then needs to juggle around appropriately.

Edit: Well, there are other options, but the host always needs to know what's going on in the VM - or rather, the virtual NIC needs to support the required features.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@theprez rancheros is the docker host to which you can assign a static IP by either giving your rancheros vm a mac address and using DHCP reservation or setting a static IP by using a suitable cloud-config within the rancheros vm. But you need to get to gripes with the various forms of docker networking (host, bridge, overlay, etc ) to know how/if the containers you wish to use will function as you want within your overall network. A docker macvlan may be of help.

You have not said if your are running the Rancher UI within your rancheros vm or not, but might find this useful: https://forums.freenas.org/index.ph...ner-networking-demystified.53516/#post-369598

Plenty refs on the web, for example: https://blog.docker.com/2016/12/understanding-docker-networking-drivers-use-cases/
 
Last edited:
Status
Not open for further replies.
Top