Полезная информация

cc/td/doc/product/software/ios120/12supdoc
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Using Cisco IOS Software

Using Cisco IOS Software

This chapter provides helpful tips for understanding and configuring Cisco IOS software using the command-line interface (CLI).

For an overview of Cisco IOS software configuration, refer to the Configuration Fundamentals Configuration Guide.

For information on the conventions used in the Cisco IOS documentation set, refer to the "About this Guide" chapter at the beginning of this book.

Getting Help

Entering a question mark (?) at the system prompt displays a list of commands available for each 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 an argument, use one of the following commands:
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. (No space between command and question mark.)

abbreviated-command-entry<Tab>

Complete a partial command name.

?

List all commands available for a particular command mode.

command ?

List a command's associated keywords. (Space between command and question mark.)

command keyword ?

List a keyword's associated arguments. (Space between the keyword and question mark.)

Finding Command Options

This section provides an example of how to find and display the syntax for a command. The syntax can consist of optional or required keywords. To display keywords for a command, enter a question mark (?) at the configuration prompt, or after entering part of a command followed by a space. The  Cisco IOS software displays a list of keywords available along with a brief description of the keywords. For example, if you were in global configuration mode, typed the command arap, and wanted to see all the keywords for that command, you would type arap ?.

The following table shows you how to find the command options for the following two commands:


Table 1: How to Find Command Options
Command Comment

Router>  enable
Password: <password>
Router#  

Enter the enable command and password to access privileged EXEC commands.

You have entered privileged EXEC mode when the prompt changes to Router#.


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

Enter global configuration mode.

You have entered global configuration mode when the prompt changes to Router(config)#.


Router(config)# controller t1 ?
   <0-3> Controller unit number
Router(config)# controller t1 1
Router(config-controller)#

Enter controller configuration mode by specifying the T1 controller that you want to configure using the controller t1 global configuration command.

Enter a ? to display what you must enter next on the command line. In this example, you must enter a controller unit number from 0 to 3.

You have entered controller configuration mode when the prompt changes to Router(config-controller)#.


Router(config-controller)# ?
Controller configuration commands:
   cablelength Specify the cable length for a DS1 link
   cas-group Configure the specified timeslots for CAS (Channel Associate Signals)
   channel-group Specify the timeslots to channel-group mapping for an interface
   clock Specify the clock source for a DS1 link
   default Set a command to its defaults
   description Controller specific description
   ds0 ds0 commands
   exit Exit from controller configuration mode
   fdl Specify the FDL standard for a DS1 data link
   framing Specify the type of Framing on a DS1 link
   help Description of the interactive help system
   linecode Specify the line encoding method for a DS1 link
   loopback Put the entire T1 line into loopback
   no Negate a command or set its defaults
   pri-group Configure the specified timeslots for PRI
   shutdown Shut down a DS1 link (send Blue Alarm)
Router(config-controller)#

Enter a ? to display a list of all the controller configuration commands available for the T1 controller.


Router(config-controller)# cas-group ?
   <0-23> Channel number
Router(config-controller)# cas-group

Enter the command that you want to configure for the controller. In this example, the cas-group command is used.

Enter a ? to display what you must enter next on the command line. In this example, you must enter a channel number from 0 to  23.

Because a <cr> is not displayed, it indicates that you must enter more keywords to complete the command.


Router(config-controller)# cas-group 1 ?
   timeslots List of timeslots in the cas-group
Router(config-controller)# cas-group 1

After you enter the channel number, enter a ? to display what you must enter next on the command line. In this example, you must enter the timeslots keyword.

Because a <cr> is not displayed, it indicates that you must enter more keywords to complete the command.


Router(config-controller)# cas-group 1 timeslots ?
   <1-24> List of timeslots which comprise the cas-group
Router(config-controller)# cas-group 1 timeslots

After you enter the timeslots keyword, enter a ? to display what you must enter next on the command line. In this example, you must enter a list of timeslots from 1 to 24.

You can specify timeslot ranges (for example, 1-24), individual timeslots separated by commas (for example 1, 3, 5), or a combination of the two (for example 1-3, 8, 17-24). The 16th time slot is not specified in the command line, because it is reserved for transmitting the channel signaling.

Because a <cr> is not displayed, it indicates that you must enter more keywords to complete the command.


Router(config-controller)# cas-group 1 timeslots 1-24 ?
   service Specify the type of service
   type Specify the type of signaling
Router(config-controller)# cas-group 1 timeslots 1-24

After you enter the timeslot ranges, enter a ? to display what you must enter next on the command line. In this example, you must enter the service or type keyword.

Because a <cr> is not displayed, it indicates that you must enter more keywords to complete the command.


Router(config-controller)# cas-group 1 timeslots 1-24 type ?
   e&m-fgb E & M Type II FGB
   e&m-fgd E & M Type II FGD
   e&m-immediate-start E & M Immediate Start
   fxs-ground-start FXS Ground Start
   fxs-loop-start FXS Loop Start
   sas-ground-start SAS Ground Start
   sas-loop-start SAS Loop Start
Router(config-controller)# cas-group 1 timeslots 1-24 type

In this example, the type keyword is entered. After you enter the type keyword, enter a ? to display what you must enter next on the command line. In this example, you must enter one of the signaling types.

Because a <cr> is not displayed, it indicates that you must enter more keywords to complete the command.


Router(config-controller)# cas-group 1 timeslots 1-24 type e&m-fgb ?
   dtmf DTMF tone signaling
   mf MF tone signaling
   service Specify the type of service
   <cr>
Router(config-controller)# cas-group 1 timeslots 1-24 type e&m-fgb

In this example, the e&m-fgb keyword is entered. After you enter the e&m-fgb keyword, enter a ? to display what you must enter next on the command line. In this example, you can enter the dtmf, mf, or service keyword to indicate the type of channel-associated signaling available for the e&m-fgb signaling type.

Because a <cr> is displayed, it indicates that you can enter more keywords or press <cr> to complete the command.


Router(config-controller)# cas-group 1 timeslots 1-24 type e&m-fgb dtmf ?
   dnis DNIS addr info provisioned
   service Specify the type of service
   <cr>
Router(config-controller)# cas-group 1 timeslots 1-24 type e&m-fgb dtmf

In this example, the dtmf keyword is entered. After you enter the dtmf keyword, enter a ? to display what you must enter next on the command line. In this example, you can enter the dnis or service keyword to indicate the options available for dtmf tone signaling.

Because a <cr> is displayed, it indicates that you can enter more keywords or press <cr> to complete the command.


Router(config-controller)# cas-group 1 timeslots 1-24 type e&m-fgb dtmf
Router(config-controller)#

In this example, enter a <cr> to complete the command.

Understanding Command Modes

The Cisco IOS user interface is divided into many different modes. The commands available to you at any given time depend on which mode you are currently 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 router, you begin in user mode, often called EXEC mode. Only a limited subset of the commands are available in EXEC mode. In order to have access to all commands, you must enter privileged EXEC mode. Normally, you must enter a password to enter privileged EXEC mode. From privileged mode, you can enter any EXEC command or enter global configuration mode. Most of the EXEC commands are one-time commands, such as show commands, which show the current status of something, and clear commands, which clear counters or interfaces. The EXEC commands are not saved across reboots of the router.

The configuration modes allow you to make changes to the running configuration. If you later save the configuration, these commands are stored across router reboots. In order to get to the various configuration modes, you must start at global configuration mode. From global configuration mode, you can enter interface configuration mode, subinterface configuration mode, and a variety of protocol-specific modes.

ROM monitor mode is a separate mode used when the router cannot boot properly. If your router or access server does not find a valid system image when it is booting, or if its configuration file is corrupted at startup, the system might enter read-only memory (ROM) monitor mode.

Summary of Command Modes

The following table summarizes some of the main command modes of the Cisco  IOS software.


Table 2: Summary of Main Command Modes
Command Mode Access Method Prompt Exit Method

User EXEC

Log in.

Router>

Use the logout command.

Privileged EXEC

From user EXEC mode, use the enable EXEC command.

Router#

To exit back 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.

Router(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.

Router(config-if)#

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

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

To enter subinterface configuration mode, specify a subinterface with the interface command.

Subinterface configuration

From interface configuration mode, specify a subinterface with an interface command.

Router(config-subif)#

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

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

ROM monitor

From privileged EXEC mode, use the reload EXEC command. Press the Break key during the first 60 seconds while the system is booting.

>

To exit to user EXEC mode, type continue.

For more information regarding command modes, refer to the "Using the Command Line Interface" chapter of the Configuration Fundamentals Configuration Guide.

Using the No and Default Forms of Commands

Almost every configuration command also has a no form. In general, use the no form to disable a function. Use the command without the keyword no to reenable a disabled function or to enable a function that is disabled by default. For example, IP routing is enabled by default. To disable IP routing, specify the no  ip  routing command and specify ip routing to reenable it. The Cisco IOS software command references provide the complete syntax for the configuration commands and describes what the no form of a command does.

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. The Cisco IOS software command references describe what the default form of a command does if the command is not the same as the no form.

Saving Configuration Changes

Enter the copy system:running-config nvram:startup-config command to save your configuration changes to your startup configuration so that they will not be lost if there is a system reload or power outage. For example:

Router# copy system:running-config nvram:startup-config
Building configuration...

It might take a minute or two to save the configuration. After the configuration has been saved, the following output appears:

[OK]
Router#

On most platforms, this step saves the configuration to nonvolatile random-access memory (NVRAM). On the Class A Flash file system platforms, this step saves the configuration to the location specified by the CONFIG_FILE environment variable. The CONFIG_FILE variable defaults to NVRAM.



hometocprevnextglossaryfeedbacksearchhelp
Copyright 1989-1998 © Cisco Systems Inc.