This page contains CLI scripts that are used to automate control of the LANforge system. You may freely download and modify these scripts in any manner you would like. You are also welcome to submit scripts for inclusion here.
To better understand how you can use the CLI to script LANforge, you may wish to read the LANforge CLI User Guide.
LANforge CLI Scripts
|This is a collection of Perl modules that automate some of the tasks involving setting and parsing objects through the LANforge CLI. They are a work in progress and may change significantly as I learn more Perl! Unzip this in the directory you run your Perl scripts in, or study up on Perl and install it in a more system-wide area.||LANforge.pm.tgz|
| This script sets up connections of types:
lf, lf_udp, lf_tcp, custom_ether, custom_udp, and custom_tcp
across 3 ports on 2 machines.
It then continously starts and stops the connections.
|This creates a few fast connections between 3 ports on two machines. It then starts/stops them with a fairly lengthy run between them..||lf_stress2.pl|
|This script is used to test 4 high-end machines. Two of them have GigE NICs in them, and will be configured to run back-to-back. Two other machines have a 4-port NIC and 2 single-port NICs. These ports will be configured to talk to each other..||lf_stress3.pl|
|This script uses the new LANforge perl modules, and is used in verification regression testing. It has the ability to set values and then test to see if the values were actually set correctly. You may find it interesting as an example of how to use the LANforge perl modules. Requires the LANforge.pm collection above.||lf_verify.pl|
| The purpose of this script is to create 10 (or more) TCP and/or UDP connections on
specified ports. The connections will run for a short period of time, and
then 10 more will be created on a new set of ports (the next 10). It
writes it's cmds to a log file so you can get an idea of what it's doing.
This script should be useful for people who are testing firewalls and other types of systems that care about what ports the data is transmitted on...
|The purpose of this script is to create as many TCP connections as possible. It creates 40 cross-connects (cmd-line arguments may over-ride the defaults). It then falls into an endless loop that starts all CXs, waits until both side has received traffic, and then stops the connections.||lf_many_conn.pl|
|The purpose of this script is to test for the maximum number of simultaneous connections possible on either a firewall or router. The script sets up one UDP connection, then one TCP connection at a time up to 200 or more connections until the UDP starts dropping packets. Once the UDP connection starts dropping packets, the script records the number of TCP connections and runs the entire test again for 3 loops then calculates the average.||lf_macvlan3.pl|