CCNA Notes

200-301 Exam Prep

Progress0/67

0% complete

Practice TestsNew
1Networking Devices2Interfaces And Cables3OSI Model and TCP/IP Suite4Intro to the CLI5Ethernet LAN Switching - Part 16Ethernet LAN Switching - Part 27IPv4 Addressing - Part 18IPv4 Addressing - Part 29Switch Interfaces10The IPv4 Header11Routing Fundamentals - Part 111Static Routing - Part 212Life of a Packet13Subnetting - Part 114Subnetting - Part 215Subnetting (VLSM) - Part 316VLANs - Part 117VLANs - Part 218VLANs - Part 319DTP / VTP20Spanning Tree Protocol - Part 121Spanning Tree Protocol - Part 222Rapid Spanning Tree Protocol23Etherchannel24Dynamic Routing25RIP / EIGRP26OSPF - Part 127OSPF - Part 228OSPF - Part 329First Hop Redundancy Protocol30TCP and UDP31IPv6 - Part 132IPv6 - Part 233IPv6 - Part 334Standard Access Control List35Extended Access Control List36CDP and LLDP37NTP - Network Time Protocol38DNS - Domain Name System39DHCP - Dynamic Host Configuration Protocol40SNMP - Simple Network Management Protocol41SYSLOG42SSH - Secure Shell43FTP and TFTP44NAT (Static) - Part 145NAT (Dynamic) - Part 246QoS (Voice VLAN) - Part 147QoS (Quality of Service) - Part 248Security Fundamentals49Port Security50DHCP Snooping51Dynamic ARP Inspection52LAN Architectures53WAN Architectures54Virtualization and Cloud - Part 154Virtualization (Containers) - Part 254Virtualization (VRF) - Part 355Wireless Fundamentals56Wireless Architectures57Wireless Security58Wireless Configuration59Introduction to Network Automation60JSON, XML, and YAML61REST APIs62Software Defined Networking63Ansible, Puppet, and Chef67CCNA Complete Cheatsheet
/Intro to the CLI
Topic 44 min read

Intro to the CLI

/
Tip: Select text to highlight or pin your reading position

4. INTRO TO THE CLI

What is a CLI?

  • A "Command-line Interface"
  • The interface you use to configure Cisco devices

A GUI is a "Graphical User Interface"

How do you connect to a Cisco Device?

  • Console Port : When you first configure a device, you have to connect via the Console Port.

You can use a "Rollover cable" : DB9 serial connector to RJ45 OR a DB9 Serial to USB

imageClick to enlarge

How do you actually access the CLI?

  • You need to use a TERMINAL EMULATOR (Example: PuTTy is a popular choice) and connect via "Serial" (default settings)

Cisco Default Settings are:

Speed (baud) : 9600 bits/second Data bits: 8 data bits Stop bits: 1 stop bit (sent after 8 data bits are sent) Parity: None Flow Control: None


When you first enter the CLI you will DEFAULT be in what is called 'User EXEC' mode.

USER EXEC MODE:

(Hostname) > // Prompt looks like THIS //

  • User EXEC mode is very limited.
  • User can look at some things but can't make ANY changes to the configuration.
  • AKA 'User Mode'

Using the 'enable' command, in User EXEC mode, switches you to 'Privileged EXEC' mode.


PRIVILEGED EXEC MODE:

  • Provides complete access to view the device's configuration, restart the device, etc.
  • Cannot change the configuration, but can change the time on the device, save the configuration file, etc.

(Hostname)# // Prompt looks like THIS //


USE a Question Mark (?) to view the available commands in ANY mode. Combining ? with a letter or partial command will list all the commands with those letters.

imageClick to enlarge

USE the TAB key to complete partially entered commands IF the command exists.


GLOBAL CONFIGURATION MODE:

To enter Global Configuration Mode, enter the command, within Privileged EXEC mode

'configure terminal' (or 'conf t')

Router# configure terminal Router(config) #

Router(config) # run

Router(config) # no

Type 'exit' to drop back into 'Privileged EXEC' mode.


To Enable Password for User EXEC mode:

Router(config)# enable password (password)

  • Passwords ARE case-sensitive.

// This command encrypts plain-text passwords, visible in the config files, using simple encryption.

Router(config)# service password-encryption

If you enable 'service password-encryption'

  • Current passwords WILL be encrypted.
  • Future passwords WILL be encrypted.
  • The 'enable secret' WILL NOT be effected.

If you disable 'service password-encryption'

  • Current passwords WILL NOT be decrypted.
  • Future passwords WILL NOT be encrypted.
  • The 'enable secret' WILL NOT be effected.

// This command enables passwords for the Privileged EXEC mode.

Router(config)# enable secret (password)

// enable secret will ALWAYS be encrypted (at level 5)


There are TWO separate configuration files kept on the device at once.

Running-config :

  • The current, ACTIVE configuration file on the device. As you enter commands in the CLI, you edit the active configuration.

Startup-config :

  • The configuration file that will be loaded upon RESTART of the device.

To see the configuration files, inside 'Privileged EXEC' mode:

Router# show running-config // for running config //

OR

Router# show startup-config // for startup config //


To SAVE the Running configuration file, you can:

Router# write Building configuration... [OK]

Router# write memory Building configuration... [OK]

Router# copy running-config startup-config

Destination filename [startup-config]?

Building configuration... [OK]


To encrypt passwords:

Router# conf t

Router(config)# service password-encryption

This makes all current passwords encrypted

Future passwords will ALSO be encrypted

“Enable secret” will not be effected (it’s ALWAYS encrypted)

imageClick to enlarge

Now you will see that the password is no longer in plaintext.

“7” refers to the type of encryption used to encrypt the password. In this case, “7” uses Cisco’s proprietary encryption.

“7” is fairly easy to crack since the encryption is weak.

For BETTER / STRONGER encryption, use “enable secret”

imageClick to enlarge

“5” refers to MD5 encryption.

Can still be cracked but it’s much much stronger.

Once you use “enable secret” command, this will override “enable password”


To CANCEL or delete a command you entered, use the “no” keyword

imageClick to enlarge

In this instance, disabling “service password-encryption”:

  • current passwords will NOT be decrypted (unchanged)
  • future passwords will NOT be encrypted
  • the “enable secret” will not be effected

imageClick to enlarge

imageClick to enlarge

imageClick to enlarge

imageClick to enlarge

imageClick to enlarge

PreviousOSI Model and TCP/IP Suite
NextEthernet LAN Switching - Part 1