Proxicast

Topics > Device Management/Configuration > FAQ ID # 204

FAQ ID # 204
Last Update : 2010/08/16
Rating : Not Rated
Send FAQ by E-mail
Add to favorites
Print this FAQ

Social Bookmark this Article :


Question / Issue
LAN-Cell 2 Command Line Scripting

Answer / Solution

The LAN-Cell 2 has a command-line interface (CLI) that can be reached using Telnet or SSH protocols. Many different parameters and commands can be set using the CLI.  It is also possible to use script files to automatically issue one or more CLI commands to the LAN-Cell without having to manually log in.

For example, the "SYS REBOOT" command forces an immediate reboot of the device (same as clicking Restart on the Maintenance web page).

There are many utilities available to assist with command line scripting.  This functionality can also be implemented in any programming language that can open a Telnet or SSH connection such as PERL, TCL, etc.

One Windows freeware telnet scripting utility is called TST10.EXE (see attached file).  It can be automated and run silently from a command shell. Double click on the TST10 application for help on its parameters and scripting language.

The following is a sample TST10 script file that connects to a LAN-Cell and reboots it.

(comments are to the right in blue and are not part of the script file)

192.168.1.1 23 <-- IP address of LAN-Cell and telnet port #
SEND "\m" <-- Send CRLF to wake up router
WAIT "Password:" <-- Expect "Password:" prompt string
SEND "1234\m" <-- send password (example: 1234) and CRLF
WAIT "Number:" <-- Expect "Number:" prompt from SMT screen 1
SEND "24\m" <-- Switch to SMT screen 24
WAIT "Number:" <-- Expect "Number:" prompt from SMT screen 24
SEND "8\m" <-- Select option 8 (command line mode)
WAIT ">" <-- Wait for the command line prompt
SEND "sys reboot\m" <-- Send sys reboot command


Attachments
tst10.zip (194.7Kb)


Direct Link to This FAQ
http://www.proxicast.com/AbsoluteFM/?f=204

Tags
telnet, ssh, command line, commands, automation, automate, script, remote, program,programming, batch, command
How would you rate this article?

Poor
1
2
3
4
5

Great
Submit

Back to Top