Candela Technologies Logo
Network Testing and Emulation Solutions

Operate LANforge Scripts from Windows.

Goal: Use an installation of LANforge and Perl on a Windows computer to operate tests and manage connections on remote LANforge computers.

You do not need to connect to your LANforge manager using ssh or VNC to manage connections or operate tests. In this cookbook, you will see an example of using the lf_firemod.pl script which can give you port information. This example will require a Windows desktop with Java, ActiveState Perl, the LANforge Server and the LANforge GUI installed. You will not need to start the LANforge server on your Windows computer, so no licenses will be required for operating on the Windows computer. This cookbook assumes connectivity between the Windows computer and a running LANforge manager computer.
 
  1. Prepare your Windows computer:
  2. Install LANforge Server
    1. You do not need to configure or start this server. Only the perl scripts directory of this installation will be used.
    2. You can download it from our current releases page.

      For more information see LANforge Server Installation

  3. Install LANforge GUI
    1. You can download it from the same location.
    2. Make sure you can connect to your LANforge manager. In this example, the LANforge manager will be at 192.168.100.26
    3. Open the LANforge GUI screenshot
    4. ... and click Discover screenshot
    5. If you are able to connect you should be able to browse your ports and connections. screenshot

    For more information see LANforge GUI Installation

  4. Install ActiveState Perl
    1. Please download it from the ActiveState downloads page.
    2. Begin and press next... screenshot
    3. ...press next... screenshot
    4. ...press next... screenshot
    5. ...and then wait a few minutes... screenshot
    6. Now, you are done, press Finish. screenshot
    7. For advanced GUI scripting in Windows, you may also wish to view the Win32::GuiTest perl module page.
  5. Using scripts from Windows
    1. The scripts installed on your Windows computer will communicate with the LANforge manager over the management port (TCP 4001).
    2. Open a cmd window. Click Start->Run, type cmd and press Enter
      1. screenshot
      2. screenshot
    3. Change directory to C:\Program Files\LANforge-Server\scripts screenshot
    4. List the script files: dir *.pl screenshot
    5. Your installation of Perl should have put it into your path variable (%PATH%). Please verify that it did with this command: perl -v screenshot
    6. If perl is not found (Command not found) then you might need to close your DOS window and open a new one, or your Windows computer might need a reboot for the PATH variable to take effect.
    7. Start the lf_firemod.pl script with the --help switch to see the options. screenshot
      1. perl lf_firemod.pl --help
    8. Open a second cmd window so that you can see the help text in the first window. Change directory to C:\Program Files\LANforge-Server\Scripts
    9. Use this command to list ports available on 192.168.100.26:
      1. perl lf_firemod.pl --mgr 192.168.100.26 --resource 1 --action list_ports
      2. screenshot
    10. Most command output shows considerably more text than the output of the previous command. You may want to pipe it to a file. In this example, the output is redirected to C:\tmp\port-vap0.txt and shown with Notepad.
      1. Query the port stats using: perl lf_firemod.pl --mgr 192.168.100.26 --resource 1 --action show_port --port vap0 > c:\tmp\port-vap0.txt screenshot
      2. Show the output with: notepad c:\tmp\port-vap0.txt screenshot

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