Can't get vlans to ...
 
Notifications
Clear all

Can't get vlans to work in Proxmox

6 Posts
2 Users
0 Reactions
514 Views
Posts: 3
Topic starter
(@bobinohio)
Active Member
Joined: 11 months ago

I duplicated the recent video and accompanying notes. It seems no matter what I do I end up with not being able to reach Proxmox.

I installed Proxmox at 10.0.99.30. I want to tag this as vlan 99, my management network. The switch it's connected to sets the port as default 99 and tagged 20, 30, 40, 99, 107. 20 is the main network, 107 is IOT, and 40 is cameras. Note that Proxmox works fine until I start screwing around with vlans.

Here is the /etc/networks/interface file:

auto lo
iface lo inet loopback

iface enp180s0 inet manual

iface eno1 inet manual

iface eno2 inet manual

iface enp180s0d1 inet manual

auto vmbr0
iface vmbr0 inet manual
        bridge-ports enp180s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 20,40,99,107

auto vmbr0.99
iface vmbr0.99 inet static
address 10.0.99.30/24
gateway 10.0.99.1

And I can no longer reach that IP.

I have to go to the console and remove all the vlan stuff from the interface file and reboot to get back to Proxmox.

Does anyone see what I'm doing wrong? If I get Proxmox working again, I don't know what to try next.

ย 

5 Replies
Brandon Lee
Posts: 395
Admin
(@brandon-lee)
Member
Joined: 14 years ago

@bobinohio welcome to the forums! Glad you tossed the question over. It looks like from your Proxmox configuration and what you have described as your switch configuration, what you may have happening is "double tagging." On your switch, when you set the default VLAN, you are telling the switch that any traffic that "isn't tagged" you want to tag the traffic with VLAN 99.ย 

However, with your configuration in Proxmox, you are tagging traffic with VLAN 99. There are two ways to correct this:

Either move your IP address back to the vmbr0 interface, like below:

auto vmbr0
iface vmbr0 inet manual
        iface vmbr0.99 inet static
        address 10.0.99.30/24
        gateway 10.0.99.1
        bridge-ports enp180s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 20,40,99,107


Or you could leave your configuration in Proxmox as is, and then set the default VLAN to something else on the uplink port for your Proxmox host and then make sure you have that port tagged for VLAN 99.

The second option by reconfiguring the switch port may be the easiest since you wouldn't have to change anything on the Proxmox side.

Let me know if this makes sense. Either way, it should correct your problem.

Reply
Posts: 3
Topic starter
(@bobinohio)
Active Member
Joined: 11 months ago

Thank you for your reply. It didn't work ๐Ÿ™ย  I have to assume I messed something up someplace.

The switch port has native vlan 99. My understanding of vlans says my switch removes any tags from the packet as it leaves the switch. Do I have that right? Here is a capture of the port profile in the UDMPro.

Screen Shot 2023 12 27 at 2.12.59 PM

ย Does iface vmbr0.99 declare the bridge to untag 99? So if a packet comes in with no vlan tag, it's tagged as 99. Where is the second tagging taking place?

I have opted to go with your first suggestion of putting the IP on vmbr0. I think I understand what my switch is doing so I'm leaving that alone. What Proxmox is doing is fuzzy to me.

Thank you.

Reply
Brandon Lee
Posts: 395
Admin
(@brandon-lee)
Member
Joined: 14 years ago

@bobinohio. I believe leaving the Linux VLAN (vmbr0.99) in place on your Proxmox host would cause issues. I think your configuration looks like this now? I missed earlier, taking off the ".99" in the interface. You won't need that, see below.

auto vmbr0
iface vmbr0 inet manual
        iface vmbr0.99 inet static
        address 10.0.99.30/24
        gateway 10.0.99.1
        bridge-ports enp180s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 20,40,99,107

auto vmbr0.99

ย 

If you want to leave the untagged native VLAN in place for 99, you would need your configuration to look like this, removing the Linux VLAN for 99. Make sure your switch traffic is set for untagged traffic VLAN 99, and then you can add additional Linux VLANs to carry other traffic.

auto lo
iface lo inet loopback

iface enp180s0 inet manual

iface eno1 inet manual

iface eno2 inet manual

iface enp180s0d1 inet manual

auto vmbr0
iface vmbr0 inet manual
        iface vmbr0 inet static
        address 10.0.99.30/24
        gateway 10.0.99.1
        bridge-ports enp180s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 20,40,99,107

ย 

Reply
Posts: 3
Topic starter
(@bobinohio)
Active Member
Joined: 11 months ago

You are my new best friend!ย  Thank you.

I have a second 10GbE port on this machine. Is there a best practice on what to do with it?

ย 

Reply
1 Reply
Brandon Lee
Admin
(@brandon-lee)
Joined: 14 years ago

Member
Posts: 395

@bobinohio No problem! I am guessing you are up and running now with connectivity restored? You could add that adapter to a LAG configuration in Proxmox to back the default bridge. Or you could save it off to use for storage traffic or something else if you want.

Reply