Show Menu
Cheatography

Cisco Router Config Cheat Sheet (DRAFT) by

General configuration commands for Cisco Routers.

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

Cisco Basic Router commands

Initial Setup Commands

Prompt / Mode:
Command:
Descri­ption:
R(config)#
hostname <ho­stn­ame>
Set hostname for the device.
R(config)#
no ip domain­-lookup
Disable ip domain­-lo­okup; no timeout when incorrect cmd typed.
R(config)#
banner motd $ <motd msg> $
Set MOTD. Use $ to end the MOTD when multiple lines typed.
R(config)#
line console 0
R(config-line)#
logging synchr­onous
Prevents logging output from immedi­ately interr­upting console session.
R(config-line)#
password <pw­d>
Sets an unsecure password for the console port.
R(config-line)#
login
Enable required console port login password.
R(config-line)#
no login
Disables login.
R(config)#
line vty 0 4
Enter telnet/ssh config mode.
R(config-line)#
password <pw­d>
Sets a password for telnet­/ssh.
R(config-line)#
login
Enable required console port login password.
R(config)#
interface vlan1
Enter VLAN1 interface config mode.
R(config-if)#
ip address <ip ad> <subnet mask>
Configure VLAN ip address and subnet. (used for telnet)
R(config-if)#
no shutdown
Manually enable the interface.
R(config)#
enable secret <pw­d>
Enable a secure password for privileged mode.
R(config)#
service passwo­rd-­enc­ryption
Manually encrypt passwords.
R#
copy runnin­g-c­onfig startu­p-c­onfig
Copies running config to startup config. Saves all changes.
Router>
enable (or ena)
To enter privileged EXEC mode (enable mode)
Router#
configure terminal
enter global config­uration mode from privileged EXEC mode (Router#).
R(config)#
hostname <ho­stn­ame>
change the hostname on a Cisco router
R(config)#
enable secret­<pa­ssw­ord>
secures privileged EXEC mode by setting an MD5, SHA256, or higher hashed password.
R(config)#
line console 0
enters config­uration mode for the physical console port (tty line 0)
R(config-line)#
password <pa­ssw­ord>
secures direct console access, requiring a password to enter user exec mode.
R(config-line)#
login
Activates password authen­tic­ation
R(config)#
service passwo­rd-­enc­ryption
Encrypts all plain-text passwords in the config­uration file.
R#
write memory
Saves the config­uration to NVRAM, ensuring it persists after a reboot.
R#
show runnin­g-c­onfig
This command shows current interface, routing, and system settings.