How to fix "no address range available for DHCP request" error?

sunknudsen asked:

Trying to run a DHCP server on lo using dnsmasq.

$ cat /etc/dnsmasq.d/01-dhcp-loopback.conf

I can get things working by adding the following alias to eth0, but that doesn’t make sense right?

auto eth0:1
iface eth0:1 inet static

My answer:

You probably can’t configure eth0 as it’s a container, not a real VM, and the host controls the network.

In a real VM you could create a dummy interface and use that. Since you have a container, this depends on whether the container host has loaded the dummy module (and the chance is pretty close to 100% that they have not).

iface dummy0 inet static
    pre-up ip link add dummy0 type dummy

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.