Show Menu

Cisco CLI Comprehensive Commands Cheat Sheet (DRAFT) by

Command line interface practice

This is a draft cheat sheet. It is a work in progress and is not finished yet.

User Levels | Routers & Switches

User Exec
Router Name>
Privileged Exec
Router Name# [where network devices are config­ured]
Global Exec
Router Name(c­onfig)# [conf­igu­ration impact the entire device]
Interface Config
Router Name(c­onf­ig-if)# [impacts a particular interf­ace]
Line Config
Router Name(c­onf­ig-­line)

Basic Config | Routers & Switches

router> enable | disable
logs the user into/out of privileged exec
router# configure terminal
logs user into global config
router­(co­nfi­g)#> hostname
re/name current device
no hostname
removes name
router­(co­nfig)# exit
backs out one level to a previous levvel
router> reload
reboots the device
router­(co­nfig)# end
Drops back to user exec mode

Basic Commands | Routers & Switches

Router­(co­nfig)# interface f0/0 int f0/0
Enter interface config
Router­(co­nfig)# line console 0
Router­(co­nfig)# interface gigabi­tet­hernet 0/0 int g0/0
Router­(co­nfi­g-l­ine)# exit
back up one step from any level
Router­(co­nfi­g-l­ine)# end
straight to user exec mode

Basic Security

Securing privileged EXEC
S1(con­fig)# enable secret Cisc0
pw protects the privileged exec line
Securing console port
S1(con­fig)# line console 0
moves into line config­uration mode
S1(con­fig­-line)# passsword Cisc0
sets console access password to "­Cis­c0"
S1(con­fig­-line)# login
turns on the password requir­ement
Securing the Virtual Ports [ssh & telnet]
S1(con­fig)# line vty 0 15
moves into line config­uration mode
S1(con­fig­-line)# Password Cisc0
sets virtual terminal access password to "­Cis­c0"
S1(con­fig­-line)@ login
turns on the password requir­eme­nt­turns on the password requir­ement
Encry­pting all Passwords
S1(con­fig)# service passwo­rd-­enc­ryp­tion
encrypts all passwords
Message of the Day
S1(con­fig)# banner motd # Autho­rized Access Only *#
S1# copy run start

adding Pipe Commands

R1# do show run |
include interface
exclude interface
begin hostname


Co­mmands are only case sensitive after the pipe
regar­dless of current config; router will start up with this
until the current config is saved


read only memory


R1># no ip domain­-lo­okup
[turns off auto dns query]
R1(con­fig­-if)# no ip address
[Removes IP Address]
[cursor moved to the beginning of the line]
[cursor moved to the end of the line]
copy run start
[copys running config to startup config]
show run start
[displays startup config]
* ctl+s­hift+6
ip host switch1
Assigns the listed ip address [] to Switch1
Open help docume­ntation
enable secret abc123
Enables secret password and sets to abc123
vty - virtual telnet line

Remote Access

R2# telnet
`with PW & access allowed; you will enter the remote router *


interface serial 0/0/0 int f0/0 [moves into config for s0/0/0]
ip address 192.16­8.1.254 255.25­5.2­55.0 [sets ip & subnet]
no shut [powers on interf­ace]
shut [powers off interf­ace]
copy run start


interface f0/0 int f0/0­[moves into config for f0/0]
ip address 192.16­8.1.254 255.25­5.2­55.0 [sets ip & subnet]
no shut [powers on interf­ace]
shut [powers off interf­ace]
copy run start

Configure VLAN

Create and Name VLANs
Switch­(co­nfi­g)# vlan 10
moves to vlan 10 config
Switch­(co­nfi­g-v­lan)# name Support
names vlan 10, "­sup­por­t"
Switch­(co­nfi­g)# vlan 20
moves into vlan 20 from vlan 10
Switch­(co­nfi­g)# name Develo­pment
names vlan 20, "­dev­elo­pme­nt"
Assign switchport access
Switch­(co­nfi­g)# int f0/1
enters config for f0/1
Switch­(co­nfi­g-i­f)# switc­hport access vlan 10 ` *
Switch­(co­nfi­g)# int f0/2
Switch­(co­nfi­g-i­f)# switc­hport access vlan 20 ` *

Routing Config­uration

Gateway of Last Resort
[rest­ricted to edge [stub] routers only]
R1(con­fig)# ip route s0/0/0
Static Route admin­ist­rative distance = 150
R1(con­fig)# ip route 192.16­8.2.0 255.25­5.255.0 s0/0/0 150
routers only "­kno­w" what they are connected too
s* - default static route
c - direct connect

"­Adv­anc­ed" Show Commands

show access­­-list
Displays the access­­-lists located on the device; including every line of the access­­-list [not which interface the list is list is applied to
show vlan
Displays info and status of VLANs [on the device] i.e. VLAN names, numbers, and the interfaces on which each VLAN can be found
show ip protocols
Displays info about Layer 3 protocols; RIP, OSPF and EIGRP [high level overview each protocol has its own show command]
show interface trunk
Displays all trunk ports on the device; which VLANs are allowed on which trunk, what the native VLAN is.

Verifi­cation Commands

R1# show ip route
displays routing table
R1# show ip interface
R1# show ip interface brief
displays the interface config­ura­tions
R1# show runnin­g-c­onfig
R1# show interface s0/0/0
R1# show interface f0/0
R1# show interface g0/0
R1# show version
displays IOS info and previous method of restart
R1# show mac addres­s-t­able
dispalys contents of MAC Address Table
R1# *int g0/0
displays the listed interface info
R1# show clock
R1# clock set
09:10:01 11 December 2019
** 'Do' - in front of a command will run the command at any level i.e. my device
(config)# do show ip interface brief -OR- my device (config)# do reload
Add a Ne

Managing IOS Files

R1# copy run flash:my config
copies running config­\saves to flash; names it my config
R1# erase start
erases startup config
R1# copy flash:my config start
copies my config and overwrites start up config
R1# copy run tftp
requests a remote host
add ip address of remote router
requests a file name
add unique file name w/ data
R1# more flash:my config
`allows you to view the config file
Storage for Operating System
IOS - Flash
startup Config - NVRAM
Running config - RAM

Error Messages

% Invalid input detected at '^' marker
You are at the wrong level to run command
% Incomplete command
[command brings a null response]
This is not a bad command, there is just no results to display
Your CLI command fails - are you in the right mode | level
- are you on the right device


stop current activity
erases from cursor to end of line
erases from cursor to beginning of line
completes the command


mydevice (config)# sdm pre dual def
used if switch won't take IPv6 address

Execute Commands

Build a server w/IP
ip host Server1
Rename the router "My Router­­"
hostname MyRouter