Config Lab: Syslog 1

Wendell Odom
By Wendell Odom October 12, 2021 13:05

Routers and switches issue log messages to tell us about different events. Be ready to run through the various options! Today’s lab exercises a couple of those options related to message formats and how a router chooses to manage Syslog messages.

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

In this lab, you will enable system logging and change the message format in a couple of ways on both routers. Specifically:

  • Configure the two routers so that they keep a copy of log messages so that you can later view them with the show logging command
  • Change the system message format to disable the use of timestamps
  • Change the system message format to enable the use of sequence numbers

Figure 1: Two Routers with IP Addresses

 

Initial Configuration

Examples 1 and 2 show the beginning configuration state of R1 and R2.

Example 1: R1 Config

 

Example 2: R2 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:

The CML topology matches the lab topology.

Lab Answers Below: Spoiler Alert

Lab Answers: Configuration (Click Tab to Reveal)

Answers

Figure 1: Two Routers with IP Addresses

 

Example 3: R1 Config

 

Example 4: R2 Config

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

Commentary

Syslog provides a mechanism on devices to log the messages that a specific device (system) will typically generate to the console. This provides engineers with the ability to look back at the history of device and the view the events that have happened to gain insight as to its current status. This mechanism accounts for Syslog’s widespread use in troubleshooting. It also provides a method of delivering these messages to an external Syslog server for central storage.

For this lab you were asked to alter the format of the Syslog messages. The two most used options include the use of sequence numbers as well as timestamps (Default) which enable system events to be correlated with other systems information. The service sequence-numbers and service timestamps global commands enable both; to disable them, use the same command with a no at the beginning.

The lab also asked that you configure the logging buffered command so that the router will buffer (store in memory) a copy of the log messages. Cisco devices typically use a default of keeping log messages in a buffer, but the examples show the command just to be complete as compared to the requirements in the lab.

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 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. 

Although this lab shows a two-router lab, you could do it on a single router with a console connection.

  1. Login from the console and then get into config mode and back out again. Each time you exit configuration mode, the router will issue a log message to the console about the fact that someone may have changed the configuration. So it is an easy way to generate log messages so that you can test your Syslog settings. Look at those messages to check the log message format to see if it meets the requirements of the lab.
  2. Alternately, move to enable mode, enter configuration mode (configure terminal), and then exit configuration mode. Doing so will also generate log messages.

More Labs with Related Content!

Config Lab: NTP Client/Server
Config Lab: Syslog 2
Wendell Odom
By Wendell Odom October 12, 2021 13:05
Write a comment

2 Comments

  1. L January 16, 09:39

    Hi, it seems like the 2911 Routers dont have the service sequence-numbers command, why is that? or have I made a mistake?

    Reply to this comment
    • Wendell Odom Author January 17, 12:46

      Hi L,
      Broad answer first. Support for a particular command depends on the feature. Feature support in say IOS on a router varies based on the version plus something called a feature set. EG, you can buy the most basic feature set of IOS for a particular router model, or one with additional features packaged into a feature set. The terminology has varied over the years and product lines, but the idea is straightforward. Not all companies need all IOS features, so Cisco creates different tiers of features. So it **could** be that the 2911 you are using has a basic feature set that doesn’t include that command, or it could be an old enough IOS so that the IOS version predates the introduction of that command.
      You can find when a command was introduced into IOS if you can manage to find the Command Reference document at cisco.com that details the command. I managed to find it here: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/fundamentals/command/Cisco_IOS_Configuration_Fundamentals_Command_Reference/R_through_setup.html So, if you look there, service sequence-numbers was added at IOS 12.0. That dates back to the late 1990s, so I’d guess you likely have at least the right IOS version.
      As for feature set, that’s difficult per-command. You can find larger features at cisco.com/go/cfn (the Cisco feature navigator), but a search there for service sequence-number does not reveal anything useful.
      I have a 2901, running IOS 15.7, base feature set, and it supports the command, by the way. You’re using it in global config mode, right? If you try it in another config submode it’ll be rejected. Sorry, don’t mean to be over simplistic, just covering the bases.
      Hope this helps…
      Wendell

      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