0% found this document useful (0 votes)
139 views

(CCNA) Cisco Commands Cheat Sheet #1

The document provides a cheat sheet of basic Cisco commands for the CCNA certification, organized into sections on router modes, configuring passwords and banners, interface settings, and verifying configurations. It includes commands for changing the hostname, securing login access, configuring IP addresses and default gateways, saving configurations, enabling SSH, using aliases for commands, and setting interface descriptions, speeds and duplex modes. The cheat sheet is intended to serve as a quick reference for CCNA students to common Cisco commands.

Uploaded by

Md IrfAN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
139 views

(CCNA) Cisco Commands Cheat Sheet #1

The document provides a cheat sheet of basic Cisco commands for the CCNA certification, organized into sections on router modes, configuring passwords and banners, interface settings, and verifying configurations. It includes commands for changing the hostname, securing login access, configuring IP addresses and default gateways, saving configurations, enabling SSH, using aliases for commands, and setting interface descriptions, speeds and duplex modes. The cheat sheet is intended to serve as a quick reference for CCNA students to common Cisco commands.

Uploaded by

Md IrfAN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

[CCNA] Cisco Commands Cheat Sheet #1

CCNA RnS, Cisco, Network September 16, 2013 Comments: 17

In this serie of 4-5 posts, we’ll try to create a simple Cisco Commands Cheat Sheet as a reference for
CCNA students.

Cisco Commands Cheat Sheet #2


Cisco Commands Cheat Sheet #3
Cisco Commands Cheat Sheet #4
Cisco Commands Cheat Sheet #5

Router Modes:

Router>: User mode = Limited to basic monitoring commands


Router#: Privileged mode (exec-level mode) = Provides access to all other router commands
Router(config)#: global configuration mode = Commands that affect the entire system
Router(config-if)#: interface mode = Commands that affect interfaces
Router(config-subif)#: subinterface mode = Commands that affect subinterfaces
Router(config-line)#: line mode = Commands that affect in lines modes (console, vty, aux…)
Router(config-router)#: router configuration mode

Changing switch hostname:

1 Switch(config)# hostname SW1

Configuring passwords:

1 SW1(config)# enable secret cisco ! MD5 hash


2 SW1(config)# enable password notcisco ! Clear text

Securing console port:

1 SW1(config)# line con 0


2 SW1(config-line)# password cisco
3 SW1(config-line)# login
Securing terminal lines:

1 SW1(config)# line vty 0 4


2 SW1(config-line)# password cisco
3 SW1(config-line)# login

Encrypting passwords:

1 SW1(config)# service password-encryption

Configuring banners:

1 SW1(config)# banner motd $


2 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
3 UNAUTHORIZED ACCESS IS PROHIBITED
4 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
5 $

Giving the switch an IP address:

1 SW1(config)# interface vlan 1


2 SW1(config-if)# ip address 172.16.1.11 255.255.255.0 ! or DHCP
3 SW1(config-if)# no shutdown

Setting the default gateway:

1 SW1(config)# ip default-gateway 172.16.1.1

Saving configuration:

1 SW1# copy running-config startup-config


2 Destination filename [startup-config]? ! Press enter to confirm file name.
3 Building configuration…
4 [OK]
5
6 ! Short for write memory.
7 SW1# wr
8 Building configuration…
9 [OK]
Working environment:

name lookup, history, exec-timeout and logging behavior…, also valid for line con 0.

1 SW1(config)# no ip domain-lookup
2 SW1(config)# line vty 0 4
3 SW1(config-line)# history size 15
4 SW1(config-line)# exec-timeout 10 30
5 SW1(config-line)# logging synchronous

Configuring switch to use SSH:

Configure DNS domain name:

1 SW1(config)# ip domain-name example.com

Configure a username and password:

1 SW1(config)# username admin password cisco

Generate encryption keys:

The size of the key modulus in the range of 360 to 2048

1 SW1(config)# crypto key generate rsa


2 How many bits in the modulus [512]: 1024

Define SSH version to use:

1 SW1(config)# ip ssh version 2

Enable vty lines to use SSH:

1 SW1(config)# line vty 0 4


2 SW1(config-line)# login local
3 ! You can set vty lines to use only telnet or only ssh or both as in the exam
4 SW1(config-line)# transport input telnet ssh

Aliases:

Used to create shortcuts for long commands.

1 SW1(config)# alias exec c configure terminal


2 SW1(config)# alias exec s show ip interface brief
3 SW1(config)# alias exec sr show running-config

Description, speed and duplex:


1 SW1(config)# interface fastEthernet 0/1
2 SW1(config-if)# description LINK TO INTERNET ROUTER
3 SW1(config-if)# speed 100 ! Options: 10, 100, auto
4 ! The range keyword used to set a group of interfaces at once.
5 SW1(config)# interface range fastEthernet 0/5 – 10
6 SW1(config-if-range)# duplex full (options: half, full, auto)

Verify Basic Configuration:

Shows information about the switch and its interfaces, RAM, NVRAM, flash, IOS, etc.

1 SW1# show version

Shows the current configuration file stored in DRAM.

1 SW1# show running-config

Shows the configuration file stored in NVRAM which is used at first boot process.

1 SW1# show startup-config

Lists the commands currently held in the history buffer.

1 SW1# show history

Shows an overview of all interfaces, their physical status, protocol status and ip address if
assigned.

1 SW1# show ip interface brief

Shows detailed information about the specified interface, its status, protocol, duplex, speed,
encapsulation, last 5 min traffic.

1 SW1# show interface vlan 1

Shows the description of all interfaces

1 SW1# show interfaces description

Shows the status of all interfaces like connected or not, speed, duplex, trunk or access vlan.

1 SW1# show interfaces status

Shows the public encryption key used for SSH.

1 SW1# show crypto key mypubkey rsa

Shows information about the leased IP address (when an interface is configured to get IP address
via a dhcp server)

1 SW1# show dhcp lease

Enjoy !

You might also like