Config Lab: CLI Miscellany 1

Wendell Odom
By Wendell Odom August 31, 2021 09:05

The CCNA certification includes many prominent features that need to be configured. VLANs. Trunking. Routing protocols. IPv4 addressing. IPv6 addressing. But there are also the occasional small topic or single command that might be forgotten. This lab examines a couple of those easily forgotten commands, just to give them a little attention in the hope that it might make you better prepared on test day.

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.

The Lab Exercise

Requirements

This lab is direct and straightforward. The lab uses a single router with two interfaces, with a list of requirements. Your job: remember the command(s) to achieve each function, and write/type the command with the correct syntax. The specific rules for this lab are:

  • Configure ‘Router’ so that if you happen to misspell a command and then press enter, the command will not automatically try to do name resolution with a DNS server as if the misspelled command were a hostname.
  • Configure the console so that the router will synchronize the output of log and debug messages versus solicited command output.
  • Configure the console so it times out after 5 minutes of inactivity.
  • Administratively disable both the GigabitEthernet0/1 and 0/2 interfaces.

 

Figure 1: Single Router Topology

 

Initial Configuration

Example 1 shows the beginning configuration state of the Router.

 

Example 1: Router Config

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 link for more information about Cisco Packet Tracer.)

Use this workflow to do the labs in Cisco Packet Tracer:

  1. Download the .pkt file linked below.
  2. Open the .pkt file, creating a working lab with the same topology and interfaces as the lab exercise.
  3. Add your planned configuration to the lab.
  4. Test the configuration using some of the suggestions below.

Download this lab’s Packet Tracer File

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:

  1. Download the CML file (filetype .yaml) linked below.
  2. Import the lab’s CML file into CML and then start the lab.
  3. Compare the lab topology and interface IDs to this lab, as they may differ (more detail below).
  4. Add your planned configuration to the lab.
  5. Test the configuration using some of the suggestions below.

Download this lab’s CML file!

 

Network Device Info:

All interfaces in topology match the lab figure.

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)

Answers

Figure 1: Single Router Topology

 

Example 1: Router Config

Commentary, Issues, and Verification Tips (Click Tabs to Reveal)

Commentary

There are a number of different commands that are commonly used by almost all Cisco network engineers; this lab focuses on a few of these.

The first requirement asks for a command that can simplify the life of an engineer day-to-day: The no ip domain-lookup command. When using the router CLI, the user types some text and then the first space. If the router does not recognize that text as a command, the router, instead of processing the text as simply an incorrect command, treats the text as if it were a hostname. If the router has no DNS servers configured, another IOS default causes the router to broadcast on the connected subnets looking for a DNS server to resolve names – with around a one-minute timeout waiting for a response. That combination of facts means that with default settings if an engineer mistypes a command, they end up waiting for roughly a minute before IOS gives them another command prompt. The no ip domain-lookup command simply turns off name resolution on the router. (Note that it does not impact name resolution on the hosts in the network at all.) In lab, this command will become one of your habitual commands to add every time you set up a new lab device.

The next requirement asked you to add the logging synchronous subcommand to the console line. This command causes IOS to synchronize device messages, debug output, and command output. With this command, you will have an easier time reading show command output at the console.

The third requirement asks for a command to alter the inactivity timer for a logged-in user at the console. The command, from console line configuration mode, is exec-timeout minutes [seconds], with a default setting of 10 minutes. While a low timeout makes sense in production devices, in lab you might want to disable the timeout for convenience. For this lab the requirement was to alter the exec-timeout of the console to 5 minutes; the command to use would be exec-timeout 5 while inside console line configuration mode.

The fourth requirement asks for the popular command to disable (or enable) an interface. The shutdown interface subcommand disables an interface, and the no shutdown interface subcommand enables an interface.

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:

# Summary Detail
1 PT file includes LAN switches The figure does not show any LAN switches. However, for the router interfaces to reach an up/up state in Packet Tracer, the router interface must be cabled to some working device. The Packet Tracer file includes two LAN switches for this purpose. You can ignore the all-default configuration on the switches.

 

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. 

  1. To test whether or not the router will perform name lookup on a mistyped command, just type random characters and press enter. If you configured the lab correctly, IOS should not delay more than a second or so to give you a new command prompt.
  2. Next, to verify the console timeout, you can either verify the configuration in the running configuration or wait five minutes to see if the console exits automatically.
  3. Verifying whether message synchronization works requires more work in lab. You could just check the configuration versus the answer post.
  4. Finally, for the verification of the GigabitEthernet0/1 and 0/2 interface being disabled, issue the show ip interfaces brief command and verify that both interfaces are shown as administratively down.

 

More Labs with Related Content!

Config Lab: Login Security 1
Config Lab: Telnet Config
Wendell Odom
By Wendell Odom August 31, 2021 09:05
Write a comment

1 Comment

  1. Emil January 25, 06:35

    Tip: you can press Ctrl+Shift+6 to stop the name resolution. If you’re using packet tracer, you can also speed up the time – there’s a >> button on the bottom left corner. Just press it twice to speed up by 1 minutes.

    Reply to this comment
View comments

Write a comment

Comment; Identify w/ Social Media or Email

Subscribe

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Search

Categories