jpetazzo / pipework

Software-Defined Networking tools for LXC (LinuX Containers)
Apache License 2.0
4.22k stars 727 forks source link

help setting Docker DHCP+DNS for my network #94

Closed ehudkaldor closed 9 years ago

ehudkaldor commented 10 years ago

I keep finding partial answers to this, so maybe someone here will know: I am trying to set up a home network, with Ubuntu running Docker, with a container running DNSMASQ (or ISC DHCP + BIND9) to serve the network. the Docker host (Ubuntu) will be wired to the cable modem, and to a wireless access point. so,

bonus: have multiple networks based on VLANs, each with its own DHCP container.

wow.

jpetazzo commented 10 years ago

Hi,

There's just one thing that confuses me:

preferably, the Ubuntu host will get its IP from DNSMASQ after it boots and starts teh container, but i can live with having a static IP on it.

Does that mean that you want the Ubuntu host to:

ehudkaldor commented 10 years ago

i would prefer it, so that IPs are managed in one central spot (that is, the DHCP). I do, however, understand the risk, and I'm willing to leave that portion.

so, i am looking to run a DHCP in a container, that will serve outside the host. the host will have a static IP (let's say 10.20.30.1), the dockerized DHCP will have a static IP (10.20.30,2) and will be serving as DHCP to all others who connect to the network.

i understand the one thing that makes this case (DHCP) special is that DHCP listens on ARP, under the IP layer, and i am not sure if this is passed along to the container. while i can find documentation about running a dockerized DHCP for other containers, i cannot seem to find how to make it serve the host network.

ehudkaldor commented 9 years ago

bump?

jpetazzo commented 9 years ago

Would this help you:

https://github.com/jpetazzo/pxe

It shows how to run a PXE server (and therefore, a DHCP server) in a container.

jpetazzo commented 9 years ago

Closing older issues.