As per the Title really. I can't work out if there's a way to do this or not. The only mention of ports in the docs are "patch ports" as pairs of ports. The example shows the use of these patch ports, but it's still not clear at all if you can 'define' these ports in a way that can receive configuration on them.
Basically trying to create the equivalent configuration from Proxmox Open vSwitch, Example 3:
# Loopback interface
auto lo
iface lo inet loopback
Bond eth0 and eth1 together
allow-vmbr0 bond0
iface bond0 inet manual
ovs_bridge vmbr0
ovs_type OVSBond
ovs_bonds eth0 eth1
ovs_options bond_mode=balance-slb vlan_mode=native-untagged
Bridge for our bond and vlan virtual interfaces (our VMs will
also attach to this bridge)
allow-ovs vmbr0
iface vmbr0 inet manual
ovs_type OVSBridge
ovs_ports bond0 vlan1
Virtual interface to take advantage of originally untagged traffic
allow-vmbr0 vlan1
iface vlan1 inet static
ovs_type OVSIntPort
ovs_bridge vmbr0
ovs_options vlan_mode=access
address 192.168.3.5
netmask 255.255.255.0
gateway 192.168.3.254
I can achieve the vmbr0 and bond0 interfaces with the following netplan config, but don't know how to create the internal port (named vlan1).
---
network:
version: 2
ethernets:
eth0: {}
eth1: {}
bonds:
bond0:
interfaces:
- eth0
- eth1
openvswitch: {}
bridges:
vmbr0:
interfaces:
- bond0
openvswitch: {}
I am aware I can add layer 3 configuration directly to vmbr0, but I believe I need an internal port as I want this interface to handle VLANs in the same way other ports for containers/VMs will. Answers explaining how this assumption is wrong also appreciated!
I am also constrained to using Open vSwitch as libvirt doesn't support "standard linux bridges".