I have a LXC machine configured with bridging so that it has its own public IP address and is accessible over the internet. Even though it's working, the netmask address set in the VMs /etc/network/interfaces is not being kept.

The interface eth0 on the VM is set to an inet static configuration. The address and gateway fields are correct but the netmask is, whereas it should be

Setting the inet to manual and letting LXC do the network configuration by specifying the lxc.network.ipv4 and lxc.network.gateway parameters in the host's /var/lib/lxc/my-vm/config results in the same problem.

Should I fix this by specifying the gateway and netmask with a post-up route, or is there a better way?


Have try tried setting the network mask on lxc.network.ipv4 like:

lxc.network.ipv4 =
| improve this answer | |

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.