Multiple VLANs on one vmbr

  • Thread starter Thread starter incubu$
  • Start date Start date
I

incubu$

Guest
Hello.
I need to make multiple vlans on VM with linux.
For example:
....
auto vlan100
iface vlan100 inet static
address 192.168.16.11
netmask 255.255.255.0
mtu 1500
vlan_raw_device eth0


auto vlan101
iface vlan101 inet static
address 192.168.17.11
netmask 255.255.255.0
mtu 1500
vlan_raw_device eth0
....
This part of working config from physical computer. On VM this config does not work. How to make vmbr became trunk (tagged) interface.

Thanks.
 
Hi,
define differend bridges on the host (without IP) and assign this bridges to the guest,
like
Code:
auto eth1.100
iface eth1.100 inet static
        address  0.0.0.0
        netmask  0.0.0.0

auto eth1.101
iface eth1.101 inet static
        address  0.0.0.0
        netmask  0.0.0.0

auto vmbr100
iface vmbr100 inet manual
        bridge_ports eth1.100
        bridge_stp off
        bridge_fd 0

auto vmbr101
iface vmbr101 inet manual
        bridge_ports eth1.101
        bridge_stp off
        bridge_fd 0
Udo
 
I need huge vlan interfaces ~ 500. It's need for dhcp server.

I made it, but if vmbr's interfaces > 30 then vm does not run.

kvm:-devicevirtio-net-pci,romfile=,mac=16:98:C7:E1:B2:F0,netdev=net31,id=net31:PCI: no slot/function available for virtio-net-pci, all in use
kvm:-devicevirtio-net-pci,romfile=,mac=16:98:C7:E1:B2:F0,netdev=net31,id=net31:device 'virtio-net-pci' could not be initialized
TASK ERROR: startfailed: command '/usr/bin/kvm -id 101 -chardev'socket,id=monitor,path=/var/run/qemu-server/101.mon,server,nowait'-mon 'chardev=monitor,mode=readline' -vncunix:/var/run/qemu-server/101.vnc,x509,password -pidfile/var/run/qemu-server/101.pid -daemonize -usbdevice tablet -namedebserv1 -smp 'sockets=1,cores=2' -cpu qemu32 -nodefaults -boot'menu=on' -vga cirrus -k en-us -drive'file=/var/lib/vz/images/101/vm-101-disk-1.raw,if=none,id=drive-ide0,aio=native,cache=none'-device'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -drive'file=/var/lib/vz/template/iso/debian-6.0.5-i386-netinst.iso,if=none,id=drive-ide2,media=cdrom,aio=native'-device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2' -m 768-netdev'type=tap,id=net0,ifname=tap101i0,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=32:2F:CA:EE:1E:26,netdev=net0,bus=pci.0,addr=0x12,id=net0'-netdev'type=tap,id=net1,ifname=tap101i1,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=42:B0:93:A6:1C:A3,netdev=net1,bus=pci.0,addr=0x13,id=net1'-netdev'type=tap,id=net2,ifname=tap101i2,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=4E:86:7A:32:0A:88,netdev=net2,bus=pci.0,addr=0x14,id=net2'-netdev'type=tap,id=net3,ifname=tap101i3,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=4A:F7:C7:12:85:2C,netdev=net3,bus=pci.0,addr=0x15,id=net3'-netdev'type=tap,id=net4,ifname=tap101i4,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=5A:92:C2:FF:94:55,netdev=net4,bus=pci.0,addr=0x16,id=net4'-netdev'type=tap,id=net5,ifname=tap101i5,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=B6:26:56:4D:82:88,netdev=net5,bus=pci.0,addr=0x17,id=net5'-netdev'type=tap,id=net6,ifname=tap101i6,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=12:76:E3:8C:66:B2,netdev=net6,id=net6'-netdev'type=tap,id=net7,ifname=tap101i7,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=36:BE:40:03:A3:89,netdev=net7,id=net7'-netdev'type=tap,id=net8,ifname=tap101i8,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=7AC1:77:09:C4:4A,netdev=net8,id=net8'-netdev'type=tap,id=net9,ifname=tap101i9,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=A2:84:A0:C3:79:15,netdev=net9,id=net9'-netdev'type=tap,id=net10,ifname=tap101i10,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=5A:5B:2F:E4:84:21,netdev=net10,id=net10'-netdev'type=tap,id=net11,ifname=tap101i11,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=FE:59:3B:5C:AC:C5,netdev=net11,id=net11'-netdev'type=tap,id=net12,ifname=tap101i12,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=D2:23:2A:95:61:F2,netdev=net12,id=net12'-netdev'type=tap,id=net14,ifname=tap101i14,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=DA:0D:AF:BC:47:AD,netdev=net14,id=net14'-netdev'type=tap,id=net15,ifname=tap101i15,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=0E:81:15:6C:00:07,netdev=net15,id=net15'-netdev'type=tap,id=net16,ifname=tap101i16,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=12:53:AAC:05:A8:B3,netdev=net16,id=net16'-netdev'type=tap,id=net17,ifname=tap101i17,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=5A:AD:43:BF:6A:4E,netdev=net17,id=net17'-netdev'type=tap,id=net18,ifname=tap101i18,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=9E:09:A8:EF:A7:2A,netdev=net18,id=net18'-netdev'type=tap,id=net19,ifname=tap101i19,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=5E:C1:C4:30:45:39,netdev=net19,id=net19'-netdev 'type=tap,id=net20,ifname=tap101i20,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=DE:B1:F1:03:A7:50,netdev=net20,id=net20'-netdev'type=tap,id=net21,ifname=tap101i21,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=4E:31:A6:06:41:F1,netdev=net21,id=net21'-netdev'type=tap,id=net22,ifname=tap101i22,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=22:13:BA:30:7C:A1,netdev=net22,id=net22'-netdev'type=tap,id=net23,ifname=tap101i23,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=16:EC:1D:8C:78:E6,netdev=net23,id=net23'-netdev'type=tap,id=net24,ifname=tap101i24,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=0E:2F:17:0E:AF:FB,netdev=net24,id=net24'-netdev'type=tap,id=net25,ifname=tap101i25,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=BA:BD:B1:F6:83:F9,netdev=net25,id=net25'-netdev'type=tap,id=net26,ifname=tap101i26,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=B6:BD:7C:23:16:A5,netdev=net26,id=net26'-netdev'type=tap,id=net27,ifname=tap101i27,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=CE:51:44:8B:78:CB,netdev=net27,id=net27'-netdev'type=tap,id=net28,ifname=tap101i28,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=FA:0E:54:C9:37:FE,netdev=net28,id=net28'-netdev'type=tap,id=net29,ifname=tap101i29,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=E6:01:02:74:8C:FB,netdev=net29,id=net29'-netdev'type=tap,id=net31,ifname=tap101i31,script=/var/lib/qemu-server/pve-bridge,vhost=on'-device'virtio-net-pci,romfile=,mac=16:98:C7:E1:B2:F0,netdev=net31,id=net31'-netdev'type=tap,id=net32,ifname=tap101i32,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=2E:96:3E:9B:93:6F,netdev=net32,id=net32'-netdev'type=tap,id=net33,ifname=tap101i33,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=8E:6B:82:69:31:30,netdev=net33,id=net33'-netdev'type=tap,id=net34,ifname=tap101i34,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=1A:0B:1A:FF:49:64,netdev=net34,id=net34'-netdev'type=tap,id=net35,ifname=tap101i35,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=C6:B9:65:62:75:CF,netdev=net35,id=net35'-netdev'type=tap,id=net36,ifname=tap101i36,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=06:23:EC:1F:16:29,netdev=net36,id=net36'-netdev'type=tap,id=net37,ifname=tap101i37,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=9A:6E:FD:0F:27:AF,netdev=net37,id=net37'-netdev'type=tap,id=net38,ifname=tap101i38,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=62:47:7E:0C:0C:62,netdev=net38,id=net38'-netdev'type=tap,id=net39,ifname=tap101i39,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=E6:F5:6E:91:A5:FB,netdev=net39,id=net39'-netdev'type=tap,id=net40,ifname=tap101i40,script=/var/lib/qemu-server/pve-bridge'-device 'rtl8139,romfile=,mac=66:E6:32:BC:7A:F7,netdev=net40,id=net40''failed: exit code 1



second:
Iin vm linux server names of interfaces eth0 - eth30... to difficult remember what ethX belong vlanY. :-( I can rename ethX via udev with MAC, but now I need to solve first trouble - limit of vmbrs.
 
The current limit is 6 network devices. The new version on pvetest support up to 32 network devices.

To remove limit on 6 network device /usr/share/perl5/PVE/QemuServer.pm line 399

Tested with 20 interfaces. Works ok.


In future, are you planning make support vlan trunk via one vmbr? because 32 interfaces not enough.
 
Hi,

I'm asking because i'm trying to see if i can configure more than 1 VLAN using VMBR1 within a cluster. Will that work? Or do i need to create a linux bridge for each VLAN?

Please advise
 
I'm asking because i'm trying to see if i can configure more than 1 VLAN using VMBR1 within a cluster. Will that work? Or do i need to create a linux bridge for each VLAN?

Why don't you use the VLAN configuration in the VM network setup?
 

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!