I know, that I can assign static IP manually, using /etc/network/interfaces
.
I also know, that I can read the MAC address of the LXC container (e.g. by looking for lxc.network.hwaddr
entry in /var/lib/lxc/<container-name>/config
and assign the IP based using entries dhcp-host=<mac-addr>,10.0.3.3
in /etc/dnsmasq.d/<some file>
.
In the file /etc/default/lxc-net
I read
# Uncomment the next line if you'd like to use a conf-file for the lxcbr0
# dnsmasq. For instance, you can use 'dhcp-host=mail1,10.0.3.100' to have
# container 'mail1' always get ip address 10.0.3.100.
#LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf
That would suit my needs; unfortunately doing so has no effect.
lxc-net
doesn't help if you don't remove your lxcbr0 bridge. See my answer.