29, January 2017

[CCNA] Cisco Commands Cheat Sheet

CCNA Cheat Sheet

CCNA 1 v5.1 PT Practice Skills Exam 2017

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
2
SW1(config)# enable secret cisco    ! MD5 hash
SW1(config)# enable password notcisco    ! Clear text

Securing console port:

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

Securing terminal lines:

1
2
3
SW1(config)# line vty 0 4
SW1(config-line)# password cisco
SW1(config-line)# login

Encrypting passwords:

1
SW1(config)# service password-encryption

Configuring banners:

1
2
3
4
5
SW1(config)# banner motd $
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
UNAUTHORIZED ACCESS IS PROHIBITED
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
$

Giving the switch an IP address:

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

Setting the default gateway:

1
SW1(config)# ip default-gateway 172.16.1.1

Saving configuration:

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

Working environment:

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

1
2
3
4
5
SW1(config)# no ip domain-lookup
SW1(config)# line vty 0 4
SW1(config-line)# history size 15
SW1(config-line)# exec-timeout 10 30
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
2
SW1(config)# crypto key generate rsa
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
2
3
4
SW1(config)# line vty 0 4
SW1(config-line)# login local
! You can set vty lines to use only telnet or only ssh or both as in the example.
SW1(config-line)# transport input telnet ssh

 

sources and additional links : https://www.reddit.com/r/networking/comments/2y1epr/four_downloadable_cheatsheets_for_ccna_study_ip/

http://packetlife.net/library/cheat-sheets/

http://www.ncat.co.uk/net_lib/ncat%20ccna%20cheat%20sheet.pdf

[CCNA] Cisco Commands Cheat Sheet #1