Verifying the traffic

Getting Started with Napatech Link-Virtualization™ Software

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

Verify the traffic using your preferred traffic generator tool. This example describes how to verify the traffic using the TRex traffic generator.

About this task

To generate traffic that’s easily distributed, this test uses a modified version of the file trex/scripts/stl/bench.py included in the standard TRex package.

Procedure

  1. Copy the bench.py script to mybench5.py:
    cp trex/scripts/stl/bench.py trex/scripts/stl/mybench5.py
  2. Modify the IP range:
    diff bench.py mybench5.py
    5c5
    <     ip_range['src'] = {'start': '16.0.0.0', 'end': '16.0.255.255'}
    ---
    >    ip_range['src'] = {'start': '16.0.0.0', 'end': '16.0.4.255'}
    
  3. Start the TRex server:
    cd /opt/trex-core/scripts
    ./t-rex-64 -i -c <cores>
    

    where cores is the number of available cores.

  4. On the same host, in a new terminal window, connect to the TRex server using trex-console in cli mode:
    cd /opt/trex-core/scripts
    ./trex-console
    tui
    
  5. Start the traffic generator to transmit on port 0 with rate-controlled load:

    Enter the following command in the TRex console to start the traffic generator at 10 Mpps, varying the source IP address field:

    start -p 0 -f stl/mybench5.py -t size=64,vm=var1 -m 10mpps
  6. Record and compare to expected results:

    In this example, OVS is expected to return all incoming traffic to SmartNIC port 0 while copying 1 in 5 packets (2 Mpps) to the monitoring port (port 1).