Candela Technologies Logo
Network Testing and Emulation Solutions

Start Here: Introduction to Executing Python Script on LANforge

Goal: Run First Python Script on LANforge

Each LANforge system has Python scripts preinstalled at /home/lanforge/scripts to configure the LANforge and run Traffic Emulation. Goal is to execute, one of the pre-installed python scripts located at /home/lanforge/scripts/py-script/

The Script will create a station, create TCP and UDP traffic, run traffic for a short amount of time, and verify whether traffic was sent and received. It also verifies the station connected to the requested BSSID if bssid is specified as an argument. The script will clean up the station and connections at the end of the test. An html and pdf or the results will be generated and placed in /home/lanforge/html-reports directory The script will clean up the station and connections at the end of the test.
  1. Start the LANforgeGUI if GUI not running: 
    To start the LANforgeGUI navigate to : /home/lanforge/LANforgeGUI_5.4.5
    Execute : ./lfclient.bash
    Select 'Connect' 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 location: /home/lanforge/scripts/py-scripts/
  3. Initial Information to gather as input to 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: --mgr [localhost]
    2. The LANforge upstream port: --upstream_port [eth port]
    3. The LANforge radio: --radio [radio]
    4. The Device Under Test ssid: --dut_ssid [ssid]
    5. The Device Under Test passwd: --dut_passwd [passwd]
    6. The Device Under Test security: --dut_security [security]
    7. The Device Under Test Model Number: --dut_model_num [model]
    8. The Device Under Test Hardware Version: --dut_hw_version [hw version]
    9. The Device Under Test Software Version: --dut_sw_version [sw version]
    10. The Device Under Test Serial Number: --dut_serial_num [serial number]

  4.  Example Command for 
    ./ --mgr locahost --upstream_port 1.1.eth2
    --radio 1.1.wiphy1 --dut_ssid axe11000_5g --dut_passwd lf_axe11000_5g --dut_security wpa2
    --dut_model_num GT-AXE11000 --dut_hw_version 1.0 --dut_sw_version V3.
    --dut_serial_num M32A

  5.  Results for located in /home/lanforge/html-reports: 

  6. Results for located in /home/lanforge/html-reports: 
    Script produces both html and pdf results
    Sample Script HTML Output: example of html output
    Sample Script pdf Output: example of pdf output
    Other script options may be show by typing ./ --help

Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA | | +1.360.380.1618
Facebook | LinkedIn | Blog