[SOLVED] Connecting LXC Container to VLAN

Gamienator

Member
Mar 16, 2021
41
6
13
33
Hey everyone,
sorry for this basic question but I guess there is something missing in my mind setting up correctly my VLANs.

My current goal is to connect a LXC Container via VLAN ID 5 to my pfsense. My current Interface settings on my hypervisor is:

Code:
auto lo
iface lo inet loopback

auto enp3s0
iface enp3s0 inet manual

iface enp2s0 inet manual

iface enp4s0 inet manual

iface enp5s0 inet manual

iface enp6s0 inet manual

iface enp7s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 10.0.6.4/21
        gateway 10.0.7.1
        bridge-ports enp3s0 enp4s0 enp5s0 enp6s0 enp7s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

auto vmbr1
iface vmbr1 inet manual
        bridge-ports enp2s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094
#WAN Connections

auto vmbr0.5
iface vmbr0.5 inet manual
#TestVLAN

After that I created on my pfSense the VLAN in vtnet1. vtnet1 is connected to vmbr0.

On my Container I have the following settings:

Code:
root@proxmox1:~# cat /etc/pve/lxc/116.conf
arch: amd64
cores: 2
hostname: test.ip
memory: 4096
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=CA:4A:13:9C:C6:CB,ip=dhcp,ip6=auto,tag=5,type=veth
onboot: 0
ostype: debian
rootfs: local-zfs:subvol-116-disk-0,size=10G
swap: 0
unprivileged: 1

And still there is no connection possible. What am I missing currently?

Cheers,
Gamie
 
  • Like
Reactions: dnndev
Sometimes the solution is far more easier then I thought.

After making the bridge VLAN Aware I didn't reboot the host. After rebooting that everything works as intented.
 
which is the config of pfsense?
where is working the dhcp'?
which ip have the test container?
is your managment vlan also on vlan 5?
 
The config of the pfsense is not posted.

DHCP is enabled an all devices, and after the reboot of the host the container got the desired IP Address :)
 
True, but the issue this time was a missing reboot of the proxmox node. Then the vmbr was really VLAN aware.
 

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!