[SOLVED] [HELP] Need to setup different vlans (single Nic host)

javierspn

New Member
Apr 15, 2023
14
2
3
Hi Team!

I have a single Nic host with a bridge (ignore the unused interface, it is a USB Nic plugged in for testing purposes).

Screenshot 2024-03-13 222957.png

The interface is plugged into a switch port -ge-0/0/1.0 - with a sigle vlan wit id v200 (tag 200):

Bash:
root> show vlans
Name           Tag     Interfaces
default
                       ge-0/0/6.0*
v100           100
                       ge-0/0/6.0*, ge-0/0/10.0, ge-0/0/11.0*
v150           150
                       ge-0/0/6.0*
v200           200
                       ge-0/0/0.0*, ge-0/0/1.0*, ge-0/0/2.0*, ge-0/0/3.0*,
                       ge-0/0/4.0*, ge-0/0/5.0, ge-0/0/6.0*, ge-0/0/7.0
v250           250
                       ge-0/0/6.0*

Port ge-0/0/6.0 is configured as a VLAN trunk (you can see above it has ALL VLANs configured):

Bash:
root> show interfaces ge-0/0/6
Physical interface: ge-0/0/6, Enabled, Physical link is Up
  Interface index: 136, SNMP ifIndex: 516
  Link-level type: Ethernet, MTU: 1514, Speed: Auto, Duplex: Auto,
  BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled,
  Source filtering: Disabled, Flow control: Enabled, Auto-negotiation: Enabled,
  Remote fault: Online
  Device flags   : Present Running
  Interface flags: SNMP-Traps Internal: 0x4000
  Link flags     : None
  CoS queues     : 8 supported, 8 maximum usable queues
  Current address: 78:fe:3d:3f:39:c9, Hardware address: 78:fe:3d:3f:39:c9
  Last flapped   : 2011-09-11 10:44:46 UTC (00:44:41 ago)
  Input rate     : 0 bps (0 pps)
  Output rate    : 0 bps (0 pps)
  Active alarms  : None
  Active defects : None

  Logical interface ge-0/0/6.0 (Index 75) (SNMP ifIndex 517)
    Flags: SNMP-Traps 0x40004000 Encapsulation: ENET2
    Input packets : 82
    Output packets: 0
    Protocol eth-switch
      Flags: Trunk-Mode

The idea is to use ge-0/0/6.0 both as the bridge I use to manage proxmox, reusing its current IP, and also set up VMs within the different VLANS:

connections_juniper.excalidraw 1.png
The thing is I already tried it:

1. I made the bridge (with the other test USB Nic) VLAN Aware and when I create a VM there, if I set up the proper VLAN wthin the VM interface, it properly access the VLAN. BUT I cannot access the new bridge's IP on VLAN 200 (10.100.1.120).
2. if I swap cables and just connectthe proxmox Nic against the new trunk port (ge0/0/6) I can't also access the bridge IP (for management)

So what is recomended in this scenario? How can I achieve this?
 

Attachments

  • connections_juniper.excalidraw 1.png
    connections_juniper.excalidraw 1.png
    120.4 KB · Views: 0
You can either create the VLAN tag on the VMs NIC interface or you create a VLAN at the network setup and use the VLAN NIC (e.g. vmbr0.100) at your VM
 
You can either create the VLAN tag on the VMs NIC interface or you create a VLAN at the network setup and use the VLAN NIC (e.g. vmbr0.100) at your VM
No, that is working. What I need is for the management interface to run on vlan 200.
 
You need to use a trunk port and make sure your bridge is VLAN aware. You would set the VLAN in the NIC setting for each VM or CT. Here is what your /etc/network/interfaces file should look like

auto lo
iface lo inet loopback
iface eno1 inet manual

auto vmbr0.200 (make the vlan match which ever VLAN you use to manage your Proxmox servers)
iface vmbr0.200 inet static
address 192.168.XXX.XXX/24
gateway 192.168.XXX.1

auto vmbr0
iface vmbr0 inet static
bridge-ports eno1
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4092 (don't change this. You can't use 1 or 4093, 4094)


This setup requires a trunk port, not a tagged port
 
Last edited:
  • Like
Reactions: javierspn
You need to use a trunk port and make sure your bridge is VLAN aware. You would set the VLAN in the NIC setting for each VM or CT. Here is what your /etc/network/interfaces file should look like

auto lo
iface lo inet loopback
iface eno1 inet manual

auto vmbr0.200 (make the vlan match which ever VLAN you use to manage your Proxmox servers)
iface vmbr0.200 inet static
address 192.168.XXX.XXX/24
gateway 192.168.XXX.1

auto vmbr0
iface vmbr0 inet static
bridge-ports eno1
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4092 (don't change this. You can't use 1 or 4093, 4094)


This setup requires a trunk port, not a tagged port
Thanks! Worked like a charm.
 
  • Like
Reactions: louie1961

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!