Cisco Active Network Abstraction Customization User Guide, 3.6.5
Understanding Cisco ANA Shell Behavior

Table Of Contents

Understanding Cisco ANA Shell Behavior

Overview

Cisco ANA Shell Modes

Cisco ANA Shell Errors

Error Format

Command Completion Errors

Output Format

Table

Paragraph

Output Redirection

Background Processing

Basic Commands

Inline Help ("?")

Enable

Configure

Exit Cisco ANA Shell

Exit Current Mode

Help

Terminal Length

Show History

Clear History

Access History

Execute Script

Node Management

AVM Management

Show AVM List

Show AVM VNEs

VNE Management

Show All VNEs

Show VNE Information

Add AVM

Remove AVM

Load AVM

Unload AVM

Add VNE

Remove VNE

Load VNE

Unload VNE

Add Static Topology Link

Remove Static Topology Link

Surveillance

Show Links

Drools Rules Management

Show All Rules

Show Specific Rules

Reload Rules

Validate Rule


Understanding Cisco ANA Shell Behavior


This chapter describes the Cisco ANA shell modes, errors, and output format. It also describes the basic commands, unit management commands, and surveillance commands.

The chapter includes the following topics:

Overview

Cisco ANA Shell Modes

Cisco ANA Shell Errors

Output Format

Output Redirection

Background Processing

Basic Commands

Node Management

Surveillance

Overview

The Cisco ANA shell CLI follows guidelines similar to the Cisco IOS interface.

The interface includes the following:

Command completion—Pressing the Tab key completes a partially typed command. If more than one valid completion exists, the Cisco ANA shell beeps.

Completion sound notification—Short alarm notice is given when completion is not available.

Fast help mechanism—Entering ? lists all valid completions.

Error messages—See Cisco ANA Shell Errors.

Case-insensitive interface.

Partial syntax recognition.

Validation of the input.

Use of Cisco ANA shell syntax when connecting to Cisco ANA Manage and unit machines—Using Telnet to connect to a unit allows all management functions relevant to a single machine.

Support for the More command and terminal length.

Cisco ANA Shell Modes

The following table identifies and describes the four Cisco ANA shell modes:

Mode Name
Description

exec

Entrance mode—Designed to show general details to the operator user. Activation of this mode is authenticated using a username and password upon login to the Cisco ANA shell.

enable

Enhanced user mode—Allows further details and configuration. Activation of this mode is authenticated using a password.

configure

Configuration mode—Used to set different attributes. Activation of this mode is authenticated in and possible only from enable mode.

manage

Management mode—Used to perform management operations on the system. This mode requires authentication.



Note Each level includes all previous levels.


Cisco ANA Shell Errors

This section includes the following topics concerning shell errors:

Error Format

Command Completion Errors

Error Format

Upon function termination with an error, the error uses the following format:

ERROR (error code): error message

For example:

ERROR(10443): IP address already in use

If a parsing or type-check error occurs (for example, entering a string instead of an integer), the command is reprinted with an arrow pointing to the erroneous phrase. If it is not a parsing or type-check error, the command is not reprinted.

For example, if you enter show ip 192.168.1, the result is:

ERROR (203): Invalid Value
show ip 192.168.1
^

Command Completion Errors

Error Example
Error Message

show momomo

^

Unknown command—A caret ( ^ ) marks the first letter that is unrecognized.

ip change <cr>

Incomplete command—When more arguments are needed.

s <TAB>

Beep if more than one command starts with an s.


Output Format

This section describes the format of the output that the Cisco ANA shell can return and includes the following topics:

Table

Paragraph

Some commands provide no output, such as the exit command.

Table

Cisco ANA shell can produce output in a table with the following attributes:

A header that:

Lists the names of the columns.

Appears only once at the beginning of the table, and not on each page.

A horizontal ruler that separates the header from the rows of the table.

Left-aligned text in all table fields.

For example:

No.
IP
Name
Type
Uptime

1

192.168.2.3

asam1

ASAM1000

29.04.02 13:12

10

192.168.2.4

asam2

ASAM1000

1.05.02 9:43

11

192.168.2.45

RedBack2

SMS500

1.05.02 9:44

100

192.168.2.46

RedBack3

SMS500

1.05.02 9:44


Paragraph

Cisco ANA shell can produce output in text paragraphs that use the following format:

<objectname>: 
<attribute name> = <value> 
... 

For example:

192.168.2.3:
IP address = 192.168.2.3
Name = asam1
Type = ASAM1000
Vendor = Alcatel
Uptime = 1.05.02 13:13
Status = OK

Output Redirection

Output redirection enables you to send the output of a command to a file.

Cisco ANA shell provides two options for output redirection:

> filename—Enter at the end of the command to create a new file and redirect the command output to it. If the file already exists, the new file overwrites the old one. If an error occurs when creating the output file, the command is not run.

Example: show device > out.txt

>> filename—Enter at the end of the command to append the output to an existing file. The file is created if it does not already exist.

Example: show device >> devices0515.text

Background Processing

Each Cisco ANA shell command may be run in the background by including an ampersand (&) at the end of the command. For example, entering the command show link > links.txt & runs the show link command in the background and redirects all output to the file links.txt. By default, unless redirection is specified, the output of a background command is redirected to the Cisco ANA shell terminal.

Basic Commands

This section describes the following basic commands:

Inline Help ("?")

Enable

Configure

Exit Cisco ANA Shell

Exit Current Mode

Help

Terminal Length

Show History

Clear History

Access History

Execute Script

Inline Help ("?")

Property
Description

Name

Inline help.

Description

Supplies command completion while typing.

Mode

All modes.

Usage

?

General

The command executes without pressing Enter.

Example

show ?
path		find path from source to destination
example command that generates a very long description that exceeds a 
single line and therefore wraps to the next line

Output Format

Paragraph:

Lists the valid options with a short description for each option.

If the description exceeds a single line, the lines after the first one are indented with the first description line.


Enable

Property
Description

Name

Enable.

Description

Enter enable mode.

Mode

exec

Usage

enable

General

Requires authentication.

After entering enable mode, the interface prompt is suffixed with a hash (#) sign.

Example

enable

Output Format

None.


Configure

Property
Description

Name

Configure.

Description

Enter configure mode.

Mode

enable

Usage

configure <cr>

General

After entering configure mode, the interface prompt is suffixed with conf.

Example

configure <cr>

Output Format

None.


Exit Cisco ANA Shell

Property
Description

Name

Exit Cisco ANA shell.

Description

Exit Cisco ANA shell interface.

Mode

exec

Usage

exit <cr>

General

If the Cisco ANA shell serves as the shell for the machine, it returns to the login window.

Example

exit

Output Format

None.


Exit Current Mode

Property
Description

Name

Exit current mode.

Description

Exit current Cisco ANA shell mode and return to the previous mode.

Mode

enable, config, manage

Usage

exit <cr>

General

Running exit in enable mode returns to exec mode.

Running exit in config mode returns to enable mode.

Running exit in manage mode returns to the mode from which the user entered it, either enable or configure.

Example

exit

Output Format

None.


Help

Property
Description

Name

Help.

Description

Prints general help. Lists all the commands with a short description for each command.

Mode

All modes.

Usage

help <cr>

General

Example

help

Output Format

Paragraph containing a fixed help message.


Terminal Length

Property
Description

Name

Terminal length.

Description

Set terminal length.

Mode

all modes

Usage

terminal length <integer> <cr>

General

Use length 0 for no pausing.

Example

terminal length 40

Output Format

None.


Show History

Property
Description

Name

Show history.

Description

Show previously run command.

Mode

all modes

Usage

history <cr>

General

The history contains the last 100 commands. This is not configurable.

Example

history

Output Format

Table.

Column
Description

Index

The index of the command. Index 1 refers to the previous command.

Command

The string of the command.


Clear History

Property
Description

Name

Clear history.

Description

Clear the command list stored in the history buffer.

Mode

all modes

Usage

history clear<cr>

General

Example

history clear

Output Format

None.


Access History

Property
Description

Name

Access history.

Description

Runs against a command in the history buffer.

Mode

all modes

Usage

history <integer> <cr>

General

Specifying 1 indicates the last command (not including the current history command), specifying 2 indicates the command before that, and so on.

Example

history 3

Output Format

None.


Execute Script

Property
Description

Name

Execute script.

Description

Run a script file of Cisco ANA shell commands.

Mode

All modes.

Usage

run <filename> [async] [silent] <cr>

General

The scripts must reside on the UNIX machine running the Cisco ANA shell in the directory /Main. This directory resides under the directory where the system was installed. The files should be transferred to this directory or its subdirectories using FTP. If a script resides in a subdirectory of /Main, include the relative path with the name of the script.

The silent option suppresses any output that the command sends to the terminal.

Note You can run the script in the background by appending & to the command.

Example

run provision.cmd

run scripts/provision.cmd

Output Format

None.


Node Management

This section describes the commands needed to manage a unit node. Unit node management includes management of the AVM processes and VNEs within the AVMs. Topics include:

AVM Management

VNE Management

AVM Management

AVM management commands include:

Show AVM List

Show AVM VNEs

Show AVM List

Property
Description

Name

Show AVM list.

Description

Show a list of AVMs with their minimum set of properties.

Mode

manage

Usage

show [unit [<IPAddress>]] avm <cr>

General

If an IP address is specified, this command shows AVMs on the indicated machine only. If no IP address is specified, this command shows AVMs on all machines.

If no unit is specified, the command refers to the current machine.

Example

show unit avm <cr>

Output Format

Table.

Column
Description

Machine

IP address of the machine where the AVM resides.

ID

AVM ID.

PID

Process ID.

Port

Management port.

Uptime

Process uptime (date format).

Version

AVM version.


Show AVM VNEs

Property
Description

Name

Show AVM VNEs.

Description

List all VNEs for a specific AVM.

Mode

manage

Usage

show [unit <IPAddress>] avm <integer> | all agent [detailed] <cr>

General

Lists all VNEs for the specified AVM.

If no unit is given, the command refers to the current machine.

If detailed is not specified, only DAs are displayed. Otherwise, all agent types (Device Agent [DA], Collector Agent [CA], and Instrumentor Agent [IA]) are displayed.

The argument all refers to all AVMs in the current machine.

The command also displays configured VNEs, which are configured in the XML but are not loaded. In this scenario, all nonrelevant fields are empty.

Example

show unit 192.168.2.10 avm 32 agent

Output Format

Table.

Column
Description

IP address

VNE leading IP address.

Type

Agent type: DA, IA, or CA.

State

VNE state: idle, wait, block, running, or configured.

Runtime

The total time spent by the VNE processing messages.

Wait time

The total time spent by the VNE waiting to process messages.

Last run

The last time the VNE visited the scheduler. Units are milliseconds relative to now.

Transport address

The VNE transport address in hexadecimal format.

Parent

Parent VNE. Transport address of the parent VNE.


VNE Management

VNE management commands include:

Show All VNEs

Show VNE Information

Add AVM

Remove AVM

Load AVM

Unload AVM

Add VNE

Remove VNE

Load VNE

Unload VNE

Add Static Topology Link

Remove Static Topology Link

Show All VNEs

Property
Description

Name

Show all VNEs in the unit.

Description

Show the basic information for all VNEs for all AVMs on the unit.

Mode

manage

Usage

show agent [detailed] <cr>

General

If detailed is not specified, only DAs are displayed. Otherwise, all agent types (DA, CA, and IA) are displayed.

Example

show agent <cr>

Output Format

See Show AVM VNEs.


Show VNE Information

Property
Description

Name

Show VNE information.

Description

Show the information for a specific VNE.

Mode

manage

Usage

show agent <IPAddress | name> <cr>

General

The parameter can be the leading IP address of the VNE or the device name.

Example

show agent 192.168.2.2 <cr>

Output Format

Paragraph.

Field
Description

IP Address

VNE leading IP address.

Type

Agent type: DA, IA, or CA.

Machine

IP address of the machine where the VNE is installed.

AVM

AVM number where the VNE is installed.

Transport address

The transport address of the VNE in hexadecimal format.

State

VNE state: idle, wait, block, running, or configured.

Runtime

The total time spent by the VNE processing messages.

Wait time

The total time spent by the VNE waiting to process messages.

Last run

The last time the VNE visited the scheduler. Units are milliseconds relative to now.

Parent

Parent VNE. Transport address of the parent VNE.


Add AVM

Property
Description

Name

Add AVM.

Description

Add a new AVM to a unit.

Mode

manage

Usage

unit <IPAddress> avm <integer> add <cr>

General

The integer parameter represents the ID of the AVM to be added.

Example

unit 192.168.2.10 avm 32 add

Output Format

None.


Remove AVM

Property
Description

Name

Remove AVM.

Description

Remove an AVM from a unit machine.

Mode

manage

Usage

unit <IPAddress> avm <integer> remove<cr>

General

The integer parameter represents the ID of the AVM to be deleted.

Example

unit 192.168.2.10 avm 32 remove

Output Format

None.


Load AVM

Property
Description

Name

Load AVM.

Description

Add a configured AVM to the unit bootstrap list.

Mode

manage

Usage

unit <IPAddress> avm <integer> load <cr>

General

The integer parameter represents the ID of the AVM to be loaded.

The newly loaded AVM starts immediately and will be started in all consecutive restarts of the system.

Example

unit 192.168.2.10 avm 32 load

Output Format

None.


Unload AVM

Property
Description

Name

Unload AVM.

Description

Remove an AVM from the bootstrap list.

Mode

manage

Usage

unit <IPAddress> avm <integer> unload <cr>

General

The AVM is automatically stopped if it is currently executing.

The integer parameter represents the ID of the AVM to be unloaded.

Example

unit 192.168.2.10 avm 32 unload

Output Format

None.


Add VNE

Property
Description

Name

Add VNE.

Description

Add a VNE to the configuration database of a given AVM.

Mode

manage

Usage

agent <IPAddress> add unit <IPAddress> avm <integer> name <name> vendor <string> type <string> <cr>

General

If no name is given, the IP address is used as the device name.

Example

agent 192.168.2.3 add unit 192.168.2.10 avm 32 vendor alcatel type asam1000

Output Format

None.


Remove VNE

Property
Description

Name

Remove VNE.

Description

Remove a VNE from a given AVM.

Mode

manage

Usage

agent <IPAddress> remove <cr>

General

If the VNE is currently running, it stops.

If the VNE is loaded, it is unloaded from the bootstrap list.

Example

agent 192.168.2.3 remove

Output Format

None.


Load VNE

Property
Description

Name

Load VNE.

Description

The newly loaded VNE starts immediately and will be loaded every time the system restarts.

Mode

manage

Usage

agent <IPAddress> load <cr>

General

Example

agent 192.168.2.3 load

Output Format

None.


Unload VNE

Property
Description

Name

Unload VNE.

Description

Unload an VNE from the AVM bootstrap list. If the VNE is currently running, it is stopped before it is unloaded from the bootstrap list.

Mode

manage

Usage

agent <IPAddress> unload <cr>

General

Example

agent 192.168.2.3 unload

Output Format

None.


Add Static Topology Link

Property
Description

Name

Add static topology link.

Description

Add a static link between two devices in the network.

Mode

manage

Usage

topology link source <IPAddress> [shelf <integer>] module <integer> [submodule <integer>] port <integer> destination <IPAddress> [shelf <integer>] module <integer> [submodule <integer>] port <integer> add [unidirectional] <cr>

General

By default, the link is bidirectional and enabled automatically.

Unidirectional represents a unidirectional link.

Example

topology link source 192.168.2.3 module 1 port 1 destination 192.168.2.4 module 2 port 1 add

Output Format

None.


Remove Static Topology Link

Property
Description

Name

Remove static topology link.

Description

Remove an existing static topology link.

Mode

manage

Usage

topology link source <IPAddress> [shelf <integer>] module <integer> [submodule <integer>] port <integer> destination <IPAddress> [shelf <integer>] module <integer> [submodule <integer>] port <integer> remove [unidirectional] <cr>

General

Example

topology link source 192.168.2.3 module 1 port 1 destination 192.168.2.4 module 2 port 1 remove

Output Format

None.


Surveillance

This section describes the surveillance commands that are supported by the Cisco ANA shell interface.

Topics include:

Show Links

Drools Rules Management

Show Links

Property
Description

Name

Show links.

Description

Show the topological links managed by the unit.

Mode

enable

Usage

show link <cr>

General

Example

show link

Output Format

Table.

Column
Description

Index

Unique running index.

From

A-side location.

To

Z-side location.

State

Automatic, Static, Configured.


Drools Rules Management

For more information about the Drools Rules Engine, refer to the Cisco Active Network Abstraction 3.6.5 Administrator User Guide.

Topics in this section include:

Show All Rules

Show Specific Rules

Reload Rules

Validate Rule

Show All Rules

Property
Description

Name

Show rules.

Description

Show all rules.

Mode

enable

Usage

show rule

General

Example

show rule

Output Format

contextID, ruleName, isValid.


Show Specific Rules

Property
Description

Name

Show rules.

Description

Show rules of a specific context.

Mode

enable

Usage

show rule <contextID>

General

Example

show rule aaa

Output Format

contextID, ruleName, isValid.


Reload Rules

Property
Description

Name

Reload rules.

Description

Reloads all rules of a specific context.

Mode

config

Usage

rule <contextID> reload

General

Example

rule aaa reload

Output Format


Validate Rule

Property
Description

Name

Validate rule.

Description

Validate a specific rule.

Mode

Usage

rule <contextID> <ruleName> validate

General

Example

rule aaa bbb validate

Output Format