cc/td/doc/product/dsl_prod/6200
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Using the Cisco IOS Command  Line  Interface

Using the Cisco IOS Command  Line  Interface

Cisco IOS software provides a command line interface (CLI) that allows you to configure and manage the Cisco 6200 advanced digital subscriber line access multiplexer (DSLAM). This chapter provides an overview of the Cisco IOS CLI and includes the following sections:

For more information on using the Cisco IOS, refer to the book Configuration Fundamentals Configuration Guide for Cisco IOS Release 11.3.

3.1 Using the CLI

You access the CLI from a terminal connected to the Cisco  6200 through the console port on the management processor card (MPC) or through a Telnet session. For information on setting up the console terminal, refer to the "Console Connection" section in Chapter  2. To set up an IP address (for use with a Telnet session), refer to the "Initial Configuration" section in Chapter  2 or to the "Changing the Ethernet Port Addresses" section in Chapter 4.

The Cisco IOS CLI consists of different command modes. On the Cisco 6200, the primary CLI command modes are

The commands available to you depend on which mode you are in. Entering a question mark (?) at the system prompt allows you to obtain a list of commands available for each command mode.

When you start a session on the Cisco 6200, you begin in user EXEC mode, where you have access to a limited number of commands. To access all commands and configuration modes you must enter privileged EXEC mode; this generally requires a password.

From privileged EXEC mode, you can enter global configuration mode. The commands in this mode allow you to change aspects of the running configuration that affect the system as a whole---for example, configure a new card or change a password. From global configuration mode, you can enter interface configuration mode, where you can make changes to individual interfaces.

3.1.1 User EXEC Mode

After you log in to the Cisco 6200, you are automatically in user EXEC command mode. The EXEC commands available at the user level are a subset of those available at the privileged level. The user EXEC mode commands allow you to connect to remote devices, change terminal settings on a temporary basis, perform basic tests, and list system information.

The user-level prompt consists of the host name followed by the angle bracket (>), for example:

c6200>

The host name can be changed during initial configuration (through use of the setup command). Refer to Chapter 2, "Installing the Cisco 6200" for information on the setup facility. You can also change the host name using the hostname global configuration command, which is described in Chapter 5, "Command Reference."

3.1.2 Privileged EXEC Mode

Because many of the privileged EXEC mode commands set operating parameters, access to this mode should be password protected to prevent unauthorized use. The privileged command set includes commands contained in user EXEC and high-level testing commands, as well as the configure command, which allows you to access the remaining command modes.

The privileged EXEC mode prompt consists of the devices's host name followed by the pound sign  (#).

c6200#

To enter privileged EXEC mode, perform the following task while in user EXEC mode:

Task Command

Enter privileged EXEC mode.

enable [password]

If the system administrator has set a password, you are prompted to enter it before being allowed access to privileged EXEC mode. The password is not displayed on the screen and is case sensitive. If a password has not been set, privileged EXEC mode can be accessed only from the Cisco 6200 console, not through a Telnet session. The system administrator uses the enable password and enable secret global configuration commands to set passwords that restrict access to privileged EXEC mode. These commands are described in Chapter 5, "Command Reference."

To return from privileged EXEC mode to user EXEC mode, perform the following task:

Task Command

Move from privileged EXEC mode to user EXEC mode.

disable

The following example shows how to access privileged EXEC mode:

c6200> enable Password: c6200#

3.1.3 Global Configuration Mode

Global configuration commands apply to features that affect the system as a whole, rather than just one protocol or interface. Use the configure terminal command in the privileged EXEC mode to enter global configuration mode.

To access global configuration mode, perform the following task while in privileged EXEC mode:

Task Command

At the terminal, from the privileged EXEC mode, enter global configuration mode.

configure terminal

To exit global configuration mode and return to privileged EXEC mode, use one of the following commands:

Task Command

Exit global configuration mode.

exit
end
Ctrl-Z

The following example shows how to access global configuration mode:

c6200# configure terminal Enter configuration commands, one per line. End with CNTL/Z. c6200(config)#

3.1.4 Interface Configuration Mode

Interface configuration commands modify the operation of an interface type, such as ATM or DSL.

To access interface configuration mode, perform the following task while in global configuration mode:

Task Command

From global configuration mode, enter interface configuration mode.

interface type slot/port

To exit interface configuration mode and return to global configuration mode, enter the exit command. To exit configuration mode and return to privileged EXEC mode, use the end command or the exit command, or enter Ctrl-Z.

In the following example, DSL (interface 2 on the card in slot 5) is about to be configured. The new prompt---c6200(config-if) #---indicates that you are in interface configuration mode.

c6200(config)# interface dsl 5/2 <CR> c6200(config-if)#

3.1.5 Summary of Main Command Modes

Table 3-1 summarizes the main command modes you will use on the Cisco 6200.


Table 3-1: Summary of Main Command Modes
Command Mode Access Method Prompt Exit Method

User EXEC

Default at log in.

c6200>

To exit User EXEC mode, use the logout command.

To enter privileged mode, use the enable command.

Privileged EXEC

From user EXEC mode, use the enable EXEC command.

c6200#

To exit to user EXEC mode, use the disable command.

To enter global configuration mode, use the configure terminal privileged EXEC command.

Global configuration

From privileged EXEC mode, use the configure terminal privileged EXEC command.

c6200(config)#

To exit to privileged EXEC mode, use the exit or end command or press Ctrl-Z.

To enter interface configuration mode, enter an interface configuration command.

Interface configuration

From global configuration mode, enter by specifying an interface with an interface command.

c6200(config-if)#

To exit to global configuration mode, use the exit command.

To exit to privileged EXEC mode, use the end or exit command or press Ctrl-Z.

3.1.6 Using the No and Default Forms of Commands

Most CLI commands have a no form. The no form disables a feature or function or returns it to a default value. To undo a no command, use the same command (with required parameters) without the keyword no.

The following example shows the command for entering interface configuration mode for interface  1 on the card in slot 5. The command is followed by the command for assigning the subscriber name "boston." The example also shows the no form of the command, which removes the subscriber name and sets other DSL parameters to their default values.

6200(config)# interface dsl 5/1 6200(config-if)# 6200(config-if)# dsl subscribername boston 6200(config-if)# 6200(config-if)# no dsl subscribername 6200(config-if)#

3.2 Online Help

Cisco IOS has several features to assist you monitor and configure the Cisco 6200. The system supports context-sensitive help and command syntax verification. In addition, Cisco IOS maintains a command history, to make it easier for you to recall commands.

3.2.1 Context-Sensitive Help

Entering a question mark (?) at the system prompt displays a list of commands available for the current command mode. You can also get a list of any command's associated keywords and arguments with the context-sensitive help feature.

To get help specific to a command mode, a command, a keyword, or argument, perform one of the following tasks:

Task Command Example

Obtain a brief description of the help system in any command mode. (See below.)

help

c6200> help

Help may be requested at any point in a command by entering a question mark '?'. If nothing matches, the help list will be empty and you must backup until entering a '?' shows the available options.

Two styles of help are provided:

1. Full help is available when you are ready to enter a command argument (e.g. 'show ?') and describes each possible argument.

2. Partial help is provided when an abbreviated argument is entered and you want to know what arguments match the input (e.g. 'show pr?'.)

List all commands that begin with a particular character string.

abbreviated-command-entry?

c6200# clo?
clock
c6200# clo

Complete a partial command name.

abbreviated-command-entry<Tab>

c6200# clo<tab>
c6200# clock

List all commands available for a particular command mode; some commands may not apply to your technical environment.

?

c6200# ?
Exec commands:
<1-99>                    Session number
access-enable      Create access list
access-template  Create access list
alarmcutoff          Freeze audibles.
cd                          Change current device
clear                      Reset functions

(Abbreviated example)

List keywords associated with a command.

command ?

c6200-lab# clock ?
set Set the time and date

List arguments associated with a keyword.

command keyword ?

c6200# clock set ?
hh:mm:ss                Current Time
c6200# clock set

You can abbreviate a command or keyword provided the abbreviation is not ambiguous. For example, you can abbreviate the show version command to sh ver. On the other hand, if you abbreviate the telnet command to te, you would get an "ambiguous command" error message because te could mean the telnet, terminal, or test command.

3.2.2 Command Syntax Help

The user interface returns an error indicator, a caret symbol (^), at the point in the command string where you have entered an incorrect command, keyword, or argument. If you enter an incomplete or incorrect command, the user interface returns an error message.

In the following example, context-sensitive help is used to check the syntax for setting the clock.

    1. The clock command followed by a question mark returns its keywords.

c6200# clock ? read-calendar Read the hardware calendar into the clock set Set the time and date update-calendar Update the hardware calendar from the clock c6200# clock

    2. The keyword followed by a question mark returns the syntax for entering the time.

c6200# clock set ? hh:mm:ss Current time c6200# clock set

    3. After you enter the time and press Enter, an error is returned. The system indicates that you need to provide additional arguments to complete the command.

c6200# clock set 13:32:00 % Incomplete command.

    4. Ctrl-P automatically repeats the previous command entry. If you enter a space and question mark after the time, additional arguments are returned.

c6200# clock set 13:32:00 ? <1-31> Day of the month MONTH Month of the year

    5. After you enter the date and press Enter, an error is returned. The caret symbol (^) and text indicate an error at 98.

c6200# clock set 13:32:00 19 May 98
                                                               ^
% Invalid input detected at '^' marker.

    6. To determine the correct syntax, enter the command up to the point where the error occurred and then enter a question mark.

c6200# clock set 13:32:00 19 May ? <1993-2035> Year c6200# clock set 13:32:00 19 May

    7. Once the correct syntax for the year is entered, the command can be executed.

c6200# clock set 13:32:00 19 May 1998

3.2.3 Command History Features

The CLI stores a history of commands that you have entered. This feature is particularly useful for recalling long or complex commands or entries. With the command history feature, you can perform the following tasks:

Set the Command History Buffer Size

By default, the system records ten command lines in its history buffer. To set the number of command lines that the system will record during the current terminal session, complete the following task in EXEC mode:

Task Command

Change the command history buffer size for the current terminal session.

terminal history [size number-of-lines]

The terminal no history size command resets the number of lines saved in the history buffer to the default of ten lines.

Display Command History Buffer

To recall commands from the history buffer, perform one of the following tasks:

Task Key Sequence/Command

Recall commands in the history buffer, beginning with the most recent command. Repeat the key sequence to recall successively older commands.

Press Ctrl-P or the up arrow key.1

Return to more recent commands in the history buffer after you have recalled commands with Ctrl-P or the up arrow key. Repeat the key sequence to recall earlier commands.

Press Ctrl-N or the down arrow key.1

While in EXEC mode, list the last several commands you have entered.

show history

1In general, these key sequences function only on ANSI-compatible terminals such as VT100s.

Disable the Command History Feature

The command history feature is automatically enabled. To disable it during the current terminal session, complete the following task in EXEC mode:

Task Command

Disable the command history feature for the current session.

terminal no history


hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1998 © Cisco Systems Inc.