Show Menu

Cisco Command#1 BY kanisthaw Cheat Sheet by

thanks :

Router Modes

Router­>: User mode = Limited to basic monitoring commands
Router#: Privileged mode (exec-­level mode) = Provides access to all other router commands
Router­(co­nfig)#: global config­uration mode = Commands that affect the entire system
Router­(co­nfi­g-s­ubif)#: subint­erface mode = Commands that affect subint­erfaces
Router­(co­nfi­g-l­ine)#: line mode = Commands that affect in lines modes (console, vty, aux…)
Router­(co­nfi­g-r­out­er)#: router config­uration mode

Changing switch hostname

Switch­(co­nfig)# hostname SW1

Config­uring passwords

SW1(co­nfig)# enable secret nutty !MD5 hash
SW1(co­nfig)# enable password 1234

Encrypting passwords

SW1(co­nfig)# service passwo­rd-­enc­ryption

Working enviro­nment

SW1(co­nfig)# no ip domain­-lookup
SW1(co­nfig)# line vty 0 4
SW1(co­nfi­g-l­ine)# history size 15
SW1(co­nfi­g-l­ine)# exec-t­imeout 10 30
SW1(co­nfi­g-l­ine)# logging synchr­onous

Saving config­uration

SW1# copy runnin­g-c­onfig nutty
! Destin­ation filename [nutty]
SW1# wr

Descri­ption, speed and duplex

SW1(co­nfig)# interface fastEt­hernet 0/1
SW1(co­nfi­g-if)# descri­ption LINK TO INTERNET ROUTER
SW1(co­nfi­g-if)# speed 100 ! Options: 10, 100, auto
! The range keyword used to set a group of interfaces at once.
SW1(co­nfig)# interface range fastEt­hernet 0/5 – 10
SW1(co­nfi­g-i­f-r­ange)# duplex full (options: half, full, auto)

Setting the default gateway

SW1(co­nfig)# ip defaul­t-g­ateway

Securing console port

SW1(co­nfig)# line con 0
SW1(co­nfi­g-l­ine)# password cisco
SW1(co­nfi­g-l­ine)# login


! Used to create shortcuts for long commands.
SW1(co­nfig)# alias exec c configure terminal

Securing terminal lines

SW1(co­nfig)# line vty 0 4
SW1(co­nfi­g-l­ine)# password cisco
SW1(co­nfi­g-l­ine)# login

Config­uring banners

SW1(co­nfig)# banner motd $

Giving the switch an IP address

SW1(co­nfig)# interface vlan 1
SW1(co­nfi­g-if)# ip address 255.25­5.255.0 ! or DHCP
SW1(co­nfi­g-if)# no shutdown

Config­uring switch to use SSH

Configure DNS domain name :
SW1(co­nfig)# ip domain­-name exampl­

Configure a username and password :
SW1(co­nfig)# username admin password cisco

Generate encryption keys :
! The size of the key modulus in the range of 360 to 2048
SW1(co­nfig)# crypto key generate rsa
How many bits in the modulus [512]: 1024

Define SSH version to use :
SW1(co­nfig)# ip ssh version 2

Enable vty lines to use SSH :
SW1(co­nfig)# line vty 0 4
SW1(co­nfi­g-l­ine)# login local
! You can set vty lines to use only telnet or only ssh or both as in the example.
SW1(co­nfi­g-l­ine)# transport input telnet ssh

Verify Basic Config­uration

Shows inform­ation about the switch and its interf­aces, RAM, NVRAM, flash, IOS, etc
SW1# show version

Shows the current config­uration file stored in DRAM.
SW1# show runnin­g-c­onfig

Shows the config­uration file stored in NVRAM which is used at first boot process.
SW1# show startu­p-c­onfig

Lists the commands currently held in the history buffer.
SW1# show history

Shows an overview of all interf­aces, their physical status, protocol status and ip address if assigned.
SW1# show ip interface brief

Shows detailed inform­ation about the specified interface, its status, protocol, duplex, speed, encaps­ula­tion, last 5 min traffic.
SW1# show interface vlan 1

Shows the descri­ption of all interfaces
SW1# show interfaces descri­ption

Shows the status of all interfaces like connected or not, speed, duplex, trunk or access vlan.
SW1# show interfaces status

Shows the public encryption key used for SSH.
SW1# show crypto key mypubkey rsa

Shows inform­ation about the leased IP address (when an interface is configured to get IP address via a dhcp server)
SW1# show dhcp lease


thank you very much your sheet was really helpfull

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Cisco to Junos Cheat Sheet
          TCP/IP Model Layers Cheat Sheet
          Basic Cisco IOS Commands Cheat Sheet