By James Boney
Cover | Table of Contents | Colophon
Router>
show
commands in user mode are limited to a
few basic levels. You cannot edit or view configurations at this
stage; you can only view the router status and other miscellaneous
information. To obtain a basic listing of commands, type a
question mark:
Router>?
enable
command to enter this mode:
Router>enable Password: Router# Privileged mode prompt
> at the end; the privileged mode prompt always
has a # at the end, regardless of the submode.
configure
terminal
(see Section 1.3 for a shortcut). This command can be
entered only when you are in the privileged mode.
Router#configure terminal Enter configuration commands, one per line. End with Ctrl-Z Router(config)# Configuration mode
configure
terminal:
Router#configure terminal
Router#conf t
conf
t
to configure
terminal. Another
shortcut is to press Tab after typing "conf"; the router
will fill in the best completion, which is "configure".
Here is another example:
Router#show running-config
Router#sh ru
show is the only command that begins with
"sh"; likewise, the only subcommand of
show that begins with "ru" is
running-config.
^) under the
point at which it ran into trouble. For example:
Router>show itnerface e0
>show itnerface e0
^
% Invalid input detected at '^' marker.
Router>show interface e0
Router>sh int e0
? at the prompt. You can also use this trick to
find the subcommands of any command. For example, if you know you
want to use the copy
command but cannot remember which
subcommand you need, type:
Router#copy ?
WORD Copy from flash device - format <dev:>[partition:][filename]
flash Copy from system flash
flh-log Copy FLH log file to server
mop Copy from a MOP server
rcp Copy from an rcp server
running-config Copy from current system configuration
startup-config Copy from startup configuration
tftp Copy from a TFTP server
configure command begins with
"co", but that's it. The router gives us the
matching commands:
Router#co?
configure connect copy
copy. Had
there not been a space, the router would have tried to complete the
word "copy" for us, not given us the next available
commands. In the next example, we did not add the space, so the
router tried to complete "co" with all the commands it
could find that start with "co".
|
Keys
|
Commands
|
|---|---|
|
Ctrl-a
|
Returns the cursor to the beginning of the current line.
|
|
Ctrl-b
|
Moves the cursor back one character. (Equivalent to the left arrow
key.)
|
|
Ctrl-d
|
Deletes the character to the left of the cursor.
|
|
Ctrl-e
|
Moves the cursor to the end of the line.
|
|
Ctrl-f
|
Moves the cursor forward one character. (Equivalent to the right
arrow key.)
|
|
Ctrl-k
|
Deletes all the characters from the current cursor position to the
end of the line.
|
|
Ctrl-n
|
Goes to the next command in the session history. (Equivalent to the
down arrow key.)
|
|
Ctrl-p
|
Goes to the previous command in the session history. (Equivalent to
the up arrow key.)
|
|
Ctrl-t
|
Switches the current character with the character to the left of the
cursor.
|
|
Ctrl-r |
terminal
command, you
can set an important feature of the user interface: the pausing of
lengthy output. For example, if you run a command that has more than
one page of output, the router will pause after 24 lines with a
"—More—" prompt. The value 24 is the default
terminal length. Depending on the size of your terminal window, this
might not be adequate. You can change the length and width using the
terminal command, like this:
Router>terminal length 10 Router>terminal width 80
Router>terminal length 0
show
commands. They are among
the most useful commands you will ever use; they allow you to view
just about any settings within the router. Issuing the command
show
? produces output like
this:
Router>show ?
clock Display the system clock
history Display the session command history
hosts IP domain-name, lookup style, nameservers, and host table
sessions Information about Telnet connections
snmp snmp statistics
terminal Display terminal configuration parameters
users Display information about terminal lines
version System hardware and software status
show command has many different subcommands.
However, notice that we are in user mode. In privileged mode, the
show command has a lot more subcommands, which
would take up a few pages if we listed them here. The important thing
to remember is that show commands often have more
than one keyword. For example, the command
show ip route works by itself, but there are also
many other options that can be applied to it. For example:
router#show ip route ?
Hostname or A.B.C.D Network to display information about or hostname
bgp Border Gateway Protocol (BGP)
connected Connected
egp Exterior Gateway Protocol (EGP)
eigrp Enhanced Interior Gateway Routing Protocol (EIGRP)
igrp Interior Gateway Routing Protocol (IGRP)
isis ISO IS-IS
odr On Demand stub Routes
ospf Open Shortest Path First (OSPF)
rip Routing Information Protocol (RIP)
static Static routes
summary Summary of all routes
supernets-only Show supernet entries only
<cr>
show keywords with the question mark. The
show
version
:
Router>show version
Cisco Internetwork Operating System Software IOS (tm)
3600 Software (C3640-JS-M), Version 12.0(5)T1, RELEASE SOFTWARE (fc1)show
version
:
Router>show version
Cisco Internetwork Operating System Software IOS (tm)
3600 Software (C3640-JS-M), Version 12.0(5)T1, RELEASE SOFTWARE (fc1)|
Filesystem type
|
Router
|
|---|---|
|
Class A
|
7000 series, C12000, and LightStream 1010
|
|
Class B
|
1003, 1004, 1005, 2500, 3600, 4000, AS5200, 800
|
|
Class C
|
3810
|
|
Command
|
Filesystem
|
Description
|
|---|---|---|
cd
|
All
|
Changes the working directory.
|
delete
|
All
|
Router#copy running-config startup-config
Building configuration...
Router#copy running-config tftp
writeRouter#copy tftp running-config (for TFTP) Router#copy rcp running-config (for RCP)
Router#copy tftp startup-config (for TFTP) Router#copy rcp startup-config (for RCP)
Router#copy running-config startup-config
Router#show startup-config Router#show running-config
hostname
command:
Router(config)#hostname Sphinx
Sphinx(config)#
hostname
command:
Router(config)#hostname Sphinx
Sphinx(config)#
prompt
command. For example:
Sphinx(config)#prompt %h:%n%p Sphinx(config)#exit Sphinx:5#
%h), followed by the command number
(%n), followed by the appropriate prompt character
for the current command mode (%p). The escape
sequences for the prompt command are listed in
Table 3-1.
|
Escape sequence
|
Meaning
|
|---|---|
%%
|
Percent character
|
%h
|
Hostname of the router
|
%n
|
TTY number for this EXEC session
|
%p
|
Prompt character: either > for user level or # for privileged level
|
%s
|
Space character
|
%t
|
Tab character
|
no prompt command returns the router to the
default prompt.
! ! This is a comment. !
enable password
command:
Router(config)#enable password not2secure
service
password-encryption (with no arguments) configures
the router to store the password in an encrypted form.
Return to CISCO IOS in a Nutshell