Learn Cisco CLI – Part 1 – The Basics

Table of Contents
Learn Cisco CLI - Part 1
Router Basics

This is a blog series that is mainly used for personal use. I found I learn better by doing, repetition, and teaching others. If you find this useful then that’s great!

CLI Modes

Enable

Enter privileged EXEC mode.

				
					Router>enable
Router#
				
			

Disable

Return to user EXEC mode.

				
					Router#disable
Router>
				
			

Configuring Global Settings

Configure Terminal

Enter global configuration mode from privileged EXEC mode.

				
					Router>enable
Router#configure terminal
Router(config)#
				
			

Hostname

Set the device name.

				
					Router>enable
Router#configure terminal
Router(config)#hostname Router1
Router1(config)#
				
			

Managing User Access

Enable Password

Set the enable password.

				
					Router>enable
Router#configure terminal
Router(config)#enable password p4ssw0rd
				
			

Enable Secret

Set the enable secret password, which is encrypted.

				
					Router>enable
Router#configure terminal
Router(config)#enable secret p4ssw0rd!
				
			

Line Console 0

Access console line configuration mode.

				
					Router>enable
Router#configure terminal
Router(config)#line console 0
Router(config-line)#
				
			

Password

Specify the password required for a user to log in through console.

				
					Router>enable
Router#configure terminal
Router(config)#line console 0
Router(config-line)#password p4ssw0rd#
				
			

Login

Enable password checking at login.

				
					Router>enable
Router#configure terminal
Router(config)#line console 0
Router(config-line)#login
				
			

Line VTY 0 4

Enter configuration mode for virtual terminals (Telnet) lines.

				
					Router>enable
Router#configure terminal
Router(config)#line vty 0 4
Router(config-line)#
				
			

Password

Specify the password required for a user to log in through telnet.

				
					Router>enable
Router#configure terminal
Router(config)#line vty 0 4
Router(config-line)#password p4ssw0rd#
				
			

Login

Enable password checking at login.

				
					Router>enable
Router#configure terminal
Router(config)#line vty 0 4
Router(config-line)#login
				
			

Service Password-Encryption

Apply an encryption to all current and future password configured on the router.

				
					Router>enable
Router#configure terminal
Router(config)#service password-encryption
				
			

Configuring Banners

Banner Login

Configure a message that displays at user login attempts.

				
					Router>enable
Router#configure terminal
Router(config)#banner login #Message to display#
				
			

Banner MOTD

Configure a message of the day banner.

				
					Router>enable
Router#configure terminal
Router(config)#banner motd #Welcome to this router#
				
			

Setting Up System Clock

Clock Set

Set the system software clock.

				
					Router>enable
Router#clock set 12:30:00 15 Aug 2024
				
			

Show Clock

Display the system clock.

				
					Router>enable
Router#show clock
				
			

Managing Command History

History Size

Set the number of previously issued commands to store in the history buffer.

				
					Router>enable
Router#history size 50
				
			

Show History

Display the commands entered in the current EXEC session.

				
					Router>enable
Router#show history
				
			

Display System Information

Show Flash

Display the boot flash.

				
					Router>enable
Router#show flash
				
			

Show IP Interface Brief

Display a brief summary of interface status and configuration.

				
					Router>enable
Router#show ip interface brief
				
			

Show Protocols

Display Later 3 protocols enabled on the router.

				
					Router>enable
Router#show protocols
				
			

Show Running-Config

Display the active configuration file.

				
					Router>enable
Router#show running-config
				
			

Show Terminal

Display the current terminal settings.

				
					Router>enable
Router#show terminal
				
			

Show Version

Display the hardware platform and software versions.

				
					Router>enable
Router#show version
				
			

Managing Configuration Files

Copy Running-config Startup-config

Save the active configuration file to be used after a reboot.

				
					Router>enable
Router#copy running-config startup-config
				
			

Erase Startup-config

Deletes the startup configuration file in non-volatile random access memory (NVRAM).

				
					Router>enable
Router#erase startup-config
				
			

Reload

Reboot the router.

				
					Router>enable
Router#reload
				
			

Exiting

End

End and exit configuration mode.

				
					Router(config)#end
Router#
				
			

Exit

Exit one level in the menu structure.

				
					Router(config)#exit
Router#
				
			

Logout

Exit from the user EXEC mode CLI and end the current session.

				
					Router>logout
				
			

Leave a Comment