Using the CLI

Contents

1Using the CLI
1.1Starting an Administrative Session
1.2Displaying Help for a Command
1.3Navigating the CLI
1.4Recalling Previous Command Entries
1.5Editing Command Entries
1.6Modifying Output of show Commands
1.7Context-Specific show Commands

2

Operations Commands
2.1Monitoring Commands
2.2Administration Commands
2.3Troubleshooting, Performance Management, and Problem Recovery Commands
Copyright

© Ericsson AB 2009–2011. All rights reserved. No part of this document may be reproduced in any form without the written permission of the copyright owner.

Disclaimer

The contents of this document are subject to revision without notice due to continued progress in methodology, design and manufacturing. Ericsson shall have no liability for any error or damage of any kind resulting from the use of this document.

Trademark List
SmartEdge is a registered trademark of Telefonaktiebolaget LM Ericsson.
NetOp is a trademark of Telefonaktiebolaget LM Ericsson.

1   Using the CLI

This document describes the tasks and commands you use to navigate the command-line interface (CLI) to the SmartEdge router. It also describes how to display help for a command, recall previous command entries, and edit command entries.

This document applies to both the Ericsson SmartEdge® and SM family routers. However, the software that applies to the SM family of systems is a subset of the SmartEdge OS; some of the functionality described in this document may not apply to SM family routers.

For information specific to the SM family chassis, including line cards, refer to the SM family chassis documentation.

For specific information about the differences between the SmartEdge and SM family routers, refer to the Technical Product Description SM Family of Systems (part number 5/221 02-CRA 119 1170/1) in the Product Overview folder of this Customer Product Information library.

The CLI recognizes abbreviated forms of commands, so it only requires you to enter enough of any command or keyword to uniquely identify it.

The primary administrator interface to the SmartEdge router is the CLI. See Start an Administrative Session for detailed information.

Note:  
In the following descriptions, the term controller card applies to the Cross-Connect Route Processor (XCRP4), including the controller carrier card unless otherwise noted.

The term controller carrier card refers to the controller functions on the carrier card within the SmartEdge 100 chassis. The term I/O carrier card refers to the traffic card functions on the carrier card; these functions are compatible with the similar functions that are implemented on the traffic card that are supported on all other SmartEdge routers.


Note:  
In this section, the command syntax in the task table displays only the root command; for the complete command syntax, search for the command in the Command List to find the command reference documentation with the full description for the command.

1.1   Starting an Administrative Session

The primary administrator interface to the SmartEdge router is the CLI. You access the CLI from the console port or through a remote session (for example, Telnet or Secure Shell [SSH]) to monitor, administer, and troubleshoot the SmartEdge router. To access the SmartEdge router software and its CLI, use either of the following methods:

1.1.1   Telnet and SSH Sessions

If the management port has been configured, you can establish a Telnet or SSH session to the system. There are many tools that provide Telnet and SSH access to remote systems. These tools are beyond the scope of this document. In general, you must provide the system name (the hostname configured for the system) or IP address (the IP address configured for the system management port), as well as an administrator name and password.

Within the system, the maximum number of concurrent sessions permitted is either 32 or the sum of all sessions permitted for each context, whichever is smaller. If the maximum number of concurrent sessions permitted on the system is greater than the maximum number of permitted SSH sessions, the remaining sessions must be Telnet sessions. See the following configuration commands for more information: aaa authentication administrator and ssh server full-drop.

1.1.2   Console Sessions

The SmartEdge router provides default settings for local console sessions. You can customize these settings for the duration of the current session. To change the settings, see Performing Basic System Tasks. After you are logged on to the system, you have access to the CLI, based on the context to which you are logged on and the privilege level of your account.

1.1.3   Administrator Names and Passwords

To log on to the system using SSH:

To log on to the system using Telnet:

Note:  
The separator character between the admin-name and the ctx-name arguments is configurable and can be any of %, -, @, _, \\, #, and /. The default value is @, which is used throughout this document.

When you connect to the system either directly to the console or remotely to the management port, the password you enter is not echoed.

If you forget a password, you must delete the administrator account and create a new one; there is no way to modify the password for an administrator account.

If you forget all passwords on the system, you must perform the password discovery procedure described in Recovering Passwords.

1.2   Displaying Help for a Command

You can access the online Help for the CLI in the following ways:

Table 1 lists these commands; enter either command in any mode.

Table 1    Access Online Help

Task

Root Command

Obtain help for the current command.

counters (VPLS)

Obtain help for using the ? command.

help

Note:  
To enter the ? character as part of a command, when it is not a request for online Help, enter the Esc character followed by the ? character.

1.3   Navigating the CLI

To navigate the CLI, perform the tasks described in Table 2.

Table 2    Navigate the CLI

Task

Root Command

Return the privilege level for the current exec session to the initial privilege level configured for the current administrator account.


When you create the account, the initial privilege level is specified.


Enter this command in exec mode.

disable

Change the current privilege level for an exec session while in exec mode.


You can specify a level up to the level specified for your account.


Enter this command in exec mode.

enable

Return to exec mode while in any configuration mode.

end

Terminate the current CLI session while in exec mode. Enter this command in exec mode.

show configuration

Move up one level in the configuration mode hierarchy while in a configuration mode; return to exec mode while in global configuration mode. Enter this command in any configuration mode.

exit

Enter global configuration mode. Enter this command in exec mode.

configure

Displays the current configuration of the SmartEdge router or the contents of a previously saved configuration file on the local file system. Enter this command in any configuration mode.

show configuration

Display the command history for the current session. Enter this command in any configuration mode.

show history

Display outstanding transactions for other administrators or internal processes. Enter this command in any configuration mode.

show transaction

Enter a configuration mode from another configuration mode. (1)

 

(1)  Commands to enter various configuration mode. See the Command List or the specific document for the mode you plan to access.


1.4   Recalling Previous Command Entries

Table 3 lists two Emacs-style command keyboard sequences that allow you to step through previously entered commands.

Table 3    Recall Previously Entered Commands

Keyboard

Description

Ctrl + p or up arrow

Recalls previous command in the command history.

Ctrl + n or down arrow

Recalls next command in the command history.

1.5   Editing Command Entries

Table 4 lists additional Emacs-style command keyboard sequences.

Table 4    Additional Emacs-Style Keyboard Sequences

Keyboard

Description

Ctrl+f or right arrow

Moves cursor forward one character.

Ctrl+b or left arrow

Moves cursor backward one character.

Esc+f

Moves cursor forward one word.

Esc+b

Moves cursor backward one word.

Ctrl+a

Moves cursor to beginning of line.

Ctrl+e

Moves cursor to end of line.

Ctrl+k

Deletes to end of line.

Ctrl+u

Deletes to beginning of line.

Ctrl+d

Deletes character.

Esc+d

Deletes word.

Ctrl+c

Quits editing the current line.

Ctrl+l

Refreshes (redraws) the current line.

Ctrl+t

Transposes current character with previous.

For more information on Emacs key bindings, see the GNU Emacs documentation available at http://www.gnu.org.

1.6   Modifying Output of show Commands

All show commands accept a common set of keywords and arguments called modifiers that you can use to refine the command output. For example, you can specify the line number at which the output is to begin, output only lines containing certain patterns, and apply filtering criteria that pass only those lines you want to see.

This section describes the syntax of show command output modifiers and how to get help for the grep command in the CLI. It also provides examples of a show command displaying lines before and after a pattern, a show command displaying lines that include a pattern, and a show command displaying lines that match a grep pattern.

1.6.1   Syntax of show Command Output Modifiers

The syntax for the output modifiers is as follows:

[| {begin [before lines] [after lines] pattern | count | exclude pattern | include pattern | join-lines | {grep [options options] | pattern} | save filename}]

Table 5 describes how each modifier affects the show command output.

Table 5    Modifier Syntax Descriptions

Modifier

Description

|

Modifies the output with the keywords that follow; that is, pipes the output of the show command into keyword-specified functions that control which lines of the output display.

begin pattern

Displays output beginning at the first occurrence of text matching the specified pattern. Surround groups of words that must be matched as a unit with double quotes. The pattern must be a regular expression. For more information on regular expressions, see the GNU documentation available at http://www.gnu.org.

before lines

Optional. Number of lines before the first line containing the matching pattern to display.

after lines

Optional. Number of lines after the first line containing the matching pattern to display.

count

Counts the number of lines generated by the show command but does not display the lines.

exclude pattern

Excludes all lines that contain text that matches the specified pattern from the display.

include pattern

Displays only the lines that contain text that matches the specified pattern.

join-lines

Optional. Temporarily arranges (concatenates) all lines of a record entry (circuit, route, subscriber, and so on.) from a multi-line output into a single-line output.


This keyword is convenient when using exclude and grep keywords. Not all commands will return concatenated output when the join-lines keyword is issued. For output examples, see Section 1.6.6.

grep pattern

Displays only the lines that contain text that matches the specified pattern. The pattern must be a regular expression. For more information on regular expressions, see Help for the grep Command in the CLI.

options options

Optional. UNIX grep command options.

save filename

Output saved to the specified file name.

1.6.2   Help for the grep Command in the CLI

You can get help for the grep (global regular expression print) command by entering grep ? or grep --help after a show command at the command line. For more information on the grep command options, see the GNU grep documentation available at http://www.gnu.org.

The following example displays using regular CLI help to understand the syntax of the grep command:

[local]Redback#show port counters | grep ?
  WORD     Pattern to match
  options  Grep options starting with a hyphen
[local]Redback#show port counters | grep 4/2 ?
  |     Output Modifiers
<cr>

To get more detailed help, enter the --help keyword after adding the grep command to a show command as in the following example:

[local]Redback#show hardware card 4/1 | grep --help
usage: grep [-[ABC] num] [-EFGHILVZabcdhilnoqrsvwxz] [-D action] [-d action] [-e pattern] [-f file]

Table 6 describes the grep command options:

Table 6    Grep Command Option Descriptions

Syntax Element

Description

[ABCnum

Regular expression to match, starting with a hyphen. It can contain capital letters and numbers.

-EFGHILVZabcdhilnoqrsvwxz

Regular expression, starting with a hyphen, which can contain upper and lower case letters.

-D action

Grep option, indicating the action to take with devices. Actions could be read (the default) or skip.

-d action

Grep option indicating the action to take with directories. Actions could be read (the default), skip, or recurse (reads all files under each directory, recursively).

-e pattern

Pattern (regular expression) to match.

-f file

Grep command option followed by input file name.

1.6.3   Example of the show Command Displaying Lines Before and After a Pattern

The following example displays all lines from the output for the show configuration command (in any mode) beginning with the line before the first line that contains the word (pattern), ospf, and including the 6 lines after the first occurrence of the pattern:

[local]Redback#show configuration | begin before 1 after 6 ospf 
router ospf 64001
  spf-timers 1 1
  area 0.0.0.0
   interface 10.100.11.10
  area 0.0.0.11
   interface 10.100.11.27
   interface 10.100.11.49

1.6.4   Example of the show Command Displaying Lines that Include a Pattern

The following example displays all lines in the current configuration file that contain the word (pattern), port:

[local]Redback#show configuration | include port 

card ge-10-port 1
card oc12e-4-port 2
card gigaether-4-port 3
port ethernet 1/1
port ethernet 1/2
port ethernet 1/3
port ethernet 1/4
port pos 2/1
port pos 2/2
port pos 2/3
port pos 2/4

1.6.5   Example of the show Command Displaying Lines that Match a grep Pattern

The following example takes the output of show port counters command with the live keyword and pipes it into the grep command. Next, the grep command filters what it receives and outputs only the lines that contain atm, ethernet, or rate. (The -E option interprets the pattern as an extended regular expression where the pipe character ( | ) is a logical OR operator.) The output of the grep command is received by the exclude keyword, which removes all lines containing the pattern interval and outputs the remainder to the display:

[local]Redback#show port counters live | grep option -E
 'atm|ethernet|rate' | exclude interval 
1/1 atm  
send packet rate : 0.00 send bit rate : 0.00  
recv packet rate : 0.00 recv bit rate : 0.00  
1/2 atm  
send packet rate : 0.00 send bit rate : 0.00
recv packet rate : 0.00 recv bit rate : 0.00
1/3 atm
send packet rate : 0.00 send bit rate : 0.00
recv packet rate : 0.00 recv bit rate : 0.00
1/4 atm  
send packet rate : 0.00 send bit rate : 0.00
recv packet rate : 0.00 recv bit rate : 0.00  

1.6.6   Example of the show Command Displaying Lines using the join-lines Keyword

The following examples display various ways the join-lines keyword can be used to output record entries.

The following output is that of the show circuit count command without the join-lines keyword.

[local]Redback#show circuit count
Circuit                               Packets/Bytes Sent Packets/Bytes Received
1/1                                                    0                      0
                                                       0                      0
4/1:1                                                  0                      0
                                                       0                      0
4/1                                                    0                      0
                                                       0                      0
5/1                                                    0                      0
                                                       0                      0
5/3                                                    0                      0
                                                       0                      0
5/4                                                    0                      0
                                                       0                      0
6/1                                                    0                      6
                                                       0                    360
12/2                                                   0                      0
                                                       0                      0
14/1                                                   0                      0
                                                       0                      0

When the exclude pattern keyword is piped with the join-lines keyword, the record(s) that do not contain the pattern 2 is output.

[local]Redback#show circuit count | join-lines | exclude 2 
Circuit                               Packets/Bytes Sent Packets/Bytes Received
1/1                                                    0                      0
                                                       0                      0
4/1:1                                                  0                      0
                                                       0                      0
4/1                                                    0                      0
                                                       0                      0
5/1                                                    0                      0
                                                       0                      0
5/3                                                    0                      0
                                                       0                      0
5/4                                                    0                      0
                                                       0                      0
6/1                                                    0                      6
                                                       0                    360
14/1                                                   0                      0
                                                       0                      0

When the grep pattern command is piped with the join-lines keyword, the record(s) containing the pattern 00:30:88:01:cc:00 is output.

[local]Redback#show circuit details | join-lines | grep 00:30:88:01:cc:00
Circuit: 6/1, internal id: 1/1/29, state: Up
----------------------------------------------------------
interface bound   : eth10@3
bind type         : interface
admin state       : 0                 hardware address  : 00:30:88:01:cc:00 
media type        : ethernet          encap type        : ethernet          
mode type         : 0x1               port type         : ethernet          
mtu size          : 1500              cfg mtu size      : 1500              
ipv6 mtu size     : 1500              ipv6 cfg mtu size : 1500              
cct speed         : 100000            cct rx speed      : 0                 
cct flags (attr)  : 0x0               cct flags2 (attr) : 0x0               
L3 proto flags    : 0x0               L3 proto valid    : NO                
L3 v4 proto       : DISABLED          L3 v6 proto       : DISABLED          
L3 v4 proto       : DOWN              L3 v6 proto       : DOWN              
slot mask         : 0x0               parent slot mask  : 0x0               
ppa cct clear     : FALSE             
if flags          : 0x0               aaa index         : 0x0               
profile id        : 0                 version           : 270               
nd profile        : 0                 h node id         : 0                 
lg_id             : 0                 spg_id            : 0                 
internal handle   : 2/10:1023:63/1/1/29

1.7   Context-Specific show Commands

Some show commands are context-specific. For these commands, enter the context ctx-name command before entering the show command.

2   Operations Commands

Operations commands are characterized as follows:

For more information about specific commands, see the Command List.

Operations commands are described in the following sections.

2.1   Monitoring Commands

Monitoring commands allow you to view the state of one or more feature elements. Table 7 lists the types of monitoring commands and examples of each type.

Table 7    Types of Monitoring Commands

Type of Command

Example

Function

Monitor a system component

show chassis


show hardware

Displays status of cards installed in the chassis.


Displays detailed card hardware information.

 

show port perf-monitor

Displays configuration and performance statistics for one or more ports.

 

show circuit counters

Displays statistics for one or more circuits.

Monitor the status of a process and provide continuous updates.

monitor process

Enter this command in exec mode.

Monitor files in memory

directory


pwd

Displays a list of files in the specified directory. Enter this command in exec mode.


Displays the current working directory. Enter this command in exec mode.

Monitor a process

show process

Displays current status of a process. Enter this command in all modes.

Display a software release or version

show release


show version

Displays release and installation information. Enter this command in all modes.


Displays the version of the currently running OS. Enter this command in all modes.

Monitor an administrator session

show privilege


show public-key

Displays the current privilege level for the current session..


Displays the public keys for an administrator.


Enter these commands in all modes.

System monitoring

show clock-source

Displays clock source information. Enter this command in all modes.

 

show configuration

Displays the configuration commands for a feature. Enter this command in all modes.

 

show memory

Displays memory statistics. Enter this command in all modes.

 

show redundancy

Displays state of the standby controller card. Enter this command in all modes.

 

show system alarm

Displays system alarms at one or more levels. Enter this command in all modes.

2.2   Administration Commands

Administration commands allow you to perform routine maintenance. Table 8 lists the types of administration commands that you enter in exec mode and examples of each type.

Table 8    Types of Administration Commands

Type of Command

Example

Function

Manage a device

mount /md


shutdown

Mounts a mass-storage device.


Disables a port (stop operations on it).

Manage a feature

clear circuit counters

Clears circuit counters for one or more circuits. Enter this command in exec mode.

Manage Files

delete


mkdir

Deletes a file. Enter this command in exec mode.


Create a directory. Enter this command in exec mode.

Manage processes

process restart

Restarts a process. Enter this command in exec mode.

Upgrade software

release upgrade

Installs another release. Enter this command in exec mode.

Manage administrator sessions

enable


ssh

Modifies the privilege level for the current session. Enter this command in exec mode.


Establishes an SSH session from the SmartEdge router to a host. Enter this command in exec mode.

Manage system

bulkstats force transfer


clock set

Immediately transfers the bulkstats data file to the configured receiver. Enter this command in exec mode.


Sets the system time. Enter this command in exec mode.

2.3   Troubleshooting, Performance Management, and Problem Recovery Commands

Troubleshooting commands allow you to view information or determine the low-level state of a feature element. Table 9 lists the types of troubleshooting and problem recovery commands, which are run in various modes, and examples of each type.

For more information about troubleshooting and data collection, see the General Troubleshooting Guide, BRAS Troubleshooting Guide, Debugging, and Data Collection Guideline for the SmartEdge Router.

Table 9    Types of Troubleshooting and Problem Recovery Commands

Type of Command

Example

Function

Troubleshoot a feature

debug snmp

Initiates internal monitoring of a feature and the generation of messages, which can be stored in the system log buffer or displayed in real time.


Enter this command in exec mode.

Collect system-wide data

show tech-support

Collects system-wide information (this macro has a basic form for general troubleshooting which is required to be saved and sent to customer support when logging a customer support request (CSR). It also has optional keywords for collecting data about more focussed problems such as ASE cards and many SmartEdge OS processes.


Enter this command in exec mode.

troubleshoot system or recover from a problem

reload


save seos-core

Reloads the operating system. Enter this command in exec mode.


Saves a core dump of the operating system to a pair of files on the mass-storage device /md partition. Enter this command in exec mode.

 

ping

Tests IP connectivity to a host. Enter this command in exec mode.

 

format microdrive(1)

Reformats the mass-storage device.

 

diag on-demand

Initiates on-demand diagnostics for a traffic card.


Enter format microdrive and the diag on-demand commands in exec mode.

Troubleshoot process or recover from a problem

process set

Sets process management parameters for a specified process. Enter this command in exec mode.

 

process coredump

Initiates a core dump of a process, and saves it in a crash file. Enter this command in exec mode.

 

process restart

Restarts a process that has stopped. Enter this command in exec mode.

(1)  This command is supported only on the SM family chassis 400, 600, 800, 1200, and 1200H routers. Use the format media-device command (in exec mode) on the SM family chassis 100 router.


For more information about these commands, see Command List.

2.3.1   Using Debugging Commands

Use debugging commands to enable the generation of messages that will help in troubleshooting problems.

To store or display debug messages, configure your system as follows:

  1. To store messages in the system log buffer, use the logging debug command (in global configuration mode).
  2. To display the messages, use the show log command (in exec mode).
  3. To display messages in real time when connected through the console port, enter the logging console command (in context configuration mode).
  4. To display them when connected through a Telnet or Secure Shell (SSH) session, use the terminal monitor command (in exec mode).
Note:  
For more information about logging commands and the terminal monitor command, see Command List.


 Caution! 
Risk of performance loss. Enabling the generation of debug messages can severely affect system performance. To reduce the risk, exercise caution when enabling the generation of any debug messages on a production system.