|
Table Of Contents
Command Line Interface - ONSCLI
Command Line Interface - ONSCLI
22.1 Introduction to ONSCLI
The command line interface, ONSCLI is a line-oriented ASCII-based management interface, by means of which simple commands - possibly with parameters - may be issued to access or modify the device configuration.
22.1.1 Accessing ONSCLI
The ONSCLI is accessed via a serial port or via an IP connection (Telnet). The serial connection communications parameters are fixed: 19200 bit/s, no parity, 8 bits, 1 stop bit, and no hardware flow control. VT100 terminal codes are used.
Step 1 Type ONSCLI to invoke a ONSCLI session.
The cli name is presented on the terminal screen after a system restart.
User authentication (password, 8-12 ASCII characters) is required, as the following session start-up sequence shows:
Step 2 Type terminal password (default onscli)
Command Line Interface
Password: *********
22.1.1.1 Default Passwords
Telnet password = telnet
Terminal password = onscli
22.1.1.2 Incorrect Password
Each password characters is echoed as '*'. An incorrect password is rejected with the message:
invalid password and the password prompt is re-issued.
22.1.1.3 Exit
The Exit command is used to terminate an ONSCLI session. The ONSCLI session will be automatically terminated after a period of 30 minutes of inactivity. ONSCLI does not accept simultaneous sessions.
An authorized ONSCLI user obtains full access rights to the available management information.
22.1.2 Syntax Rules
An ONSCLI command line begins with a prompt (issued by ONSCLI), which serves to indicate the current position in the command hierarchy.
An ONSCLI command is issued by typing the command followed by ENTER. Optionally, and only at the lowest level in the command hierarchy, one or more parameters may also be supplied. These are identified by keywords. The command name, parameter keywords and parameter values are delimited by one or more spaces.
It is only necessary to type sufficient leading characters of the command name to avoid ambiguity - the same applies to keywords. BACKSPACE or DELETE may be used to edit the command line. Commands and keywords are NOT case-sensitive, although for clarity they are written in this document using both upper- and lowercase letters. A list of valid commands that have been issued in the current session is maintained in a command history.
22.1.2.1 Universal Commands
Table 22-1list the ONSCLI universal commands:
Some commands (in particular Show) may potentially produce many lines of output. After a predetermined number of lines of output in response to a single command, the user is prompted to enter y(es) or n(o) to continue the output.
Command lines may be edited by using the or keys to position along the line, and by using BACKSPACE or DELETE to remove characters. All other (graphical) characters are inserted at the current position in the line.
22.1.2.2 Basic Command Syntax
A basic ONSCLI command has the following syntax:
<basic command>
= [<path>]<command> [<parameter>]... <CR>
<path>
= [\]<command\>[<command>\]...
<command>
= <command name> |.
<parameter>
= <spaces> <keyword>=<value> |?
<value>
= <integer> | <choice> | <IP address> | <string> | <MAC address> | <NSAP address> | <time> | <date>
| <KLM> |<portList> |<port>
<NSAP address>
= <area address>:<system id>:<selector>
<portList>
= <port>[,<port>]
<areaAddressList>
= <area address>[,<area address>]...
Please see Table 22-2 for details on the Command Syntax
Overview of the ONSCLI command hierarchy is following subsections. A detailed overview of all commands is found in Command Reference.
Optional parameters are enclosed in square brackets. For clarity, parameter command keywords are written in capital letters, for example [IP-ADDRESS=<IP address>].
The order of parameters (keyword/value pairs) is not significant. The help command "?" will display all available commands at the current level, each with a short description.
22.1.2.2.1 The Help Command
The Help command "?" will display all available commands at the current level, each with a short description. E.g. typing "?" at the root level will list the commands which are available at this level:
Step 1 ONSCLI>?
*** current menu path:
<root>
*** valid commands:
IP-Configuration (Management-Port):
Show-Current-Alarms:
Change-Passwords: Manage CLI/TELNET passwords
Erase-CDB:
Reset-Device:
Community-Handler:
Management-Modes:
Running-Config:
Exit:
ONSCLI - available commands:
22.1.2.2.2 IP-Configuration (Management-Port):
The following example configures the device by setting IP address to the management port:
Step 1 ip ip=192.168.2.2 sub=255.255.255.252 def=192.168.2.1
Step 2 --- Change IP address, are you sure (y/n)? Y
IP-ADDRESS: 192.168.2.2
SUBNET-MASK: 255.255.255.252
DEFAULT-GATEWAY: 192.168.2.1
MANAGEMENT-MODE: ip
ADMIN-STATUS: up
STATUS: down
Note DEFAULT-GATEWAY cannot be configured from ONSCLI if routing feature is enabled.
22.1.2.2.3 Show-Current-Alarms
By this command all active alarms are displayed.
22.1.2.2.4 Change-Passwords
By this command, TELNET and ONSCLI passwords can be changed. Both passwords can be changed in the same command or they can be changed one by one.
22.1.2.2.5 Erase-CDB
By this command the complete configuration file is erased. The device is also automatically restarted.
22.1.2.2.6 Reset-Device
By this command the device is restarted.
22.1.2.2.7 Running-Config
Shows all relevant configuration data. Running config contains 9 sections that correspond with the configuration blocks in the device. Each section can be started separately or all at once.
22.1.2.2.8 Community-handler:
These set of commands are used to add, change, remove or display community entries.
Example of adding a new community entry:
Step 1 ONSCLI>Community-handler\add?
Usage:
Add
MANAGER=<IP address>
COMMUNITY=<string[1:20]>
ACCESS=<readOnly|readWrite|super>
TRAPS=<enable|disable>
Step 2 ONSCLI>Community-handler\add ma=0.0.0.0 commu=test access=readonly traps=di
MANAGER: 0.0.0.0
COMMUNITY: test
ACCESS: readOnly
TRAPS: disable
22.1.2.2.9 Management-Modes:
Commands used to set system mode, management-port mode and DDC-channels modes. These commands are useful in installation phase.
22.2 Command Reference
This section describes available CLI commands for the ONS 15305.
Tip The following illustrations are hyperlinked with the command table in the end of this section. If you view the PDF version, you can click on desired command in Figure 22-1, Figure 22-2, Figure 22-3 and Figure 22-4 to view corresponding parameters. Use "Previous View" button in the PDF browser to return to the illustrations.
The basic ONSCLI Commands are grouped as depicted in Figure 22-1.
Figure 22-1 Basic CLI commands
An overview of available commands within these groups, is found in Figure 22-2, Figure 22-3 and Figure 22-4. See ONSCLI Command Parameters for descriptions on all commands mentioned in this section.
Figure 22-2
ONSCLI Root Commands
Figure 22-3
ONSCLI Commands - Community Table
Figure 22-4
ONSCLI commands - Management modes
Posted: Fri Sep 14 08:56:54 PDT 2007
All contents are Copyright © 1992--2007 Cisco Systems, Inc. All rights reserved.
Important Notices and Privacy Statement.