{"id":2799,"date":"2025-01-25T15:20:45","date_gmt":"2025-01-25T21:20:45","guid":{"rendered":"https:\/\/techlensfocus.com\/?p=2799"},"modified":"2025-01-25T15:20:45","modified_gmt":"2025-01-25T21:20:45","slug":"cisco-packet-tracer-lab-practice-with-ios-cli","status":"publish","type":"post","link":"https:\/\/techlensfocus.com\/index.php\/2025\/01\/25\/cisco-packet-tracer-lab-practice-with-ios-cli\/","title":{"rendered":"Cisco Packet Tracer Lab: Practice with IOS CLI"},"content":{"rendered":"\n<div class=\"wp-block-ideabox-toc ib-block-toc\" data-anchors='h2,h3,h4,h5,h6' data-collapsable='true' ><div class=\"ib-toc-container ib-toc-list-style-numbers ib-toc-hierarchical ib-toc-expanded\"><div class=\"ib-toc-header\"><div class=\"ib-toc-header-title\">Table of Contents<\/div><div class=\"ib-toc-header-right\"><span class=\"ib-toc-icon-collapse\"><span class=\"dashicon dashicons dashicons-minus\"><\/span><\/span><span class=\"ib-toc-icon-expand\"><span class=\"dashicon dashicons dashicons-plus\"><\/span><\/span><\/div><\/div><div class=\"ib-toc-separator\" style=\"height:2px\"><\/div><div class=\"ib-toc-body\"><ol class=\"ib-toc-anchors\"><\/ol><\/div><\/div><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>In this guide, we will walk through the steps to configure basic security and management settings on Cisco devices, including hostnames, enable passwords, and password encryption. This lab is perfect for beginners preparing for the CCNA exam.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Key Concepts of the Cisco IOS CLI<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">EXEC Modes<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>User EXEC Mode (hostname&gt;)<\/strong><\/p>\n\n\n\n<p>This is the entry-level mode when you access a Cisco device. It allows basic, non-intrusive commands like viewing the system status and network settings. However, it does not permit any configuration changes. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Privileged EXEC Mode (hostname#)<\/strong><\/p>\n\n\n\n<p>A more powerful mode where you can execute advanced administrative tasks. Privileged EXEC mode is essential for viewing detailed device information and modifying configurations. <\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Global Configuration Mode (hostname(config)#)<\/strong><\/p>\n\n\n\n<p>The mode for making configuration changes to the device. To access it, type <strong>configure terminal<\/strong> from privileged EXEC mode.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configuration Files<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Cisco devices use two text-based files to store configurations:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Running-Config:<\/strong> This file resides in RAM and determines the current operational state of the device. Changes to this file take effect immediately but are lost upon a restart unless saved.<\/li>\n\n\n\n<li><strong>Startup-Config:<\/strong> Stored in non-volatile RAM (NVRAM), this file contains the saved configuration that is loaded when the device boots. Any changes made to the running-config must be explicitly saved to the startup-config.<\/li>\n<\/ul>\n\n\n\n<p>Below are essential commands for managing configuration files: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Save the running-config to startup-config. There are three commands to do:<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">copy running-config startup-config\nwrite \nwrite memory<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>View the current configurations:<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">show running-config\nshow startup-config<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Reset the device to factory defaults, three different commands:<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">write erase\nerase nvram\nerase startup-config<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Cisco IOS Context-Sensitive Help<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Cisco IOS CLI includes built-in tools to assist users with commands, syntax, and options:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>?<\/strong> : List all the available command in current mode<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Switch>?\nExec commands:\n  connect     Open a terminal connection\n  disable     Turn off privileged commands\n  disconnect  Disconnect an existing network connection\n  enable      Turn on privileged commands\n  exit        Exit from the EXEC\n  logout      Exit from the EXEC\n  ping        Send echo messages\n  resume      Resume an active network connection\n  show        Show running system information\n  ssh         Open a secure shell client connection\n  telnet      Open a telnet connection\n  terminal    Set terminal line parameters\n  traceroute  Trace route to destination<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>command ?<\/strong>: List available keywords for the command<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Switch>enable ?\n  &lt;0-15>  Enable level\n  &lt;cr><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Lab Topology <\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>Our lab setup is very simple, includes a router (R1) and a switch (SW1) connected to a PC (PC1).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"288\" src=\"https:\/\/techlensfocus.com\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-25-at-1.45.06\u202fPM-1024x288.png\" alt=\"\" class=\"wp-image-2812\" style=\"width:690px;height:auto\" srcset=\"https:\/\/techlensfocus.com\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-25-at-1.45.06\u202fPM-1024x288.png 1024w, https:\/\/techlensfocus.com\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-25-at-1.45.06\u202fPM-300x84.png 300w, https:\/\/techlensfocus.com\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-25-at-1.45.06\u202fPM-768x216.png 768w, https:\/\/techlensfocus.com\/wp-content\/uploads\/2025\/01\/Screenshot-2025-01-25-at-1.45.06\u202fPM.png 1160w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n<p>Now let&#8217;s practice!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Instructions<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Access the CLI<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>You can connect via console cable or SSH to your Cisco device. In this Packet Tracer lab, you just need to click on the device. Also, you can skip the configuration dialog by typing <strong>no<\/strong>.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">         --- System Configuration Dialog ---\n\nWould you like to enter the initial configuration dialog? [yes\/no]: no<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Change the Hostname<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>Let&#8217;s assign a name for our Router 1 (R1). Here are the commands:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">Router>enable\nRouter#configure terminal\nRouter(config)#hostname R1\nR1(config)#<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Enable Password<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>The enable password is configured  in<strong> global configuration <\/strong>mode:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">R1>enable\nR1#configure terminal\nR1(config)#enable password techlensfocus\nR1(config)#exit\nR1#exit\n\nR1>enable\nPassword: \nR1#<\/pre>\n\n\n\n<p>By default, this password is stored in plain text and visible in the configuration file. This step helps you understand how an unencrypted password works and its limitations.<\/p>\n\n\n\n<p>To view the enable password in the device\u2019s configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">show running-config<\/pre>\n\n\n\n<p>Look for the enable password line in the output. The password &#8220;techlensfocus&#8221; will appear in plain text, as it is not encrypted.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Encrypt the password<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>In this section, we will ensure current and future passwords are encrypted.<\/p>\n\n\n\n<p>The <strong>service password-encryption<\/strong> command applies a weak encryption (Type 7) to these passwords, providing basic protection:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">R1>enable\nR1#configure terminal\nR1(config)#service password-encryption\nR1(config)#exit<\/pre>\n\n\n\n<p>After enabling password encryption, you need to verify that passwords in the running configuration are no longer displayed in plain text:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">R1#show running-config\n\nenable password 7 0835494D01150019010D03073F38<\/pre>\n\n\n\n<p>Check the output for the enable password. You should see the password has been converted into an encrypted string. The number 7 indicates that the password has been encrypted using Cisco&#8217;s Type 7 encryption.<\/p>\n\n\n\n<p>While this encryption is better than plain text, it is relatively weak and can be decrypted with specialized tools.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Encrypted Enable Password<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>In this step, we will configure a more secure password for privileged EXEC mode.  Unlike the <strong>enable<\/strong> <strong>password<\/strong> command, the <strong>enable<\/strong> <strong>secret<\/strong> automatically encrypts the password with strong Type 5 encryption (MD5 hashing), providing enhanced security.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">R1#configure terminal\nR1(config)#enable secret cisco\nR1(config)#exit<\/pre>\n\n\n\n<p>Next, we verify the current configuration to ensure the password was configured successfully:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">R1#show running-config\n\nenable secret 5 $1$mERr$hx5rVt7rPNoS4wqbXKX7m0<\/pre>\n\n\n\n<p>Locate the enable secret line. The password will be displayed as a hashed value. The number 5 indicates that the password is encrypted using Type 5 (MD5 hashing).<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Save the Configuration<\/h3>\n\n\n\n<p><\/p>\n\n\n\n<p>It is crucial to save your running configuration to the startup configuration to ensure the changes persist after a reboot. We will use <strong>write memory<\/strong> command to complete this task:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">R1# write memory\nBuilding configuration...\n[OK]<\/pre>\n\n\n\n<p>You can also use the following command to display the saved startup configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"raw\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"false\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">show startup-config<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<p>In summary, you\u2019ve gained hands-on experience configuring hostnames, passwords, and encryption on Cisco devices. These steps are fundamental for securing network devices and managing access effectively.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to configure hostnames, secure privileged EXEC mode with passwords, and enable encryption on Cisco devices in this step-by-step CCNA lab guide. <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[6,7],"tags":[56,57],"class_list":["post-2799","post","type-post","status-publish","format-standard","hentry","category-it","category-networking","tag-cisco","tag-packet-tracer"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/posts\/2799","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/comments?post=2799"}],"version-history":[{"count":44,"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/posts\/2799\/revisions"}],"predecessor-version":[{"id":2846,"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/posts\/2799\/revisions\/2846"}],"wp:attachment":[{"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/media?parent=2799"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/categories?post=2799"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techlensfocus.com\/index.php\/wp-json\/wp\/v2\/tags?post=2799"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}