In the LXC config file we can specify an IP address for a container:

lxc.network.ipv4 =
lxc.network.hwaddr= 00:16:3e:24:26:33

But if the container has the default configuration of DHCP, what's going to happen:

# The primary network interface
auto eth0
iface eth0 inet dhcp
  • Does LXC act as a DHCP server for the container?
  • Will the two configurations conflict with the container broadcasting requests for an IP before/after LXC attempts to manually configure the interface?
  • Will LXC simply override whatever is in the containers configuration for eth0?
  • Why don't you try it? This is purely theoretical. However, one aspect I can shed light on: dnsmasq is running as DNS and DHCP server for the lxcbr0 bridge by default. Otherwise global settings govern how the container configuration affects operation. – 0xC0000022L May 4 '14 at 23:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.