Candela Technologies Logo
Network Testing and Emulation Solutions

Basic: Layer3 Traffic Generation: test_l3.py

Goal: Use Python Script test_l3.py to Generate Layer3 Traffic

Each LANforge system has Python scripts installed at /home/lanforge/scripts. You can find it at /home/lanforge/scripts/py-script/test_l3.py

The script test_l3.py will:

  • create stations (on multiple radios),
  • create TCP and UDP cross connects
  • run traffic at specified data rates for a specified time.

The traffic prioritization is configurable:

BE
Best Effort
BK
Background
VI
Video
VO
Video

The upload and download statistsics are recorded at the end of each polling interval. The script will verify whether traffic is sent and received. The script cleans up the station and connections at the end of the test. An HTML and PDF report of the results will be generated and placed in the /home/lanforge/html-reports directory.

 
  1. Start the LANforgeGUI if GUI not running:
    To start the LANforgeGUI navigate to : /home/lanforge/LANforgeGUI_5.4.5
    Execute : ./lfclient.bash
    Click the Connect button to connect to: localhost:4002 Local Machine Address

  2. Where Do I Find Scripts?
    Preinstalled Python Scripts Location on LANforge: /home/lanforge/scripts/py-scripts
    Example script test_l3.py location: /home/lanforge/scripts/py-scripts/test_l3.py
  3. Initial Information to Gather as input to test_l3.py script:
    Note: An example of a Device Under Test is an Access Point. The DUT information is used in report generation. The DUT information may be optional.
    1. The LANforge manager IP address: --lfmgr [localhost]
    2. The LANforge upstream port: --upstream_port [eth port]
    3. The LANforge end point type: --endp_type 'lf_udp,lf_tcp'
    4. The LANforge type of service: --tos 'BK,VI'
    5. The side 'a' tx bit rate (upload) --side_a_min_bps [bits per second]
    6. The side 'b' tx bit rate (download) --side_b_min_bps [bits per second]
    7. The LANforge radio information :
      --radio 'radio==[radio] stations==[number] ssid==[ssid] ssid_pw==[password] security==[security]'
    8. The Test Durations : --test_duration [value] (s - seconds, m - minutes, h - hours)
    9. The Polling Interval : --polling_interval [value] (s - seconds, m - minutes, h - hours)
    10. The Test Rig: --test_rig [test system id]
    11. The Test Tag: --test_tag [unique test id]
    12. The Device Under Test Model Number: --dut_model_num [model]
    13. The Device Under Test Hardware Version: --dut_hw_version [hw version]
    14. The Device Under Test Software Version: --dut_sw_version [sw version]
    15. The Device Under Test Serial Number: --dut_serial_num [serial number]
  4. Example Command for test_l3.py:
     ./test_l3.py --lfmgr 192.168.0.103 \
    --upstream_port 1.1.eth2 \
    --endp_type 'lf_udp,lf_tcp' \
    --tos 'BK,VI' \
    --side_a_min_bps 256000 \
    --side_b_min_bps 102400000 \
    --radio 'radio==wiphy1 stations==1 ssid==asus_5g ssid_pw==lf_asus_5g security==wpa2' \
    --test_duration 30s \
    --polling_interval 5s \
    --test_rig CT_LAB_104 \
    --test_tag Layer_3_Example \
    --dut_model_num RT-AX88U \
    --dut_hw_version A1.1
    --dut_sw_version 3.0.0.4.384 \
    --dut_serial_num M1IAHP000003
  5. Results for test_l3.py located in /home/lanforge/html-reports:

  6. Results for test_l3.py is located at /home/lanforge/html-reports:
    Script produces both HTML and PDF results:Other script options may be show by typing ./test_l3.py --help

Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA
www.candelatech.com | sales@candelatech.com | +1.360.380.1618
Facebook | LinkedIn | Blog