[SOLVED] Bridges and VLANS

TwiX

Renowned Member
Feb 3, 2015
311
23
83
Hello,

I'm currently trying to figure out to settle vmbr0 to support VLANS for my VMs.
I'm using the latest version of proxmox v4.4 via no-pve-subscription.

eth0 and eth1 are slaves of bond0 (active/backup mode).
eth0 and eth1 are connected on 2 stacked cisco 2960S, each port is configured in trunk mode.

My /etc/network/interfaces :

Code:
auto lo
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual

auto bond0
iface bond0 inet manual
        slaves eth0 eth1
        bond_miimon 100
        bond_mode active-backup

auto vmbr0
iface vmbr0 inet static
        address  10.192.5.36
        netmask  255.255.255.224
        gateway  10.192.5.33
        bridge_ports bond0
        bridge_stp off
        bridge_fd 0

And then when configuring VM network interface putting the ID of the VLAN expected cf screenshot.

Is it the right way to configure VLAN on VMs ?

Thanks in advanced !
 

Attachments

  • NET_VMBRO_VM.png
    NET_VMBRO_VM.png
    22.4 KB · Views: 248
yes it looks good
after starting the VM you can check with

bctrl show

that a bridge was created for each VLAN tag you assigned to your VMs

this is how it looks my machine

vmbr0 8000.ac9e17846319 no eth0
tap100i0
tap101i0
tap102i0
tap102i1
tap104i0
tap105i0
tap106i0
tap107i0
vmbr0v2 8000.ac9e17846319 no eth0.2
tap101i1
tap105i1
tap105i2
tap106i1
tap106i2
tap107i1
tap107i2
vmbr0v3 8000.ac9e17846319 no eth0.3
tap105i3
tap106i3
tap107i3
 
Hi, thanks for your reply :)

It is working as expected...But I'm wondering for what kind of usage the bridge option 'vlan aware' is needed for...It's not configured for me.

I also saw a 'vlan-raw-device bondX' on the wiki, is this only needed if proxmox server has to be in a particular vlan ?

Later,
 
With a VLAN aware bridge you would see all your VLANs in one bridge instead of splitted in multiple bridges as I've currently shown you.
Actually I found the output easier to understand without the VLAN aware option.
 

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!