Lost with VLAN and network config

taich

Member
Aug 15, 2020
116
18
23
64
Hi I am new to proxmox and I am trying to configure the proxmox network.

My Proxmox has one network device called eth0
I want 2 VLAN's on eth0

VLAN 227 with a public IP 227.10.x.x
VLAN 1 (default) with private IP 10.10.x.x

And Both VLAN's should be useable with virtual machines.
e.g.
vm1 with 2 network devices
vm1/eth0 - 10.10.x.x
vm1/eth1 - 227.10.x.x

Here is my interface

Code:
auto lo
iface lo inet loopback

iface eth0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 10.10.0.144/24
        bridge-ports eth0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

auto vmbr0.227
iface vmbr0.227 inet static
        address 227.10.x.x/29
        gateway 227.10.x.1
        bridge-ports eth0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

Please help
 
Hi,

vmbr0.X is a special way to defined an internal vlan port for this bridge. (this is used only to use an ip for this bridge in this vlan).
but you don't need to redeclare "bridge-..."

Code:
auto vmbr0
iface vmbr0 inet static
        address 10.10.0.144/24
        bridge-ports eth0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

auto vmbr0.227
iface vmbr0.227 inet static
        address 227.10.x.x/29
        gateway 227.10.x.1


But, I don't think it's what you need.
you don't need to defined ips address on vmbrX to be able to use them in your vm. (If you don't use a routed setup with host as gateway for your vms)
only for your proxmox host management.



to define a vlan on your vms interfaces, simply choose in your vm interface "vmbr0" and choose a vlan tag.
the vlan tag will be added on the vmbr0 virtual port when the vm start
 
Thanks for your reply.

I did not think this way, it is a possibility to just define one network interface in the vm.
But I also want the WAN on my proxmox server. Thats why I defined the vmbr0.227

Meanwhile I found the error I had before. It was a wrong gateway.
The setup I now have with the bridge also works but with 2 network interfaces in the vm. One interface for LAN and the other for WAN.
 
  • Like
Reactions: spirit

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!