cc/td/doc/product/software/ios121/121sup
hometocprevnextglossaryfeedbacksearchhelp
PDF

Table of Contents

Using Cisco IOS Software

Using Cisco IOS Software

This section provides helpful tips for understanding, using, and configuring your routers with the Cisco IOS command-line interface (CLI).

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

For information on the conventions used in the Cisco IOS documentation set, refer to the "About This Guide" section 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, enter 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.)

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 displays a list of commands available for each command mode.

When starting a session on the router:

.
Table 1: Summary of Main Command Modes of the Cisco IOS Software
Command Mode Access Method Prompt Exit Method

User EXEC

Log in.

Router>

Enter the logout command.

Privileged EXEC

From user EXEC mode, enter the enable EXEC command.

Router#

To return to user EXEC mode, enter the disable command.

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

Global configuration

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

Router(config)#

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

To access 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 return to global configuration mode, enter the exit command.

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

To access 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 return to global configuration mode, enter the exit command.

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

ROM monitor

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

>

To return to user EXEC mode, enter continue.

For more information regarding command modes, refer to "Using the Command-Line Interface" in the Cisco IOS Configuration Fundamentals Configuration Guide.

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 and arguments. To see keywords and arguments for a command, enter a question mark (?) at the configuration prompt, or enter a question mark after entering part of a command followed by a space. The Cisco IOS software displays a list of keywords and arguments available along with brief descriptions. For example, if you are in global configuration mode, you can enter the command arap ? to see all keywords and arguments for that command.

Table 2 shows examples of how you can use the question mark (?) to assist you in entering commands. It steps you through configuring a serial interface IP address on a Cisco 7206 router running Cisco IOS Release 12.0(3).


Table 2: 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# configure 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)# interface serial ?
  <0-6>     Serial interface number
Router(config)# interface serial 4 ?
  /
Router(config)# interface serial 4/ ?
  <0-3>     Serial interface number
Router(config)# interface serial 4/0
Router(config-if)#

Enter interface configuration mode by specifying the serial interface that you want to configure using the interface serial global configuration command.

Enter a ? to display what you must enter next on the command line. In this example, you must enter the serial interface slot number and port number, separated by a back slash.

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

Router(config-if)# ?
Interface configuration commands:
  ...
  ip                  Interface Internet Protocol config commands
  keepalive           Enable keepalive
  lan-name            LAN Name command
  llc2                LLC2 Interface Subcommands
  load-interval       Specify interval for load calculation for an                       interface
  locaddr-priority    Assign a priority group
  logging             Configure logging for interface
  loopback            Configure internal loopback on an interface
  mac-address         Manually set interface MAC address
  mls                 mls router sub/interface commands
  mpoa                MPOA interface configuration commands
  mtu                 Set the interface Maximum Transmission Unit (MTU)
  netbios             Use a defined NETBIOS access list or enable                       name-caching
  no                  Negate a command or set its defaults
  nrzi-encoding       Enable use of NRZI encoding
  ntp                 Configure NTP
  ...
Router(config-if)#

Enter a ? to display a list of all the interface configuration commands available for the serial interface. This example shows only some of the interface configuration commands that are available.

Router(config-if)# ip ?
Interface IP configuration subcommands:
  access-group        Specify access control for packets
  accounting          Enable IP accounting on this interface
  address             Set the IP address of an interface
  authentication      authentication subcommands
  bandwidth-percent   Set EIGRP bandwidth limit
  broadcast-address   Set the broadcast address of an interface
  cgmp                Enable/disable CGMP
  directed-broadcast  Enable forwarding of directed broadcasts
  dvmrp               DVMRP interface commands
  hello-interval      Configures IP-EIGRP hello interval
  helper-address      Specify a destination address for UDP broadcasts
  hold-time           Configures IP-EIGRP hold time
  ...
Router(config-if)# ip

Enter the command that you want to configure for the interface. In this example, the ip command is used.

Enter a ? to display what you must enter next on the command line. This example shows only some of the interface IP configuration subcommands that are available.

Router(config-if)# ip address ?
  A.B.C.D             IP address
  negotiated          IP Address negotiated over PPP
Router(config-if)# ip address

Enter the subcommand that you want to configure for the interface. In this example, the address subcommand is entered.

Enter a ? to display what you must enter next on the command line. In this example, you must enter an IP address or the negotiated keyword.

Because a carriage return (<cr>) is not displayed, it indicates that you must enter more keywords or arguments to complete the command.

Router(config-if)# ip address 172.16.0.1 ?
  A.B.C.D             IP subnet mask
Router(config-if)# ip address 172.16.0.1

Enter the keyword or argument you want to use. In this example, the 172.16.0.1 IP address is entered.

Enter a ? to display what you must enter next on the command line. In this example, you must enter an IP subnet mask.

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

Router(config-if)# ip address 172.16.0.1 255.255.255.0 ?
  secondary           Make this IP address a secondary address
  <cr>
Router(config-if)# ip address 172.16.0.1 255.255.255.0

Enter the IP subnet mask. In this example, the 255.255.255.0 IP subnet mask is entered.

Enter a ? to display what you must enter next on the command line. In this example, you can enter the secondary keyword or press Enter.

Because a <cr> is displayed, it indicates that you can press Enter to complete the command.

Router(config-if)# ip address 172.16.0.1 255.255.255.0 Router(config-if)#

In this example, Enter is pressed to complete the command.

Using the No and Default Forms of Commands

The Cisco IOS software command references provide the complete syntax for the configuration commands and describe each:

Searching and Filtering Output of show and more Commands

In Cisco IOS Release 12.0(1)T or later, you can search and filter the output for show and more commands. This functionality is useful when you need to sort through large amounts of output, or if you want to exclude output that you do not need to see.

To use this functionality, enter a show or more command followed by the "pipe" character (|), one of the keywords begin, include, or exclude, and an expression that you want to search or filter on:

  command | {begin | include | exclude} regular-expression

The following is an example of the show interface command in which you want the output to only include lines where the expression "protocol" appears:

  Router# show interface | include protocol
  FastEthernet0/0 is up, line protocol is up
  Serial4/0 is up, line protocol is up
  Serial4/1 is up, line protocol is up
  Serial4/2 is administratively down, line protocol is down
  Serial4/3 is administratively down, line protocol is down
 

For more information on the search and filter functionality, refer to the "Using the Command Line Interface" chapter in the Cisco IOS Configuration Fundamentals Configuration Guide.

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, which defaults to NVRAM.


hometocprevnextglossaryfeedbacksearchhelp
Posted: Wed Mar 22 16:29:33 PST 2000
Copyright 1989 - 2000©Cisco Systems Inc.