The Various Techniques Cookbooks provide miscellaneous examples of how to perform various network configuration tasks. Each is a set of step-by-step instructions intended to help build your familiarity with network configuration in Linux and Windows.
Please contact us at support@candelatech.com if you have any questions.
In cases where is is not convenient to use an existing management network, LANforge WiFi systems can be configured to provide their own WiFi management network. This may be especially useful when testing in environments where LANforge needs to be moved around or where you have no good access to existing management LANs. This example assumes that you already know how to create and configure VAP and Stations in LANforge. | |
Here are some techniques for finding and setting IP addresses on Microsoft Windows using the Control Panel and the command line. |
![]() |
Here are some techniques for finding MAC addresses on Microsoft Windows using the Control Panel and the command line. |
![]() |
For more information see Finding Windows IP Address
netsh interface ipv4 addresses > ifnotes.txt getmac /v /fo csv >>ifnotes.txt notepad ifnotes.txt
Here we review DOS window settings that will help you to work faster. |
![]() |
Use this technique to inspect your DOS environment variables for specific strings using findstr. |
![]() |
set | findstr /i temp
Lots of tasks, like scripting, can be done over SSH from your Windows desktop. Here are a few steps to help you customize your PuTTY terminal to work faster. |
![]() |
For more information see WinScp Net
chmod 600 authorized_keysto correct the permissions.
The automatic driver install process for Windows XP might automatically install a Microsoft Windows version of the Arduino Mega driver. This is not the driver LANforge expects. These instructions will guide you how through uninstalling an old driver and installing the new driver. | |
For more information see Installing LANforge Server on Windows
LANforge CT70x attenuators require recently signed Arduino drivers. The automatic driver install process for Windows 7 might automatically install a Microsoft Windows version of the Arduino Mega driver. This is not the driver LANforge expects. These instructions will guide you how through uninstalling an old driver and installing the new driver from the Arduino website. If you have recently removed a driver, you might need to reboot your Windows system for it to complete the driver installation process. |
|
For more information see Installing LANforge Server on Windows
LANforge CT70x attenuators require recently signed Arduino drivers. The automatic driver install process for Windows 10 might automatically install a Microsoft Windows version of the Arduino Mega driver. This is not the driver LANforge expects. These instructions will guide you how through uninstalling an old driver and installing the new driver from the Arduino website. If you have recently removed a driver, you might need to reboot your Windows system for it to complete the driver installation process. |
|
For more information see Installing LANforge Server on Windows
LANforge computers on Intel hardware are typically installed with a full Linux desktop. You can use the LANforge GUI, do traffic sniffing, open terminal windows, and office software to look at report data over remote desktop. LANforge computers are pre-configured with RDP and VNC desktop services. |
![]() |
LANforge computers on Intel hardware are typically installed with a full Linux desktop. You can use the LANforge GUI, do traffic sniffing, open terminal windows, and office software using a VNC Viewer program. LANforge computers are pre-configured with RDP and VNC desktop services. |
![]() |
The native display protocol for Linux (and Unix) is the X Display Protocol. The Cygwin.org project provides Linux software that runs natively on Windows. You can run an X display server on Windows that accepts connection from LANforge. We will walk through setting up Cygwin and configuring an X display. |
![]() |
C:\> cd \cygwin\bin
C:\> .\xhost.exe +
By default, your LANforge server and your LANforge client do not save the data on connection and port performance. When you configure the save destination for this data, you can use it with any other tool that can read a CSV file. |
![]() |
You can tell the LANforge server to save data to a directory locally on the
management machine, and you can configure your workstation running the the
LANforge GUI to save data to a local desktop folder. First, find the Reporting
Manager dialog by in the
Reporting menu, and select Report Manager the client.
Collecting data on your local workstation is very convenient if you can leave
the GUI running for the duration of your test scenario. The format of the data
here should be similar to the format of the data saved to the server directory.
The folders for collecting data are relative to the folder you start your
GUI from. If you type in lf_data that probably means
C:\Users\mumble\AppData\Local\LANforge-GUI\lf_data. You probably want to
put in a fully qualified path thats more intuitive, like
C:\Users\mumble\Documents\lf_data.
The Report Generator uses the local data files. In that dialog shows the
Report Input Directory field is a local folder where the CSV files
collect. The Save Reports to Directory field is where HTMl and PDF
files should collect.
If your test scenario runs longer than your GUI can be up, you can configure
the LANforge server to collect the data. The directory is relative to the
/home/lanforge directory, so if you enter lf_data, you would
find the CSV files in /home/lanforge/lf_data.
You can take a look at the data files easily. Here is a server data collection directory:
And using a utility like notepad, vi, more or less you can look at the file contents:
Importing the file into a spreadsheet like LibreOffice Calc is simple:
![]() |
You only need to separate on comma (,)
![]() |
![]() |
Libre Office does not have a builtin formula to do this, but it has been discussed here. And the solution is a formula that looks like this:
=(A2/86400)+25569and then you format the column as Date.
There are a number of ways to collect an dort the data with shell utilities. The first utility to consider is cut, then awk. The first column of the endpoint file we are going to read is the timestamp, the 14th is the rx bytes.
$ head -n2 c201-A_1488414451.csv | cut -d, -f1 TimeStamp 1488414454125 $ date -d @1488414454125 Mon Dec 23 19:28:45 PST 49135
$ head -n2 c201-A_1488414451.csv | (while IFS=, read -a L; do echo ${L[13]}; done) rx_bytes 33847640064
$ head -n2 c201-A_1488414451.csv | cut -d, -f14 rx_bytes 33847640064
$ head -n2 c201-A_1488414451.csv | awk -F, '{print $14}' rx_bytes 33847640064 head -n2 c201-A_1488414451.csv | awk -F, '{print $1 "\t" $14}' TimeStamp rx_bytes 1488414454125 33847640064
It is a lot easier to do math with a perl script than a bash or an awk script. You can pipe things into perl or perl will read the last argument of the -ne switches as an input file.
$ head -n2 c201-A_1488414451.csv \ | perl -ne '@v=split(/,/,$_); print "$v[0]\t$v[13]\n";' TimeStamp rx_bytes 1488414454125 33847640064 perl -ne 'BEGIN{$tt=0;@tstamps=();@rxb=();} \ {@v=split(/,/,$_); push(@tstamps, $v[0]); push(@rxb, $v[13]);} \ END{$dt=$tstamps[$#tstamps] - $tstamps[1]; $db=$rxb[$#rxb] - $rxb[1]; \ print "Time: $dt, Total:$db\n";}' \ c201-A_1488414451.csv Time: 18959363, Total:1213399040
Not everthing you do in perl is going to be a one-liner. Here's an example of the same script as a more properly formatted perl file:
#!/usr/bin/perl my $tt=0; my @tstamps=(); my @rxb=(); while(<>) { @v = split(/,/, $_); push(@tstamps, $v[0]); push(@rxb, $v[13]); } $dt = $tstamps[$#tstamps] - $tstamps[1]; $db = $rxb[$#rxb] - $rxb[1]; print "Time: $dt, Total:$db\n";
Many LANforge ICE WAN emulator machines are embedded systems that lack display hardware. Installing an OS using only the serial console can be very inconvenient. The easy solution is to perform the installation on similar hardware that does have display hardware, and then move the drive to the embedded device. Here, we learn how to use Etcher on Windows to write a compressed disk image to an mSata drive plugged into a USB3 adapter. |
![]() |
We review the configuration steps necessary to add a virtual LANforge resource. This was done using VirtualBox 5.2.10 and Fedora 27 Server edition. The guest instances will be configured to export MAC-VLAN ports to run traffic on their physical management port. |
![]() |
[root@localhost]# dnf update -y
[root@localhost]# dnf install -y perl
[root@localhost]# hostnamectl --static set-hostname atlas-fedora27s01
[root@localhost]# shutdown -r now
[root@atlas-fedora27s01]# cd /root [root@atlas-fedora27s01]# curl -o lf_kinstall.pl http://www.candelatech.com/lf_kinstall.txt [root@atlas-fedora27s01]# chmod +x lf_kinstall.pl
[root@atlas-fedora27s01]# touch /home/lanforge/did_cpuburn
[root@atlas-fedora27s01]# ./lf_kinstall.pl --lfver 5.3.7 --kver 4.13.16+ --do_all_ct
[root@atlas-fedora27s01]# systemctl stop vncserver@\:1 xrdp.service [root@atlas-fedora27s01]# systemctl disable vncserver@\:1 xrdp.service [root@atlas-fedora27s01]# systemctl daemon-reload
[root@atlas-fedora27s01]# shutdown -r now
[root@localhost]# ip a show
[root@atlas-fedora27s01]# shutdown -r now
[root@localhost]# hostnamectl --static set-hostname atlas-fedora27s02
[root@localhost]# cd /etc/sysconfig/network-scripts [root@localhost]# cat ifcfg-enp0s17
[root@localhost]# cd /etc/udev/rules.d [root@localhost]# ip li show enp0s17 [root@localhost]# cat 70-persistent-net.rules
[root@localhost]# service lanforge stop [root@localhost]# cd /home/lanforge [root@localhost]# ./lfconfig Your command: resource 5 Your command: config
[root@localhost]# shutdown -r now
If you experience crashes or system misconfiguration, a network link to LANforge can become unavailable. LANforge machines are shipped with a serial cable for just this possibility. Most LANforge servers come with standard RS232 DB9 pin serial ports, other models have a special RJ45 style connector. You might need a USB to Serial adapter to connect your laptop to the serial cable. |
![]() |
Many WiFi testing scenarios benefit from some amount of WiFi isolation. Connecting the radios of the Device Under Test (DUT) to LANforge's radios using SMA cables can improve connection quality. Using a fixed attenuator can reduce a direct signal so that it is heard by the radios without distortion. |
![]() |
The LANforge client (GUI) can encounter variety of difficulties depending on the amount of RAM and version of Java running on your desktop. Read this guide to learn steps to take to collect error messages and how to fix out of memory problems. The LANforge client can be both the GUI running interactively, or in headless HTTP mode. |
![]() |
For more information see Windows Server 2016 Features
Candelatech introduces features into LANforge quickly, and discovering a problem in the LANforge Client occasionally happens--and we want to hear when it does! You can help by copying the terminal output and emailing it to us (at support@candelatech.com).
Various kinds of errors leave messages we can find in the terminal like when the LANforge client:
A Java exception is a rather long list of method calls (a stack trace) that starts with the exception message. Sometimes the exception message is IllegalArgumentException, sometimes it is null (a null pointer exception)
For more information see LANforge Downloads
For more information see Download Notepad++
For more information see Tuning Java Machines
If your LANforge boots into Emergency Mode, your system is experiencing file-system corruption. Follow these instructions to check the filesystems. This process will require a monitor and keyboard or a serial cable connected to the LANforge. File system corruptions are caused by power-off events without properly shutting down the system |
![]() |
Give root password for maintenance
(or type Control-D to continue):
/dev/sda2 on / type ext4 (rw,relatime,nodelalloc)This example shows partitions.
/dev/sda4 on /home type ext4 (rw,relatime,nodelalloc)
/dev/sda1 on /boot type ext4 (rw,relatime,nodelalloc)
/dev/mapper/fedora-root on / type ext4 (rw,relatime,nodelalloc)Notice that /boot is typically not a LVM volume.
/dev/mapper/fedora-home on /home type ext4 (rw,relatime,nodelalloc)
/dev/sda1 on /boot type ext4 (rw,relatime,nodelalloc)
/dev/sda2 on / type ext4 (rw,relatime,nodelalloc)
/dev/sda4 on /home type ext4 (rw,relatime,nodelalloc)
/dev/sda1 on /boot type ext4 (rw,relatime,data=writeback)
UUID=1c1b4732-653f-47dd-a106-ae17cf5b12a9 /boot ext4 data=writeback 1 2Notice the fstab entry for /boot? It has overridden the data journaling mode. Erase that setting from the fstab mount options.
Follow these steps to Configure LANforge to automatically start LANforge GUI on boot or login. Requires version 5.4.1 |
![]() |
$ cd /home/lanforge/LANforgeGUI_5.4.1
$ cp LANforge-auto.desktop ~lanforge/.config/autostart
$ sudo systemctl restart vncserver@:1.service
Connecting to the office network remotely requires you to install the openvpn package and place the config files in the correct places. You can start and stop the VPN using simple commands at a terminal. | |
$ which openvpnThis means you have OpenVPN installed.
/usr/sbin/openvpn
$ sudo apt install openvpn
$ sudo -s
[/home/amelia] # cd /etc/openvpn
[/etc/openvpn] # cp ~amelia/Downloads/your-laptop.key .
[/etc/openvpn] # cp ~amelia/Downloads/your-laptop.crt .
[/etc/openvpn] # cp ~amelia/Downloads/ca.crt .
[/etc/openvpn] # cp ~amelia/Downloads/candelatech.conf .
$ cd /etc/openvpnPress
$ sudo openvpn candeltech.conf
client
dev tun1
proto udp
remote firewall.candelatech.com 1194
#remote firewall.candelatech.com 443
script-security 2
resolv-retry infinite
nobind
persist-key
persist-tun
verb 3
ca ca.crt
cert laptop-dell.2019-08-13.jreynolds.candelatech.com.crt
key laptop-dell.2019-08-13.jreynolds.candelatech.com.key
comp-lzo
cipher AES-256-CBC
Connecting to the office network remotely requires you to install the openvpn package and place the config files in the correct places. You can start and stop the VPN using simple commands at a terminal. | |
For more information see Openvpn Community Downloads
client
dev tun1
proto udp
remote firewall.candelatech.com 1194
#remote firewall.candelatech.com 443
script-security 2
resolv-retry infinite
nobind
persist-key
persist-tun
verb 3
ca ca.crt
cert "C:\\Program Files\\OpenVPN\\config\\laptop-dell.2019-08-13.jreynolds.candelatech.com.crt"
key "C:\\Program Files\\OpenVPN\\config\\laptop-dell.2019-08-13.jreynolds.candelatech.com.key"
comp-lzo
cipher AES-256-CBC
The CI/CD lights-Out chamber is composed of a CT840a chamber, a CT523c LANforge and a test-controller*, that connects to them via serial and Ethernet. *) A test controller is a Linux system that can be remotely accessed, and does not need LANforge installed. Inside the chamber we have:
|
![]() |
![]() |
|
When connecting to your remote LANforge hardware (presumably accessible over a VPN) you will notice poor response time and lag in your LANforge GUI or your VNC connection. Many VPN connections are based on UDP protocols and packet loss might be affecting your connection quality. Below we explain how to set up SSH tunnels that increase the quality of your connection. |
![]() |
For more information see Connecting with PuTTy.
VRF devices are a Linux kernel networking driver that allows private routing tables for individual ports in the system. The examples below show how to find these routes. Requires version 5.3.9 |
![]() |
ip a show wlan3 wlan3:mtu 1500 qdisc noqueue master _vrf6 state DOWN mode DEFAULT group default qlen 1000 link/ether 00:0e:8e:44:07:a1 brd ff:ff:ff:ff:ff:ff promiscuity 0 minmtu 256 maxmtu 2304
ip route show vrf _vrf10 default via 10.40.0.1 dev br0 10.40.0.0/20 dev br0 scope link src 10.40.0.21
$ ip route show vrf _vrf15 unreachable default
Access points used as a DUT in a wireless-mesh scenario might not have an ethernet port available to be able to access their management screen. Rather, they require a station to associate to the DUT to access the management console. LANforge virtual stations operate in the context of a VRF (virtual routing) device that protects them from the default routing table of the system. This makes using a browser over a station unintuitive; special commands are required to do this. Requires LANforge 5.3.9 or later. | |
For more information see Create stations
Most of the data that LANforge produces lives in the directory /home/lanforge. Not all the files and directories under there are useful to backup or migrate to a new LANforge machine. This guide relates to Linux based LANforge machines. We will assume for this cookbook during a restore situation you have the two LANforge systems connected on the same management network. |
![]() |
cd /home/lanforge tar cjf /home/lanforge-bu.tar.bz2 DB html-reports lf_reports report-data
scp /home/lanforge-bu.tar.bz2 lanforge@your-new-machine-ip:/var/tmp
cd /home/lanforge tar xvf /var/tmp/lanforge-bu.tar.bz2 sudo service lanforge restart
![]() |
|