OVS: Native VLAN for Console - Tag VLAN for VMs

Marvin

Renowned Member
Jan 20, 2011
40
1
73
Getting very confused reading through so many OVS explanations and examples, most with complexities i don't need and none of which clearly answer my questions.

Question 1
I have eth0 NIC connected to a line giving me a native VLAN (10.1.1.0/24) and a tagged (tag=2) VLAN (172.17.0.0/16). No bonding involved. No clusters or fail-overs.
I want to use:
  • Native VLAN (10.1.1.0/24) for Proxmox console. It needs an IP for the console (10.1.1.232).
  • Tag=2 VLAN for VMs. IPs are supplied by VMs -- since no console connection here, does it also need an IP in interfaces?
  • Native VLAN has its default gateway (10.1.1.1) and Tag=2 VLAN has its default gateway (172.17.1.1). Are these both entered in interfaces?
What is the correct interfaces configuration to do this?

Question 2
I also have 2 VLANs which are internal only (connecting VM to VM) -- no hardware connections.
Are these ovs_type OVSBridge or OVSIntPorts or both?

Question 3
For which of the above do i need?:
ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif

Thank you.
 
Hi,

Use a normal setting with wlan aware bridge.
Then add the Vlan Tag on the vnics of the VM.
 
Hi,

Use a normal setting with wlan aware bridge.
Then add the Vlan Tag on the vnics of the VM.
So are you saying to just use an OVS Bridge with only the eth0 as port, and no other settings -- then the VM's NIC references that bridge and sets the tag=2 there?
 
Yes but I would not use OVS.
In this setup Linux Bridge is better.
If you use Linux bridge check the "VLAN aware" checkbox.
This makes the bridge able to handle vlans internally.
 
Herewith a sample OVS configuration, which:
  • Uses eth0 and eth1 as a LACP bond
  • Untagged traffic (native) is associated as vlan 1 (tagged on ingress and popped on egress)
  • MTU of bond and it's slave interfaces, is 9000 bytes. Management interface is 1500 bytes.
  • Bridge (vmbr0) is VLAN aware so you can simply set the requires VLAN ID on the virtual's network interface (set as '1' to connect the VM to the untagged network on the bond interface.

/etc/network/interfaces
Code:
auto lo
iface lo inet loopback

allow-vmbr0 bond0
iface bond0 inet manual
        ovs_bridge vmbr0
        ovs_type OVSBond
        ovs_bonds eth0 eth1
        pre-up ( ifconfig eth0 mtu 9000 && ifconfig eth1 mtu 9000 )
        ovs_options bond_mode=balance-tcp lacp=active other_config:lacp-time=fast tag=1 vlan_mode=native-untagged
        mtu 9000

auto vmbr0
allow-ovs vmbr0
iface vmbr0 inet manual
        ovs_type OVSBridge
        ovs_ports bond0 vlan1
        mtu 9000
                                                                          
allow-vmbr0 vlan1
iface vlan1 inet static
        ovs_type OVSIntPort
        ovs_bridge vmbr0
        ovs_options tag=1
        ovs_extra set interface ${IFACE} external-ids:iface-id=$(hostname -s)-${IFACE}-vif
        address 192.168.1.26
        netmask 255.255.255.0
        gateway 192.168.1.1
        mtu 1500
 

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!