Config Lab: CLI Passwords 1
Protecting access to the CLI of Cisco routers and switches starts with basic password security. From there, you can move on to use per-user login security that requires both a username and password, whether using locally-configured username/password pairs or whether taking advantage of the authentication servers already used by users inside the company. For the CCNA exam, though, you start with simple passwords. This lab gives you some practice configuring basic passwords (with no usernames) to protect CLI access.
The Lab Exercise
Configure switch SW1 with password security for console, telnet, and privileged-mode access. Configure the passwords so that all users use the same password to reach user mode from the console, with no per-user username required. Likewise, use one password for all users who Telnet into the switch to reach user mode.
This lab begins with all the interfaces shown in Figure 1 working, with IPv4 addresses configured, and with all hosts able to ping other local hosts and hosts in the rest of the Enterprise.
The specific rules for this lab are as follows:
- Use password “joy” to protect console access for all users to switch SW1.
- Use password “peace” to protect Telnet access for all users to switch SW1.
- Use password “kindness” to protect access to privileged mode for all users, using the more secure configuration option.
Figure 1: Network for this Lab, with Console Access Switch SW1
Example 1 shows the non-default configuration added to switch SW1 before your work for this lab begins. Basically, the switch has already been configured with an IP address and a default gateway to allow telnet access.
hostname SW1 ip default-gateway 10.1.1.1 ! interface vlan1 ip address 10.1.1.20 255.255.255.0
Example 1: SW1 Initial Configuration
Answer Options - Click Tabs to Reveal
You can learn a lot and strengthen real learning of the topics by creating the configuration – even without a router or switch CLI. In fact, these labs were originally built to be used solely as a paper exercise!
To answer, just think about the lab. Refer to your primary learning material for CCNA, your notes, and create the configuration on paper or in a text editor. Then check your answer versus the answer post, which is linked at the bottom of the lab, just above the comments section.
You can also implement the lab using the Cisco Packet Tracer network simulator. With this option, you use Cisco’s free Packet Tracer simulator. You open a file that begins with the initial configuration already loaded. Then you implement your configuration and test to determine if it met the requirements of the lab.
Use this workflow to do the labs in Cisco Packet Tracer:
- Download the .pkt file linked below.
- Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
- Add your planned configuration to the lab.
- Test the configuration using some of the suggestions below.
You can also implement the lab using Cisco Modeling Labs – Personal (CML-P). CML-P (or simply CML) replaced Cisco Virtual Internet Routing Lab (VIRL) software in 2020, in effect serving as VIRL Version 2. If you prefer to use CML, use a similar workflow as you would use if using Cisco Packet Tracer, as follows:
- Download the CML file (filetype .yaml) linked below.
- Import the lab’s CML file into CML and then start the lab.
- Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
- Add your planned configuration to the lab
- Test the configuration using some of the suggestions below.
Network Device Info:
This table lists the interfaces listed in the lab exercise documentation versus those used in the sample CML file.
|Device||Lab Port||CML Port|
Host device info:
This table lists host information pre-configured in CML, information that might not be required by the lab but may be useful to you.
|Device||IP Address||Mac Address||User/password|
Lab Answers Below: Spoiler Alert
Lab Answers: Configuration (Click Tab to Reveal)
Commentary, Issues, and Verification Tips (Click Tabs to Reveal)
Cisco routers and switches allow a simple security method for both the console and for Telnet access. Basically, all you have to do is tell the device to use that method by supplying a prompt for the password (the login subcommand), and then define the password’s value (the password subcommand).
Note that the answer shows the configuration of the VTY password (to support Telnet) with VTYs 0 through 4 as separate from the configuration of VTYs 5 through 15. This quirk of Cisco output has to do with the fact that older IOS versions support only VTYs 0 through 4. You could have used the commands literally shown in the answer example, or you could have used the command line vty 0 15, followed by those same password and login commands.
Known Issues in this Lab
This section of each Config Lab Answers post hopes to help with those issues by listing any known issues with Packet Tracer related to this lab. In this case, the issues are:
|1||None||No known issues related to this lab.|
Why Would Cisco Packet Tracer Have Issues?
(Note: The below text is the same in every Config Lab.)
Cisco Packet Tracer (CPT) simulates Cisco routers and switches. However, CPT does not run the same software that runs in real Cisco routers and switches. Instead, developers wrote CPT to predict the output a real router or switch would display given the same topology and configuration – but without performing all the same tasks, an actual device has to do. On a positive note, CPT requires far less CPU and RAM than a lab full of devices so that you can run CPT on your computer as an app. In addition, simulators like CPT help you learn about the Cisco router/switch user interface – the Command Line Interface (CLI) – without having to own real devices.
CPT can have issues compared to real devices because CPT does not run the same software as Cisco devices. CPT does not support all commands or parameters of a command. CPT may supply output from a command that differs in some ways from what an actual device would give. Those differences can be a problem for anyone learning networking technology because you may not have experience with that technology on real gear – so you may not notice the differences. So this section lists differences and issues that we have seen when using CPT to do this lab.
Beyond comparing your answers to this lab’s Answers post, you can test in Cisco Packet Tracer (CPT) or Cisco Modeling Labs (CML). In fact, you can and should explore the lab once configured. For this lab, once you have completed the configuration, try these verification steps.
- Connect to the console, and try to login with the configured password.
- Using the PC connected to a LAN interface, Telnet into the switch, and try the Telnet password.
- From either, use the enable command to then test the enable password.