Using Command-Line Interface
This chapter provides information for understanding the Cisco ASR 901 series router using the command-line interface (CLI). This chapter includes the following sections:
- Getting Help
- How to Find Command Options
- Understanding Command Modes
- Using the No and Default Forms of Commands
- Saving Configuration Changes
For an overview of the Cisco ASR 901 series router, refer to the Cisco ASR 901 Series Aggregation Services Router Software Configuration Guide.
Getting Help
To obtain a list of commands that are available for each command mode, enter a question mark (?) at the system prompt. You also can obtain a list of any command’s associated keywords and arguments with the context-sensitive help feature.
Table 1-1 lists commands you can enter to get help that is specific to a command mode, a command, a keyword, or an argument.
How to Find Command Options
This section provides an example of how to display 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 ASR 901 series router software displays a list of available keywords along with a brief description of the keywords. For example, if you are in global configuration mode and want to see all the keywords for the cem command, you enter cem ?.
Table 1-2 shows examples of how you can use the question mark (?) to assist you in entering commands and also guides you through entering the following command:
Understanding Command Modes
The Cisco ASR 901 series router Cisco IOS user interface is divided into many different modes. The commands that are available to you depend on which mode you are currently in. You can obtain a list of commands that are available for each command mode by entering a question mark (?) at the system prompt.
When you start a session on the Cisco ASR 901 series 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 EXEC mode, you can enter any EXEC command or enter global configuration mode. Most EXEC commands are one-time commands, such as show commands, which show the current status of a given item, and clear commands, which clear counters or interfaces. The EXEC commands are not saved across reboots of the Cisco ASR 901 series router.
The configuration modes allow you to make changes to the running configuration. If you later save the configuration, these commands are stored across Cisco ASR 901 series router reboots. In order to get to the various configuration modes, you must start at global configuration mode where you can enter interface configuration mode, subinterface configuration mode, and a variety of protocol-specific modes.
ROM-monitor mode is a separate mode that is used when the Cisco ASR 901 series router cannot boot properly. If your Cisco ASR 901 series 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 ROM-monitor mode.
Table 1-3 provides a summary of the main command modes.
For more information on 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 has a no form. In general, enter 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. This publication provides the complete syntax for the configuration commands and describes what the no form of a command does.
Configuration commands can 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 arguments that are set to certain default values. In these cases, the default form of the command enables the command and sets arguments to their default values. This publication describes what the default form of a command does if the command is not the same as the no form.
Saving Configuration Changes
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, enter the following command:
It might take a minute or two to save the configuration. After the configuration has been saved, the following output appears: