[lxc-users] DHCP or static ip address?

Marat Khalili mkh at rqc.ru
Sun Mar 5 05:13:39 UTC 2017


> The other way is to leave in /var/lib/lxc/NAME/config only [...] and have: [...] in /var/lib/lxc/NAME/rootfs/etc/network/interfaces. Then everything works.

> Which way is better? 

I also stumbled on nameservers issue when using config and switched to /etc/network/interfaces more than a year ago. No problems so far. Didn't find any other way yet.

I'd also recommend you to install local DNS server and automatically put names of new containers in its zone by the same script you use to assign IP addresses. Helps accessing network services running in containers, if you have any.

I don't see any benefits in DHCP _unless_ you use LXD and plan to move your containers around.
-- 

With Best Regards,
Marat Khalili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170305/9fd6b59c/attachment.html>


More information about the lxc-users mailing list