breakfixlearn.com

NET-05Networking

Cisco IOS CLI essentials

Use this when: you sit at a Cisco router or switch prompt and need to move between modes, find a command, secure the box and save your work.

NET-05 Cisco IOS CLI essentials cheat sheet. Every table on it is repeated as text below.
Tap the sheet for the full-size image. The text version below is screen-reader friendly.

Text version

Everything on the sheet, as plain HTML: handy for screen readers, copy-paste and search.

Command modes: read the prompt

Each mode only accepts its own commands.

PromptModeUsed forGet there with
R1>User EXECBasic show, pingLog in
R1#Privileged EXECAll show, copy, reloadenable
R1(config)#Global configSettings for the whole deviceconfigure terminal
R1(config-if)#Interface configOne portinterface g0/1

Lines use line vty 0 15 or line console 0. exit goes up one level, end or Ctrl+Z goes straight back to #, and disable returns to >.

Help and shortcuts

Key or commandWhat it does
?, sh?, show ?What can I type here?
TabComplete the word
Ctrl+Shift+6Stop a ping or traceroute
do show ip int briefRun a show command from config mode
no shutdownno undoes a command

Look before you touch

CommandShows
show running-configLive config in RAM (show startup-config = saved in NVRAM)
show versionIOS version, uptime, model
show ip interface briefIP addresses and up/up status
show run | section line vtyOne section of the config
show run | include hostnameMatching lines only

Secure baseline

Replace <secret> with your own value. Keep owner, model and IOS details out of banners.

  • hostname R1
  • no ip domain-lookup (typos don't hang the console)
  • enable algorithm-type scrypt secret <secret>
  • username admin privilege 15 algorithm-type scrypt secret <secret>
  • ip domain-name lab.example.com
  • crypto key generate rsa modulus 2048
  • ip ssh version 2
  • line vty 0 15, then transport input ssh, login local and exec-timeout 10 0
  • banner login # Authorized access only #

Read interface status

Status / protocolMeans
up / upWorking
administratively downshutdown is set
down / downLayer 1: cable, or the far end is off
up / downLayer 2: encapsulation or clocking

show interfaces g0/1 adds errors, duplex and speed.

Save and recover

CommandWhat it does
copy running-config startup-configSave. write memory does the same.
reload in 10Reboots to the saved config in 10 minutes unless you run reload cancel. A safety net for risky changes.

Danger. erase startup-config followed by reload wipes the device.

Caution. Type 7 passwords (service password-encryption) are easy to reverse. Use secret.

Remember

  • Running config lives in RAM: save it or lose it
  • secret beats password
  • Abbreviate: sh ip int br

Sources

Go deeper on the blog