3 Different ways to configure VLANs?

ThOr101

New Member
Jan 7, 2014
3
0
1
Just trying to double check my sanity and thoughts. I think there are 3 different ways I could setup a VM to get access to a tagged VLAN, and was hoping you might be able to tell me if I am right, and I can just pick and choose, or if I have misunderstood something.

What I'm working with
An ethernet cable plugged into eth1 of the ProxMox machine that has an untagged network, and 2 tagged networks: VLAN 900 and 950.
I'd like my VM guest to have access to all 3 networks.

Option 1
I can make a vmbr1 to eth1.
Add a network device on the VM to vmbr1 set to no VLAN and let the VM do all the untagging with virtual interfaces (The guest happens to be an ubuntu linux machine).

Option 2
I can make a:
  • vmbr1 to eth1
  • vmbr900 to eth1.900
  • vmbr950 to eth1.950
And then add 3 network devices to the VM each plugged into vmbr1, vmbr900, vmbr950 and it would get the network untagged (VLAN tag: no VLAN)

which seems really similar to

Option 3
I can make a vmbr1 to eth1
Then make 3 network devices on the VM each connected to vmbr1
Each one would be configured with VLAN Tag: no VLAN, 900, 950 respectively in the configuration of the network device in ProxMox

Using the latest version of ProxMox.
Thanks much.
 
From my experience with many VMs and many VLANs I would alway use Option 2. This makes it easy to keep an eye on what VM sees which networks, and you don't have to mess with VLANs in the VMs themselves...
 
> BTW: if you don't us the proxmox management over one vlan (also with assigned IP address) Option 2 is the favorite way.
This way requires rebooting a host if you need to add/remove VLAN, and probably not only this host if you use migration. So I pefer the first one.
 
> BTW: if you don't us the proxmox management over one vlan (also with assigned IP address) Option 2 is the favorite way.
This way requires rebooting a host if you need to add/remove VLAN, and probably not only this host if you use migration. So I pefer the first one.
Hi,
sorry I mean Option 3 not 2 ( 2 is usable with an management on a vlan).
But you can do the bridge creation by hand, or with ifup without reboot (if you directly edit /etc/network/interfaces).

Udo
 
sorry I mean Option 3 not 2 ( 2 is usable with an management on a vlan).
I was also thinking about the third one :)

But you can do the bridge creation by hand, or with ifup without reboot (if you directly edit /etc/network/interfaces).
True, however if I had to do this on a server in production I would do this very carefully because it is easy to make a mistake there.
 
Just FYI, once you get the result you want make sure the switch can handle it too.

I ran into a case where vlan was working okay with vm's on a physical machine but once the vm's were placed on different host it became an issue until the switch was allowed to pass it.

In my case I have Dell 6224 switches stacked.. Now that I'm thinking about it gonna have to go look. Best I recall it was not a setting in the GUI but had to be enabled via CLI.
 

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!