I have my containers getting a dynamic IP address from my home network’s router, however, I have run into an issue. My router is so poor and dated that I can’t even reserve IP addresses. So, this means I have to request that IP address from my container. I have tried a couple things that don’t seem to work.
1- edit the /etc/network/interfaces.d/50-cloud-init.cfg so that it requests a static IP
RTNETLINK answers: Cannot assign requested address
when I do ifdown eth0 && ifup eth0
2- lxc config device set containerName eth0 ipv4.address ip-addr
The configs for the container show this after I make that change:
However, I still get an unwanted address from my router’s DHCP server. I don’t want to do the NAT method with a couple of my containers because they’re remaining on the inside network only and I have a lot of ports to forward that I don’t want to do. Any ideas?