Candela Technologies Logo
Network Testing and Emulation Solutions

Introduction to Layer 4-7 Traffic Generation

Goal: Use LANforge to emulate layer 4-7 download traffic

Creating web browsing and movie watching is a common task with LANforge.This cookbook will introduce HTTP download examples and describe the difference between the Layer 4-7 and Generic traffic generation techniques. We will begin on a CT520a with 20 stations.There are two methods of emulating web browsing:
  1. Layer 4-7 connections: these are workers doing downloads using curl
  2. Generic connections: these are scripts call programs that can download or upload. Not just any program can be used, these programs need to be able to bind to a specified network interface.
If you want to:
...load test a web server, you will use mostly use Layer 4-7 connections.
...multiple video streams, you would use Generic connections that call c-clive
...Upload files, you would use Generic connections that call curl
The following examples do not assume your LANforge has a route to the Internet, but are pointing at a webserver at an IP address. We are going to show making a common mistake in the first example.
  1. Simple HTTP Get

  2. Check your Port Mgr tab and note we have 20 stations on resource 2, radio wiphy0. screenshot
  3. Move to the Layer 4-7 tab screenshot
  4. Create a new connection, this example is named www1. on resource 2, WiFi station sta1000 Next, consider the URLs per 10 minute field. screenshot
    1. Hover your mouse over the URLs per 10 min field to see the tool tip.   If you wanted to create five connections a second,   that would be 3000 connections in 10 minutes.   This differs from the Max Speed field, which sets the maximum bit per second of the connection.
  5. Continue with other settings. We are purposely going to make an error and diagnose it. screenshot
    1. Set the request rate, choose the number of URLs per 10 min to 3000
    2. DNS Cache Timeout: 600
    3. Select Gzip
    4. Set URL to
    5. Set Destination file or directory to /dev/null if you are on Linux.  (If you are on Windows, you need to use NUL)
    6. Select Enable 4XX to show errors in logs
    7. Select Bind DNS so that hostnames are resolved over sta1000 (not over our management port)
    8. Click Apply. Do not close this window.
  6. Back in the Layer 4-7 tab, select the connection screenshot
  7. Start the connection screenshot
    1. ... then click Display
  8. Watch the www1 endpoint window... screenshot
    1. Notice how there is no traffic to ctweb: because the hostname won't resolve over our test network.   This is a common mistake. Let's use the IP of our other LANforge hosting our test network instead.
  9. Change the URL to use an IP address: screenshot
    1. Click Apply
    2. Do not close the window.
  10. The endpoint display now shows traffic. screenshot
    1. Not having DNS resolution is a common problem in test networks.
    2. It can cause problems when connecting to a https website and getting certificate errors.
    3. Click Close
  11. It is pretty simple to create a connection per WiFi station on our LANforge. Return to our Create/Modify L4Endpoint window for www1 screenshot
    1. Click Batch-Create
  12. In the Batch Create window, create 19 more connections screenshot
    1. Quantity: 19
    2. Number of Digits **3**
    3. File Increment: **0** (because we don't have multiple /dev/null files)
    4. Click Apply
  13. Back in the Layer 4-7 tab, observe all our connections screenshot
  14. Hightlight them, and click Start screenshot
  15. Note that if we were to Right Click→Display to show dynamic report
  16. Right Click → Dynamic Report to show dynamic report screenshot
    1. This shows throughput for all the connections.
    2. Notice how crowded this graph is. There is a simpler way to display overall throughput.
  17. Next, select the Port Mgr tab.
    1. Select resource 2, radio wiphy0 screenshot
    2. Right Click → Dynamic Report to show dynamic report screenshot
    3. See the overall througput through the radio screenshot

Facebook | LinkedIn | Blog