Configure OVS on host1 and Duplicate Traffic

Getting Started with Napatech Link-Virtualization™ Software

Napatech SmartNIC
Content Type
Getting Started Guide
Capture Software Version
Link-Virtualization™ Software 4.4


  1. Create a bridge with 2 physical and 2 virtual ports:
    ovs-vsctl --if-exists del-br br0
    ovs-vsctl add-br br0 -- set bridge br0 datapath_type=netdev
    ovs-vsctl add-port br0 dpdk0 -- set interface dpdk0 type=dpdk \
    ovs-vsctl add-port br0 dpdk1 -- set interface dpdk1 type=dpdk \
    ovs-vsctl add-port br0 dpdkvp0 -- set int dpdkvp0 type=dpdk \ 
    ovs-vsctl add-port br0 dpdkvp1 -- set int dpdkvp1 type=dpdk \

    XX:XX is the PCI bus ID, found with the command lspci | grep Napatech.

    mac=xx:xx:xx:xx:xx:xx is the MAC address of the physical port dpdk0, and mac=yy:yy:yy:yy:yy:yy is the MAC address of the physical port dpdk1.

    ntlog | grep mac
    on the physical port to discover the MAC address.
  2. Clear the flow table. Add flow table entries to send all traffic through a service chain composed of two VMs: phy0->vm1->vm2->phy0. Add one additional rule to duplicate a slice of inter-VM traffic to the monitoring port:
    # clear the flow table 
    ovs-ofctl del-flows br0
    # send all traffic through 2-VM SFC
    ovs-ofctl add-flow br0,in_port=dpdk0,actions=dpdkvp0
    ovs-ofctl add-flow br0,in_port=dpdkvp0,actions=dpdkvp1
    ovs-ofctl add-flow br0,in_port=dpdkvp1,actions=dpdk0
    # duplicate a slice of traffic to the monitoring port
    ovs-ofctl add-flow br0 \
    # display flow table
    ovs-ofctl dump-flows br0