Hello,
My PVE hypervisor has an interface eth0 connected to a switch port configured as a trunk, where VLAN1 is the native (untagged) VLAN and a number of other (tagged) VLANs are allowed.
On top of eth0 I created a "vlan aware" bridge, named vmbr0.
When I create a network interface for a new VM I can easily map it to a certain VLAN on vmbr0, using the "VLAN tag" option from the GUI.
But how can I map the new VM NIC to the native VLAN (i.e. untagged VLAN 1) ?
If I put "1" in "VLAN tag" from the GUI that obviously doesn't work, because the traffic gets tagged.
If I choose no tag in "VLAN tag", than the new VM sees the untagged VLAN1 traffic... but it also sees all the tagged traffic coming from other VLANs, which is not desirable for security issues.
The only workaround I found, so far, is manually adding "trunks=999" in the NIC definition of the VM config file, where "999" is a black-hole VLAN (i.e. no traffic in there).
In this way, the VM correctly sees the untagged VLAN1 traffic and no other tagged VLANs traffic (except for the 999, which has nothing in it).
I wonder if there is a more appropriate way to do this.. ?
Any help would be appreciated, thanks.
Ros
My PVE hypervisor has an interface eth0 connected to a switch port configured as a trunk, where VLAN1 is the native (untagged) VLAN and a number of other (tagged) VLANs are allowed.
On top of eth0 I created a "vlan aware" bridge, named vmbr0.
When I create a network interface for a new VM I can easily map it to a certain VLAN on vmbr0, using the "VLAN tag" option from the GUI.
But how can I map the new VM NIC to the native VLAN (i.e. untagged VLAN 1) ?
If I put "1" in "VLAN tag" from the GUI that obviously doesn't work, because the traffic gets tagged.
If I choose no tag in "VLAN tag", than the new VM sees the untagged VLAN1 traffic... but it also sees all the tagged traffic coming from other VLANs, which is not desirable for security issues.
The only workaround I found, so far, is manually adding "trunks=999" in the NIC definition of the VM config file, where "999" is a black-hole VLAN (i.e. no traffic in there).
In this way, the VM correctly sees the untagged VLAN1 traffic and no other tagged VLANs traffic (except for the 999, which has nothing in it).
I wonder if there is a more appropriate way to do this.. ?
Any help would be appreciated, thanks.
Ros