CISCO IOS USEFUL COMMANDS

amartechstuff 08/Nov/2018 Routing
CISCO IOS USEFUL COMMANDS
CHAPTER 1-COMPARE STARTUP & RUNNING CONFIGURATION

WHY USEFUL?

  • Time Saving.
  • Quick Rollback.

COMMAND

#show archive config difference

Practicals

AMARTECHSTUFF#sh archive config differences
Contextual Config Diffs:
!No changes were found
AMARTECHSTUFF#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
AMARTECHSTUFF(config)#int fa0
AMARTECHSTUFF(config-if)#description CONNECTION TO PUNE
AMARTECHSTUFF(config-if)#router eig 100
AMARTECHSTUFF(config-router)#network 20.0.0.0
AMARTECHSTUFF(config-router)#^Z
AMARTECHSTUFF#sh archive config differences
*Mar  1 00:04:50.255: %SYS-5-CONFIG_I: Configured from console by console
AMARTECHSTUFF#sh archive config differences
Contextual Config Diffs:
interface FastEthernet0
 -description CONNECTION TO PUNE
router eigrp 100
 -network 20.0.0.0

AMARTECHSTUFF#wr
Building configuration...
[OK]
AMARTECHSTUFF#sh archive config differences
Contextual Config Diffs:
!No changes were found	
CHAPTER 2- Schedule Cisco Router Reload
  • Cisco IOS allows to Schedule a Reload.
  • Very useful command during performing critical configuration changes activity or need to have a reload at night time.

Options Available

Two Options Available –

  • in : after an interval
  • at : specific time

Verifying Reload

#show reload
No reload is scheduled.

Canceling Reload

Reload can cancelled by using 'reload cancel' command

Practicals

R1#sh clock
12:35:21.999 UTC Thu Nov 1 2018
R1#reload in?
Delay before reload (mmm or hhh:mm)
R1#reload in 2:10 ?
  LINE  Reason for reload
  
R1#reload in 2:10
Reload scheduled for 14:45:56 UTC Thu Nov 1 2018 (in 2 hours and 10 minutes) by console
Reload reason: Reload Command
Proceed with reload? [confirm]
R1#
Nov  1 12:35:59.191: %SYS-5-SCHEDULED_RELOAD: Reload requested for 14:45:56 UTC Thu Nov 1 2018 at 12:35:56 UTC Thu Nov 1 2018 by console. Reload Reason: Reload Command.
R1#sh reload
Reload scheduled for 14:45:59 UTC Thu Nov 1 2018 (in 2 hours and 9 minutes) by console
Reload reason: Reload Command
R1#reload cancel
R1#
***
*** --- SHUTDOWN ABORTED ---
***

R1#
Nov  1 12:36:09.603: %SYS-5-SCHEDULED_RELOAD_CANCELLED: Scheduled reload cancelled at 12:36:09 UTC Thu Nov 1 2018
R1#
R1#sh clock
12:38:00.491 UTC Thu Nov 1 2018
R1#reload at ?
  hh:mm  Time to reload (hh:mm)

R1#reload at 5:30 ?
  <1-31>  Day of the month
  LINE    Reason for reload
  MONTH   Month of the year
  

R1#reload at 5:30 2 NOV ?
  LINE  Reason for reload
  

R1#reload at 5:30 2 NOV TEST
Reload scheduled for 05:30:00 UTC Fri Nov 2 2018 (in 16 hours and 51 minutes) by console
Reload reason: TEST
Proceed with reload? [confirm]
R1#s
Nov  1 12:38:30.423: %SYS-5-SCHEDULED_RELOAD: Reload requested for 05:30:00 UTC Fri Nov 2 2018 at 12:38:28 UTC Thu Nov 1 2018 by console. Reload Reason: TEST.
R1#sh reload
Reload scheduled for 05:30:00 UTC Fri Nov 2 2018 (in 16 hours and 51 minutes) by console
Reload reason: TEST
CHAPTER 3-Decrypt Type 7 Password

Let’s see how to Decrypt type 7 Password on Cisco device itself.

Options Available

To Decrypt Type 7 Password

  • Online tools.
  • On Cisco device

Commands

# Lets first configure
R1(config)#service password-encryption
R1(config)#username cisco password Pune@123
R1(config)#enable password Shubhra
!

Commands

R1#  sh run | i user
username cisco password 7 023611550E265E731F
R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#key chain ?
  WORD  Key-chain name

R1(config)#key chain TECHSTUFF
R1(config-keychain)#key ?
  <0-2147483647>  Key identifier

R1(config-keychain)#key 1
R1(config-keychain-key)#key?
key-string
R1(config-keychain-key)#key-string ?
  0     Specifies an UNENCRYPTED password will follow
  7     Specifies a HIDDEN password will follow
  LINE  The UNENCRYPTED (cleartext) user password
R1(config-keychain-key)#key-string 7 023611550E265E731F
R1(config-keychain-key)#^Z

Output

R1#sh key chain TECHSTUFF
Key-chain TECHSTUFF:
    key 1 -- text "Pune@123"
        accept lifetime (always valid) - (always valid) [valid now]
        send lifetime (always valid) - (always valid) [valid now]
R1#

COMMANDS

R1#sh run | i enable
enable password 7 073C29594C010B04
R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#key chain TECHSTUFF
R1(config-keychain)#key ?
  <0-2147483647>  Key identifier
R1(config-keychain)#key 2
R1(config-keychain-key)#key-string 7 073C29594C010B04
R1(config-keychain-key)#^Z

Output

R1#sh key chain
Key-chain TECHSTUFF:
    key 1 -- text "Pune@123"
        accept lifetime (always valid) - (always valid) [valid now]
        send lifetime (always valid) - (always valid) [valid now]
    key 2 -- text "Shubhra"
        accept lifetime (always valid) - (always valid) [valid now]
        send lifetime (always valid) - (always valid) [valid now]

Recent Post