0% found this document useful (0 votes)
132 views12 pages

Commands Are Given With Description & Configuration Example All Configurations Are Extracted From Real World Network

The document provides descriptions and configuration examples for 19 commands commonly used on Cisco networking devices. The commands covered include show version, show processes, show clock, show module, show history, show inventory, show users, and show line. Real-world network configurations are used in the examples to demonstrate how each command displays system information, hardware details, software status, process CPU and memory usage, user sessions, and other essential device data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
132 views12 pages

Commands Are Given With Description & Configuration Example All Configurations Are Extracted From Real World Network

The document provides descriptions and configuration examples for 19 commands commonly used on Cisco networking devices. The commands covered include show version, show processes, show clock, show module, show history, show inventory, show users, and show line. Real-world network configurations are used in the examples to demonstrate how each command displays system information, hardware details, software status, process CPU and memory usage, user sessions, and other essential device data.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

19 MUST KNOW COMMANDS

Commands Are Given With Description &


Configuration Example

All Configurations Are Extracted From Real World


Network

1). Show Version


The show version command displays different information depending on the type of
device you use. This command gives uptime, info about software and hardware and a
few other details.

● IOS version
● System uptime
● Image filename
● Type of processor
● Amount of RAM
● Number of ports on the switch
● Amount of flash memory
● MAC address
● Serial number

1-a) Show version | in uptime


This command shows uptime of devices.

Example:-

core_1#show version | in uptime

core_1 uptime is 1 year, 23 weeks, 5 days, 3 hours, 22 minutes

2). Show Processes CPU history


➢ The show processes CPU command to display detailed CPU utilization
statistics on these processes.
➢ The show processes memory command to show the amount of memory used.

2-a) Show processes CPU


The show processes CPU command displays information about the active processes
in the router and their corresponding CPU utilization statistics. The following is a sample
output of the show processes CPU command:

router#show processes cpu


CPU utilization for five seconds: 8%/4%; one minute: 6%; five minutes: 5%
PID Runtime(uS) Invoked uSecs 5Sec 1Min 5Min TTY Process
1 384 32789 11 0.00% 0.00% 0.00% 0 Load Meter
2 2752 1179 2334 0.73% 1.06% 0.29% 0 Exec
3 318592 5273 60419 0.00% 0.15% 0.17% 0 Check heaps
4 4 1 4000 0.00% 0.00% 0.00% 0 Pool Manager
5 6472 6568 985 0.00% 0.00% 0.00% 0 ARP Input
6 10892 9461 1151 0.00% 0.00% 0.00% 0 IP Input
7 67388 53244 1265 0.16% 0.04% 0.02% 0 CDP Protocol
8 145520 166455 874 0.40% 0.29% 0.29% 0 IP Background
9 3356 1568 2140 0.08% 0.00% 0.00% 0 BOOTP Server
10 32 5469 5 0.00% 0.00% 0.00% 0 Net Background
11 42256 163623 258 0.16% 0.02% 0.00% 0 Per-Second Jobs
12 189936 163623 1160 0.00% 0.04% 0.05% 0 Net Periodic
13 3248 6351 511 0.00% 0.00% 0.00% 0 Net Input
14 168 32790 5 0.00% 0.00% 0.00% 0 Compute load avgs
15 152408 2731 55806 0.98% 0.12% 0.07% 0 Per-minute Jobs

2-b) Show processes cpu history Command


The show processes cpu history command displays in ASCII graphical form the total
CPU usage on the router over a period of time: one minute, one hour, and 72 hours,
displayed in increments of one second, one minute, and one hour, respectively.
Maximum usage is measured and recorded every second; average usage is calculated
on periods over one second.

router#show processes cpu history

!--- One minute output omitted

6665776865756676676666667667677676766666766767767666566667
6378016198993513709771991443732358689932740858269643922613
100
90
80 * * * * * * * *
70 * * ***** * ** ***** *** **** ****** * ******* * *
60 #***##*##*#***#####*#*###*****#*###*#*#*##*#*##*#*##*****#
50 ##########################################################
40 ##########################################################
30 ##########################################################
20 ##########################################################
10 ##########################################################
0....5....1....1....2....2....3....3....4....4....5....5....
0 5 0 5 0 5 0 5 0 5

CPU% per minute (last 60 minutes)


* = maximum CPU% # = average CPU%

2-c) The show processes memory Command:--


The show processes memory command displays information about the active
processes in the router and the corresponding memory used. The following is a sample
output of the show processes memory command:
Router#show processes memory
Total: 106206400, Used: 7479116, Free: 98727284
PID TTY Allocated Freed Holding Getbufs Retbufs Process
0 0 81648 1808 6577644 0 0 *Init*
0 0 572 123196 572 0 0 *Sched*
0 0 10750692 3442000 5812 2813524 0 *Dead*
1 0 276 276 3804 0 0 Load Meter
2 0 228 0 7032 0 0 CEF Scanner
3 0 0 0 6804 0 0 Check heaps
4 0 18444 0 25248 0 0 Chunk Manager
5 0 96 0 6900 0 0 Pool Manager
6 0 276 276 6804 0 0 Timers
7 0 276 276 6804 0 0 Serial Backgroun
8 0 96 0 3900 0 0 OIR Handler
9 0 96 0 6900 0 0 IPC Zone Manager
10 0 0 0 6804 0 0 IPC Periodic Tim
11 0 17728 484 11156 0 0 IPC Seat Manager
12 0 288 136 7092 0 0 ARP Input

....

90 0 0 0 6804 0 0 DHCPD Timer


91 0 152 0 6956 0 0 DHCPD Database
7478196 Total

Note: Due to the way in which show processes memory sorted is implemented in
certain Cisco routers and switches, some devices (such as the Cisco 7304) show the
total value as the sum of the processor memory and IO memory, rather than the total of
the processor memory as shown by show processes memory.

3). Show Clock:-


Cisco Unity Express uses the Network Time Protocol (NTP) server for clocking
functions. Use the show clock detail command to display the Cisco Unity Express
module clock status.

core_1#show clock
02:07:58.264 EDT Tue Jul 22 2014

4). Show Module:-


Output shows modules present in Slots of Switch

core_1#show module

Mod Ports Card Type Model Serial No.


--- ----- -------------------------------------- ------------------ -----------
3 48 SFM-capable 48 port 10/100/1000mb RJ45 WS-X6548-GE-TX SAL1215M8P5
4 48 SFM-capable 48 port 10/100/1000mb RJ45 WS-X6548-GE-TX SAL1115L9WA
5 48 SFM-capable 48 port 10/100/1000mb RJ45 WS-X6548-GE-TX SAL1101CU3H
6 48 SFM-capable 48 port 10/100/1000mb RJ45 WS-X6548-GE-TX SAD084105BK
7 2 Supervisor Engine 720 (Hot) WS-SUP720-BASE SAD084507P9
8 2 Supervisor Engine 720 (Active) WS-SUP720-BASE SAD084506UF
9 48 SFM-capable 48 port 10/100/1000mb RJ45 WS-X6548-GE-TX SAD0840009N

Mod MAC addresses Hw Fw Sw Status


--- ---------------------------------- ------ ------------ ------------ -------
3 001f.cada.0298 to 001f.cada.02c7 11.3 7.2(1) 8.3(0.156)RO Ok
4 001b.0cd5.a2e4 to 001b.0cd5.a313 11.1 7.2(1) 8.3(0.156)RO Ok
5 001a.6d9e.31b0 to 001a.6d9e.31df 11.1 7.2(1) 8.3(0.156)RO Ok

5). Show History:-


The following is sample output from the show history command, which lists the
commands the user has entered in mode for this session .

core_1#show history
show module
show history
show cdp neigh
sh history
sh ip arp
show history

6). Show Inventory:-


To display the system inventory information for a NAM (Network Analysis Module)
device, use the show inventory command.
This command is supported on all NAM platforms.
The show inventory command allows you to view the UDI for a NAM device. This
identity information is stored in the NAM device's non-volatile memory.
• PID—Product identification (ID) number of the device
• VID—Version ID of the device. Displays as 0 if the version number is not available.
• SN—Serial number of the device
core_1#show inventory
NAME: "WS-C6513", DESCR: "Cisco Systems Catalyst 6500 13-slot Chassis System"
PID: WS-C6513 , VID: , SN: SAL08332806
NAME: "WS-C6K-VTT 1", DESCR: "VTT FRU 1"
PID: WS-C6K-VTT , VID: , SN: SMT0828D793
NAME: "WS-C6K-VTT 2", DESCR: "VTT FRU 2"
PID: WS-C6K-VTT , VID: , SN: SMT0828E238

What are VTY ports?


VTY ports are virtual TTY ports, used to Telnet or SSH into the router over the network.
You can use them to connect to the router to make configuration changes or check the
status. Most routers have five VTY ports, numbered 0 to 4.
That means you can have up to five concurrent network admins configuring the router at
one time. However, you can easily generate more VTY lines.

7). Show Users:-


core_1#show users
Line User Host(s) Idle Location
* 1 vty 0 abcd idle 00:00:00 10.159.100.23
Interface User Mode Idle Peer Address
core_1#show run | in user
username pvault password 7 03345C1A5554114778
username vtyuser password 7 1121491312000F2C09

8). Show Line:-


Lines on Cisco routers are physical async serial ports on the router (such as a terminal
or modem), a virtual network connection, or another type of serial line on the router. To
see which lines you have on your devices, use the show line command. Here's an
example:
core_1#show line
Tty Typ Tx/Rx A Modem Roty AccO AccI Uses Noise Overruns Int
0 CTY - - - - - 0 0 0/0 -
* 1 VTY - - - - - 1616 0 0/0 -
2 VTY - - - - - 357 0 0/0 -
3 VTY - - - - - 96 0 0/0 -
4 VTY - - - - - 28 0 0/0 -

9). Show CDP neighbor:-


CDP will show only directly connected devices, or neighbors with Local interface &
Remote Interface
core_1#show cdp neighbor
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Interface Holdtme Capability Platform Port ID
FP-4507-MPLS Gig 13/41 123 RSI WS-C4507R+Gig 2/1
fp_unixhb_sw1 Gig 5/5 144 SI WS-C3560G-Gig 0/22
FP_6513_3 Gig 11/13 156 RSI WS-C6513-EGig 2/3/48
FP_6513_3 Gig 11/14 164 RSI WS-C6513-EGig 2/4/48
FP_6513_3 Gig 13/17 145 RSI WS-C6513-EGig 1/4/48

10). Show IP interface brief:-


This command is great for showing up/down status of IP interfaces, as well as what the
IP address is of each interface. This command displays a brief summary of the
interfaces on a device.
NB_Rtr#show ip interface brief
Interface IP-Address OK ? Method Status Protocol
GigabitEthernet0/0 10.145.0.27 YES NVRAM up up
GigabitEthernet0/1 unassigned YES NVRAM up up
GigabitEthernet0/1.10 10.145.225.129 YES NVRAM up up
Loopback0 10.145.0.195 YES NVRAM up up

11). Show ip protocol summary:-


This command will show you all the current routing protocols running on the router.
NB_Rtr#show ip protocol summary
Index Process Name
0 connected
1 static
2 ospf 100
*** IP Routing is NSF aware ***

12). Show Log:-


Show log will display your currently configured logging settings and the buffered log
messages.
core_1#show log
Syslog logging: enabled (0 messages dropped, 10 messages rate-limited, 2937 flus
hes, 0 overruns)
Console logging: level debugging, 66054 messages logged
Monitor logging: level debugging, 81 messages logged
Buffer logging: level debugging, 61345 messages logged
Exception Logging: size (4096 bytes)
Count and timestamp logging messages: disabled

13). Show IP ARP:-


Output shows the IP to MAC Address resolution for all the learned IP’s at the
device, with the interface from which MAC Address is learned.

In the following example, the show ip arp command lists all ARP entries by interface for
this router:
core_1#show ip arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 10.146.114.234 20 0021.5aa8.f05a ARPA Vlan114
Internet 10.146.22.142 178 000b.fcfe.1b02 ARPA Vlan322
Internet 10.146.8.144 2 1cc1.def1.dd48 ARPA Vlan8
Internet 10.146.4.156 19 e411.5b96.52d9 ARPA Vlan4
Internet 10.146.114.235 20 0021.5aa8.f05a ARPA Vlan114
Internet 10.146.7.158 228 001a.4bff.5ac6 ARPA Vlan7
Internet 10.146.22.143 137 000b.fcfe.1b02 ARPA Vlan322
Internet 10.146.8.145 8 001c.c415.99fb ARPA Vlan8
Internet 10.146.4.157 180 0050.569f.0094 ARPA Vlan4

14). Show mac-address-table:-


core_1#show mac-address-table
Legend: * - primary entry
age - seconds since last seen
n/a - not available

vlan mac address type learn age ports


------+----------------+--------+-----+----------+--------------------------
* 322 000b.fcfe.1b04 dynamic Yes 0 Po19
* 3 0100.5e01.0103 static Yes -
* 5 0021.5a4f.c6b8 dynamic Yes 0 Gi6/48
* 576 3333.0000.0001 static Yes - Switch,Stby-Switch
* 99 001c.7f40.16ef dynamic Yes 0 Po29

15). Show mac-address-table address:-


To get the switch port where the mac address is learned, you can use the following
command
core_1#show mac-address-table address 0022.640b.0bc0
Legend: * - primary entry
age - seconds since last seen
n/a - not available
vlan mac address type learn age ports
------+----------------+--------+-----+----------+--------------------------
Supervisor:
* 3 0022.640b.0bc0 dynamic Yes 0 Po18
Supervisor:
* 3 0022.640b.0bc0 dynamic Yes 0 Po18

16). Show interfaces link:-


"show interface link" command will display the down time for each port.
To display how long a cable has been disconnected from an interface, use the show
interfaces link command:
If the interface state is up, the command displays 0:00. If the interface state is down, the
time (in hours, minutes, and seconds) is displayed.

Example
Switch# show interfaces link
Port Name Down Time
Gi1/1 00:00:00
Gi1/2 00:00:00
Gi3/1 00:00:00
Gi3/2 00:00:00
Fa4/1 00:00:00
Fa4/2 00:00:00

Example

Switch# show interfaces link


Port Name Down Time
Gi3/4 1 minute 28 secs
Gi3/5 1 minute 28 secs
Gi3/6 1 minute 28 secs
Gi4/1 1 minute 28 secs

In this example, the cable has been disconnected from the port for 1 minute and 28
seconds.

17). Show Interfaces Status:-


Juniper switches don't support "show interface status"

Cisco's command displayed some useful information. port name, Status , vlan, Duplex,
speed, type etc.

core_1#show interfaces status


Port Name Status Vlan Duplex Speed Type
Gi3/1 G3/1 Connection to not connect 61 auto auto 10/100/1000BaseT
Gi3/2 Connection for TOR connected 3 a-full a-1000 10/100/1000BaseT
Gi3/3 Gi3/3 Connection f connected trunk full 1000 10/100/1000BaseT
Gi3/4 Gi3/4 Connection f connected trunk full 1000 10/100/1000BaseT
Gi3/5 Gi3/5 Connection f connected trunk full 1000 10/100/1000BaseT
18). Show Interfaces Summary:-
Output shows the Live Traffic running on the Interfaces

core_1#show interfaces summary


*: interface is up
IHQ: pkts in input hold queue IQD: pkts dropped from input queue
OHQ: pkts in output hold queue OQD: pkts dropped from output queue
RXBS: rx rate (bits/sec) RXPS: rx rate (pkts/sec)
TXBS: tx rate (bits/sec) TXPS: tx rate (pkts/sec)
TRTL: throttle count

Interface IHQ IQD OHQ OQD RXBS RXPS TXBS TXPS TRTL
---------------------------------------------------------------------
Vlan1 0 0 0 0 0 0 0 0 0
* Vlan2 0 0 0 0 0 0 0 0 0
* Vlan3 1 496350 0 0 288455000 25803 24671000 11288 23 918
* Vlan4 0 139620274 0 0 168740000 21020 48100000 11620 1247241

19). TRACE ROUTE:-


Trace route simply shows all the Layer3 Hops/ Devices, which comes
Between Source & Destination
Traceroute works by sending packets with gradually increasing TTL value, starting
with TTL value of 1. The first router receives the packet, decrements the TTL value and
drops the packet because it then has TTL value zero. The router sends an ICMP Time
Exceeded message back to the source.
core_1#traceroute 10.145.0.142
Type escape sequence to abort.
Tracing the route to 10.145.225.130
1 10.146.1.18 0 msec 0 msec 4 msec
2 10.146.192.142 0 msec 0 msec 0 msec
3 10.146.192.145 28 msec 0 msec 4 msec
4 10.145.0.141 28 msec 28 msec 28 msec
5 10.145.0.142 32 msec 32 msec 32 msec

You might also like