Hello all. I have a few questions about networking in LXD and hosting a DHCP server in a container. I’m not sure if what I’m trying to do is even possible.
I have Ubuntu Server 20.04 installed as my host OS. I would like to run DHCP in a Linux Container to provide address information for a guest network I’m building at my job. Normally I would just launch a new container and use a macvlans profile for the container to speak directly to the rest of the network. However, I realized then that the host OS would not be able to get a lease assigned since the host OS can’t communicate over the network to a container networked using macvlans.
I’m not sure if I’m making any sense. I’ve been researching this for hours now and am running on lots of caffeine. Is it possible for a container to be the sole DHCP server for a network and the host OS still get leases assigned so that it can continue to communicate on the network and acquire updates, etc? Perhaps I’m just going about this the wrong way?
Any help would be appreciated, and I’ll do the best I can to clarify any information.