I am using Ubuntu 22.04.01 host and am not able to get IPv4 addresses on the containers via DHCP. The containers do get IPv6 assigned. The setup was working without any issues. I have tried following steps but still not working for me.
-
I cleaned all networks/images/profiles etc and have reinitialized the configuration of LXD with default parameters
-
I was using LXD 5.8 and have now upgraded to LXD 5.9/stable
-
I followed the link LXD containers w ubuntu images get ipv6 dhcp addresses but not ipv4, alpine does get ipv4 but the my problem seems to be different.
-
Have tried to do IP assignment using command but it just waits for dhcp.
$ lxc exec cont-name -- dhclient eth0
-
I tried running the dnsasq with debugging on but i doesn’t receive any requests.
$ sudo dnsmasq -d --interface=lxdbr0 --listen-address=10.54.101.1 --dhcp-authoritative \
--bind-interfaces --except-interface=lo \
--dhcp-leasefile=/var/snap/lxd/common/lxd/networks/lxdbr0/dnsmasq.leases \
--dhcp-range 10.54.101.2,10.54.101.254,1h \
--interface-name _gateway.lxd,lxdbr0 -S /lxd/ -u lxd -g lxd
Any help in this regard would be appreciated.