# Supported datapaths
Linux upstream
Linux OVS tree:implemented by the Linux kernel module distributed with the OVS source tree.
Userspace:Also known as DPDK, dpif-netdev or dummy datapath. on NetBSD, FreeBSD and Mac OSX.
Hyper-V:Also known as the Windows datapath.
ovs-vsctl add-br br0
ovs-vsctl add-port br0 eth0 # trunk port (the default)
VLAN
ovs-vsctl add-port br0 tap0 tag=9 # access port
ovs-vsctl add-port br0 eth0 tag=9 vlan_mode=native-tagged
native-tagged
A native-tagged port resembles a trunk port, with the
exception that a packet without an 802.1Q header that
ingresses on a native-tagged port is in the ``native
VLAN’’ (specified in the tag column).
native-untagged
A native-untagged port resembles a native-tagged port,
with the exception that a packet that egresses on a
native-untagged port in the native VLAN will not have an
802.1Q header.
ovs-vsctl set port tap0 tag=9 # set existing port
Port bonding
ovs-vsctl add-bond br0 bond0 eth0 eth1 # ovs-vswitchd.conf.db(5) for options
each of the interfaces in my bonded port shows up as an individual OpenFlow port.
Open vSwitch makes individual bond interfaces visible as OpenFlow ports, rather than the bond as a whole.
Port mirroring
# eth0 + tap0 mirrored to tap1
ovs-vsctl add-port br0 eth0
ovs-vsctl set bridge br0 stp_enable=true # not well tested
ovs-vsctl add-port br0 tap0
ovs-vsctl add-port br0 tap1 \
-- --id=@p get port tap1 \
-- --id=@m create mirror name=m0 select-all=true output-port=@p \
-- set bridge br0 mirrors=@m
ovs-vsctl clear bridge br0 mirrors # disable mirror
RSPAN VLAN, mirroring of all traffic to that VLAN. Mirroring to a VLAN can disrupt a network that contains unmanaged switches.
Controller
ovs-vsctl set-controller of-switch tcp:0.0.0.0:6633 # set Remote Controller
Faucet
IP_faucet=127.0.0.1 # don't use domain name
ovs-vsctl add-br br0 \
-- set bridge br0 other-config:datapath-id=0000000000000001 \
-- set-controller br0 tcp:$IP_faucet:6653 \
-- set controller br0 connection-mode=out-of-band
ovs-vsctl add-port br0 enp3s0 -- set interface enp3s0 ofport_request=1
ovs-vsctl -- --columns=name,ofport,link_speed,admin_state,statistics,mac_in_use list Interface # mapping
for i in 1 2 3; do
ip tuntap add mode tap dev tap$i
ovs-vsctl add-port br0 tap$i -- set interface tap$i ofport_request=$i
ovs-ofctl mod-port br0 tap$i up
done
cat /var/log/openvswitch/ovs-vswitchd.log
ovs-vsctl show
ovs-vsctl --if-exists del-br br0
ovs-appctl ofproto/trace br0 in_port=tap1
ovs-appctl vlog/list
ovs-appctl vlog/set ANY:file:dbg
ovs-ofctl dump-flows br0