Cover | Table of Contents | Colophon
The modern world is networked in a way that could barely be imagined a few decades ago. Today, the Internet reaches into virtually every business and almost every home. Our children and even our grandparents speak of dot-coms, email, and web sites. The Internet is now part of our culture.
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 "Command-Line Completion" later in this chapter for a shortcut). This command can be entered only when you are in privileged mode.Router#configure terminal Enter configuration commands, one per line. End with Ctrl-Z
configure terminal:
Router#configure terminal
Router#conf t
conf t to configure terminal, completing the command for you. It may seem like extra work to learn these short versions of the commands, but doing so really pays off, especially for the commands you use frequently. But if you haven't learned the shortcut, you can try pressing Tab. In this case, you could have pressed Tab after typing conf; the router fills in the best completion, which is configure. If you press Tab and the router doesn't fill in the rest of the command, type a few more letters and press Tab again.
Router#show running-config
Router#sh ru
show is what you wanted, because 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.
|
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 many other options 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)
|
Identifier
|
Platforms
|
|---|---|
|
as
|
Access Server 5200 series
|
|
ca
|
Cisco Advantage
|
|
cpa
|
Cisco Pro
|
|
cs
|
Communication Server
|
|
c800, c1000, c1005, c1600
|
c3745-entbase-mz.123-9a.bin
ethernet0). Let's assume that the address 10.10.1.1 is available for the router and that the TFTP server is 10.10.1.2. Before you load the new image, enter the following commands:Router>enable Router#config terminal Router(config)#interface ethernet0 Router(config-if)#ip address 10.10.1.1 255.255.255.0 Router(config-if)#no shutdown Router(config-if)#exit Router(config)#exit Router#ping 10.10.1.2
|
Filesystem type
|
Router
|
|---|---|
|
Class A
|
7000 series, C12000, and LightStream 1010
|
|
Class B
|
1003, 1004, 1005, 2500, 2600, 3600, 4000, AS5200, 800
|
|
Class C
|
3810, disk0 of SC3640
|
|
Command
|
Filesystem
|
Description
|
|---|---|---|
cd
|
All
|
Changes the working directory.
|
delete
|
All
|
Router#copy running-config startup-config
Building configuration...
Router#copy running-config tftp
Router#copy tftp running-config (for TFTP) Router#copy rcp running-config (for RCP) Router#copy scp://user@ip:. running-config (for SCP)
Router#copy tftp startup-config (for TFTP) Router#copy rcp startup-config (for RCP) Router#copy scp://user@ip:. startup-config (for SCP)
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
|
|
lass="literal">%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
|
! ! This is a comment. !
Return to Cisco IOS in a Nutshell