sunknudsen asked:
Trying to run a DHCP server on lo
using dnsmasq.
$ cat /etc/dnsmasq.d/01-dhcp-loopback.conf
interface=lo
dhcp-range=10.0.2.10,10.0.2.254,255.255.255.0
port=0
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
address 10.0.2.1/24
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
address 10.10.0.1/24
pre-up ip link add dummy0 type dummy
View the full question and any other answers on Server Fault.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.