Problems with VLAN's

donkeh

New Member
Jan 25, 2013
18
0
1
Hi All,

I'm having a problem getting VLAN's working. I've followed a couple of examples from a member called udo, however, these were posted in the 1.X forum, so may be out ouf date.

In my host, I have 3 nics. On eth2, I wish to utilise 3 VLAN's, with ID's 2,3,5

Initially, I just created a bridge (vmbr2 / eth2) and on my guest PC, I assigned the NIC to this bridge and in the GUI I specified VLAN tag 5.

This didn't work.

As I said, I've tried all sorts from various forum posts, but all relate to 1.X.

Anybody have any tips ?

Thanks.
 
Was playing with this and found that adding a vlan tag, that those vlans worked if on the same node. But not one node to another..

node 1 has 2 VMs with nics configured to vlan 5, when VM was moved to node 2 it stopped.

those nics worked between VMs on same node. So I guess the trick is to get this to work within the "datacenter", across nodes and this would be where a vlan config is needed on each node?
 
Was playing with this and found that adding a vlan tag, that those vlans worked if on the same node. But not one node to another..

node 1 has 2 VMs with nics configured to vlan 5, when VM was moved to node 2 it stopped.

those nics worked between VMs on same node. So I guess the trick is to get this to work within the "datacenter", across nodes and this would be where a vlan config is needed on each node?

Hi,

Your test is slightly different to mine. At this stage, I had only a single node, although there will be a requirement later for multiple nodes.

Also, my test was between a VM and a physical machine, rather than two vms on the same node.

Good to know however that there may be issues down the line when we introduce multiple nodes.

That said, my network requirements are reasonably static, so using the method I have should suffice for now, by doing the same thing on each node.
 
Hi,
when you migrate a vm between nodes, the nics of the vm are always attached to same bridge (vmbrX).
But each vmbrX can be assign to differents network card on each node. (ex : node1 vmbrX->eth0 , node2 vmbrX ->eth2). This is only the thing you need to check, I'm using vlan on 16 nodes cluster without any problem.
 
Hi,
when you migrate a vm between nodes, the nics of the vm are always attached to same bridge (vmbrX).
But each vmbrX can be assign to differents network card on each node. (ex : node1 vmbrX->eth0 , node2 vmbrX ->eth2). This is only the thing you need to check, I'm using vlan on 16 nodes cluster without any problem.

I speaking of VLAN when used with PROXMOX gui, resulting with this ###.conf

first VM node 1
Code:
net0: virtio=xx:xx:xx:20:A2:18:CA,bridge=vmbr0
net1: virtio=xx:xx:xx:BC:E2:D7:AA,bridge=vmbr0,tag=1

On second VM, on node 2

Code:
net0: virtio=xx:xx:xx:FE:AC:13:B4,bridge=vmbr0
net1: virtio=xx:xx:xx:8D:AB:D0:AB,bridge=vmbr0,tag=1

The net1 nics are addressed 192.168.0.100 and 192.168.0.101.
When on same node, they see each other fine, but when moved to different nodes, say 1 and 2. It no longer works.

Nodes are configured alike outside of necessary ip changes needed... could it be the nics/bond/bridge conf? Proxmox wiki talks of vlan at the node level, but if I understand the comment above then this should work?
Code:
# network interface settings
auto lo
iface lo inet loopback

iface eth0 inet manual

iface eth1 inet manual

iface eth2 inet manual

iface eth3 inet manual

iface eth4 inet manual

iface eth5 inet manual

iface eth6 inet manual

iface eth7 inet manual

auto bond0
iface bond0 inet manual
        slaves eth0 eth1 eth6 eth7
        bond_miimon 100
        bond_mode 802.3ad

auto bond1
iface bond1 inet manual
        slaves eth2 eth3 eth4 eth5
        bond_miimon 100
        bond_mode 802.3ad

auto vmbr0
iface vmbr0 inet static
        address  10.10.0.200
        netmask  255.255.254.0
        gateway  10.10.1.1
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0

auto vmbr1
iface vmbr1 inet static
        address  172.16.0.86
        netmask  255.255.255.0
        bridge_ports bond1
        bridge_stp off
        bridge_fd 0
 
Was working on adding tag to bond0.100, as new bridge vmbr2. Again it works within a node but not between nodes.. So logic tells me that it must be at the switch not passing it thru or the type of bond I am using (802.3ad) I will look further. Its not a show stopper for me, but a method I would like to use.
 
Last edited:
something must be wrong in your network setup. (I'm also using lacp bonding windows problem)

Are you sure that all your physicals swtichs ports allow the vlans tag ?

Try to start a vm on a node, then stop it, and try to start it on another node.
If it's not working on 1 of the 2 nodes, something is wrong on your network setup.
 
its easier when we do virtual switch tagging (vmbr tagging)
we create vmbr and brigded with vlan id in the ethernet ports / bond ports connected in trunk mode in physical switch
then, after that, add the vmnic to the vmbr vlan interface

for example
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual


auto bond0
iface bond0 inet manual
slaves eth1 eth2
bond_miimon 100
bond_mode 802.3ad


auto vmbr0
iface vmbr0 inet static
address 172.20.0.10
netmask 255.255.255.0
gateway 172.20.0.1
bridge_ports eth0
bridge_stp off
bridge_fd 0


auto vmbr104
iface vmbr104 inet manual
bridge_ports bond0.4
bridge_stp off
bridge_fd 0


auto vmbr110
iface vmbr110 inet manual
bridge_ports bond0.10
bridge_stp off
bridge_fd 0


i make vmbr0 brigded with eth0 -> for management traffic proxmox web

bond0 = consist of eth1 and eth2 mode 802.1ad

create vlan4 in bond0 -> bond0.4
create vlan10 in bond0 -> bond 0.10

create vmbr104 brigded with bond0.4
create vmbr110 brigded with bond0.10

make sure to reboot your proxmox to activate all config, or you can alternatively manually create use vconfig and brctl command if you an advanced user

when creating vm, if you want to set the vm to be member of vlan4 set the virtual ethernet brigded to vmbr104


hth
 
its easier when we do virtual switch tagging (vmbr tagging)
we create vmbr and brigded with vlan id in the ethernet ports / bond ports connected in trunk mode in physical switch
then, after that, add the vmnic to the vmbr vlan interface

for example
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual
iface eth2 inet manual


auto bond0
iface bond0 inet manual
slaves eth1 eth2
bond_miimon 100
bond_mode 802.3ad


auto vmbr0
iface vmbr0 inet static
address 172.20.0.10
netmask 255.255.255.0
gateway 172.20.0.1
bridge_ports eth0
bridge_stp off
bridge_fd 0


auto vmbr104
iface vmbr104 inet manual
bridge_ports bond0.4
bridge_stp off
bridge_fd 0


auto vmbr110
iface vmbr110 inet manual
bridge_ports bond0.10
bridge_stp off
bridge_fd 0


i make vmbr0 brigded with eth0 -> for management traffic proxmox web

bond0 = consist of eth1 and eth2 mode 802.1ad

create vlan4 in bond0 -> bond0.4
create vlan10 in bond0 -> bond 0.10

create vmbr104 brigded with bond0.4
create vmbr110 brigded with bond0.10

make sure to reboot your proxmox to activate all config, or you can alternatively manually create use vconfig and brctl command if you an advanced user

when creating vm, if you want to set the vm to be member of vlan4 set the virtual ethernet brigded to vmbr104


hth

HI, this manual vlan config setup in not needed anymore.

you can simply do

auto bond0
iface bond0 inet manual
slaves eth1 eth2
bond_miimon 100
bond_mode 802.3ad


auto vmbr0
iface vmbr0 inet static
address 172.20.0.10
netmask 255.255.255.0
gateway 172.20.0.1
bridge_ports eth0
bridge_stp off
bridge_fd 0


auto vmbr1
iface vmbr1 inet manual
bridge_ports bond0
bridge_stp off
bridge_fd 0



and if you create a vm, with network interface on vmbr1 + vlan tag 4, proxmox create a

vmbr1v4
iface vmbr1v4 inet manual
bridge_ports bond0.4
bridge_stp off
bridge_fd 0

(not in /etc/network/interfaces, but directly in memory)
 
something must be wrong in your network setup. (I'm also using lacp bonding windows problem)

Are you sure that all your physicals swtichs ports allow the vlans tag ?

Try to start a vm on a node, then stop it, and try to start it on another node.
If it's not working on 1 of the 2 nodes, something is wrong on your network setup.


Agree, just working to get my head around this powerconnect 6224 vlan configs.
 
Just a followup, I got this working. At least for now. But it had to do with Dell 6224 Powerconnect's config of a port for QinQ. Just discover this by accident.
 

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!