cc/td/doc/product/lan/ms1548m
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Overview

Overview

This chapter defines the following aspects of the Cisco Enterprise Edition software command-line interface (CLI) commands of the Cisco 1548M Series Micro Switch 10/100:

Cisco CLI Command Reference Formats

Understanding Command Modes

The CLI commands for the Micro Switch are sorted into classes: Exec commands and configuration commands. Configuration commands are further categorized into three modes: global configuration, interface (and sub-interface) configuration, and line configuration. Figure 1-1 illustrates the class and mode hierarchy.


Figure 1-1: CLI Command Classes and Modes

Table 1-1 lists the command modes that are used in this guide, how to access each mode, the prompt you see in that mode, and how to exit that mode. The examples in the table use the hostname 1548.

.

Table 1-1: Command Modes Summary
Mode Access Method Prompt Exit Method About This Mode1

User Exec

Begin a session with your switch.

1548>

Enter the exit command.

This mode contains the nonpassword-protected Exec mode commands. Use this mode to:

  • Change terminal settings

  • Perform basic tests

  • Display system information

Privileged Exec

Enter the enable command while in user Exec mode.

1548#

To exit to user Exec mode, enter the disable command.

To enter global configuration mode, enter the configure command.

Use this mode to:

  • Configure your switch operating parameters.

  • Verify information.

To prevent unauthorized changes to your switch configuration, protect access to this mode with a password.

Global configuration

Enter the configure command while in privileged Exec mode.

1548(config)#

To exit to privileged Exec mode, enter the exit or end command, press Ctrl-C or Ctrl-Z.

To enter interface configuration mode, enter the interface command. To enter line configuration mode, enter the line command.

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

Interface configuration

Enter the interface command (with an interface number) while in the global configuration mode.

1548(config-if)#

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

To exit to privileged Exec mode, enter the end command, or press Ctrl-C or Ctrl-Z.

Use this mode to configure Ethernet and Fast Ethernet parameters for the switch interfaces.

Line configuration

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

1548(config-line)#

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

  • To enter privileged Exec mode, enter the end command, or press Ctrl-C or Ctrl-Z.

Use this mode to configure parameters for the terminal line.

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

The commands of each mode are accessible only to users with privileges assigned for the mode.

Enabling Passwords

Because many privileged-level Exec commands are used to set operating parameters, you should password-protect these commands to prevent unauthorized use.

Use two commands to do this:

For maximum security, the privileged and user Exec passwords should be different.

An enable password can contain from 4  to  8 alphanumeric characters. The passwords are case-sensitive, and the first character cannot be a number. Spaces are valid password characters; for example, two words is a valid password as long the string is inclosed in quotation marks.

Entering Configuration Mode

To make any configuration changes to your Micro Switch, you must be working in configuration mode. This section describes how to enter configuration mode while using a terminal or PC that is connected to your switch console port.

To enter configuration mode:

    1. After your switch boots ups, enter the enable command, and if you have configured your switch with an enable password, enter the password when you are prompted for it (the enable password does not show on the screen).

> enable
Password: <enable_password>
#
 

    2. Enter the config command to enter configuration mode, which is indicated by the (config)# in the prompt:

# config
(config)#
 

Using Commands

This section provides some tips about entering Cisco Enterprise Edition software CLI commands.

Abbreviating Commands

The CLI requires a minimum number of characters to uniquely identify a keyword in a command. For example, for the fictional commands catch and catalog, the minimum number of characters required to identify them are catc and cata, respectively. An error message appears if the keyword is ambiguous.

Command Completion

If you enter part of a keyword and press the Tab key, the CLI displays the remaining keyword characters to the point of a keyword ambiguity. For example, for the fictional commands catch and catalog, entering ca and pressing the Tab key displays the characters cat.

Command History

You can use the UP arrow or Ctrl-P key to display a history of your last 10 commands, beginning with the most recent. Exec and Configuration commands are each listed in their own history file and display when in their respective command mode. Use the DOWN arrow or Ctrl-N key to display the last entry you typed.

Command-Line Error Messages

Table 1-2 shows the five types of CLI error messages you are most likely to see:


Table 1-2: Common CLI Error Messages
Error Message Meaning
1548(config)# monitor-port

% Incomplete command

Incomplete command error message:

You did not enter all of the keywords or values required by this command. This example requires a port specification.

Reenter the command followed by a question mark with a space between the command and the question mark. The possible keywords that you can enter with the command are displayed.

1548# show interfaces fa 1/1

                       ^

% Invalid input detected at `^' marker

Invalid input error message:

This example lists module and port values outside the valid range. The module value should be 0.

Reenter the command followed by a question mark with a space between the command and the question mark. The possible values that you can enter with the command are displayed.

1548(config)# duplex auto

% Unrecognized command

This example uses a command that is not available within that mode. Duplex is an interface configuration mode command.

Backspace over the previous text and enter a question mark at the prompt to see all the commands for that mode.

Refer to the "Command Descriptions" chapter of this book to find the correct mode for the command you want and enable that mode. Enter a question mark with a space between the command and the question mark to see all the commands for that mode.

1548(config)# tftp

% Ambiguous command: "tftp"

Ambiguous command error message:

The example shows a command word that could be either tftp  server, tftp  filename, or tftp  upgrade.

Reenter the command followed by a question mark with a space between the command and the question mark. The possible commands that you can enter for that mode are displayed.

1548# clear mac-address-table dynamic 
address 0040.C80A.2F07 interface fa0/1

% Error: MAC address not found

Configuration error error message:

If you enter a complete command with the correct syntax, errors might still occur due to mismatches between the configuration you want and the configuration choices you have. These messages are command-specific. Refer to the "Command Descriptions" chapter of this book to find the correct syntax for the command.

Getting Help

You can use the question mark (?) and arrow keys to help you enter commands. For a list of available commands within that command mode, enter a question mark:

1548(config-if)#?
 
Interface configuration commands:
  description  Interface specific description
  end          Exit from interface configuration mode, to Privileged mode
  exit         Exit from interface configuration mode, to hub configuration
               mode
  help         Description of the interactive help system
  no           Negate a command or set its defaults
  port-speed   Port speed of the interface
  shutdown     Shutdown the selected interface 
 

To check the correct spelling of a command, enter a few known characters followed by a question mark (with no space):

1548(config)# debug?
debug memory read
debug memory write

For a list of command keywords and parameters, enter the command followed by a space and a question mark:

1548(config)# copy ?
tftp: Copy from a TFTP server xmodem: Copy from a XMODEM host

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

Saving Configuration Changes

All configuration changes are saved to NVRAM immediately after the command is entered successfully. You can save the configuration to a TFTP server using the upgrade  mode command. You can restore the saved configuration using the copy tftp command.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Wed Feb 17 15:34:45 PST 1999
Copyright 1989-1999©Cisco Systems Inc.