Show Menu
Cheatography

Cisco IOS CLI Cheat Sheet by

This is a Cisco IOS CLI Cheat Sheet for Cisco CCNA 1

Basic Device Config­uration

Enter Privie­leged Exec mode
Switch> enable
Leave Privie­leged Exec mode
Switch# disable
Enter Global Config­uration mode
Switch# configure terminal
Config­uring a Device Name (Hostname)
Switch­(co­nfig)# hostname NAME
Config­uring a Console Port (Console)
Switch­(co­nfig)# line console 0
Config­uring a Console Password (Console)
Switch­(co­nfi­g-l­ine)# password PASSWORD
Activating password checking on the Console Port
Switch­(co­nfi­g-l­ine)# login
Activating Userna­me/­Pas­sword checking on the Console Port
Switch­(co­nfi­g-l­ine)# login local
Creating a timeout on the Console Port
Switch­(co­nfi­g-l­ine)# exec-t­imeout MINUTES SECONDS
Backup one level
Switch­(co­nfi­g-l­ine)# exit
Backup one level
Switch­(co­nfig)# exit
Backup all levels
Switch# CTRL + Z or CTRL + C

The Show Commands to Know!

Shows inform­­ation about the switch and its interf­­aces, RAM, NVRAM, flash, IOS, etc
Switch# show version
Shows the current config­­ur­ation file stored in DRAM.
Switch# show runnin­­g-­c­onfig
Shows the config­­ur­ation file stored in NVRAM which is used when the device boots.
Switch# show startu­p-c­­onfig
Shows an overview of all interf­­aces, their physical status, protocol status and ip address if assigned.
Switch# show ip interface brief
Shows any Descri­ptions you've configured on your individual interf­aces.
Switch# show interfaces descri­­ption
Shows the status of all interfaces like connected or not, speed, duplex, trunk or access VLAN.
Switch# show interfaces status

Awesome Shortcuts

Create shortcuts for long commands
Router­(co­­nfig)# alias exec SHIP show ip interface brief
Configure a Banner Message that shows "­eve­ryw­her­e"
Router­(co­­nfig)# banner motd $ THIS IS MY MESSAGE $
Encrypt all plain-text passwords stored on the devic
Router­(co­­nfig)# service passwo­rd-­enc­ryption
Stop those "­pop­-up­" messages from cutting through your CLI
Router­(co­­nfig)# logging synchr­onous
Save your config­uration
Router# wr or write or copy run star

Some Fun "­Stu­die­s"

LearnCisco (Confi­guring a Cisco Router)
Lock down your Cisco Router (from the NSA?)
 

Config­uring a Switch Management Interface

Access a specific switch VLAN interface SVI (common VLAN 1)
Switch­(co­nfig)# interface VLAN #
Configure a reachable IP address and Subnet Mask
Switch­(co­nfig-if )# ip address ADDRESS MASK
Activate the Switch management interface
Switch­(co­nfig-if )# no shut
Exit the switch VLAN interface (SVI)
Switch­(co­nfig-if )# exit
Configure a default gateway for the switch to send upstream traffic out of the local LAN
Switch­(co­nfig)# ip defaul­t-g­ateway IP-ADD­RES­S-O­F-U­PST­REA­M-R­OUTER

Config­uring a Router Network Interface

Locate your Router interfaces (learn their design­ations)
Router# show ip interface brief
Access Global Config­uration mode
Router# configure terminal
Access a specific Router interface
Router­(co­nfig)# interface gi0/0/0
Configure a reachable IP address and Subnet Mask
Router­(co­nfi­g-if)# ip address ADDRESS MASK
Activate the Router interface
Router­(co­­nf­ig-if )# no shut

Config­­uring SSH for Remote Management

Configure the device hostname
Switch­(co­nfig)# hostname NAME
Configure the Doman Name the device will operate on
Switch­(co­­nfig)# ip domain­­-name EXAMPL­E.COM
Configure a username and password for remote management
Switch­(co­­nfig)# username admin password cisco
Generate encryption keys to "­obf­usc­ate­" the management traffic
Switch­(co­­nfig)# crypto key generate rsa
Configure a minimum of 1024 bits for encryption security
How many bits in the modulus [512]: 1024
Define the SSH version to use (older versions have exploi­ts/­vul­ner­abi­lities)
Switch­(co­­nfig)# ip ssh version 2
Access the VTY lines (used for Telnet and SSH)
Switch­(co­­nfig)# line vty 0 4
Activate SSH on the VTY lines
Switch­(co­­nf­ig-­line)# transport input ssh
Require a username and password combo
Switch­(co­­nf­i­g­-l­­ine)# login local
Save your config­uration
Switch# wr
                           
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          NET-126 Commands Cheat Sheet
          Cisco 101 Exam #1 Cheat Sheet