Show Menu

Cisco Command#1 BY kanisthaw Cheat Sheet by

thanks : https://boubakr92.wordpress.com/2013/09/16/ccna-cheat-sheet-part-1/
cisco

Router Modes

Rout­er>: User mode = Limited to basic monitoring commands
Rout­er#: Privileged mode (exec-­level mode) = Provides access to all other router commands
Rout­er(­con­fig­)#: global config­uration mode = Commands that affect the entire system
Rout­er(­con­fig­-su­bif­)#: subint­erface mode = Commands that affect subint­erfaces
Rout­er(­con­fig­-li­ne)#: line mode = Commands that affect in lines modes (console, vty, aux…)
Rout­er(­con­fig­-ro­ute­r)#: router config­uration mode

Changing switch hostname

Switch­(co­nfig)# host­name 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­ryp­tion

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­ate­way 172.16.1.1

Securing console port

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

Aliases

! 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)# pass­word 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)# inte­rface vlan 1
SW1(co­nfi­g-if)# ip address 172.16.1.11 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­e.com

Configure a username and password :
SW1(co­nfig)# user­name admin pass­word 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­nfi­g)# 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

Download the Cisco Command#1 BY kanisthaw Cheat Sheet

2 Pages
//media.cheatography.com/storage/thumb/kanisthaw_cisco-command-1-by-kanisthaw.750.jpg

PDF (recommended)

Alternative Downloads

Share This Cheat Sheet!

 

Comments

RebazOmerAbbas RebazOmerAbbas, 14:42 6 Jan 19

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

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