Is it possible to put an LXC on VLAN 1?

n8ur

New Member
Oct 10, 2024
22
5
3
I am trying to configure an LXC with VLAN 1 and despite all efforts, I can neither ping to it from outside, or ping from it to outside. I changed the bridge-vids in /etc/network/interfaces from "2-4094" to "1-4094" but that made no difference.

Am I running up against a hard-coded configuration limitation?

Thanks!
 
Apparently it's not possible. I found this thread via Google (it didn't turn up in the Proxmox forum search):
which pointed to: https://forum.proxmox.com/threads/not-possible-to-tag-interface-in-vlan-1.27363/
which says that VLAN1 can't be tagged in a container.
 
VLAN1 should never be used because it is not only the default PVID on linux bridges but also a „system reserved like“ default ID/PVID on many switches.
 
Thanks @cwt. But is it the case that containers on VLAN 1 *won't work*, or just that it is bad practice? My reason for using VLAN 1 here is that the container runs a Unifi controller, and if the controller is not on the same VLAN as the router and switches, you have to jump through hoops to get them talking to each other.
 
Thanks @cwt. But is it the case that containers on VLAN 1 *won't work*, or just that it is bad practice? My reason for using VLAN 1 here is that the container runs a Unifi controller, and if the controller is not on the same VLAN as the router and switches, you have to jump through hoops to get them talking to each other.

Both. It won’t work and it’s bad practice. Interconnecting VLANs can either be done on the switch (usually with no granular filter options or rules) or in your router (if supported). If you have no VLAN larger >1 defined in your network it’s not necessary to add a VLAN tag to your LXC. If you only have multiple subnets it’s the router‘s job to route between them and forward needed broadcast packets (for ap discovery or something like that).