Candela Technologies Logo
Network Testing and Emulation Solutions

Generating FTP Traffic Between Two Physical ports

Goal: Allow LANforge to simulate a FTP connection within the same system.

This scenario is useful if you wish to generate stateful FTP traffic between two physical ports using a single LANforge system. You will need two non-management physical ports connected to eachother with a loopback cable or switch.
  1. Configure the physical interfaces. We will set up eth1 as a client and eth2 as a FTP server.
    1. Go to the Port Mgr tab and select eth1. screenshot
    2. Click Modify to configure port eth1. screenshot
      1. Set the IP Address to
      2. Click OK.
    3. While still in the Port Mgr tab, select eth2. screenshot
    4. Click Modify to configure port eth2. screenshot
      1. Set the IP Address to
      2. Enable FTP under Services.
      3. Click OK.
  2. Create a file for the FTP client to download/upload. This is optional if you already have a file in mind to test with, just make sure the file is in /home/lanforge (the default directory for FTP). Step 3 explains how to upload a file from a Windows machine.
    1. First, you'll need to open a console on the LANforge system.
      1. Log into the machine directly or remotely through rdesktop. The user/password should be lanforge/lanforge for both.
      2. To log in via rdesktop type the following command into a console (replace LANforge-IP with the IP of your LANforge system):
        rdesktop LANforge-IP screenshot
      3. Log in with user/password lanforge/lanforge.
      4. Once you are on the system, a console should already be open. If you don't see a console, go ahead and open one by clicking the console icon in the top menu bar (shown in the below screenshot). screenshot
    2. Once you have a console ready, use the below commands to create a small or large file. These files will just contain random text.
      Note: These files will be created in the /home/lanforge directory. This is the default directory used for FTP on LANforge.
      1. Small file (45 KB):
        dd if=/dev/urandom of=/home/lanforge/small-file.bin bs=1k count=44 screenshot
      2. Large file (10 MB):
        dd if=/dev/urandom of=/home/lanforge/large-file.bin bs=1k count=10240 screenshot
  3. Optional: Upload a file to the LANforge system for the FTP client to download/upload. There are multiple ways to do this, this step will demonstrate the upload using a Windows machine with FileZilla.
    1. On your Windows machine, download and install FileZilla. You can download the FileZilla client here:
    2. Open FileZilla. screenshot
      1. Near the top left in the Host field, enter in the following: sftp://LANforge-IP
        (sftp:// is used in this example).
      2. Username: lanforge Password: lanforge.
      3. Click Quickconnect.
    3. In the left column navigate to your file's directory. Make sure the right column is set to /home/lanforge screenshot
    4. To start transferring your file, double click it in the left column. Once the transfer is complete make sure you can find it within the right column under /home/lanforge. Your file is now on the LANforge machine! screenshot
  4. Create the FTP endpoint.
    1. On the Layer 4-7 tab, click Create. screenshot
    2. Configure the FTP endpoint. screenshot
      1. Name your endpoint ftp-download.
      2. Set Rpt Timer to fast (1 s)
      3. Set Port to eth1.
      4. Set URLs per 10m to 600 (1/sec).
        1. Here is a list of common values used for URLS per 10m. screenshot
      5. To download the small file (44KB) created earlier, set URL to:
        To download the large file (10MB) created earlier, set URL to:
        Note: The default directory for FTP is /home/lanforge and the default username/password is lanforge/lanforge. All files downloaded/uploaded via FTP need to be in /home/lanforge.
      6. Optional: If you want to use another file in /home/lanforge you can just change the filename at the end of the URL.
        For example ftp://lanforge:lanforge@ would be changed to ftp://lanforge:lanforge@
      7. Set Source/Dest File to /dev/null.
      8. Click OK.
  5. Start the endpoint and display the graph.
    1. In the Layer 4-7 tab, select the connection called ftp-download.
    2. Click Start. screenshot
    3. Select ftp-download and click Display to see a graph similar to below. screenshot
  6. Uploading a file from the FTP client to the FTP server.
    1. Go to the Layer 4-7 tab and modify the ftp-download endpoint. The below changes will need to be made: screenshot
      1. Name to ftp-upload.
      2. UL/DL to Upload.
      3. URL to ftp://lanforge:lanforge@ The 'upload-file' filename in this link can be changed if needed.
      4. Source/Dest File to large-file.bin. This can be changed to a preferred file as long as it is in /home/lanforge (the default FTP directory).
      5. Click OK.
    2. Select ftp-upload and click Start.
    3. This endpoint will now essentially upload the large-file.bin file in /home/lanforge to the same directory with a new file name (upload-file in this case). If you select ftp-upload in the Layer 4-7 tab and click Display, the graph should look similar to the one below. screenshot
  7. Using SCP, SFTP, and TFTP.
    1. Go to the Layer 4-7 tab and modify the ftp-download endpoint. The below changes will need to be made: screenshot
      1. Name to ftp-scp for scp or ftp-sftp for sftp.
      2. For SCP, set the URL to scp://lanforge:lanforge@ The filename at the end of the link can be changed to another file in /home/lanforge. screenshot
      3. Click OK.
      4. For SFTP, set the URL to sftp://lanforge:lanforge@ The filename at the end of the link can be changed to another file in /home/lanforge. screenshot
      5. Click OK.
    2. Select the ftp-scp or ftp-sftp endpoint and click Start.
    3. To use TFTP, you will first need to have a TFTP server set up and configured to serve the Layer 4-7 endpoint a file.
      1. Once the server is set up, use the below configuration to set up a TFTP endpoint.
        Note: You will need to provide your own server's IP and file name. screenshot
        1. Set the Port to a port that can talk to the TFTP server. In this case the server was on the management network so eth0 was used.
        2. URLs per 10m was left at the default 100, this can be set higher or lower depending on how often the file should be downloaded.
        3. Set URL to tftp://server-IP/filename.
        4. Source/Dest File can be /dev/null.

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