CLI Exploration 2

 In 200-301 V1 Ch04: Command Line, 200-301 V1 Part 2: Ethernet, 200-301 V1 Parts, Config Lab, Config Lab CCNA Vol 1 Part 2

Most Config Lab posts here at my blog follow a consistent formula: A problem statement (requirements, figures, and inital configuration), followed by you creating the configuration, and closing with a review of my suggested solution. This lab deviates. Why? I need a scripted lab with specific steps to help you learn the basics of the CLI. For this lab, I’ll have you open a .pkt file and do the scripted tasks detailed in the lab. Simple enough.

All about Config Labs

The blog has a series of lab exercises called “Config Labs.” Each lab presents a topology with the relevant initial configuration for each device. The lab also lists new requirements, after which you should create the additional configuration to meet those requirements. You can do the lab on paper, in a text editor, or use software tools like Cisco Packet Tracer or Cisco Modeling Labs.

Once you have created your answer, you can click various tabs at the bottom of this post to see the lab answers, comments about the lab, and other helpful information.

Some Lab Context

The IOS CLI and Configuration Mode

Most config labs here at this blog assume you have basic CLI navigation skills. Those include the ability to open a console, login, move between user EXEC, privileged EXEC, and configuration mode. But configuration mode has separate modes: the global configuration mode and many submodes. So the second CLI navigation skill you need to learn is how to navigate around inside configuration mode.

This lab gives you practice with those prerequisite IOS CLI skills in using the various configuration modes.

You can learn these skills from most any source. That includes my Cisco Press CCNA Official Cert Guide (OCG), Volume 1, particularly chapters 4 and 6. But it does not matter where you learn the information, but only that you practice and get comfortable with navigation within the CLI.

 

YouTube Video

The lab steps in this lab follow a specific order that matches a video from my YouTube Channel. You don’t have to watch the video to perform this lab. However, I’ve embedded the video here in case you’d like to check it out. Look for the section titled “CLI Demo (Packet Tracer)” for the demo.

(Link coming soon!)

 

The Cisco Packet Tracer File

To do this lab, you must have Cisco Packet Tracer installed, Version 8.2.2 or later. (If you have an earlier version, the file will likely not open.) If you have not yet learned much about Cisco Packet Tracer, check out this page, learn about it, and circle back to this lab to learn about the IOS CLI.

Click the button below to download the .pkt file for this lab. Then open the file in packet tracer to get ready to do the lab.

The Lab Exercise

The Lab Environment

The lab uses a simple environment with a single LAN switch and four PCs as seen in the figure. The devices exist just so that you can experience the CLI as if you were at the console of the switch.

Figure 1: Single Switch Topology

 

Initial Configuration

The switch does have some initial configuration: It has been configured with the hostname SW1 command. As a result, the command prompt begins with “SW1” instead of the default of “switch”.

 

Scripted Lab Steps

Perform the following steps in order. After each step, consider questions such as:

  • Am I in user EXEC, privileged EXEC, or Global Config mode?
  • What in the command prompt identifies the mode?
  • What commands or keystrokes would move me to privileged EXEC mode?

The steps:

  1. Move into global configuration mode on the switch:
    1. From Cisco Packet Tracer, open the .pkt file you downloaded for this lab.
    2. Notice the switch icon and four PC icons.
    3. Click the switch icon to open a window above the devices.
    4. Click the CLI tab in that window to reveal the switch device console.
    5. Point your mouse inside the center of that window and click once to bring focus to the window.
    6. The switch should not have any passwords configured. So, use the enable command to move to privileged mode. Note the change in the command prompt.
    7. Move to global configuration mode using the configure terminal command. Note the additional change in the command prompt.
  2. Experience global configuration mode:
    1. Issue the hostname Wendell command to change the hostname. Note the change in the prompt. (Feel free to use your name instead.)
    2. Get help for the commands in global config mode by pressing the ? key. Do you see:
      1. The hostname command?
      2. The description command?
      3. The password command?
      4. The name command?
    3. The lab steps ask you to try all the above commands, but only hostname appears in the help, because it is the only command that is a valid global configuration command. The others require you to move to specific configuration modes.
    4. Type the interface g1/0/1 command and press enter. This command moves you to interface configuration mode for the G1/0/1 interface. Note the change in the command prompt.
    5. Get help for the commands in global config mode by pressing the ? key. Do you see:
      1. The hostname command?
      2. The description command?
      3. The password command?
      4. The name command?
    6. Configure the description connected to PC1 command. IOS should accept the command, that is, it gives you no error messages.
    7. Configure the password cisco command. IOS should reject the command, because there is no password command available to interface mode.Experience interface configuration mode
    8. Navigate back to global configuration mode using the exit command. Note the change in the command prompt.
  3. Experience interface configuration mode:
    1. Type the interface g1/0/1 command and press enter. This command moves you to interface configuration mode for the G1/0/1 interface. Note the change in the command prompt.
    2. Get help for the commands in interface config mode by pressing the ? key. Do you see:
      1. The hostname command?
      2. The description command?
      3. The password command?
      4. The name command?
    3. Configure the description connected to PC1 command. IOS should accept the command, that is, it gives you no error messages.
    4. Configure the password cisco command. IOS should reject the command, because there is no password command available to interface mode.
    5. Navigate back to global configuration mode using the exit command. Note the change in the command prompt.
  4. Experience console line configuration mode:
    1. Type the line line console 0 command and press enter. This command moves you to console configuration mode. Note the change in the command prompt.
    2. Get help for the commands in console config mode by pressing the ? key. Do you see:
      1. The hostname command?
      2. The description command?
      3. The password command?
      4. The name command?
    3. Configure the password cisco and login commands. IOS should accept the commands, that is, it gives you no error messages.
    4. Configure the name Wendell22 command. IOS should reject the command, because there is no name command available to console mode.
  5. Experience VLAN configuration mode:
    1. Type the line vlan 22 command and press enter. This command moves you to from whatever mode you were in (console mode in this case) to VLAN configuration mode. It also creates VLAN 22 if it did not already exist on the switch.
    2. Get help for the commands in console config mode by pressing the ? key. Do you see:
      1. The hostname command?
      2. The description command?
      3. The password command?
      4. The name command?
    3. Configure the name Wendell22 command to assign VLAN 22 a non-standard name. IOS should accept the command.
    4. Use the end command to exit from configuration mode back to privileged EXEC mode.
  6. Investigate the running-config and startup-config files
    1. Issue a show running-config EXEC command and scan the output. Look for the commands you just configured in the above steps: hostname, description, password, login, and name.
    2. Confirm all the values you configured exist in the running-config file. If you do not see them, repeat the command and look again.
    3. Issue a show startup-config EXEC command and scan the output. Because none of those commands had been configured earlier, and because you have not yet saved the configuration, the commands should not exist in the startup-config file. Look for these commands to confirm they do not exist in the startup-config file: hostname, description, password, login, and name.
    4. Issue a copy running-config startup-config command to replace the startup-config file with the contents of the running-config file.
    5. Repeat the show startup-config EXEC command, which should now have the same configured settings for the usual commands: hostname, description, password, login, and name. Confirm that you see the commands and parameters listed in the startup-config file.
    6. Issue the reload EXEC command to reboot the switch.
    7. Repeat the show running-config EXEC command to confirm that when the switch was reloaded, it copied the startup-config into the running-config file. To do that, scan the output to find those same familiar configured settings: hostname, description, password, login, and name.

More Labs with Related Content!

CLI Exploration 1
Cisco CCNA Roadmap - CY2023 Plans Announced!
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

0
Would love your thoughts, please comment.x
()
x