LXC Container with 2 network connections

ams123

Active Member
Jan 19, 2017
15
0
41
53
I have created a LXC container with Ubuntu 18.04 and added 2 network connections (1 LAN and 1 VLAN) both with the same settings for IPv4 DHCP and IPv6 SLAAC for the purpose of running avahi. At first it works and both connections show with ifconfig with IP addresses assign but communication through the Proxmox console eventually stops working and the container becomes unresponsive, cannot connect through console or ssh and cannot shutdown. Should I be able to have two network connections to a container or should I use a VM for this? If it should be working what can I do to diagnose?
 
Should I be able to have two network connections to a container or should I use a VM for this? I

Yes, you can have two network connections on a container.

If it should be working what can I do to diagnose?

Try to enter your container with `pct enter CTID` after the problem occurs again (CTID is the ID of your container).
Check your network configuration in & outside the container and make sure everything is correct.

You can check if the network interfaces are still up after the problem occurs and if not, you might be able to figure out something from the error output in syslog.

If you need further help, post your container configuration file here, along with the network settings.