Create Vlan with single physical NIC

Florencehawk

New Member
Dec 19, 2021
2
0
1
29
Hi Guys,

Im pretty new to Proxmox, and I just started to build machine for Proxmox to having the first homelab in my life.
Current setup, I am using a single physical NIC of motherboard and wanna to create a different Vlans for my homelab (e.g. Security Labs, Home Devices, Dockers, IOT devices, etc.)
Would it possible that can create multiple vlans in just one physical NIC?
---
I tried the following settings that I found in internet, I just wanna test if it works in my Windows VM and I added the Vlan tag 20 in Windows VM configuration setting. But unfortunately, the VM cannot get the IP address. Is there any settings that I still missing? Thanks for everyone.
1639927638429.png

Code:
auto lo
iface lo inet loopback

iface enp8s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.80/24
        gateway 192.168.1.1
        bridge-ports enp8s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

iface wlo1 inet manual

auto vmbr0.20
iface vmbr0.20 inet static
        address 10.10.20.0/24
        gateway 10.10.20.1
 
Would it possible that can create multiple vlans in just one physical NIC?
That is the idea behind VLANs :)
I tried the following settings that I found in internet, I just wanna test if it works in my Windows VM and I added the Vlan tag 20 in Windows VM configuration setting. But unfortunately, the VM cannot get the IP address. Is there any settings that I still missing? Thanks for everyone.
So you assigned the vmbr0.20 to the VM and then additionally set the VLAN tag there as well?

If so, then you did create a QinQ (nested VLAN). Either set the VLAN tag in the VMs network setting directly or the way you configured the vmbr0.20 interface. But don't combine them. So either remove the vmbr0.20 and just set the VLAN IDs for each VM individually, or just assign them to the vmbr0.20 and leave the VLAN tag field empty :)