Candela Technologies Logo
Network Testing and Emulation Solutions

Using LANforge python script to do packet captures then analyze to determine if the traffic was OFDMA, MU-MIMO or Single User

Goal: Sniff wireless traffic to/from LANforge stations using additional LANforge Radios in monitor mode.

This script automates creating WiFi monitor devices correctly configured for the station's channel, and in the case of OFDMA, the AID and BSSID will also be configured in the sniffing radio. The OFDMA vs MU-MIMO analysis is performed by the wifi diagnostics script. Both of these scripts require LANforge 5.4.2 or higher and an appropriate set of WiFi radios.

 
  1. Create and configure stations to talk to your DUT. You may create these through Chamber View scenarios or other methods. Please refer to introductory cookbooks for more information on this if you have questions.
  2. Run lf_sniff.py script.
    1. Change directory to the /home/lanforge/scripts directory (or other location if you have installed scripts elsewhere), and run the lf_sniff.py script with the --help argument to understand your options..
    2. Run the script with arguments for your test case. The basic idea is to provide a list of stations you wish to sniff, and a list of matching radios that you wish to use as sniffers. The script will query the station to find the channel, AID and BSSID and will then create WiFi monitor devices on the sniffer radios. A command-line packet capture tool will then be started and write the captured packets to disk for the requested duration. When the duration is complete, the packet capture process will exit. You can then post-process the packet captures, open them with wireshark, etc.
      Examples
      Sniff sta00000 on LANforge resource 1 using radio wiphy0 on LANforge resource 2 for 15 seconds:
      ./lf_sniff.py --lfmgr 192.168.100.238 --station "1.sta00000" \
       --sniffer_radios "2.wiphy0" --duration 0.25
  3. Run do_wifi_diag.bash script.
    1. Change directory to the /home/lanforge/scripts/wifi_diag directory, and run the bash script without any arguments to view the usage help. screenshot
    2. Run the bash script with correct location of the pcap file obtained with lf_sniff.py and with the correct BSSID of the AP used as the DUT. Depending on your system processing power and the pcap file size, the wifi diag script will take some time to complete.
    3. When the wifi diag script is complete, you can open the index.html file to view the results. screenshot
  4. Interpreting the report for OFDMA or MU-MIMO operation.
    1. To determine if the packet capture contains OFDMA or MU-MIMO operation, scroll down in the report to the table labeled "RX Packet Type Histogram" and the element "ACK but not captured" which is a count of the number of Block ACKs captured without capturing the corresponding Data frames. If the report shows a large percentage of "ACK but not captured", this indicates MU-MIMO operation because the data frames are not able to be captured. If there is a lower percentage, than the traffic is likely OFDMA. screenshot
    2. "ACK but not captured" is also represented in the graph later in the report labeled "RX Dummy Packets". screenshot
    3. The graph labeled "RX RU Alloc over time" also indicates OFDMA operation because it shows when frames were assigned a Resource Unit allocation which is the main trait of OFDMA operation. screenshot

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