Multiple Private vLAN on 1 NIC

ejc317

Member
Oct 18, 2012
263
0
16
Hi guys,

I know for each individual NIC its tough to have different IP ranges with diffferent gateways. However, how do I bind multiple private vLANs to 1 nic ie 10.10.1.x and 10.10.2.x

I bound it manually through vmbr1:1 and vmbr1:2 - but is there a more elegant way of doing this?
 
Why not simply create a bridge for each network?

auto eth0
iface eth0 inet manual

auto vmbr1
iface vmbr1 inet static
address 10.10.1.1
network 10.10.1.0
netmask 255.255.255.0
bridge_ports eth0
bridge_stp off
bridge_fd 0


auto vmbr2
iface vmbr2 inet static
address 10.10.2.1
network 10.10.2.0
netmask 255.255.255.0
bridge_ports eth0
bridge_stp off
bridge_fd 0

The simply assign the nics on the VM's to either bridge and give the bridge IP as default gateway. Of course you will need some kind of router routing the each network if you want to be able to access the internet from the VM's
 
Did that - it doesn't work. Internet is not an issue since I have VMBR0 as the public VLAN and VMBR1 and VMBR2 as eth1 and eth2

VMBR3 and VMBR4 are both bound to eth3 with the ips 10.10.3.x and 10.10.4.x

The 10.10.3.x works but not 4.x ... I presume you can't bind 2 diff subnets to the same physical ethernet device?

Now I can bind 10.10.4.x to VMBR3:1 and the reason that works is that the vlans are not separate (we don't have separate vlans for each of the .3.x and .4.x) so there's no tagged traffic
 

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!