As you work with IOS, you'll become intimately familiar with the 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
The 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
I certainly haven't explained routing enough for you to understand the output of this command. However, you can see how to find show keywords with the question mark. The shown in the previous example indicates that you can hit Enter at this point and the command will work.[*] In other words, show ip route is a valid command. The other keywords are optional.
[*] Just for the record, "cr" stands for carriage return. This hails from the days of the typewriter. When you type on a typewriter, the carriage moves to the right as you type. When you press Return (the key is called "Enter" on most PC keyboards), the typewriter's carriage would move back to the starting positionin other words, it returned.
In each section of this book, I emphasize the appropriate show commands for the topic. For the topics covered in this chapter, the following show commands are extremely useful:
The show version command gives a lot more information than just the version of IOS that the router is currently running. You will see this command pop up a few more times later in this book. For now, you can see that it tells us the router type, the IOS image, the system uptime, the current IOS version, all the available interfaces, and the amount of memory on the router:
Router#show version Cisco Internetwork Operating System Software IOS (tm) C3550 Software (C3550-I9Q3L2-M), Version 12.1(22)EA1a, RELEASE SOFTWARE (fc1) Copyright (c) 1986-2004 by cisco Systems, Inc. Compiled Fri 20-Aug-04 00:30 by yenanh Image text-base: 0x00003000, data-base: 0x006C5C6C ROM: Bootstrap program is C3550 boot loader 3550 uptime is 3 weeks, 6 days, 13 hours, 11 minutes System returned to ROM by power-on System image file is "flash:c3550-i9q3l2-mz.121-22.EA1a/c3550-i9q3l2-mz.121-22.EA1a.bin" cisco WS-C3550-24 (PowerPC) processor (revision P0) with 65526K/8192K bytes of memory. Processor board ID CAT0849Z07W Last reset from warm-reset Running Layer2/3 Switching Image Ethernet-controller 1 has 12 Fast Ethernet/IEEE 802.3 interfaces Ethernet-controller 2 has 12 Fast Ethernet/IEEE 802.3 interfaces Ethernet-controller 3 has 1 Gigabit Ethernet/IEEE 802.3 interface Ethernet-controller 4 has 1 Gigabit Ethernet/IEEE 802.3 interface 24 FastEthernet/IEEE 802.3 interface(s) 2 Gigabit Ethernet/IEEE 802.3 interface(s) The password-recovery mechanism is enabled. 384K bytes of flash-simulated non-volatile configuration memory. Base ethernet MAC Address: 00:12:D9:56:67:00 Motherboard assembly number: 73-5700-12 Power supply part number: 34-0966-04 Motherboard serial number: CAT08490BLH Power supply serial number: LIT08410CCQ Model revision number: P0 Motherboard revision number: A0 Model number: WS-C3550-24-SMI System serial number: CAT0849Z07W Configuration register is 0x10F
The show history command gives a log of the router commands you have used. The length of this history log depends on the size set by the terminal history command. The default is 10 lines.
Router#show history show history show terminal show users enable show version
The show users command gives a complete listing of all currently connected users:
Router#show users Line User Host(s) Idle Location 2 tty 2 steve1 idle 5 tty 5 john2 Async interface 2