Vlan 1000 not working

ropeguru

Member
Nov 18, 2019
37
2
13
65
My network has a vlan 1000 defined in it. My Proxmox 10Gb NIC is setup as a bridge and not vlan aware. I am adding the vlan tag to the nic device.

If I define the vlan as 1000, the VM fails to start. If I drop it down to 999, it starts with no issue. Doesn't matter what NIC type I am trying to use.

I looked in the documentation for any limitations, but could have missed it.

Error: argument "enp9s0f0np0.1000" is wrong: "name" not a valid ifname
can't add vlan tag 1000 to interface enp9s0f0np0 - command '/sbin/ip link add link enp9s0f0np0 name enp9s0f0np0.1000 type vlan id 1000' failed: exit code 255

kvm: -netdev type=tap,id=net0,ifname=tap106i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown: network script /var/lib/qemu-server/pve-bridge failed with status 65280
TASK ERROR: start failed: QEMU exited with code 1
 
A bit more digging and I see the below in "ip addr", but I do not have vlan 1000 defined anywhere right now.

19: vmbr1v1000: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 76:39:98:bb:18:5c brd ff:ff:ff:ff:ff:ff
 
Curious, if I understand you correctly why were you adding the vlan directly to the nic interface (enp9s0f0np0) and not the Linux bridge (vmbr*).
 
Curious, if I understand you correctly why were you adding the vlan directly to the nic interface (enp9s0f0np0) and not the Linux bridge (vmbr*).
I wasn't adding it to the enp9s0f0np0 interface. I was adding it to nic in the VM config.
 
  • Like
Reactions: vesalius
If you want to set the vlan on VM config either use a classic bridge with VLAN aware option set or use ovs.

If you use a not VLAN aware classic bridge as you did, you cant set the vlan on VMs config. Don't know why you get an error with vlan 1000 and not with 999.

Here are some details about this:
https://pve.proxmox.com/wiki/Network_Configuration#_vlan_802_1q
https://forum.proxmox.com/threads/vlan-aware-option.25640/post-129090

A reddit user pointed me in the right direction as since in the linux bridge mode, there is a tag being added to the physical nic name, the name went to 16 characters. There is a confirmed 15 character limit on linux interface names.

My setup is as described in that first link where the vlan is on the guest and neither the physical nic nor the bridge are vlan aware. I do this in another environment with over 30 vlans defined and have never had an issue.

Guest configured VLAN: VLANs are assigned inside the guest. In this case, the setup is completely done inside the guest and can not be influenced from the outside. The benefit is that you can use more than one VLAN on a single virtual NIC.
 
  • Like
Reactions: VictorSTS

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!