Cisco Commands Tips for Beginners

The intended audience of this post are those who are not yet have any experience in the real working environment of being a Network Engineer. Here is the list of the commands that I believe will be helpful and are not taught in books and can only be experience in a real hardware:

  1. show inventory

“show inventory” command shows the physical hardware information of the device and could be of help if you are doing an inventory of all the devices that you managed.

Router’s show inventory:

Router#show inventory
NAME: "Chassis", DESCR: "Cisco ASR1001-X Chassis"
PID: ASR1001-X         , VID: V02, SN: 

NAME: "Power Supply Module 0", DESCR: "Cisco ASR1001-X AC Power Supply"
PID: ASR1001-X-PWR-AC  , VID: V01, SN: 

NAME: "Power Supply Module 1", DESCR: "Cisco ASR1001-X AC Power Supply"
PID: ASR1001-X-PWR-AC  , VID: V01, SN: 

NAME: "Fan Tray", DESCR: "Cisco ASR1001-X Fan Tray"
PID: ASR1001-X-FANTRAY , VID:    , SN:            

NAME: "module 0", DESCR: "Cisco ASR1001-X SPA Interface Processor"
PID: ASR1001-X         , VID:    , SN:            

NAME: "SPA subslot 0/0", DESCR: "8-port Built-in GE SPA"
PID: BUILT-IN-2T+6X1GE , VID:    , SN:            

NAME: "subslot 0/0 transceiver 2", DESCR: "GE T"
PID: SP7041-E-R        , VID:     , SN:    

NAME: "subslot 0/0 transceiver 3", DESCR: "GE T"
PID: SP7041-E-R        , VID:     , SN:    

NAME: "subslot 0/0 transceiver 4", DESCR: "GE T"
PID: SP7041-E-R        , VID:     , SN: 

NAME: "subslot 0/0 transceiver 7", DESCR: "GE LX"
PID: GLC-LH-SMD          , VID: A   , SN: 

NAME: "module R0", DESCR: "Cisco ASR1001-X Route Processor"
PID: ASR1001-X         , VID: V02, SN: 

NAME: "module F0", DESCR: "Cisco ASR1001-X Embedded Services Processor"
PID: ASR1001-X         , VID:    , SN:

Switch’s show inventory

Switch# show inventory
NAME: "Chassis", DESCR: "Nexus 3048 Chassis"
PID: N3K-C3048TP-1GE   , VID: V01 , SN: 

NAME: "Module 1", DESCR: "48x1GE + 4x10G Supervisor"
PID: N3K-C3048TP-1GE   , VID: V01 , SN: 

NAME: "Fan 1", DESCR: "Chassis fan module"
PID: N3K-C3048-FAN-B   , VID: N/A , SN: 

NAME: "Power supply 1", DESCR: "AC power supply"
PID: N2200-PAC-400W-B  , VID: V02 , SN: 

NAME: "Power supply 2", DESCR: "AC power supply"
PID: N2200-PAC-400W-B  , VID: V02 , SN: 
  1. show environment

“show environment” command shows the status of each hardware in the device, like the temperature, fan trays, and the power supply. It can also shows if there is a failing power supply, or fans. But the output of this commands differs in platforms

Nexus 3064

Switch# show environment 

Fan             Model                Hw         Status
Fan-1           N3K-C3064-FAN        --         ok
PS-1            N2200-PAC-400W       --         ok
PS-2            N2200-PAC-400W       --         ok

Module  Sensor             MajorThresh   MinorThres   CurTemp     Status
                            (Celsius)     (Celsius)   (Celsius)
1       Back-Right (D0)     55            44           37          ok
1       Back-Left  (D1)     53            42           33          ok
1       Front-Right(D2)     56            47           38          ok
1       Front-Left (D3)     57            49           37          ok          

Power Supply:
Voltage: 12 Volts
PS  Model                Input Power       Current   Status
                         Type  (Watts)     (Amps)
1   N2200-PAC-400W       AC     396.00     33.00     ok
2   N2200-PAC-400W       AC     396.00     33.00     ok                  

Mod Model                   Power     Current     Power     Current     Status
                            Requested Requested   Allocated Allocated
                            (Watts)   (Amps)      (Watts)   (Amps)
--- ----------------------  -------   ----------  --------- ----------  ----------
1    N3K-C3064PQ-10GX-SUP   349.20    29.10       349.20    29.10       powered-up

Power Usage Summary:
Power Supply redundancy mode:                 Redundant
Power Supply redundancy operational mode:     Redundant

Total Power Capacity                              792.00 W

Power reserved for Supervisor(s)                  349.20 W
Power currently used by Modules                     0.00 W

Total Power Available                             442.80 W
Cisco Catalyst 6500

Switch#show environment
environmental alarms:
  no alarms

  operating clock count: 2
  operating VTT count: 3
  operating fan count: 1

fan-tray 1:
  fan-tray 1 type: WS-C6509-E-FAN
  fan-tray 1 mode: Restricted-power
  fan-tray 1 fan-fail: OK
VTT 1:
  VTT 1 OK: OK
  VTT 1 outlet temperature: 27C
VTT 2:
  VTT 2 OK: OK
  VTT 2 outlet temperature: 24C
VTT 3:
  VTT 3 OK: OK
  VTT 3 outlet temperature: 31C
clock 1:
  clock 1 OK: OK, clock 1 clock-inuse: in-use
clock 2:
  clock 2 OK: OK, clock 2 clock-inuse: not-in-use
power-supply 1:
  power-supply 1 fan-fail: OK
  power-supply 1 power-input: AC high
  power-supply 1 power-output-mode: high
  power-supply 1 power-output-fail: OK
power-supply 2:
  power-supply 2 fan-fail: OK
  power-supply 2 power-input: AC high
  power-supply 2 power-output-mode: high
  power-supply 2 power-output-fail: OK
module 1:
  module 1 power-output-fail: OK
  module 1 outlet temperature: 44C
  module 1 inlet temperature: 20C
module 5:
  module 5 power-output-fail: OK
  module 5 outlet temperature: 27C
  module 5 inlet temperature: 22C
  module 5 device-1 temperature: 31C
  module 5 device-2 temperature: 32C
  module 5 asic-1 temperature: 23C
  module 5 asic-2 temperature: 23C
  module 5 asic-3 temperature: 23C
  module 5 asic-4 temperature: 23C
  module 5 asic-5 temperature: 23C
  module 5 asic-6 temperature: 23C
  module 5 RP outlet temperature: 25C
  module 5 RP inlet temperature: 26C
  module 5 EARL outlet temperature: 32C
  module 5 EARL inlet temperature: 21C
module 9:
  module 9 power-output-fail: OK
  module 9 outlet temperature: 35C
  module 9 inlet temperature: 21C
  module 9 device-1 temperature: 22C
  module 9 device-2 temperature: 29C

chassis connector rating: 1302.00 Watts (31.00 Amps @ 42V)
chassis auxiliary connector rating: 2016.00 Watts (48.00 Amps @ 42V)
module 1
  module 1 connector rating: 2016.00 Watts (48.00 Amps @ 42V)
  module 1 power consumption:  325.50 Watts ( 7.75 Amps @ 42V)
module 5
  module 5 connector rating: 1260.00 Watts (30.00 Amps @ 42V)
  module 5 power consumption:  282.24 Watts ( 6.72 Amps @ 42V)
module 9
  module 9 connector rating: 2016.00 Watts (48.00 Amps @ 42V)
  module 9 power consumption:  125.16 Watts ( 2.98 Amps @ 42V)

chassis per slot cooling capacity: 70 cfm
ambient temperature: < 55C
  module 1 cooling requirement: 70 cfm
  module 5 cooling requirement: 35 cfm
  module 9 cooling requirement: 70 cfm
Cisco ASR1001-X

Router#show environment 

Number of Critical alarms:  0
Number of Major alarms:     0
Number of Minor alarms:     0

Slot    Sensor       Current State       Reading
----    ------       -------------       -------
 P0    PEM Iout         Normal           5 A
 P0    PEM Vout         Normal           12 V DC
 P0    PEM Vin          Normal           229 V AC
 P0    Temp: PEM In     Normal           27 Celsius
 P0    Temp: PEM Out    Normal           24 Celsius
 P0    Temp: PEM Int    Normal           29 Celsius
 P1    PEM Iout         Normal           5 A
 P1    PEM Vout         Normal           12 V DC
 P1    PEM Vin          Normal           226 V AC
 P1    Temp: PEM In     Normal           29 Celsius
 P1    Temp: PEM Out    Normal           27 Celsius
 P1    Temp: PEM Int    Normal           30 Celsius
 R0    VVM 0: VX1       Normal           1506 mV
 R0    VVM 0: VX2       Normal           751 mV
 R0    VVM 0: VX3       Normal           1005 mV
 R0    VVM 0: VX4       Normal           1057 mV
 R0    VVM 0: VX5       Normal           899 mV
 R0    VVM 0: VP1       Normal           5088 mV
 R0    VVM 0: VP3       Normal           1507 mV
 R0    VVM 0: VP4       Normal           1795 mV
 R0    VVM 0: VH        Normal           11966 mV
 R0    VVM 1: VX1       Normal           1197 mV
 R0    VVM 1: VX2       Normal           824 mV
 R0    VVM 1: VX3       Normal           857 mV
 R0    VVM 1: VX4       Normal           996 mV
 R0    VVM 1: VX5       Normal           874 mV
 R0    VVM 1: VP2       Normal           3331 mV
 R0    VVM 1: VP3       Normal           1789 mV
 R0    VVM 1: VP4       Normal           998 mV
 R0    VVM 1: VH        Normal           11961 mV
 R0    VVM 2: VX1       Normal           1115 mV
 R0    VVM 2: VX2       Normal           1106 mV
 R0    VVM 2: VX3       Normal           1204 mV
 R0    VVM 2: VX4       Normal           2500 mV
 R0    VVM 2: VX5       Normal           961 mV
 R0    VVM 2: VP2       Normal           1534 mV
 R0    VVM 2: VP3       Normal           1505 mV
 R0    VVM 2: VP4       Normal           2486 mV
 R0    VVM 2: VH        Normal           11977 mV
 R0    VVM 2: AUX1      Normal           747 mV
 R0    VVM 2: AUX2      Normal           752 mV
 R0    Temp: sTCAM      Normal           23 Celsius
 R0    Temp: Inlet      Normal           16 Celsius
 R0    Temp: Outlet     Normal           31 Celsius
 R0    Temp: QFP Die    Normal           33 Celsius
 R0    Temp: Center     Normal           31 Celsius
 R0    Temp: Oct Die    Normal           31 Celsius
 R0    Temp: CPU Inlt   Normal           26 Celsius
 R0    Temp: CPU VRM    Normal           25 Celsius
 R0    Temp: CPU Die    Normal           31 Celsius
 R0    Temp: FC FANS    Fan Speed 60%    16 Celsius
 P0    Temp: FC FAN0    Fan Speed 60%    16 Celsius
 P1    Temp: FC FAN1    Fan Speed 60%    16 Celsius
  1. show logging

“show logging” command shows different messages including errors that could be helpful in troubleshooting if there is a problem in the network. Every logs generated has a corresponding value or severity level. For example, %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to down, the highlighted number which is 3 shows a severity of an Error. Here is the complete list of the severity levels starting from zero:

0 – Emergency
1 – Alert
2 – Critical
3 – Error
4 – Warning
5 – Notice
6- -Informational
7 – Debug

Switch#show logging
Jan 23 00:23:00 PHT: %LINEPROTO-SP-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
Feb 24 00:24:00 PHT: %LINK-3-UPDOWN: Interface GigabitEthernet0/2, changed state to down
Feb 25 00:25:00 PHT: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/3, changed state to down
Mar 26 00:26:00 PHT: %LINK-SP-3-UPDOWN: Interface GigabitEthernet0/4, changed state to down
Mar 27 00:27:00 PHT: %LINEPROTO-SP-5-UPDOWN: Line protocol on Interface GigabitEthernet0/5, changed state to down
Apr 28 00:28:00 PHT: %LINK-3-UPDOWN: Interface GigabitEthernet0/6, changed state to up
  1. telnet

“telnet” command can be use to remotely access a device but could also be use in testing if a port is allowed to it. This is useful in troubleshooting if you have problem accessing a service like HTTP or HTTPS in a web server, it could be blocked by a firewall. Note that this cannot be use in routers, switches, but it is also usable in the command line of a PC. In my example, the IP Address provided is of Cisco’s website

Switch#telnet 443
Trying, 443 ... Open

Switch#telnet 80
Trying, 80 ... Open

Switch#telnet 21
Trying, 21 ...
% Connection timed out; remote host not responding
  1. show version

“show version” command shows a high-level overview of the device that you are in. It shows the up-time of the device, the version of the code that it is running, the number of interfaces it has. This is useful to know if you are looking if the device reboots or reload.

Switch# show version
Cisco Nexus Operating System (NX-OS) Software
TAC support:
Copyright (c) 2002-2010, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained herein are owned by
other third parties and are used and distributed under license.
Some parts of this software are covered under the GNU Public
License. A copy of the license is available at

  BIOS:      version 1.2.0
  loader:    version N/A
  kickstart: version 6.0(2)U6(1)
  system:    version 6.0(2)U6(1)
  Power Sequencer Firmware:
             Module 1: version v4.4
  BIOS compile time:       08/25/2011
  kickstart image file is: bootflash:///n3000-uk9-kickstart.3.0.2.U6.1.bin
  kickstart compile time:  4/9/2015 23:00:00 [04/10/2015 00:51:22]
  system image file is:    bootflash:///n3000-uk9.6.0.2.U6.1.bin
  system compile time:     4/9/2015 23:00:00 [04/10/2015 01:23:51]

  cisco Nexus 3048 Chassis ("48x1GE + 4x10G Supervisor")
  Intel(R) Celeron(R) CPU        P450 with 3665224 kB of memory.
  Processor Board ID

  Device name: Switch
  bootflash:    1007040 kB

Kernel uptime is 37 day(s), 8 hour(s), 32 minute(s), 15 second(s)

Last reset
  Reason: Unknown
  System version: 6.0(2)U6(1)

  Core Plugin, Ethernet Plugin

That’s it! I hope this post is of use to you especially if you are new to your work. And if you think there are commands that had been of use to you especially in troubleshooting please comment in below.

Router’s Route Selection: Longest-Prefix Match or Admin. Distance is preferred?

In this post, I’ll discuss and show that Routers considers the Longest-prefix Match first before considering┬áthe Administrative Distance for Route Selection.

First, what is Longest-Prefix Match? it is the way of an IP Router to select which route it will choose to forward the packets to. It compares the Destination IP Address of the packet it receives to each entry it has in its routing table, the longest network bits that has a match wins.

To make it more clear lets lab it up.

View Full Post