Vlan

John Wick

Member
Apr 25, 2017
76
1
6
43
Hi,

Can i create bridge using vlan as follow:

Code:
auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

iface eth0.280 inet manual
    vlan-raw-device eth0

iface eth1.290 inet manual
    vlan-raw-device eth1
        
auto vmbr1
iface vmbr1 inet manual

iface vmbr1 inet manual
       bridge_ports eth0.280 eth1.290
       bridge_stp off

Please advice.

Thanks.
 
How about this:
Code:
auto eth0
iface eth0 inet manual

auto eth1
iface eth1 inet manual

iface eth1.280 inet manual
    vlan-raw-device eth1

iface eth1.290 inet manual
    vlan-raw-device eth1
    
iface eth0.280 inet manual
    vlan-raw-device eth0

iface eth0.290 inet manual
    vlan-raw-device eth0
        
auto vmbr1
iface vmbr1 inet manual

iface vmbr1 inet manual
       bridge_ports eth1.280 eth1.290 eth0.280 eth0.290
       bridge_stp off
 
what exactly do you want to do?
if you just want to have access to multiple vlans you should create a bond for eth0 and eth1, use this bond for vmbr1 and use the "VLAN" field at the container or vm level to assign a vlan to a vm
 
I want to make bridge from bonding and vlan. I tried yesterday but error.

Still not explained why you want this. Sure, on can bridge two networks, even when they're on different vlans, but why?

If I had to do this, I'd configure the bridge inside of VM, such that it is isolated. Networking should only be done if absolutely necessary on the virtualisation host (always keep things simple, so one VM for network, one host for virtualisation)
 
Let me explain to you.

On current setup each VM's connect to two vlan. Each vlan has lacp. VM's will to two nic on stackable cisco. If one nic the other will take over.

Each VM's will assign with static ip, no dhcp. So i want two nic (eg, eth1 and eth2) will put on bonding with lacp mode. After bonding, adding vlan id. This new interface with vlan id with to bridge. Since we don't use natting.
 
Is this correct way:
Code:
auto bond0
iface bond0 inet manual
        slaves eth0 eth1
        bond_miimon 100
        bond_mode 4

auto bond0.100
iface bond0.200 inet manual
    vlan-raw-device bond0

auto bond0.200
iface bond0.200 inet manual
    vlan-raw-device bond0
        
auto vmbr1
iface vmbr1 inet manual
    bridge_ports bond0.100 bond.200
    bridge_stp off
    bridge_fd 0
because after i restart network, it show error bond2 option mode ..
 
  • Like
Reactions: aasami
Let me explain to you.

On current setup each VM's connect to two vlan. Each vlan has lacp. VM's will to two nic on stackable cisco. If one nic the other will take over.

Each VM's will assign with static ip, no dhcp. So i want two nic (eg, eth1 and eth2) will put on bonding with lacp mode. After bonding, adding vlan id. This new interface with vlan id with to bridge. Since we don't use natting.

Bonding, lacp ... everything clear ... but why are there vlans involved?
 
But i got some weird thing. Config as below:
Code:
 auto lo
 iface lo inet loopback
 iface eth0 inet manual
 iface eth1 inet manual

auto bond0
iface bond0 inet manual
        slaves eth0 eth1
        bond_miimon 100
        bond_mode active-backup

auto bond0.200
iface bond0.200 inet manual
        vlan-raw-device bond0

auto bond0.300
iface bond0.300 inet manual
        vlan-raw-device bond0

auto vmbr1
iface vmbr1 inet static
   bridge_ports bond0.200 bond0.300
   bridge_stp off
   bridge_fd 0

Error:
Code:
21: bond0.200@bond0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master vmbr1 state LOWERLAYERDOWN group default qlen 1000
    link/ether 3c:d9:2b:f0:c1:d6 brd ff:ff:ff:ff:ff:ff
   22: bond0.300@bond0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master vmbr1 state LOWERLAYERDOWN group default qlen 1000
    link/ether 3c:d9:2b:f0:c1:d6 brd ff:ff:ff:ff:ff:ff
Bond0 also show down. On switch it's not blinking. Is it correct the config?
 

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!