How to use “show” command to get information ?- CCNA Course

0
6
show command to get information in cisco configuration

Using the show command to get information

As an administrator of cisco routers and switches, it is inevitable that you will get information and statistics to verify the functionality of those devices and the networks that are connected to them. The crux of every command to view these statistics is the show keyword. This article explains what information you can gain from several of these show commands and tells you how to interpret outputs of those commands.

Verifying your configurations

Without a doubt, verifying your configurations is one of the most widely used show functions in the Cisco IOS. What better way to double-check or troubleshoot your configuration could there be besides seeing it displayed right in front you? One caveat to these particular show commands, however, is that you must be in Privileged EXEC to see the configurations. This makes logical sense because you don’t want anybody from User EXEC to see your passwords in the configurations.

To use the active configuration that is running in RAM (that is, running-config), simply type show running-config. Similarly, the command show startup-config displays the configuration that will be loaded after you reboot the router or switch. The following examples show the show running-config command, and the output of some of the router configurations discusses in this article, performed on a 1720 router with a fixed Fast Ethernet interface:

CCNA1720#show running-config
Building configuration…
Current configuration:
!
Version 12.4
Service time stamps debug uptime
Service time stamps log uptime
Service password encryption
!
Hostname CCNA1720
!
Enable secret 5 $1$nLCr$gNidpLSZvMnm2wFW6ACLm0
Enable password 7 14120A0A0107382A29
!
Boot-start-marker boot-end-marker
!
!
Memory-size iomem 15
No aaa new-model ip subnet-zero
Ip host corer outer 172.16.1.1
Ip name-server 172.16.1.254
!
!
Ip cef
!
Interface FastEthernet0
Ip address 172.16.1.1 255.255.0.0
No ip directed-broadcast full-duplex
!
Interface Serial0/0
Bandwidth 64
Ip address 192.168.1.1 255.255.255.0
No ip directed-broadcast no fair-queue
!
Ip classless
Ip http server
! banner motd ^C This is a private system and may be accessed only by authorized users.
Unauthorized access is strictly prohibited and will be enforced to the full extent of the law. ^C
!
Line con 0
Exec-timeout 1 30 password 7 945802150C2E login
Line vty 0 4
Exec-timeout 1 30 password 7 02050D480809 login
!
End

Viewing interface statuses and statistics

Beyond a doubt, the next four show commands will serve as the most useful tools in determining interface functionality and the performance of the network connected to those interfaces. Some of the outputs for these interface-specific show commands display similar statistics; nevertheless, each command serves a unique purpose depending on what facet on the interfaces you are trying to investigate.

Show interfaces command

The most detailed show command that displays statistics about the status of the interfaces and the network traffic for that interface is the show interface command. This command shows you statistics for all interfaces on the router or switch; however, if you wish to view information about only a single interface, you can specify that interface in the command (for example, show interfaces serial 0/0). The output that follows illustrates the show interface output for a Fast Ethernet interface:

Router#show interfaces fastethernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is Gt96k FE, address is 001a.2f66.fa1a (bia 001a.2f66.fa1a) Internet address is 172.16.0.1/16
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive not set
Full-duplex, 100Mb/s, 100BaseTX/FX ARP type:ARAP, ARP Timeout 04:00:00
Last input 00:00:10, output 00:00:10, output hang never
Last clearing of “show interfaces” counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy:fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
322 packets input, 70336 bytes
Received 322 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 watchdog
0 input packets with dribble condition detected
343 packets output, 72188 bytes, 0 under run
0 output errors, 0 collisions, 3 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out

A common statistics of most of the interface show commands is the actual status of the interface itself. This is identified in the first line of output of the show interfaces commands. The first part of the status identifies the Layer 1 information of the interface, followed by the Layer 2 line protocol status.

If you understand the interface statuses you are ultimately building a solid foundation to accurately troubleshoot any malfunctioning interface. For example, if your interface is in an “up/line protocol up” state, you have eliminated Layer 1 and layer 2 malfunctions for that interface. From this point, you can determine whether the problem on the interface is perhaps a Layer 3 problem (IP addressing, routing, and so on). The following table lists the possible values of this command.

Layer 1 Layer 2 (Line protocol) Possible sysmptoms
Up Up None. Interface is functional
Up Down Encapsulation mismatch, lack of clocking on serial interfaces, missing keepalives.
Down Down The cable is disconnected or attached to a shutdown interface on the far-end device.
Administratively Down Down The local interface was not enabled with the no shutdown command.

The rest of the output of the show interfaces command is also extremely useful for gaining information about the interface and the network. Of course, you won’t be expected to know all the elements listed in this output; however, the following table displays some of the valuable common statistics descriptions.

Output Description
Hardware is AmdFE, the address is 0003.e32a.4080 The MAC address of the Ethernet interface.
Internet address Assigned IP address
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec, reliability 255/255, txload 1/255, rxload 1/255 The maximum transmission of Unit (frame size) for this interface, logical bandwidth (default or set with bandwidth command), cumulative delay, interface reliability, inbound and outbound load.
Encapsulation ARPA Layer 2 frame encapsulation on interface.
Half-duplex, 100Mb/s, 100BaseTX/FX Duplex and speed of interface.
Received 0 broadcasts, 0 runts, 0 giants The number of broadcasts, runts (below minimum frame size), and giants (above maximum frame size).
0 collisions The number of collisions that occurred on that segment.
0 late collision Late collisions occur when your interface is set for half-duplex and you are connected to a full-duplex interface.

Show ip interface brief Command

If the goal of your show command is to get a condensed output of the status of the interface and their IP addresses, the show ip interface brief command conveniently shows you a minimal display of these statistics as illustrated here:

Router#show ip interface brief
Interface       IP-address      OK?  Method status         Protocol
FastEthernet0/0 192.168.100.154 YES  DHCP Up              Up
FastEthernet0/1 Unassigned      YES  unset administratively     Down down
Serial0/0       Unassigned      YES  Unset administratively     down down

Show controller command

Although the output of the show controller command is unintelligible to everyone except for the Cisco TAC (Technical Assistance Center), one particularly useful extract from this output is in the show controller serial command. The needle in this haystack of statistics is the line of output that identifies whether a DTE or a DCE cable is attached to the serial interface. This is useful if you are connecting to your router remotely and you are not sure whether your router should be providing the clocking (if you are the DCE interface). The following excerpt example illustrates this useful output:

Router>show controller serial 0/1
Interface serial 0/1
Hardware is Power QUICC MPC860
V.35 DCE cable, clock rate 64000
…output omitted…

IOS file Version show commands

Now, we’ll discuss how to back up your IOS to a TFTP server or download a new version of the IOS to your router or switch. Tasks of this magnitude, however, cannot be performed unless you do some initial legwork. Namely, you must perform some essential steps such as identifying the amount of Flash memory, the IOS filename located in Flash, and the current IOS version that is running on the device.

Different Cisco IOS versions and feature sets will ultimately dictate the size of the IOS file and the amount of Flash and DRAM memory required to run the IOS. If you are planning to upgrade to a new IOS, you must make sure that you have enough memory (the more, the better) in your device. To see the amount of Flash you have and the current IOS file stored in Flash memory, utilize the show flash command as follows:

Router>show flash
System flash directory: file length  Name/status
[5510256 bytes used, 2878352 available, 8388608 total]
8192k bytes of processor board system flash (Read/write)

Typically, the filename of the IOS file in Flash correctly reflects the actual IOS version running currently on the device. However, an administrator can easily change the filename to his or her own purposes, or there could be multiple IOS files stored on the Flash and you are not sure which one is running currently. To ensure the correct version of the IOS, use the widely practical show version command.

As the following output demonstrates, the show version command displays a plethora of information well beyond the version of IOS running. The table given below explains some of the useful output of this multifaceted command.

Router#show version
Cisco IOS software, 1841 software (C1841-ADVIPSERVICESK9-M)
Version 12.4 (3g), RELEASE SOFTWARE (fc2)
Technical support: http://www.cisco.com/techsupport
Copyright 1986-2006 by Cisco Systems, Inc.
Compiled Mon 06-Nov-16 by alnguyen
ROM: system bootstrap, version 12.3 (8r)T9, RELEASE SOFTWARE (fc1)
CCNA1841 uptime is 8 hours, 35 minutes
System returned to ROM by power-on
System image file is “flash:c1841-advipservicesk9-mz.124-3g.bin”
Output Description
Cisco IOS software, 1841 software (C1841-ADVIPSERVICESK9-M) Version 12.4 (3g), RELEASE SOFTWARE (fc2)   The IOS feature set, version, and release
ROM: system bootstrap, version 12.3 (8r)T9, RELEASE SOFTWARE (fc1)   The version of the bootstrap code in ROM
Router uptime is 8 hours, 35 minutes The length of time the device has been running.
The system returned to ROM by power-on How the device was started.
System image file is “flash:c1841-advipservicesk9-mz.124-3g.bin”   The name of the IOS file that was loaded and the location of that file.
With 23644K/25600K bytes of memory The amount of RAM in the system allocated to the device’s processor, followed by the memory allocated for packets. The total RAM is calculated by adding the two values together. (236544K+25600K=49144K, or 48MB)
191K bytes of NVRAM The amount of NVRAM for the startup-config
62720K bytes of ATA CompactFlash (Read/write) The total amount of Flash memory
Configuration register is 0x2102 The current configuration register.

Now, we’ll have a review break and give you the following table that contains the show commands discussed in this article, including their functions and whether they are in User EXEC or both User EXEC and Privileged EXEC.

Command User EXEC/Privileged EXEC Output
Show running-config Privileged EXEC Current configuration in RAM
Show startup-config Privileged EXEC Configuration in NVRAM to be loaded at next boot.
Show interfaces Both Interface status, IP address, encapsulation, bandwidth, reliability, load, MTU, duplex, network statistics.
Show ip interface brief Both The IP address and status of the interface
Show controller serial Both The microcode of interface, including whether DTE or DCE cable is attached.
Show flash Both IOS filename and amount of used and available flash memory.
Show version Both IOS version, IOS filename, uptime, memory amounts, configuration register.

Learn More about CCNA through our other articles like: