Cisco Router Basic Commands: Part Two

How to set privileged mode password:

  1. Router(config)#enable password 123

How to set the privileged mode secured password:

  1. Router(config)#enable secret 1234

Note: enable password can’t be same as enable secret in setup mode but can be same in global configuration mode. enable secret is encrypted but enable password is clear text.

 

How to make console port password protected

  1. Router(config)#line console 0
  2. Router(config-line)#password 123
  3. Router(config-line)#login

How to enable telnet in cisco router

Router(config)#line vty 0 4

Router(config-line)#login

or

Router(config-line)#login local

Router(config-line)#password 123

  1. Router(config-line)#exec-timeout 0 0
  2. Router(config-line)#logging synchronous
  3. telnet 192.168.0.1 (For checking from 192.168.0.2 from usermode or privileged mode)

How to disable telnet in cisco router

Router(config)#line vty 0 4

  1. Router(config-line)#no login

 

How to enable ssh in cisco router

Router(config)#hostname iqbal

  1. Router(config)# ip domain-name iqbal.com
  2. Router(config)#crypto key generate rsa

type 1024

  1. Router(config)#ip ssh time-out 60
  2. Router(config)#ip ssh authentication-retries 2

l Router(config)#ine vty 0 4

  1. Router(config-line)#transport input ssh

How to view running configuration of router:

  1. show running-config

or

sh run

How to make your router password encrypted

  1. Router(config)#service password-encryption

How to provide a description to router’s interface:

int f0/0

  1. description WAN Port

How to view interface status & info

  1. Router(config)#sh int f0/0

how to view running configuration from Global Configuration mode:

  1. Router(config)#do sh run

How to enable an interface in Cisco router:

Router(config)#int f0/0

  1. Router(config-if)#no shutdown

or

Router(config-if)#no sh

How to view interface status & info from Global Configuration mode:

  1. Router(config)#do sh int f0/0

How to assaign ip address in cisco router:

Router(config)#int f0/0

  1. Router(config-if)#ip address 172.16.10.2 255.255.255.0

How to view route table in cisco router:

  1. Router#show ip route

How to set clock rate in serial interface DCE end:

  1. Router(config)#int s0/0
  2. Router(config-if)#clock rate 64000 (Only at DCE end)

How to view DCE/DTE end of serial cable connected to serial interface:

  1. Router#show controllers s0/0

How to set bandwidth in serial interface:

  1. Router(config-if)#bandwidth 1024

How to save router configuration:

  1. Router#copy running-config startup-config

or

Router#copy run start

or

Router#write

or

Router#wr

How to view startup configuration in router:

  1. Router#show startup-config

or

Router#sh start

How to remove router configuration:

  1. Router#erase startup-config

Erasing the nvram filesystem will remove all configuration files! Continue? [confirm] press Enter

  1. Router#reload

Proceed with reload? [confirm] press Enter

How to ping on the router:

  1. ping 192.168.10.2 (user-mode or privileged mode)

How to traceroute on a router:

  1. traceroute 4.2.2.1 (user-mode or privileged mode)

How to view interface status including Layer1, Layer2 & Layer 3 configuration:

53.Router#sh ip interface

How to view interface status briefly including Layer1, Layer2 & Layer 3:

  1. Router#sh ip int brief

How to view interface status including Layer1, Layer2 & Layer 3 configuration:

  1. Router#sh protocols

How to bypass startup configuration of nvram during booting of a router:

  1. rommon 1 >confreg 0x2142

How to boot a router with startup configuration of nvram (by default enable) of a router:

  1. Router(config)#config-register 0x2102

Password recovery steps of all series cisco router except 2500:

  1. Power off on the router
  2. Press Ctrl+Break
  3. rommon 1 >confreg 0x2142
  4. rommon 1 >reset
  5. Continue with configuration dialog? [yes/no]:no
  6. Router>enable
  7. Router#copy start run
  8. Router#conf t
  9. Router(config)#config-register 0x2102
  10. Router(config)#enable secret 123
  11. Router(config)#exit
  12. Router#copy run start

 

Password recovery steps in 2500 series Router:

  1. Power off on the router
  2. Press Ctrl+Break
  3. rommon 1 >o
  4. rommon 1>o/r  0x2142
  5. rommon 1>I
  6. Continue with configuration dialog? [yes/no]:no
  7. Router>enable
  8. Router#copy start run
  9. Router#conf t
  10. Router(config)#config-register 0x2102
  11. Router(config)#enable secret 123
  12. Router(config)#exit
  13. Router#copy run start

Leave a Reply

Your email address will not be published. Required fields are marked *