Table Of Contents
Cisco IOS Basic Skills
Configuring the Router from a PC
Understanding Command Modes
Getting Help
Enable Secret and Enable Passwords
Entering Global Configuration Mode
Using Commands
Abbreviating Commands
Undoing Commands
Command-Line Error Messages
Saving Configuration Changes
Partition and Squeeze
Summary
Where to Go Next
Cisco IOS Basic Skills
Understanding how to use Cisco IOS software saves time when you are configuring your router. If you need a refresher, take a few minutes to read this chapter. If you are already familiar with Cisco IOS software, see Chapter 7, "Router Feature Configuration," and Chapter 8, "Advanced Router Configuration."
This chapter describes what you need to know before you begin configuring your Cisco 800 series routers with Cisco IOS software (the software that runs your router).
This chapter contains the following sections:
•
Configuring the Router from a PC
•
Understanding Command Modes
•
Getting Help
•
Enable Secret and Enable Passwords
•
Entering Global Configuration Mode
•
Using Commands
•
Saving Configuration Changes
Configuring the Router from a PC
You can configure your router from a connected PC. For information on how to connect the PC, refer to the Cisco 826 Routers Hardware Installation Guide.
After connecting the PC, you need terminal emulation software. The PC uses this software to send commands to your router. Table A-1 lists some common types of this software, which are based on the type of PC you are using.
Table A-1 Terminal Emulation Software
PC Operating System
|
Software
|
Windows 95, Windows 98, Windows NT, Windows XP
|
HyperTerm (included with Windows software), ProComm Plus
|
Windows 3.1
|
Terminal (included with Windows software)
|
Macintosh
|
ProComm, VersaTerm (supplied separately)
|
You can use the terminal emulation software to change settings for the type of device that is connected to the PC, in this case a router. Configure the software to the following standard VT-100 emulation settings so that your PC can communicate with your router:
•
9600 baud
•
8 data bits
•
No parity
•
1 stop bit
•
No flow control
These settings should match the default settings of your router. To change the router baud, data bits, parity, or stop bits settings, you must reconfigure parameters in the ROM monitor. For more information, refer to Appendix B, "ROM Monitor." To change the router flow control setting, use the flowcontrol line configuration command.
For information on how to enter global configuration mode so that you can configure your router, see the "Entering Global Configuration Mode" section.
Understanding Command Modes
This section describes the Cisco IOS command mode structure. Each command mode supports specific Cisco IOS commands. For example, you can use the interface type number command only from global configuration mode.
The following Cisco IOS command modes are hierarchical. When you begin a router session, you are in user EXEC mode.
•
User EXEC
•
Privileged EXEC
•
Global configuration
Table A-2 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 to a mode or enter the next mode. Because each mode configures different router elements, you might need to enter and exit modes frequently. You can see a list of available commands for a particular mode by entering a question mark (?) at the prompt. For a description of each command, including syntax, refer to the Cisco IOS 12.0 documentation set.
Table A-2 Command Modes Summary
Mode
|
Access Method
|
Prompt
|
Exit/Entrance Method
|
About this Mode
|
User EXEC
|
Begin a session with your router.
|
Router>
|
To exit router session, enter the logout command.
|
Use this mode to:
• Change terminal settings.
• Perform basic tests.
• Display system information.
|
Privileged EXEC
|
Enter the enable command from user EXEC mode.
|
Router#
|
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 router operating parameters.
• Perform the verification steps shown in this guide.
• To prevent unauthorized changes to your router configuration, access to this mode should be protected with a password as described in "Enable Secret and Enable Passwords" later in this chapter.
|
Global configuration
|
Enter the configure command from privileged EXEC mode.
|
Router (config)#
|
To exit to privileged EXEC mode, enter the exit or end command, or press Ctrl-Z.
To enter interface configuration mode, enter the interface command.
|
Use this mode to configure parameters that apply to your router as a whole.
Also, you can access the following modes, which are described later in this table:
• Interface configuration
• Router configuration
• Line configuration
|
Interface configuration
|
Enter the interface command (with a specific interface, such as interface ethernet 0) from global configuration mode.
|
Router (config-if)#
|
To exit to global configuration mode, enter the exit command.
To exit to privileged EXEC mode, enter the end command, or press Ctrl-Z.
To enter subinterface configuration mode, specify a subinterface with the interface command.
|
Use this mode to configure parameters for the router Ethernet and serial interfaces or subinterfaces.
|
Router configuration
|
Enter your router command followed by the appropriate keyword, for example router rip, from global configuration mode.
|
Router (config- router)#
|
To exit to global configuration mode, enter the exit command.
To exit to privileged EXEC mode, enter the end command, or press Ctrl-Z.
|
Use this mode to configure an IP routing protocol.
|
Line configuration
|
Specify the line command with the desired keyword, for example, line 0, from global configuration mode.
|
Router (config- line)#
|
To exit to global configuration mode, enter the exit command.
To enter privileged EXEC mode, enter the end command, or press Ctrl-Z.
|
Use this mode to configure parameters for the terminal line.
|
Getting Help
You can use the question mark (?) and arrow keys to help you enter commands.
For a list of available commands at that command mode, enter a question mark:
access-enable Create a temporary access-list entry
access-profile Apply user-profile to interface
To complete a command, enter a few known characters followed by a question mark (with no space):
* s=show set show slip systat
For a list of command variables, enter the show command followed by a space and a question mark:
clock Display the system clock
dialer Dialer parameters and statistics
exception exception information
To redisplay a command you previously entered, press the up-arrow key. You can continue to press the up arrow key for more commands.
Enable Secret and Enable Passwords
By default, the router ships without password protection. Because many privileged EXEC commands are used to set operating parameters, you should password-protect these commands to prevent unauthorized use.
You can use two commands to do this:
•
enable secret password (a very secure, encrypted password)
•
enable password (a less secure, unencrypted password)
You must enter an enable secret password to gain access to privileged EXEC mode commands.
For maximum security, the passwords should be different. If you enter the same password for both during the setup process, your router accepts the passwords, but warns you that they should be different.
An enable secret password can contain from 1 to 25 uppercase and lowercase alphanumeric characters. An enable password can contain any number of uppercase and lowercase alphanumeric characters. In both cases, a number cannot be the first character. Spaces are also valid password characters; for example, two words is a valid password. Leading spaces are ignored; trailing spaces are recognized.
Entering Global Configuration Mode
To make any configuration changes to your router, you must be in global configuration mode. This section describes how to enter global configuration mode while using a terminal or PC that is connected to your router console port.
To enter global configuration mode:
Step 1
After your router boots up, answer no when the following question displays:
Would you like to enter the initial configuration dialog [yes]: no
Step 2
Enter the enable command:
Step 3
If you have configured your router with an enable password, enter it when you are prompted.
The enable password does not show on the screen when you enter it. This example shows how to enter privileged EXEC mode:
Password: enable_password
Enable mode is indicated by the # in the prompt. You can now make changes to your router configuration.
Step 4
Enter the configure terminal command to enter global configuration mode, indicated by (config)# in the prompt:
router# configure terminal
You can now make changes to your router configuration.
Using Commands
This section provides some tips about entering Cisco IOS commands at the command-line interface (CLI).
Abbreviating Commands
You only have to enter enough characters for the router to recognize the command as unique. This example shows how to enter the show version command:
Undoing Commands
If you want to disable a feature or undo a command you entered, you can enter the keyword no before most commands; for example, no ip routing.
Command-Line Error Messages
Table A-2 lists some error messages that you might encounter while using the CLI to configure your router.
Table A-3 Common CLI Error Messages
Error Message
|
Meaning
|
How to Get Help
|
% Ambiguous command:
"show con"
|
You did not enter enough characters for your router to recognize the command.
|
Reenter the command followed by a question mark (?) with no space between the command and the question mark.
The possible keywords that you can enter with the command are displayed.
|
|
You did not enter all of the keywords or values required by this command.
|
Reenter the command followed by a question mark (?) with no space between the command and the question mark.
The possible keywords that you can enter with the command are displayed.
|
% Invalid input detected at
`^' marker.
|
You entered the command incorrectly. The error occurred where the caret mark (^) appears.
|
Enter a question mark (?) to display all of the commands that are available in this command mode.
|
Saving Configuration Changes
You need to enter the copy running-config startup-config command to save your configuration changes to nonvolatile RAM (NVRAM) so that they are not lost if there is a system reload or power outage. This example shows how to use this command to save your changes:
router # copy running-config startup-config
Destination filename [startup-config]?
Press Return to accept the default destination filename startup-config, or enter your desired destination filename and press Return.
It might take a minute or two to save the configuration to NVRAM. After the configuration has been saved, the following message appears:
Building configuration...
Partition and Squeeze
Partition and squeeze are supported on Cisco 831, Cisco 837, SOHO 91, and SOHO 97 routers. When a Flash memory device is full, you may want to rearrange the files so that the space used by the deleted files can be reclaimed. If you wish to permanently delete files on a Flash memory device, you may use the squeeze operation to remove all the deleted files from the Flash file systems and recover the space that the files occupied. The squeeze operation can take as long as several minutes because it involves erasing and rewriting almost an entire Flash memory space. To enable the squeeze operation, all of the Flash device file systems, including the partitions if any, must be erased before the squeeze command can be used. There are provisions in the erase command to disable this squeeze utility.
The partition feature requires at least two banks of Flash memory. The partitioning does not cause an existing file in Flash memory to be split across the partitions. The number of partitions that you can create in a Flash memory device is equal to the number of banks in the device, but the maximum number of partitions is 8.
Enter the router(config)#partition flash-filesystem command to create the partition. The command separates Flash memory into up to 8 partition. The squeeze command will not delete files saved in partition that is not marked as "deleted."
Enter the #squeeze flash command to permanently delete all files marked "delete" on a Flash memory device.
Use the following steps to erase an entire Flash memory system, beginning in global configuration mode.
| |
Command
|
Task
|
Step 1
|
router(config)# no partition flash-filesystem
|
Remove all partitions on the specific Flash file system. The reason for removing partitions is to ensure that the entire Flash file system is erased. The squeeze command can be used in a Flash file memory with partitions after the Flash file memory has been erased.
|
Step 2
|
router# erase filesystem
|
Erase all of the files on the specified Flash system.
|
Note
The squeeze function is applicable only to the Cisco 831, Cisco 837, Cisco SOHO 91, and Cisco SOHO 97 routers.
Summary
Now that you have reviewed some Cisco IOS software basics, you can begin to configure your router. Remember the following:
•
You can use the question mark (?) and arrow keys to help you enter commands.
•
Each command mode restricts you to a set of commands. If you are having difficulty entering a command, check the prompt, and then enter the question mark (?) for a list of available commands. You might be in the wrong command mode or using the wrong syntax.
•
If you want to disable a feature, enter the keyword no before the command; for example, no ip routing.
•
Save your configuration changes to NVRAM so that they are not lost if there is a system reload or power outage.
Where to Go Next
To configure your router, see Chapter 7, "Router Feature Configuration," and Chapter 8, "Advanced Router Configuration."