VLANs in cluster - traffic won't run through

achekalin

Member
Jun 17, 2011
74
0
6
Hello,

I see very strange situation, I just can't make VLANs on Proxmox cluster to work.

Here is the setup:

PC with one on-board NIC and another NIC in PCI slot:

eth0: RTL8168d/8111d at 0xffffc90011fd0000, 6c:62:6d:e7:fe:4e, XID 081000c0 IRQ 27
eth1: RTL8169sb/8110sb at 0xffffc9000145ac00, 5c:d9:98:b4:de:86, XID 10000000 IRQ 20

I got 2 such PCs, and use eth0 to connect to LAN (actually to managed switch which, in turn, goes to LAN), the eth1 NICs are connected to each other to make DRBD to work.

So the initial setup was easy (this one taken from docs, mine was pretty the same but i believe there was 'auto eth0' line):

Code:
auto lo
        iface lo inet loopback

auto eth0
        iface eth0 inet static

auto vmbr0
iface vmbr0 inet static
        address  192.168.161.59
        netmask  255.255.255.0
        gateway  192.168.161.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

auto eth1
iface eth1 inet static
        address  10.255.255.2
        netmask  255.255.255.252

this setup worked well.

Now I try to add VLAN support to eth0:

Code:
auto lo
        iface lo inet loopback

auto eth0
        iface eth0 inet static

auto vmbr0
iface vmbr0 inet static
        address  192.168.161.59
        netmask  255.255.255.0
        gateway  192.168.161.1
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

auto eth1
iface eth1 inet static
        address  10.255.255.2
        netmask  255.255.255.252

auto vlan7
          iface vlan7 inet static
          vlan_raw_device eth0
 
auto vmbr0

iface vmbr7 inet static
       address 10.90.91.249
       netmask 255.255.255.0
       bridge_ports vlan7
       bridge_stp off
       bridge_fd 0

After reboot interface vmbr7 is there, and IP is on it (and I can ping that IP), but I can't ping any host on that VLAN.

So, I have a couple of questions:

  1. If my config good for the task?
  2. How I set up which VLAN is used (I mean if I set up the same config on FreeBSD, I'd set up something like "ifconfig_vlan7="inet x.x.x.x netmask 255.255.255.0 vlan 7 vlandev lan0" so I explicitly set up which VLAN we use, but here on Proxmox (that is, on Debian) I can't set up the vlan. Looks like I missed something.
Thank you in advance for the advise, I really need to run VLANs and simple can't set it up.
 
uhm - why didn't you go for the GUI?
simply add another vmbr interface and if you want to add vlanid 7 tagged on eth0 to you new vmbr device simply add "eth0.7" to your bridge ports and you're done.

regards
hk
 
That was something I couldn't imagine to be so easy. Thank you, I've set it up that way easily!
 

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!