Candela Technologies Logo
+1 360 380 1618 [PST, GMT -8]
Network Testing and Emulation Solutions

Inspecting Ports (Network Interfaces) using lf_portmod

Goal: You will be able to report and reset ports on your LANforge server.

Port statistics can be programatically monitored using the script This script can also reset ports, alter WiFi station settings, and pass arbitrary LANforge CLI commands directly to the LANforge manager.

Ports of all kinds can be viewed with the perl script. You can also do some limited manipulation of ports as well.

Listing Ports
You can show statistic on a port with the --show_port argument:
 C:\> perl .\ --quiet 1 --manager jedtest --card 1 --port_name eth1 --show_port
You can right-click to paste these commands into your DOS window
Listing Port Attributes
Individual port attributes can also be shown, which often makes automating reporting easier.
perl .\ --manager jedtest --card 1 --quiet 1 --port_name eth1 --show_port "RxDrop,Rxp,IP"
Produces: Consider that is a lot of text to type. If we want, we can reformat that command.
Long DOS commands and be continued on the next line with the ^ character.
perl .\ --manager jedtest ^
 --card 1 --quiet 1 --port_name eth1 ^
 --show_port "RxDrop,Rxp,IP"
Produces the same output:
Loading a test scenario
Saved test scenarios are often referred to as 'databases' --load day_238
This matches the same database name seen in the Status tab database dropdown.
Admin-down a port --manager --card 1 --port_name eth2 --set_ifstate down
Resetting a Port
Resetting a port forces a port to unload and reload its configuration. --manager --card 1 --port_name eth2 --cmd reset
Sending a specific CLI command to the LANforge manager:
It is possible to directly pass a command to the LANforge manager: --manager --cli_cmd "scan 1 1 sta0"

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