Catalyst 2900 XL and Catalyst 3500 XL Software Configuration Guide, 12.0(5)WC5, 12.0(5)WC6
Getting Started with the CLI

Table Of Contents

Getting Started with the CLI

Command Usage Basics

Accessing Command Modes

Specifying Ports in Interface Configuration Mode

Abbreviating Commands

Using the No and Default Forms of Commands

Redisplaying a Command

Getting Help

Command-Line Error Messages

Accessing the CLI

Accessing the CLI from a Browser

Saving Configuration Changes

Where to Go Next


Getting Started with the CLI


This chapter provides information that you should know before using the Cisco IOS command-line interface (CLI). If you have never used IOS software or if you need a refresher, take a few minutes to read this chapter before reading the rest of this guide.

Command Usage Basics

Command-Line Error Messages

Accessing the CLI

Saving Configuration Changes

Where to Go Next

This switch software release is based on Cisco IOS Release 12.0. It has been enhanced to support a set of features for the Catalyst 2900 XL and Catalyst 3500 XL switches. This chapter provides procedures for using only the commands that have been created or changed for these switches. The switch command reference provides complete descriptions of these commands. This chapter does not provide Cisco IOS Release 12.0 commands and information already documented in the Cisco IOS Release 12.0 documentation on Cisco.com.

Command Usage Basics

This section provides these topics:

"Accessing Command Modes" section

"Specifying Ports in Interface Configuration Mode" section

"Abbreviating Commands" section

"Using the No and Default Forms of Commands" section

"Redisplaying a Command" section

"Getting Help" section

For complete information about CLI usage, refer to the Cisco IOS Release 12.0 documentation on Cisco.com.

Accessing Command Modes

The CLI is divided into different modes. The commands available to you at any given time depend on which mode you are in. Entering a question mark (?) at the system prompt provides a list of commands for each command mode.

When you start a session on the switch, you begin in user mode, often called user EXEC mode. Only a limited subset of the commands are available in user EXEC mode. For example, most of the user EXEC commands are one-time commands, such as show commands, which show the current configuration status, and clear commands, which clear counters or interfaces. The user EXEC commands are not saved when the switch reboots.

To have access to all commands, you must enter privileged EXEC mode. Normally, you must enter a password to enter privileged EXEC mode. From this mode, you can enter any privileged EXEC command or enter global configuration mode.

Using the configuration modes (such as global, VLAN, and interface), you can make changes to the running configuration. If you save the configuration, these commands are stored when the switch reboots. To access the various configuration modes, you must start at global configuration mode. From global configuration mode, you can enter interface configuration mode and line configuration mode.

Table 3-1 describes the main command modes supported on the switch, the prompt you see in that mode, and how to exit the mode. The examples in the table use the host name switch.

Table 3-1 Command Modes Summary 

Modes  
Access Method
Prompt
Exit Method
About This Mode1

User EXEC

Begin a session with your switch.

switch>

Enter logout or quit.

The EXEC commands available at the user level are a subset of those available at the privileged level.

Use this mode to

Change terminal settings.

Perform basic tests.

Display system information.

Privileged EXEC

Enter the enable command while in user EXEC mode.

switch#

Enter disable to exit.

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

If your system administrator has set a password, you are prompted to enter it before being granted access to privileged EXEC mode. The password does not appear on the screen and is case sensitive.

Global configuration

Enter the configure command while in privileged EXEC mode.

switch(config)#

To exit to privileged EXEC mode, enter exit or end, or press Ctrl-Z.

Use this mode to configure parameters that apply to your switch as a whole.

Config-lre-sequence

While in global configuration mode, enter lre sequence <sequence_name>

config-seq#

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

To return to privileged EXEC mode, press Ctrl-Z or enter end.

Use this mode to create new sequences or to add or to delete profiles in a user-defined sequence.

Config-lre-controller

While in global configuration mode, enter controller lre <chipset_number>

config-controller#

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

To return to privileged EXEC mode, press Ctrl-Z or enter end.

Use this mode for all upgrade related commands (for further information on upgrading, see Upgrading LRE Switch Firmware).

VLAN database

Enter the vlan database command while in privileged EXEC mode.

switch(vlan)#

To exit to privileged EXEC mode, enter exit.

Use this mode to configure VLAN-specific parameters.

Interface configuration

Enter the interface command (with a specific interface) while in global configuration mode.

switch(config-if)#

To exit to global configuration mode, enter exit.

To exist to privileged EXEC mode, enter Ctrl-Z or end.

Use this mode to configure parameters for the switch and LRE CPE Ethernet ports.

Line configuration

Specify a line with the line vty or line console command while in global configuration mode.

switch(config-line)#

To exit to global configuration mode, enter exit.

To exit to privileged EXEC mode, enter Ctrl-Z or end.

Use this mode to configure parameters for the terminal line.

1 For any of the modes, you can see a comprehensive list of the available commands by entering a question mark (?) at the prompt.


Specifying Ports in Interface Configuration Mode

To configure a port, you need to specify the interface type, slot, and switch-port number with the interface configuration command. For example, to configure port 4 on a switch, you enter:

switch(config)#interface fa 0/4

To configure port 4 on a 10/100 module in the first module slot on the switch, you enter:

switch(config)#interface fa 1/4

Interface type—Each switch in the Catalyst 2900 series XL and Catalyst 3500 series XL platform supports different types of interfaces. To display a complete list of the interface types supported on your switch, enter the interface ? command from the global configuration mode. This example shows what the interface ? command displays on a Catalyst 2900 LRE XL switch:

lreswitch(config)#interface ?
  FastEthernet       FastEthernet IEEE 802.3
  LongReachEthernet  Ethernet over VDSL
  Multilink          Multilink-group interface
  Port-channel       Ethernet Channel of interfaces
  VLAN               Switch VLAN Virtual Interface
  Virtual-TokenRing  Virtual TokenRing


Note The multilink, port-channel, and virtual-Token Ring interface types are not supported on the Catalyst 2900 XL and Catalyst 3500 XL switches.


Slot numberThe slot number on the switch. On the modular Catalyst 2900 XL switches, the slot number is 1 or 2. On non-modular Catalyst 2900 XL and Catalyst 3500 XL switches, the slot number is 0.

Port number—The number of the physical port on the switch. Refer to your switch for the port numbers.

Abbreviating Commands

You only have to enter enough characters for the switch to recognize the command as unique. This example shows how to enter the show configuration command:

Switch# show conf

Using the No and Default Forms of Commands

Almost every configuration command has a no form. In general, use the no form to

Disable a feature or function.

Reset a command to its default values.

Reverse the action of a command. For example, the no shutdown command reverses the shutdown of an interface.

Use the command without the no form to reenable a disabled feature or to reverse the action of a no command.

Configuration commands can also have a default form. The default form of a command returns the command setting to its default. Most commands are disabled by default, so the default form is the same as the no form. However, some commands are enabled by default and have variables set to certain default values. In these cases, the default command enables the command and sets variables to their default values.

Redisplaying a Command

To redisplay a command you previously entered, press the up-arrow key. You can continue to press the up-arrow key for more commands.

Getting Help

Entering a question mark (?) at the system prompt displays a list of commands for each command mode. When using context-sensitive help, the space (or lack of a space) before the question mark (?) is significant. To obtain a list of commands that begin with a particular character sequence, enter those characters followed immediately by the question mark (?). Do not include a space. This form of help is called word help, because it completes a word for you.

To list keywords or arguments, enter a question mark (?) in place of a keyword or argument. Include a space before the ?. This form of help is called command syntax help, because it reminds you which keywords or arguments are applicable based on the command, keywords, and arguments you already have entered.

You can also obtain a list of associated keywords and arguments for any command, as shown in Table 3-2.

Table 3-2 Help Summary 

Command
Purpose

help

Obtain a brief description of the help system in any command mode.

abbreviated-command-entry?

Obtain a list of commands that begin with a particular character string. For example:

Switch# di?
dir  disable  disconnect 

abbreviated-command-entry<Tab>

Complete a partial command name. For example:

Switch# sh conf<tab>
Switch# show configuration

?

List all commands available for a particular command mode. For example:

Switch> ?

command ?

List the associated keywords for a command. For example:

Switch> show ?

command keyword ?

List the associated arguments for a keyword. For example:

Switch(config)# cdp holdtime ?
  <10-255>  Length of time (in sec) that receiver must keep this packet 

Command-Line Error Messages

Table 3-3 lists some error messages that you might encounter while using the CLI.

Table 3-3 Common CLI Error Messages

Error Message
Meaning
How to Get Help
% Ambiguous command: "show con"

You did not enter enough characters for your switch to recognize the command.

Reenter the command followed by a space and a question mark (?).

The possible keywords that you can enter with the command appear.

% Incomplete command.

You did not enter all of the keywords or values required by this command.

Reenter the command followed by a space and a question mark (?).

The possible keywords that you can enter with the command appear.

% Invalid input detected at `^' 
marker.

You entered the command incorrectly. The caret (^) marks the point of the error.

Enter a question mark (?) to display all of the commands that are available in this command mode.

The possible keywords that you can enter with the command appear.


Accessing the CLI

This procedure assumes you have already assigned IP information and password to the switch or command switch. You can assign this information to the switch in these ways:

Using the setup program, as described in the release notes (http://www.cisco.com/univercd/cc/td/doc/product/lan/c2900xl/index.htm).

Manually assigning an IP address and password, as described in the "Changing IP Information" section and "Assigning Passwords and Privilege Levels" section.

Considerations for assigning this information to a command switch and cluster members are described in the "IP Addresses" section and the "Passwords" section.

To access the CLI from a terminal session, follow these steps:


Step 1 Start up the emulation software (such as ProComm, HyperTerminal, tip, or minicom) on the management station.

Step 2 If necessary, reconfigure the terminal-emulation software to match the switch console port settings (default settings are 9600 baud, no parity, 8 data bits, and 1 stop bit).

Step 3 Establish a connection with the switch by either

Connecting the switch console port to a management station or dial-up modem. For information about connecting to the console port, refer to the switch hardware installation guide.

Using any Telnet TCP/IP package from a remote management station. The switch must have network connectivity with the Telnet client, and the switch must have an enable secret password configured. For information about configuring the switch for Telnet access, see the "SNMP Network Management Platforms" section.

The switch supports up to seven simultaneous Telnet sessions. Changes made by one Telnet user are reflected in all other Telnet sessions.


After you connect through the console port or through a Telnet session, the User EXEC prompt appears on the management station.

Accessing the CLI from a Browser

This procedure assumes you have met the software requirements, (including browser and Java plug-in configurations) and have assigned IP information and a Telnet password to the switch or command switch, as described in the release notes (http://www.cisco.com/univercd/cc/td/doc/product/lan/c2900xl/index.htm).


Caution Copies of the CMS pages you display are saved in your browser memory cache until you exit the browser session. A password is not required to redisplay these pages, including the Cisco Systems Access page. You can access the CLI by clicking Web Console - HTML access to the command line interface from a cached copy of the Cisco Systems Access page. To prevent unauthorized access to CMS and the CLI, exit your browser to end the browser session.

To access the CLI from a web browser, follow these steps:


Step 1 Start one of the supported browsers.

Step 2 In the URL field, enter the IP address of the command switch.

Step 3 When the Cisco Systems Access page appears, click Telnet to start a Telnet session.

You can also access the CLI by clicking Web Console - HTML access to the command line interface from the Cisco Systems Access page. For information about the Cisco Systems Access page, see the "Accessing CMS" section and the release notes (http://www.cisco.com/univercd/cc/td/doc/product/lan/c2900xl/index.htm).

Step 4 Enter the switch password.

The User EXEC prompt appears on the management station.


Saving Configuration Changes

The switch Flash memory stores the IOS image, the startup configuration file (config.txt file), and helper files.

The show command always displays the running configuration of the switch. When you make a configuration change to a switch or switch cluster, the change becomes part of the running configuration. The change does not automatically become part of the config.txt file in Flash memory, which is the startup configuration used each time the switch restarts. If you do not save your changes to Flash memory, they are lost when the switch restarts.

To save all configuration changes to Flash memory, you must enter the write memory command in privileged EXEC mode.


Note The write memory command does not apply to the Catalyst 1900 and Catalyst 2820 switches, which automatically save configuration changes to Flash memory as they occur.



Tip As you make cluster configuration changes, make sure you periodically save the configuration. The configuration is saved on the command and member switches.


Where to Go Next

Before configuring the switch, refer to these places for start-up information:

Switch release notes on Cisco.com (http://www.cisco.com/univercd/cc/td/doc/product/lan/c2900xl/index.htm):

CMS software requirements

Procedures for running the setup program

Procedures for browser configuration

Procedures for accessing CMS

"General Switch Administration"

The rest of this guide provides information about and CLI procedures for the software features supported in this release. For CMS procedures and window descriptions, refer to the online help.