This is an easy combination, but a quick google didn't surface a succinct entry, so for my own documentation, here is what I use:
Add a bridge:
ovs-vsctl add-br br0
Add a physical port to the bridge, which defaults to 802.1q trunk mode:
ovs-vsctl add-port br0 eno1
Allow and make use of a designated untagged VLAN:
ovs-vsctl set port eno1 vlan_mode=native-untagged
Designate which vlan is untagged:
ovs-vsctl set port eno1 tag=20
Specify which VLANs are trunked and allowed:
ovs-vsctl set port eno1 trunks=10,30,50,60A short form diagnostic command:
# ovs-vsctl list port eno1 _uuid : 579b2c91-ad26-4ba0-bdcc-172c18daae80 bond_active_slave : [] bond_downdelay : 0 bond_fake_iface : false bond_mode : [] bond_updelay : 0 external_ids : {} fake_bridge : false interfaces : [bfec126c-375c-435e-9fae-3b71d513724b] lacp : [] mac : [] name : "eno1" other_config : {} qos : [] rstp_statistics : {} rstp_status : {} statistics : {} status : {} tag : 20 trunks : [10, 30, 50, 60] vlan_mode : native-untaggedA longer form diagnostic command:
# ovs-vsctl list interface eno1 _uuid : bfec126c-375c-435e-9fae-3b71d513724b admin_state : up bfd : {} bfd_status : {} cfm_fault : [] cfm_fault_status : [] cfm_flap_count : [] cfm_health : [] cfm_mpid : [] cfm_remote_mpids : [] cfm_remote_opstate : [] duplex : full error : [] external_ids : {} ifindex : 2 ingress_policing_burst: 0 ingress_policing_rate: 0 lacp_current : [] link_resets : 1 link_speed : 100000000 link_state : up lldp : {} mac : [] mac_in_use : "4c:72:b9:4b:16:5c" mtu : 1500 mtu_request : [] name : "eno1" ofport : 1 ofport_request : [] options : {} other_config : {} statistics : {collisions=0, rx_bytes=62197532, rx_crc_err=0, rx_dropped=0, rx_errors=0, rx_frame_err=0, rx_over_err=0, rx_packets=92875, tx_bytes=30437234, tx_dropped=0, tx_errors=0, tx_packets=86960} status : {driver_name="r8169", driver_version="2.3LK-NAPI", firmware_version=""} type : ""A short, all-in-one lcommand for adding an internal access port:
ovs-vsctl add-port ovsbr0 vlan40 tag=40 -- set Interface vlan40 type=internal