Editing Command Table
Lab 1.5: Using Shortcut Commands and Tab Completion in Gathering Basic
Router Information
In this lab you will learn about shortcut commands and the tab completion function. You will use these concepts and commands used to gather basic information about a Cisco router.
Network Layout
Load the network layout you have been working with for labs in section 1.
Lab Steps
1. On the Network Visualizer screen, double-click on 2811 Router A. This will bring up a console screen.
2. Press Enter and the Router> prompt will appear. You are now in the user mode.
3. Change to the privileged mode.
Router>
Router>en
Shortcut Commands
Most Cisco IOS commands do not have to be completely spelled out. To facilitate being able to more quickly enter commands, you only have to enter part of a command, plus, each word in a command can be abbreviated. For example the command enable can be shortened to en. Another example is the command show running-configurations. You can abbreviate that and just type in sh run. A final example is when you have the com-mand show interfaces. You only need to type in sh int. The router or switch knows what you mean and correctly interprets and carries out that command.
You do need to type in enough letters for each word in a command for the router or switch to correctly understand and interpret what you are trying to do. If you do not, you will receive feedback that one or more of your words are ambiguous. The reason for that is that letters in one or more of the words in your command can be used to spell out different words. In that case the device does not know what you want to do;
there are too many possibilities.
For example, type the following:
Router>#s ver I get 2811A#s ver
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(9) T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2006 by Cisco Systems, Inc.[output cut]
Router>A#s v
% Ambiguous command: “show v”
2811 Router A recognized “s” to mean “show” but it did not recognize “v”.
Lab 1.5: Using Shortcut Commands and Tab Completion 45
In this case “v” could be the first letter in 12 different words.
On a real 2800 device you would get the output with 12 different words. This program does not have 12 different words; therefore, your output will be different.
Try this:
2811A#s v?
Version
Router>#s ver
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(9) T1, RELEASE SOFTWARE (fc2)
Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2006 by Cisco Systems, Inc.
[output cut]
The 2811 A router recognized “s” to mean “show” but it did not recognize “v”.
Enter the following command:
4. The command show version will provide basic configuration for the system hardware as well as the software version, the names and sources of configuration files, and the boot images.
Router#sh ver [press the tab key]
Router#sh version
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(12), RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport Copyright (c) 1986-2006 by Cisco Systems, Inc.
Compiled Fri 17-Nov-06 12:02 by prod_rel_team
ROM: System Bootstrap, Version 12.4(13r)T, RELEASE SOFTWARE (fc1) Router uptime is 4 weeks, 6 days, 18 hours, 29 minutes
System returned to ROM by power-on
System image file is "flash:c2800nm-advipservicesk9-mz.124-12.bin"
This product contains cryptographic features and is subject to United States and local country laws governing import, export, transfer and use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for compliance with U.S. and local country laws. By using this product you agree to comply with applicable laws and regulations. If you are unable to comply with U.S. and local laws, return this product immediately.
A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html
If you require further assistance please contact us by sending email to [email protected].
Cisco 2811 (revision 53.51) with 249856K/12288K bytes of memory.
Processor board ID FTX1048A54G 2 FastEthernet interfaces 4 Serial(sync/async) interfaces
DRAM configuration is 64 bits wide with parity enabled.
239K bytes of non-volatile configuration memory.
62720K bytes of ATA CompactFlash (Read/Write) Configuration register is 0x2102
Router#
The version number can be found on the first line of ouput ...
Cisco IOS Software, 2800 Software (C2800NM-ADVIPSERVICESK9-M), Version 12.4(12), RELEASE SOFTWARE (fc1).
Lab 1.5: Using Shortcut Commands and Tab Completion 47
The show version command gives you how long the router has been running, how it was restarted, the IOS filename running, the model hardware and processor versions, and the amount of DRAM. Also, the configuration register value is listed last. The above router has 256 megabytes of RAM and 64 megabytes of Flash.
5. You can view the router files by typing the command show running-config or show startup-config from privileged mode. The shrun command, which is the shortcut for show running-config, tells us that we are viewing the current configuration.
Router#sh run
Building configuration...
Current configuration : 874 bytes
!
version 12.4
service timestamps debug datetime msec service timestamps log datetime msec no service password-encryption
!
hostname Router [cut]
6. The sh start command, which is the shortcut for the show startup-config com-mand, shows us the configuration that will be used the next time the router is reloaded and also shows us the amount of NVRAM used to store the startup-config file.
Router#sh start
Building configuration...
Current configuration : 874 bytes
!
version 12.4
service timestamps debug datetime msec Tab Completion Function
Most of the time you will use shortcut commands to configure devices because they are quick and convenient. However, if for any reason you want to enter all the words in a command, there is an alternative to manually entering every character. You can use the Tab Completion function to spell out any word. Just type part of the word and then press your tab key. It will complete the word. As shown in the earlier command in this lab you can type “sh ver” and press the tab key. The word “version” will be spelled out.
service timestamps log datetime msec no service password-encryption
!
hostname Router [cut]
7. You can delete the startup-config file by using the command erase startup-config. Once you perform this command, you will receive an error if you try to view the startup-config file.
Router#erase startup-config
Erasing the nvram file system will remove all configuration files! Continue?
[confirm] (press Enter) [OK]
Erase of nvram: complete Router#
00:13:30: %SYS-7-NV_BLOCK_INIT: Initialized the geometry of ...
[cut]
8. Verify that you have erased the startup configuration.
Router#sh start
startup-config is not present Router#