CCNA Deep Dive #1:
Cisco CLI and Packet Tracer Basics

Lab 3: Exploring the Configuration Process in Packet Tracer

Lab 3 Introduction

Lab 3 examines the configuration of the network devices in a Cisco Packet Tracer (PT) topology and the effects of saving configurations in the individual devices compared with saving the .pkt files in PT. In particular:

Part A: Native IOS Config File Management – Experience how to display the startup-config and running-config files, as well as the effect that a configuration change in configuration mode has on these two files.

Part B: PT’s Effect on Configuration in the Devices – Cisco devices manipulate their startup-config and running-config files, but PT stores its versions of those files, along with other data, in .pkt files. Experience some interactions with how different combinations of saving and not saving impacts what PT saves when you complete a lab session.

Bonus: Reconfigure a Switch – The bonus lab walks you through the process to remove all configuration, reconfigure the same simple passwords that were pre-configured, along with introducing some useful administrative configuration you may want to use when labbing on your own.

Lab 3 Part A: Native IOS Config File Management

In Part A, you will focus on the router and switch features implemented by PT, particularly in the Command Line Interface (CLI) of Cisco routers and switches. In particular, you will see how commands added in configuration mode change the running-config file, and how you must save that configuration to the startup-config file if you want the new configuration to be used after the next device reload.

In this Lab Part, you will take these steps:

A.1 Open PT File from /Working

A.2 Navigate User and Enable (Privilege) Mode

A.3 Configure the Hostname and Compare Configuration Files (Scenario 1 )

A.4 Configure the Hostname and Compare Configuration Files (Scenario 2)

 

Figure 3A-1 Lab Topology for Lab 3 Part A

 

A.1 Open PT File from /Working

Open the .pkt file for this lab to get ready to perform the lab.

  1. First, remember the directory where you are keeping all your PT files for the course – a directory that should now have subdirectories /original and /working.
  2. Download the .pkt file for this lab and put a copy in both the /original and /working subfolders. Note the file name for future reference: ____________
  3. Start the Packet Tracer app and login as needed.
  4. Once started, open this lab’s .pkt file.
  5. Go ahead and open the detail window for router R1 by clicking the R1 icon and moving to the CLI tab in that window.

 

A.2 Navigate User and Enable (Privileged) Mode

Navigate to enable (privileged) EXEC mode to compare the startup-config and running-config files at the beginning of this lab to confirm that they both list the same hostname.

  1. From the router R1 CLI, click inside the window and press enter. (You should now see a password prompt.)
  2. Type the console password (cisco) and press enter.
  3. Use the enable command, followed by the required password (cisco), to enter enable mode.
  4. Use the show running-config and show startup-config commands and compare the output. Does the output look mostly the same? ___________________________
  5. This lab will use the hostname name global config command for comparison. Repeat the last two commands and look for that command. Do both configuration files list hostname R1? _________________

 

A.3 Configure the Hostname and Compare Configuration Files (Scenario 1)

Next, change the hostname to your first name, confirm the files are different – and then reload the router to prove that the router loses the configuration.

  1. From the router R1 enable mode prompt, enter global config mode.
  2. Use the hostname yourname global config command to change the hostname (where you use your name for “yourname”).
  3. Exit config mode (end or CNTL-z).
  4. Confirm only the running-config has the new hostname command using the show running-config and show startup-config commands. Which config file shows which hostname? ______________________
  5. Reload IOS without saving the running-config file to the startup-config file – a process that should result in you losing the configuration change you just made. To do so, either:
    1. Use the reload command, and do NOT answer “yes” when prompted to ask if you want to save the configuration. Or…
    2. From the PT detail window for router R1, click the physical tab, click the power on/off button once (to power off), and again to power on.
  6. After the reload, again move to enable mode.
  7. Repeat the comparison of the hostname command in the two configuration files using the show running-config and show startup-config commands. Which config file shows which hostname? Did PT retain your name as the hostname? ______________________

 

A.4 Configure the Hostname and Compare Configuration Files (Scenario 2)

Repeat all the steps in the previous process, but this time save your configuration before reloading your router:

  1. From the router R1 enable mode prompt, enter global config mode.
  2. Use the hostname yourname global config command to change the hostname (where you use your name for “yourname”).
  3. Exit config mode (end or CNTL-z).
  4. Confirm only the running-config has the new hostname command using the show running-config and show startup-config commands. Which config file shows which hostname? ______________________
  5. Use the copy running-config startup-config EXEC command to replace the startup-config file with the contents of the running-config file.
  6. Reload IOS  – a process that should result in you keeping the configuration change you just made because you saved the running-config file to the startup-config file. To do so, either:
    1. Use the reload command, and do NOT answer “yes” when prompted to ask if you want to save the configuration. Or…
    2. From the PT detail window for router R1, click the physical tab, click the power on/off button once (to power off), and again to power on.
  7. After the reload, again move to enable mode.
  8. Repeat the comparison of the hostname command in the two configuration files using the show running-config and show startup-config commands. Which config file shows which hostname? Did PT retain your name as the hostname? ______________________

Lab 3 Part B: Packet Tracer’s Effect on Configuration in the Devices

So far, in this lab, you have seen how a real Cisco router or switch would behave. However, PT also includes the concept of saving the network file, which includes all the configuration. In short:

  • If you ask PT to save the .pkt file, PT saves the configuration state of all devices – both startup and running-config files.
  • If you choose not to save the PT file and close the PT app, you lose all configuration changes since the previous save – no matter what IOS commands you used.

As a result, most people save their PT files before exiting PT. PT asks you to do just that, with a default answer of “yes”, meaning “yes, save the file.” Part B works through an example that shows how you could lose all your configuration as a way to help you understand how PT’s logic works.

In this Lab Part, you will take these steps:

B.1 Save Configs in the Network Devices, but Do Not Save the PT File

B.2 Re-Open the .pkt File to Discover: Was R1’s Configuration Saved?

 

Figure 3B-1 Lab Topology for Lab 3 Part B

 

B.1 Save Configs in the Network Devices, but Do Not Save the PT File

In this next task, you will change the hostname of a device again. In this scenario, you will correctly save the configuration in the network device (router R1). However, you will then choose not to save the .pkt file and discover the results.

  1. For this exercise, do NOT click “yes” to the upcoming prompt.
  2. Repeat the comparison of the hostname command in the two configuration files using the show running-config | include hostname and show startup-config  commands. Which config file shows which hostname? Did PT retain your name as the hostname? ______________________
  3. Are these hostnames the same hostnames configured on router R1 at the beginning of this lab? (The original hostname should have been “R1”.) _____________________
  4. At this point, you should realize that the original hostname was R1, and the current hostname per both the startup-config and running-config files is something else, like R1-Wendell. If not, inquire with your instructor.
  5. From the PT user interface menu items at the top of the screen, select .. New to create a new PT file. Doing so causes PT to close the current file.
  6. When prompted as to whether you want to save your network (file), click NO. (The goal by clicking “no” is to see what happens when you do not save the PT file.)

 

B.2 Re-Open the .pkt File to Discover: Was R1’s Configuration Saved?

If you followed the sequence of steps so far, PT should show a clean topology with no devices in the main window, because your last action was to ask to start a new file. However, we don’t want to start a new file. Instead, you should open the same file you just closed without saving, and then investigate to find out if the configuration change on router R1 (the change to the hostname) was saved or not. To do so:

 

  1. From the PT user interface menu items at the top of the screen, select .. Recent Files, and choose the file you just closed, to open the .pkt file again.
  2. Click on the R1 icon, move to the CLI window, and navigate to enable mode.
  3. Once again compare the hostnames using the show running-config | include hostname and show startup-config commands. Which config file shows which hostname? ______________________
  4. Are these hostnames the same hostnames configured on router R1 at the beginning of this part of the lab? Or are they the hostnames that include your first name? (The original hostname should have been “R1”.) _____________________
  5. Does it appear that clicking “no” when asked to save a .pkt file on close removes all configuration changes made in the CLI? Post your opinion in the group chat in class. ____________________

Lab 3 Bonus: Administrative Configuration and Additional Config Mode Navigation

The Bonus section provides a little additional learning for those moving quickly through the lab. If you do not reach this section, do not be concerned. You can come back to this bonus section after class if interested, and if you read the Official Cert Guide, you will learn all the same commands and processes. But for those who move more quickly, you can keep making more progress while you still have time in the lab.

This bonus section assumes you have already learned how to navigate the PT user interface to reach the CLI of any device, and once there, how to reach user, enable, and config mode. If you cannot find those places, ask in the group chat, or refer back to your notes.

In this Bonus Lab Part, you will take these steps:

Bonus.1 Erase All Switch SW2 Configuration and Re-configure

Bonus.2 Add Passwords to the Switch

Bonus.3 Miscellaneous Administrative Configuration

 

Bonus.1 Erase All Switch SW2 Configuration and Re-configure

For the bonus activity, you will login to switch SW2, delete the configuration, and reload the switch, so that it boots with all default configuration. Then you will add the configuration commands supplied here in the lab. To begin, clear out the switch’s configuration as follows:

  1. From the PT user interface, click the switch SW2 icon to open the detail window, and click the CLI tab.
  2. Click inside the CLI window and press enter to get a response.
  3. Move to enable mode on SW2.
  4. Use the erase startup-config command to, well, erase the startup-config file.
  5. Use the reload command to reload IOS. (Do NOT say yes if asked to save your configuration, because that would do the equivalent of a copy running-config startup-config command. We want to boot the switch with an empty startup-config command.)
  6. After the reload completes, the simulated IOS prompts as to whether you wish to enter “Initial Config Mode” – answer “no”.
  7. Move into enable mode; notice that no passwords are required (the passwords are configured in the startup-config file, and the switch booted without a startup-config file.)
  8. Use the show startup-config command to examine the contents. What do you see? _______________________________________________
  9. Use the show running-config command to examine the contents. What do you see? _______________________________________________

 

Bonus.2 Add Passwords to the Switch

At this point, SW2 has nothing in its startup-config file and all default settings in its running-config file. Next, add the configuration, as shown here. Note that some commands will move you into a new configuration sub-mode. When in a new sub-mode, use help to look at the available subcommands.

hostname name
 enable secret password-value

line con 0
 password password-value
 login

line vty 0 15
 password password-value
 login

Bonus.3 Miscellaneous Administrative Configuration

Finally, you might want to add a few more commands that need a little more explanation.

  1. Navigate to enable mode.
  2. Type the non-existent command abc123 and press enter.
  3. When you get tired of waiting, press CNTL-SHIFT-6 to make the simulator IOS prompt again give you a command prompt.
  4. When you type a command that does not exist, IOS thinks you typed a hostname, and IOS attempts to perform name resolution. With all default settings for name resolution, you just sit there and wait. Instead, disable name resolution:
    1. Enter configuration mode
    2. Add the no ip domain-lookup global command.
    3. Exit back to enable mode.
  5. Once you have returned to enable mode, repeat the non-existent command abc123 and press enter. What kind of response do you get now? ___________________
  6. By default, IOS uses a five-minute inactivity timeout on the console. If you prefer not to be kicked out of the console while practicing in a lab, change the console timeout, so it never times out:
    1. Enter configuration mode
    2. Use the line console 0 command to move to console config mode.
    3. Add the exec-timeout 0 0 console subcommand to disable the console timeout.
    4. Exit back to enable mode.