Candela Technologies Logo
Network Testing and Emulation Solutions

LANforge Server Installation

Overview

Candela Technologies delivers LANforge systems fully installed and configured on our validated hardware platforms. If you have a understanding of the Linux operating system, you should be able to install and configure a functional LANforge system on the hardware of your choice. LANforge also can be installed on Windows, Apple(Intel), and has client apps on Android and iOS. LANforge works best on Linux!

Legal use of the LANforge system is based upon licensed data-generating ports and/or machines. You must own a license for every port or machine configured to generate traffic.

Upgrade with Internet Access

If you are upgrading to LANforge 5.4.8 or higher, and are using Fedora 19 to 39, we suggest the upgrade.bash options.

The lf_kinstall.pl script will take a base install and add the appropriate packages, install or upgrade LANforge server, GUI, kernel and supporting files and tweak the OS to run best with LANforge.

Configure Web Proxy

If your systems do not have direct Internet access and need to configure a proxy, please use the /home/lanforge/scripts/config_proxy.bash script.

Using config_proxy.bash

/home/lanforge/scripts/config_proxy.bash http://proxy.example.com:8080
Exporting proxy environment variables set to [http://proxy.example.com:8080]
Not proxying [127.0.0.1,127.0.0.1:8080,*.localdomain,.localdomain,localhost,192.168.45.24,192.168.45.24:8080]
You might want to configure a git proxy, example:
git config --global http.proxy http://proxy.example.com:8080
git config --global http.https://domain.com.proxy http://proxy.example.com:8080
Your current git proxies:

[+proxy] root@ct521a-manx $ 

The config_proxy script creates a new sub-shell with the correct proxy variables set. Once you are done upgrading, type exit to leave the sub-shell.

Manually Configuring Proxy Settings

If your system does not have config_proxy.bash, then please set these environment variables in your terminal (as root):

  • sudo -s
  • export http_proxy="proxy.example.com:3128"
  • export HTTP_PROXY=$http_proxy \
    HTTPS_PROXY=$http_proxy \
    ALL_PROXY=$http_proxy \
    PROXY_ALL=$http_proxy \
    https_proxy=$http_proxy

Choose your Upgrade Process

Choose one method to upgrade LANforge based on your system needs:

Ensure the script finishes without errors before you continue. Please contact support if you have questions.

A
Upgrade Script You have a LANforge system that can reach the Internet.
B
Developer upgrade script You want specific features applied, and can reach the Internet.
C
Interop Upgrade Your systems are in an interop cluster.
D
Offline bundle Upgrade an isolated system by bringing updates to it.
E
Run lf_kinstall.pl by hand For old systems that need an updated lf_kinstall.pl feature.

A: Upgrading with /root/upgrade.bash:

  1. If you don't have /root/upgrade.bash, you can download it:
    1. Close the LANforge GUI application.
    2. sudo -s
    3. wget https://www.candelatech.com/private/downloads/r5.4.8/upgrade.bash
    4. chmod +x upgrade.bash
  2. Upgrade: ./upgrade.bash
  3. This script will:
    1. Ask if you want to update lf_kinstall.pl
    2. Ask what version you want to upgrade to
    3. Ask what server to pull files from
    4. Print out the corresponding lf_kinstall.pl for your reference
    5. Start your upgrade.
  4. Once the upgrade is finished, you can either:
    • Restart the system with reboot. Do this if you installed a new kernel. OR:
    • Restart the LANforge manager service with: service lanforge restart
This script will not do offline bundle installation.

B: Upgrading to a Specific Build with/root/upgrade_dev.bash:

  1. If you don't have /root/upgrade_dev.bash, you can download it:
    1. Close the LANforge GUI application.
    2. sudo -s
    3. wget https://www.candelatech.com/private/downloads/r5.4.8/upgrade_dev.bash
    4. chmod +x upgrade_dev.bash
  2. ./upgrade_dev.bash
  3. This script will:
    1. Ask if you want to update lf_kinstall.pl and lf_kinstall_dev.pl
    2. Ask what version you want to upgrade to
    3. Ask what server to pull files from
    4. List the builds available (if one is available)
    5. Ask for what style of upgrade
    6. Print out the corresponding lf_kinstall_dev.pl for your reference
    7. Start your upgrade using lf_kinstall_dev.pl .
  4. Once the upgrade is finished, you can either:
    • Restart the system with reboot. Do this if you installed a new kernel. OR:
    • Restart the LANforge manager service with service lanforge restart.
This script will not do offline bundle installation.

C: Interop Upgrade

Your systems are clustered and you want to upgrade LANforge on the manager.

  1. Your system has Internet access
  2. Upgrade the manager first ( See instructions for upgrade.bash or upgrade_dev.bash.)
  3. Create a local package mirror on your manager device. This downloads the necessary packages that other PC-based LANforge resources need to do upgrades. (Upgrades to iPhone and Android apps need updating via the Interop Batch Modify menu.) sudo -s
    cd /root
    wget -O lf_kinstall.pl https://www.candelatech.com/lf_kinstall.pl
    chmod +x lf_kinstall.pl
    ./lf_kinstall.pl --lfver 5.4.8 --do_release_mirror

    This last command will update your Linux LANforge Apache configuration and allow the files in /home/lanforge/public_html to be served from it. Those web shares will be be visible as /downloads and /private/downloads/5.4.8

  4. Upgrade the resources in the cluster:
    1. Open the GUI
    2. Select the Resource Mgr tab
    3. Select the computer resources you wish to upgrade (Android and iOS devices will not be upgraded)
    4. In the Download From box, enter your management IP (check Port Mgr tab, device eth0).
    5. Click Upgrade

D: Offline Upgrade Using Bundle

A bundle is a single tar archive that contains all the downloaded elements of a typicall upgrade of an existing installation. This reduces effort to copy items to an offline or isolated instance of LANforge.

You can use the offline-bundle when:

You should avoid the install-bundle when:

If you have a LANforge machine you purchased from us and it still runs LANforge, you can use the offline-bundle.

Steps for using the offline-bundle:

  1. Determine what OS you are using: cat /etc/os-release Probably you have Fedora 24, 27, 30, 34 or Fedora 36. The matching bundles would have F24, F27, F30, F34 or F30 in their name for these releases.

    If you have some other OS release that does not have a bundle packaged for it, contact support.

  2. Bundles can be found by looking in the release directory, for instance: https://www.candelatech.com/private/downloads/r5.4.8
  3. Copy the the install bundle for your OS version to /home/lanforge/Downloads/ on the LANforge machine.
  4. Copy the https://www.candelatech.com/lf_kinstall.txt file to /home/lanforge/Downloads/lf_kinstall.pl.
  5. Log in as root and change to the install directory: cd /home/lanforge/Downloads/
  6. Make sure the new lf_kinstall.pl is executable: chmod a+x lf_kinstall.pl
  7. Use the following command to unpack and install:

    ./lf_kinstall.pl --use_install_bundle /home/lanforge/Downloads/[install-bundle]

    Please use the full path to the bundle.

  8. Reboot system with command: reboot

E: Run lf_kinstall.pl by hand:

Download lf_kinstall.pl to /root:
cd /root
wget -O lf_kinstall.pl https://www.candelatech.com/lf_kinstall.pl
chmod +x lf_kinstall.pl

Running the lf_kinstall.pl Script

This script can do offline bundle installation.

For normal upgrades, just use /root/upgrade.bash (if it is available). For specific kinstall actions you want to accomplish, please use the lf_kinstall.pl script you downloaded in /root:
cd /root
./lf_kinstall --lfver 5.4.8 --some_action
For a full installation of release 5.4.8, you can use this command:

./lf_kinstall.pl --do_all_ct --lfver 5.4.8

For releases 5.4.1 and earlier and/or different kernel versions, change the version numbers as needed by using the latest information from the release download page.

Example: install with kernel 6.9.11+ with most options enabled: ./lf_kinstall.pl --do_all_ct --kver 6.9.11+ --lfver 5.4.8

Ensure the script finishes without errors before you continue. Please contact support if you have questions.

To see all available options use the following command:
./lf_kinstall.pl --help

For 19 and higher systems (gnome-3 based systems), the script will tweak the desktop settings if you are logged into the graphical desktop. If you are not logged in currently, just run the tweak commands next time you do log in (as user lanforge): /usr/local/bin/ctgnome.bash

Reboot the machine

After a fresh (first time) installation, or any time you upgrade the Linux kernel, reboot the LANforge machine. reboot

The machine will reboot to a black screen with a white login prompt.

Contact Support if you have any questions or notice problems with the install script.

Installation Options

You need Internet access to install LANforge for the first time.

Installation Preparation:

If you are installing LANforge on a pre-installed Linux system, your partition layout will have already been decided.

You can only install an Interop system in this case.

The partions might be BTRFS or one large / (root) filesystem, and a LANforge kernel is no longer an option.

Fedora MATE 39 is currently the suggested OS. Please use this Fedora MATE Spin ISO to install Fedora. It is has the most preinstalled packages.

During installation, format the system in ONE of these ways:

A
UEFI
Most modern computers default to UEFI. Some newer networking hardware might only be compatible with UEFI boot modes. UEFI can use GPT partitions.
B
BIOS
Many servers and embedded systems are configured as BIOS Compatibility Mode, which disables many UEFI features. Compatibility mode ensures that the Kernel signing and Trusted Platform Security are disabled, and uses only MBR partions.

A:
UEFI Partitions

B:
BIOS Partitions

Check network access

  1. Log into LANforge machine as the root user, and open a terminal window.
  2. Make sure you can reach www.candelatech.com: ping www.candelatech.com.
    If you are unable to reach www.candelatech.com, then possibly your machine:
    • Did not get a DHCP address.
    • Does not have the correct nameserver set.
    • Lacks an Internet connection.
    Please contact support.

Have Perl Installed

  1. Check that you have perl installed: which perl
    If perl does not exist, you can install it:
    • On Fedora: yum install perl
    • On Ubuntu: apt-get install perl
  2. Go to root's home directory: cd /root

For CentOS 6, see CentOS 6 Instructions.
For Ubuntu, see Ubuntu Instructions.

Choose one installation method:

A
Interop Linux System
Able to run Layer 3-7 traffic without a special kernel or WiFi drivers.
B
Full Kernel Linux System
Boots a custom LANforge kernel and comes with special WANlink modules and radio firmware.

A: Interop Linux System:

An Interop LANforge system is can be any version of Linux and is recommended for machines that do not need a special kernel, WAN emulation, packet generation, or special radio firmware features. Choose Interop if you are unsure.

  1. Download lf_kinstall.pl:
    wget https://www.candelatech.com/lf_kinstall.pl
  2. chmod +x lf_kinstall.pl
  3. sudo ./lf_kinstall.pl --lfver 5.4.8 --do_interop

B: Install a Full Kernel Linux System

This option will transform your Linux system into the kind of LANforge system that resembles the systems we would ship you, including specialized kernel, radio firmware, and WAN emulation modules. This system must be formatted correctly beforehand.

  1. Download lf_kinstall.pl:
    wget https://www.candelatech.com/lf_kinstall.pl
  2. chmod +x lf_kinstall.pl
  3. sudo ./lf_kinstall.pl --lfver 5.4.8 --kver 6.10.3++ --do_all_ct

Detailed Install Instructions

Offline Install

The lf_kinstall.pl script will stop with errors when installing the first time without Internet access.

Do not attempt to install LANforge on a fresh system without Internet access.

Historical Offline Upgrade

Offline upgrade means the LANforge system lacks access to the Internet. We encourage you use modern LANforge Bundles for offline installation. These instructions are a more detailed method of using lf_kinstall.pl, specifically how to download LANforge software for old releases.

The version numbers below are examples. Change them as needed by using the latest information by reading the release download page.

The following example is for upgrading a 64 bit, Fedora 20 based system to LANforge release 5.4.8:

  1. Download the upgrade script by saving the following link: https://www.candelatech.com/lf_kinstall.txt

    Note: You may have to copy and paste the lf_kinstall.txt from a browser to a plain text document.

  2. Copy the lf_kinstall.txt file to the LANforge machine, using winscp or similar and save it in the /home/lanforge/Downloads directory. Perform the following commands to get a list of files to download:
    cd /home/lanforge/Downloads
    dos2unix lf_kinstall.txt
    chmod a+x lf_kinstall.txt
    ./lf_kinstall.txt --do_all_ct --print_only --lfver 5.4.8 --kver 6.10.3+

    You should see output similar to this:

    # is-ubuntu: 0 mate-installed: 1 install-mate: 0  is-arm: 0 is-fedora: 1  osveri: 20 is-64: 1
    # do-gnome: 0  uveri: 14
    
    # lf_kinstall offline install will need these files:
    
    # https://www.candelatech.com/private/downloads/r5.4.8/ct4.20.17+.x64.tar.gz
    # https://www.candelatech.com/private/downloads/r5.4.8/board.bin
    # https://www.candelatech.com/private/downloads/r5.4.8/firmware-2.bin
    # https://www.candelatech.com/private/downloads/r5.4.8/firmware-2-htt-mgt.bin
    # https://www.candelatech.com/private/downloads/r5.4.8/ath10k_stock_fw.tgz
    # https://www.candelatech.com/private/downloads/r5.4.8/firmware-2-htt-mgt.bin-9887-10-1
    # https://www.candelatech.com/private/downloads/r5.4.8/firmware-5-htt-mgt.bin-9888-10-4
    # https://www.candelatech.com/private/downloads/r5.4.8/firmware-5-htt-mgt.bin-9984-10-4
    # https://www.candelatech.com/private/downloads/r5.4.8/firmware-5-htt-mgt.bin-10-4
    # https://www.candelatech.com/private/downloads/r5.4.8/ath10k-firmware-2.bin-upstream
    # https://www.candelatech.com/private/downloads/r5.4.8/LANforgeServer-5.4.8_Linux-F20-x64.tar.gz
    # https://www.candelatech.com/private/downloads/r5.4.8/xorp_64-F20.tgz
    # https://www.candelatech.com/private/downloads/r5.4.8/LANforgeDocs-5.4.8.tar.gz
    # https://www.candelatech.com/private/downloads/r5.4.8/LANforge-GUI-5.4.8-Installer.exe
    # https://www.candelatech.com/private/downloads/r5.4.8/LANforgeGUI_5.4.8_Linux64.tar.bz2
    # https://www.candelatech.com/private/downloads/r5.4.8/LANforgeGUI_5.4.8_Linux.tar.bz2
    
  3. Download the URLs and transfer them to the /home/lanforge/Downloads directory. If you do not have a password, you may log in as user guest with password guest.
  4. Log into LANforge machine as the root user, and open a terminal window.
  5. Perform the following commands: cd /home/lanforge/Downloads
    sudo -s
    ./lf_kinstall.txt --do_all_ct --kver 6.10.3+ --lfver 5.4.8 --source_dir /home/lanforge/Downloads
  6. Ensure the script finishes without errors before you continue.
  7. Reboot the LANforge machine and make sure it comes back up running the proper kernel and LANforge software.
  8. Contact Support if you have any questions or notice problems with the install script.

Most Recent Fedora Releases

If you get the latest version of Fedora, it will often be more recent than our validated Fedora target. If you are installing LANforge on the latest version of Fedora, you will probably discover that our packages are labeled one release behind the most recent Fedora release. Below is an example of doing an offline installation on Fedora 45:

The installer has a switch for this: --force_osver
./lf_kinstall.txt --do_all_ct --force_osver F45 --lfver 5.4.8 --kver 6.10.3+ --source_dir /home/lanforge/Downloads

LANforge Server and GUI software is tested on recent Fedora versions, but it is not always possible to keep up with the latest version. In some cases, versions of Fedora have been inappropriate and those releases get skipped.

CentOS 6 Installation

CentOS 6 (6.9 as of this writing) often installs with a very minimal package set and might require preparation before they will run the lf_kinstall.pl script. This is very true for the CentOS 6 Minimal Installation. To prepare the system for LANforge, login as root to your system and run the following commands:

yum install -y yum-utils
yum-config-manager --enable centosplus > /dev/null
yum-config-manager --enable contrib > /dev/null
yum-config-manager --enable epel > /dev/null
yum makecache fast
yum install -y man bash-completion bind-utils nfs-utils perl screen rsync vim wget
yum update -y

After these commands are executed, you can continue with the automated installation instructions. You should not need to reboot.

(Optional) If your system needs access to NFS shares during installation, these commands will enable NFS:

/sbin/chkconfig rpcbind on
/sbin/chkconfig nfs on
/sbin/service rpcbind start
/sbin/service nfs start
/sbin/rpc.statd

Installing LANforge OpenWRT

With LANforge 5.3.8 and higher releases, LANforge has beta support for running on OpenWRT. So far, we only have images for the Netgear r7800 platform (dual 4x4 MU-MIMO radios). These platforms may be useful for testing with many lower-speed appliances to act like a full room of users, for instance.

For a new install, download the openwrt-ipq806x-netgear_r7800-squashfs-factory.img image from our downloads page. For an upgrade, see next section.

To install on the Netgear r7800, you first connect it to a Linux machine that has 'tftp' installed on it. The Linux machine should have a network port on the 192.168.1.X subnet, with IP address other than 192.168.1.1. Connect the r7800 LAN port 4 to this interface. Power up the Netgear with the 'reset' pin pressed. The power LED should start blinking white after a short time. This indicates that the r7800's boot loader is waiting for tftp.

On the Linux machine, cd to the directory that contains the factory.img file that you downloaded. Upload the file to the r7800:

tftp 192.168.1.1
tftp> bin
tftp> put openwrt-ipq806x-netgear_r7800-squashfs-factory.img

The r7800 should reboot soon after. The yellow port will be the management port and will try to do DHCP by default. If it cannot get a DHCP address, it will be 192.168.1.101.

Connect with ssh to the r7800 as the root user (there is no password by default). To complete the install, run these commands:

cd /home/lanforge
./install.bash   # Ignore the warnings about copying over the same file
./lf_kinstall.pl --lfver 5.4.8 --do_sys_reconfig
reboot

Upgrading LANforge OpenWRT

Download the openwrt-ipq806x-netgear_r7800-squashfs-sysupgrade.bin image from our downloads page.

Use scp to copy this file to the temp directory on the r7800, for instance:

scp openwrt-ipq806x-netgear_r7800-squashfs-sysupgrade.bin root@192.168.100.221:/tmp/

Log into the r7800 and do the upgrade:

sysupgrade /tmp/openwrt-ipq806x-netgear_r7800-squashfs-sysupgrade.bin

The system will reboot. When it comes back up, log in and configure LANforge:

cd /home/lanforge
./install.bash   #Ignore the warnings about copying over the same file
./lf_kinstall.pl --lfver 5.4.8 --do_sys_reconfig
reboot

Hardware Requirements

The LANforge-FIRE Network Traffic Generator configuration typically requires at least two Ethernet ports: one for network management and one for data-generation. The LANforge-ICE Network Emulator works best using a minimum of three Ethernet ports. Your unit's performance will be directly related to the CPU and memory as well as the quality of the ethernet hardware and PCIe bus. Candela Technologies suggests a minimum of 4GB RAM and a 1.2Ghz processor.

Software Requirements

LANforge is best supported by Fedora Linux. For interop-style setups, we have packages for:

Versions of Linux that lack brctl are not compatible as full LANforge resources. This means such systems would perform only as interop resources, not use a full LANforge kernel, and might have limitations on creating network interfaces.

Manually Installing a LANforge Linux Kernel

In offline environments this is occasionally necessary. Normally we suggest using the command ./lf_kinstall.pl --lfver VER --kver KVER --do_kern command.

  1. Download an appropriate pre-built kernel from the downloads page.
  2. Using Filezilla or scp to copy the file to the LANforge server, to /home/lanforge/Downloads
  3. Install the kernel as root with command similar to:
    cd /
    tar -xvzf /home/lanforge/ct2.6.31.6.p4s.tar.gz
    /usr/local/bin/kinstall_ct2.6.31.6.bash
    If you are using Suse, this kinstall script will probably fail. Try making the initrd script with a command similar to:
    # mkinitrd -k ct2.6.31.6.img -i initrd-ct2.6.31.6.img
  4. Update GRUB (the bootloader):
    • Please use the lf_kinstall.pl script to do this.
    • ./lf_kinstall.pl --do_grub --kver 2.6.31+
    • Please do not edit the /boot/grub2/grub.conf files manually.
    • If you need to change boot settings, please edit /etc/default/grub. If you do edit that, follow it up with:
      • Fedora: grub2-mkconfig -o /boot/grub2/grub.cfg
      • Ubuntu: update-grub2

Manually Installing LANforge Server on Linux

  1. Become root user sudo su

    Other commands work well: sudo -s, su - root

  2. On Ubuntu, Redhat, CentOS

    Please use ./lf_kinstall.pl --do_interop --lfver 5.4.8. That command will:
    1. Create the lanforge account
    2. Install required libraries
    3. Install package dependencies.
    4. Configure the desktop to use MATE.
    5. Install xrdp and vnc servers.
    6. Install LANforge GUI
  3. Other Linux Systems

    Follow these instructions if you have a Linux system installed and you want to run LANforge Server on it, but do not want to run lf_kinstall.pl to install all the required dependencies. This is unlikely to work well. If this doesn't work well, you might need to reinstall your OS to get it back to its former state. We suggest you:
    1. Maintain current Candelatech support so we can help you.
    2. Backup your machine using a disk-image program like Ghost.

    Manual Steps

    1. Create LANforge Accounts

      You should create a lanforge user and install the LANforge software in that user's home directory. Use your preferred method, or use mine:
      # adduser lanforge
      # passwd lanforge

    2. Install LANforge Server

      Copy the LANforgeServer-X.X.X_Linux-XX.tar.gz file to some temporary directory and un-tar it with a command like:
      # tar -xvzf LANforgeServer-*_Linux-x86.tar.gz That command should create a LANforgeServer-X.X.X directory, in which the distribution exists. Change to that directory as root, and you will find an install.bash file.
      Run this script:

      # ./install.bash

Configure LANforge Server using lfconfig

Use the /home/lanforge/lfconfig script to configure LANforge realm settings.

NOTE 1
The lfconfig tool often scrolls information off the screen, so you may need to scroll back to see useful information. On the console, use SHIFT-PageUp, SHIFT-PageDown.
NOTE 2
Make sure you enter 'config' when done with the lfconfig changes: It is the config option that creates the files needed to run the LANforge applications.
NOTE 3
Make sure that each resource machine has a unique identifier. This identifier is specified as 'resource', and you can find more details below.
NOTE 4
If you wish to run the LANforge-ICE WAN Emulator on a machine with only two ethernet ports, the management device (mgt_dev) must be 'lo', the loopback device. This means you will not be able to get network connectivity to this machine when LANforge is running as both of the ICE interfaces must have an IP address of 0.0.0.0

After running the install script, cd to the /home/lanforge directory as root and run the lfconfig script to configure LANforge:

$ cd /home/lanforge
$ ./lfconfig

It is an interactive script that allows you to set certain configuration options and then generate the start/stop scripts to control LANforge. The lfconfig script now hides some of the less often used options. You can view them with the show_all command. However, for most configurations, you will not need to change any of the hidden options.

When you start lfconfig, you will see something like this:

Interfaces: eth0 eth1 eth2 eth3
Resource interface assignment:
  Resource 1:  eth0 eth1 eth2 eth3
Specified Resource Addresses:
  127.0.0.1:4004
Key               Acceptable Values          Value
**************************************************
log_level         [0-65535]                  7
log_dir           [directory path]           /home/lanforge
add_resource_addr [host:port]                SEE LIST ABOVE
rem_resource_addr [host:port]                SEE LIST ABOVE
realm             [1-255]                    255
resource          [1-511]                    1
mgt_dev           [ethernet device]          eth0
mode              [resource, manager, both]  both
bind_mgt          [0-1]                      0
shelf             [1-8]                      1
dev_ignore        [eth0 eth1 ... ethN]
first_cli_port    [1025-4199]                4001
connect_mgr       [host:port]
gps_dev           [device file]              NONE
max_tx            [1-500]                    5
wl_probe_timer    [50-2000]                  50
Other Commands:  help, show_all
**************************************************
If these values are correct, enter 'config', otherwise change
the values by entering the key followed by the new value, for example:
mode manager
Your command:

Here are the values you can manipulate, and what they mean:

log_level
Suggested value is 7, run the btserver binary with the -h option to see what the logging level means.
Example:  log_level 7
gps_dev
GPS Device, for those wishing to integrate a GPS through the serial port using the NMEA protocol.
Example:  gps_dev /dev/ttyS0
Example:  gps_dev NONE
log_dir
Suggested value is /home/lanforge, specifies where the logs are to be stored.
Example:  log_dir /tmp
dev_ignore
If you don't want to use some of your interfaces for LANforge, then enter them here. Otherwise, lfconfig will attempt to use them all.
Example:  dev_ignore eth5 eth6 tr3
add_resource_addr
Add to the list of remote LANforge addresses. These are LANforge resources that will otherwise not be discovered for various reasons. You must have TCP/IP connectivity to them of course!
Example:  add_resource_addr 192.168.5.5:4002
bind_mgt
If enabled, LANforge will only listen on the mgt-dev's IP for management traffic. If disabled, it will listen on all IPs on the local machine. Enabling this can help make LANforge more secure, but may also make it harder to access. The value 0 means disabled, 1 is enabled. NOTE: If you enable the bind_mgt option and are in mode 'both', and not using 'lo' for management device, then you will need to explicitly add a resource addr for [ip-of-mgt-port]:4004 so that the manager can communicate with the client process.
Example:  bind_mgt 1

rem_resource_addr
Remove from the list of remote LANforge addresses. These are LANforge resources that will otherwise not be discovered for various reasons. You must have TCP/IP connectivity to them of course!
Example:  rem_resource_addr 192.168.5.5:4002

max_tx
Maximum number of packets to tx per 'round.' The higher this number is the better performance you may achieve. However, if you make it too high, you may increase dropped packets due to making the traffic pattern too bursty. Suggested value is between 5 and 10 for traffic patterns around 2000 packets-per-second.
Example:  max_tx 50

keepalive
Resource keepalive timer, in miliseconds. After this time with no communication, the manager will request an update, and after 4 times this interval, the remote resource process will be considered dead. Default is 30,000 (30 seconds.)
Example:  keepalive 60000

wl_probe_timer
Number of milliseconds between probes of kernel-mode WanLink stats. Default is 50. Increasing this will save some processing time, at the cost of less accurate 3-second report averages and graphs. Example:  wl_probe_timer 50
realm
LANforge resources grouped (clustered) with the same realm value can be managed by a single LANforge-GUI. LANforge processes will ignore messages from other realms. Valid range of values is 1-255, inclusive, and the default is 255. If set to 255, it will never cluster with other LANforge systems, even if the other system is set to 255 also.
Example:  realm 1
shelf
This is the virtual 'shelf' that this LANforge instance should belong to. Unless you have a very large installation, you should enter 1 here. If you have more than 511 LANforge resources, then you will need to put them into a second shelf.
Example:  shelf 1
resource
Every LANforge resource (data-generator) on a given shelf MUST have a unique instance (machine) identifier. Suggested values are 1 for the first data-generator machine, 2 for the second, 3 for the third, etc. This was previously called 'client'.
Example:  resource 1
first_cli_port
This is the CLI (command line interface) port. If you have multiple resources configured on the same machine (unlikely), then the second will be 2 greater than the first, etc. The binary (GUI) port for a given resource will always be one more than the CLI interface port. You can usually leave this at its default: 4001
Example:  first_cli_port 4001
connect_mgr
Tell resource to connect to a known manager. Normally managers connect to resources, but sometimes it's useful to connect the other way to get around firewalls and when using mobile resources that may often change their management IP address.
Example:  connect_mgr 192.168.100.20:4002
Example:  connect_mgr NONE
mgt_dev
This is the ethernet device that the LANforge management traffic is carried over. The management devices for the LANforge manager and LANforge resources should be connected to the same ethernet broadcast domain (LAN). If you want this system to be completely self-contained, you can have mgt_dev be lo (loopback).
Example:  mgt_dev eth0
mode
This determines the behavior of the LANforge software. You need exactly one LANforge manager for each network, and at least 1 LANforge resource. The basic software is the same, and its behavior is determined by the mode you enter here. Use 'both' for a single machine configuration. For multiple machine configurations, you will usually have one machine in mode 'both', and the remaining machines in mode 'resource'.
Example:  mode resource

Example Configurations

  • All-in-One/Stand-alone LANforge-ICE WAN Emulator & Traffic Generator
    This is the default configuration and enables a machine with 3 ports to be a fully functional WAN emulator and/or traffic generator. The LANforge-GUI can be installed on the same machine to enable easy management as well. NOTE: LANforge resources with the default realm of 255 cannot be clustered. See the clustered resources example below to enable this feature.
    mgt_dev eth0
    resource 1
    realm 255
    mode both
    config
    LANforge data generator (or WAN Emulator) Resource only machine
    Generally, you will have one system that is both a manager and a traffic generator (see above), and the rest will be only resources. The manager will discover the resources and will be the central point for configuring the entire system. The resource machines must have unique identifiers (resource must be unique). NOTE: LANforge resources with the default realm of 255 cannot be clustered. See the clustered resources example below to enable this feature.
    mgt_dev eth0
    resource 2
    realm 22
    mode resource
    config
    LANforge Manager with Clustered Resources
    Configure LANforge resources in the same realm as the manager as illustrated by the list of lfconfig key value entries in the example below:
    Manager (Resource #1) Resource #2 Resource #3 Resource #4
    mgt_dev eth0
    resource 1
    realm 22
    mode both
    config
    mgt_dev eth0
    resource 2
    realm 22
    mode resource
    config
    mgt_dev eth0
    resource 3
    realm 22
    mode resource
    config
    mgt_dev eth0
    resource 4
    realm 22
    mode resource
    config

    All clustered resources will now be displayed on the Status page of the LANforge-GUI and will be listed in the Port Mgr tab.

    NOTE: Entering the config command creates a port configuration file called lanforge_eth_1 for resource 1 or lanforge_eth_2 for resource 2, etc., which are saved in the /home/lanforge directory.

  • After running the lfconfig script, you should have a box that is functionally similar to the LF1000 Series units.

    Start LANforge Server

    To start the LANforge server, choose one of the these methods as root:

    Installing LANforge Server on MacOS X

    Installing LANforge server on Mac OS X

    Choose one method to install LANforge on OS X::

    A
    Automated Install:
    Use lf_kinstall.pl to perform most steps.
    B
    Manual Install:
    This method might be necessary if the Automated Install option breaks.
    1. Become root user sudo su - root
    2. Automated Install

      curl -o lf_kinstall.pl https://www.candelatech.com/lf_kinstall.pl
      chmod a+x lf_kinstall.pl
      ./lf_kinstall.pl --do_all_ct --lfver 5.4.8
      Change directory to /Users/lanforge and skip to the "Configure LANforge Server" step below.

    B:
    Manual Install
    1. Create LANforge Accounts

      You should create a lanforge user and install the LANforge software in that user's home directory. Use your preferred method, or use mine:
      sysadminctl -addUser lanforge -password lanforge -shell /bin/bash

    2. Install MacOS Mac Ports project.

      This is optional, but required for at least some things (like VOIP with PESQ/POLQA analysis). After this is installed, add some additional tools: port install md5sha1sum

    3. Install LANforge Server

      Copy the LANforgeServer-X.X.X_MacOS-XX.tar.gz file to some temporary directory and un-tar it with a command like:
      tar -xvzf LANforgeServer-*_MacOS*.tar.gz That command should create a LANforgeServer-X.X.X directory, in which the distribution exists. Change to that directory as root, and you will find an install.bash file.
      Run this script:

      ./install.bash
    4. Example Configurations

      • LANforge data generator Resource only machine
        Generally, you will have one system that is both a manager and a traffic generator, and the rest will be only resources. The manager will discover the resources and will be the central point for configuring the entire system. The resource machines must have unique identifiers (resource must be unique). NOTE: LANforge resources with the default realm of 255 cannot be clustered. See the clustered resources example below to enable this feature.
        mgt_dev Ethernet
        resource 2
        realm 22
        mode resource
        config
      • Optional: Enable VNC and SSH access On recent MacOS, this cannot be automated, so you have to configure this on the MacOS machine through it's UI.

        1. Open up Sharing Preferences on your Mac and then click the Screen sharing section.
        2. Make sure Screen sharing is enabled and then click the Computer settings button.
        3. Check the VNC Viewers may control screen with password check box and enter a VNC password. You'll be prompted for this password when you connect.
        4. Enable “Remote Login” in Sharing section to allow ssh login.
          If this is stuck with "Remote login starting..." or similar, then try running this as root user in a terminal:
          launchctl load -w /System/Library/LaunchDaemons/ssh.plist
      • Optional: Enable sudo without password Enable sudo without a password on MacOS: Edit the sudoers file: sudo visudo.
        Then find the admin group permission section:
        %admin ALL = (ALL) ALL
        Change to add NOPASSWD:
        %admin ALL = (ALL) NOPASSWD: ALL

    After running the lfconfig script, reboot and LANforge should start automatically.

    Installing LANforge Server on Microsoft Windows

    BETA: Automated install procedure.

    1. NOTE: Sometimes, the install commands seem to just hang waiting for input. If you see no activity for a while, try hitting 'Enter'. Also, check for popped-under windows waiting for clicks to continue installation of packages...
    2. Open administrator powershell, change to a user-directory if needed, and run commands below to download setup script and configure for Adminstrator autologin:
      1. Download setup script:
        wget http://www.candelatech.com/windows_lf_setup.ps1 -o windows_lf_setup.ps1
      2. Allow executing powershell scripts.
        Set-ExecutionPolicy Bypass
      3. Enable Administrator auto-login and disable a lot of security. .\windows_lf_setup.ps1 -autologin
      4. Reboot
        shutdown /r
    3. Reboot. Next you should login as user Administrator. If not, then fix that before continuing.
      1. Download setup script again since you are probably in a different directory now. wget http://www.candelatech.com/windows_lf_setup.ps1 -o windows_lf_setup.ps1
      2. Install ssh, wireshark, vnc, lanforge and other tools and do automated configuration where possible.
        In powershell window as administrator
        .\windows_lf_setup.ps1 -lfver 5.4.8
      3. Be sure to configure LANforge to be proper resource-id, realm, mgt-port Please see the LFConfig section.
      4. Reboot:
        shutdown /r
    4. If this worked properly, you should see Administrator desktop and LANforge running upon reboot. Happy testing!

    Historical Windows Installation

    Many LANforge traffic generation and network emulation features are available on Microsoft Windows operating systems. This section has details pertinent to the old install process on Windows.

    See supported features for more detail.. LANforge on Linux is still the most precise, featureful, and highest performing option. Please contact Candela Technologies or your sales representative if you have questions about whether a feature you need is supported on Windows. Windows managers can manage Linux data generators, and vice versa.

    Install the LANforge Server Files

    1. Execute the LANforge Server-Installer.exe program. At the end of the LANforge install, you have an option to run the "Configure LANforge" tool. Please do run this tool (or re-run from the desktop) and click 'Configure' unless you are certain you do not need to do so.
    2. In the configuration tool, select the mode (you will want one machine configured to be 'Both' (Manager and Resource) in your realm). The rest of the machines should be configured in resource mode only.
    3. The text box at the top of the configuration tool shows the LANforge server startup information and the list of interfaces found on the machine. You will need to choose one of the adapters for your management interface. 'Management Network Device' from one of the 'Device ID:' fields.

      For example:

      Device ID: {20AC6D62-1D4E-49E1-982A-091CD9329CB3}
      Management Network Device | {20AC6D62-1D4E-49E1-982A-091CD9329CB3} |
    4. The 'Realm Number' can be any value between 1 and 255. By placing a machine into a certain realm, you ensure that the LANforge software will only communicate with other machines in that same realm. Realm 255 means do not cluster.
    5. Each LANforge machine in a cluster must have a unique identifier. This is the 'Resource Id Number', and it corresponds to the resource number in the LANforge GUI. Typically, you use 1 for the first system, 2 for the second, and so forth.
    6. If your management network is routed, and you are configuring a machine as Manager or Both mode, then you will need to specify the IP addresses for the other LANforge resource machines in the Clients <IP:port>. The reason is that while LANforge can automatically discover other LANforge machines on the local subnet, it cannot automatically discover LANforge machines on other subnets. The syntax for multiple resources is a space separated list of IP address and ports. The default port is 4002, unless you manually edit the start scripts.

      For example: IP#1:Port1 IP#2:Port2 IP#3:Port3

      Example input for three remote resources is:

      192.168.2.2:4002 192.168.2.3:4002 120.5.3.2:4002
    7. If you are configured for mode 'Both' or 'Manager', then you must install the LANforge license keys sent to you by Candela Technologies or your LANforge reseller. Install these license keys per instructions in the license file. (Typically, copy the keys to a file called license.txt in the LANforge install directory.)
    8. Configuration should now be complete. Click on the 'Configure' button to create the LANforge server start script shortcuts (LANforge Manager and LANforge Data Generator) on the desktop.

      To start the LANforge server on a 'Both' system double click both the LANforge Manager AND LANforge Data Generator shortcuts.

      Likewise, a Manager only node will only require the LANforge Manager shorcut executed while a Resource node will only require running the LANforge Data Generator shortcut.

      NOTE: Windows Vista and Windows 7 users must run the LANforge Manager, LANforge Data Generator and usually the LANforge GUI as administrator for a LANforge system to function properly.

      The shortcut properties should be modified to run as administrator: right-click on the shortcut icon, select Properties and click the Advanced button. Select 'Run as administrator' then click OK on both the Advanced Properties and LANforge Manager (or LANforge Data Generator) Properties windows.

    9. Optional packages: NTP
      If you want to keep the clocks for multiple systems in sync (to better report latencies with LANforge-FIRE, for instance), you should consider installing NTP.
      Candela suggests this page for more info and downloads: https://www.meinberg.de/english/sw/ntp.htm
    10. Optional packages: Wireshark
      The Wireshark tool is an excellent packet sniffer and protocol analyzer. You can dowload it from: www.wireshark.org. In order for LANforge to be able to automatically launch Wireshark, it must be installed in its default install directory on the same drive as LANforge is installed. You can also launch Wireshark manually of course.

    Installing LANforge Interop App on Android Devices

    The LANforge Interop App running on an Android device gives ability to control the WiFi settings on most Android devices, generate TCP and UDP traffic, as well as do specialized traffic tests like using the Android web browser to download files and play movies.

    1. Enable ADB debugging connection on Android phone.
      1. Open up settings
      2. Scroll down to “About Phone”, tap it once.
      3. Select “Software Information”.
      4. Tap “Build Version”, four or more times until you get a notification that it is in developer mode. If Build Version isn't there, try “build number”.
      5. Go back to the main Settings menu list.
      6. See “Developer options” now at the bottom of the list. Tap on it to open.
      7. Scroll down list to “Debugging” section and enable "USB Debugging".
      8. Optional: Scroll down to “Networking” section, configure WiFi networking related options:
        Enable Wireless display certification
        Enable Wi-Fi Verbose Logging
        Disable Wi-Fi scan throttling
    2. Connect your Phone to the LANforge using usb cable.
      The phone should then show up in the Interop tab in the LANforge GUI.
    3. In interop tab, double click on the new device, and give it a unique user name and click OK.
    4. Click Batch Modify.
      1. When that window opens, click the Install button. If you are running the LANforge GUI inside a VNC or Remote Desktop session, then you can click the 'Launch GUI' button to get an interactive display of your Android device.
      2. The LANforge Manager IP field is an IP address that the Android device can connect to once it is associated with the DUT. Often this is the 'upstream' Ethernet port on LANforge.
      3. Fill in the SSID, Password and Encryption type. If using wpa2, use that option instead of psk2 in the encryption pulldown unless you are certain your Android device needs to use psk2.
      4. Press 'Start'. This should launch the LANforge Interop App on the Android device, have it configure the wifi as requested, and connect to the LANforge manager on the selected IP address.
    5. Assuming that all worked as expected, then the Status panel in the LANforge GUI will now show the new device, and the Interop App on the Android device will switch from the intro screen to a screen filled with stats and other available tabs.

    Installing LANforge Interop App on iOS Devices

    The LANforge Interop App running on an iOS device gives ability to control the WiFi settings, generate TCP and UDP traffic, and do some types of Layer 4-7 generation. This functionality is offered for the iPhone 11 and all following generations. But has not yet been tested with the Apple iPad.

    1. Connecting the iPhone to a LANforge System
      1. For details about necessary components and the setup process, visit LANforge InterOp Setup for iOS

    Upgrading LANforge Server Offline

    The Candela Technologies Linux kernel can be downloaded and expanded from archive. We prefer you to use upgrade.bash for normal upgrading.

    1. Check the release notes for special instructions:
      Go to the Downloads Page and scroll down to the latest release notes link. The downloads will be in the /private/downloads/ directory.
    2. On the LANforge system, as root, stop the LANforge service: cd /home/lanforge
      ./serverctl.bash stop
    3. Backup the existing installation: cd /home
      tar -cvzf lanforge_bkup.tar.gz lanforge
    4. Use a utility like Filezilla or scp to copy the LANforgeServer archive to the LANforge system, to /home/lanforge/Downloads
    5. Install the new LANforge server software:
      cd /home/lanforge
      tar -xvzf LANforgeServer-<VER>-x64_Linux-x86.tar.gz
      cd LANforgeServer-<VER>
      ./install.bash
    6. Regenerate the LANforge configuration as root: cd /home/lanforge
      ./lfconfig --new_layout
    7. Start the upgraded LANforge server:
      # ./serverctl.bash start

    Upgrade the Linux Kernel Offline

    Sometimes it is necessary to upgrade the Linux kernel in an offline environment.

    1. Upgrade the LANforge kernel as root: Generally, the kernel version should be upgraded to match the LANforge software version both of which can be found on the Downloads Page.
      # uname -r # will give you your current kernel version
      # /usr/local/bin/kinstall_ct<CURRENT KERNEL>.bash
      # cd /
      # tar -xvzf ct<NEW KERNEL>.tar.gz
      # /usr/local/bin/kinstall_ct<NEW KERNEL>.bash
    2. Update GRUB configuration file with new kernel name:
      /home/lanforge/lf_kinstall.pl htt
    3. Reboot the system for the new kernel to be in use:
      # reboot
    4. Verify new kernel is running:
      # uname -a

    Upgrading LANforge Server on Microsoft Windows

    To upgrade your LANforge server from an existing Windows installation, follow these instructions:

    1. Check the release notes for special instructions:
      Go to the Downloads Page and scroll down to the latest release notes link.
    2. Stop the LANforge Manager and Data Generator:
      Close the DOS windows labeled LANforge Manager and LANforge Data Generator.
    3. Backup your current installation:
      Rename or copy the C:\Program Files\LANforge server directory.
    4. DO NOT UNINSTALL - YOU WILL LOSE YOUR LANforge DATABASE
      Simply run the new LANforge Server Installer.
    5. Re-run the Configure LANforge utility.
      You will be prompted after installing the new server software.
    6. Install your license keys:
      Follow the license installation instructions in your license key file.
    7. Start the LANforge server:
      For a 'Both' node, double-click the LANforge Data Generator and LANforge Manager icons.

      Otherwise, double-click the appropriate icon for the node type.

      NOTE: Windows Vista and Windows 7 users must run the LANforge Manager, LANforge Data Generator as Administrator for a LANforge system to function properly.

      The shortcut properties should be modified to run as Administrator:

      1. Right-click on the shortcut icon
      2. Select Properties→Advanced button
      3. Select Run as administrator
      4. then click OK on both the Advanced Properties and LANforge Manager (or LANforge Data Generator) Properties windows.

    Appendix

    Various techniques below.

    Discover Interface Names

    You can learn your interface names with the command: ip -br link show

    For fresh installs, on Fedora 15 and higher, you may wish to change the network device names from the bus enumeration style (p1p2) to classic Linux style (eth0). If so, edit the /etc/udev/rules.d/70-persistent-net.rules file. You will also need to rename and edit the corresponding /etc/sysconfig/network-scripts/ifcfg-* files to match the new names. When done, reboot to make sure the system comes back up with the specified kernel and with properly named network interfaces.

    Configure the Management Network Interface

    Choose one of the methods below to configure your management interface:

    LFConfig GUI

    Double click on the LFConfig icon on the desktop.
    1. Select eth0 (or appropriate)
    2. Click Apply

    CLI lfconfig:

    1. cd /home/lanforge
      ./serverctl.bash stop
      ./lfconfig --new_layout
      Key               Acceptable Values          Value
      **************************************************
      log_level         [0-65535]                  7
      log_dir           [directory path]           /home/lanforge
      add_resource_addr [host:port]                SEE LIST ABOVE
      rem_resource_addr [host:port]                SEE LIST ABOVE
      realm             [1-255]                    45
      resource          [1-511]                    1
      mgt_dev           [ethernet device]          eth0
      mode              [resource, manager, both]  both
      log_file_len      [0-2G]                     0
      bind_mgt          [0-1]                      0
      shelf             [1-8]                      1
      dev_ignore        [eth0 eth1 ... ethN]
      first_cli_port    [1025-4199]                4001
      connect_mgr       [host:port]
      gps_dev           [device file]              NONE
      max_tx            [1-500]                    5
      max_send_mmsg_mem [1000-500000]              32000
      max_send_mmsg_pkts [1-1000]                  500
      keepalive         [1000-500000]              30000
      wl_probe_timer    [50-2000]                  50
      Other Commands:   help, show_all
      **************************************************
    2. mgt_dev: eth0
    3. config
      Please see the LFConfig section to learn mnore about the lfconfig command.
    4. If you did not install a new kernel (upgrade) you may restart lanforge: ./serverctl.bash start

    Using lf_kinstall.pl one-liner:

    It is possible to runlf_kinstall.pl using a perl/curl one-liner. This syntax is noted for reference, and we don't encourage this. This syntax is not possible for offline bundle installations.
    One-line curl/perl call:
    sudo -s
    perl <(curl -s https://www.candelatech.com/lf_kinstall.txt) --lfver 5.4.8 --kver 6.10.3+ --do_upgrade)
    (This does not save the file, good for only one use.)

    This command is often more useful:
    wget -O lf_kinstall.pl https://www.candelatech.com/; chmod +x lf_kinstall.pl

    Support

    If you have a problem not answered here, please contact Candela Technologies technical support at support@candelatech.com.


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