Transcript for:
Syslog Configuration on Cisco Devices

Welcome to Jeremy’s IT Lab. This is a free, complete course for the CCNA. If you like these videos, please subscribe to follow along with the series. Also, please like and leave a comment, and share the video to help spread this free series of videos. Thanks for your help. Also, remember to sign up via the link in the description to get all of the lab files for this course, so you can try it out yourself in packet tracer. If you want more labs like these, I highly recommend picking up Boson’s NetSim for the CCNA, click the link in the video description to check it out. It’s a network simulator like packet tracer, but it’s even better, and it includes all of these guided labs to not only help you get hands-on practice configuring and troubleshooting, but also deepen your understanding of the exam topics. If you want to get NetSim, please follow the link in the video description. In this video we’ll take a look at Syslog and practice some basic configurations. Syslog functionality in Packet Tracer isn’t perfect, but it’s much more developed than packet tracer’s SNMP functionality. We’ll take a look at logging via the console line, the VTY lines, the buffer, and an external Syslog server. I’ll start with step 1, which says to connect to R1’s console port using PC2. If I click on R1 like this and go to the CLI tab, this is the same as a console connection. However accessing the device via a PC is more realistic, that’s how we connect to real network devices, so let’s go on PC2. From the desktop tab, click on terminal, and these default settings are correct so I’ll click OK. Now we’re in the CLI of R1. I’ll log in, as it says above the username is jeremy and password is ccna, and then ENABLE and the password is ccna again. Now I’ll shut down the G0/0 interface. CONF T. INTERFACE G0/0. SHUTDOWN. And we get two Syslog messages. Because we’re connected to the console line, Syslog messages are displayed by default. Why are two messages displayed when the interface goes down? Let me show you. DO SHOW IP INTERFACE BRIEF. The first message is referring to the STATUS here, administratively down. And the second message is referring to the PROTOCOL column, down. So, that’s why two messages are displayed. Okay, let’s enable it again. NO SHUTDOWN. Okay, all of these messages are considered severity level 5, also known as notice or notification. However, these messages don’t have timestamps, so let’s enable those. EXIT. SERVICE TIMESTAMPS LOG DATETIME, and if I try to enter the command it fails, why is that? In packet tracer we have to enter the MSEC option, to display milliseconds in the timestamps. In real Cisco IOS, MSEC is just an option, you don’t have to include it, but in Packet Tracer we have to. Okay, now I’ll exit from global config mode and you can see the log message now includes a timestamp. I haven’t adjusted the time of R1 so the time isn’t accurate, but in a real network it’s of course very important to have accurate time. Okay, now let’s move on to step 2 and connect to R1 from PC1 using Telnet. I’ve already configured R1 to allow Telnet connections, and I won’t cover those configurations in this video. I’ll cover Telnet and SSH in a later video, perhaps the next one. So, to Telnet to R1 we must open the command prompt of PC1. Then from here use the command TELNET, followed by R1’s IP address, 192.168.1.1. And now we’ve connected and can login, then ENABLE and enter the password. Okay, so let’s enable another interface and see if a log message appears. CONF T. INTERFACE G0/1. NO SHUTDOWN. And no message appears. That’s because log messages aren’t displayed by default when connecting via the VTY lines. So, let’s enable it. By the way, the LOGGING MONITOR command isn’t actually available in packet tracer, but if we enable logging for the current Telnet session, it will be enabled automatically. So, what’s the command to enable logging to the VTY lines for the current session? It’s TERMINAL MONITOR from privileged exec mode, but I can use DO TERMINAL MONITOR to enable it here from interface config mode. Okay, now I’ll disable the interface with SHUTDOWN, and a log message is displayed. I said in the lecture video that the TERMINAL MONITOR command only applies to the current session, the current connection. If I exit out of this Telnet session and then connect again, the logs shouldn’t display unless I use the TERMINAL MONITOR command again. Unfortunately, when I was testing the lab in packet tracer I found that packet tracer doesn’t function totally accurately. So, even if I exit out of Telnet and then connect again, log messages will still display. Don’t worry about that though, what I taught in the lecture video is correct. Now let’s do step 3, which is to enable logging to the buffer. On this router in packet tracer, logging to the buffer is actually disabled by default. Let me show you. DO SHOW LOGGING. Here you can see the logging settings, and buffer logging is disabled. So, let’s enable it. EXIT. LOGGING BUFFERED, and set the size to 8192 bytes. Now, there is no option to set the level of messages logged to the buffer in packet tracer. Let’s check the default level. DO SHOW LOGGING. Okay, looks like the default level is DEBUGGING, so all messages will be saved to the buffer. Also, down here it says ‘trap logging: level informational’. So, if a Syslog server is configured, messages of informational severity or higher will be sent. Now let’s do step 4, which is to enable logging to the Syslog server, SRV1, with a level of debugging. So, I can use either LOGGING, and then the IP address, or add HOST and then enter the IP address, which is 192.168.1.100. So, R1 will now send Syslog messages to SRV1. But let’s set the severity to debugging. The command is LOGGING TRAP, and the only option in packet tracer is DEBUGGING, so let’s do that. Okay, now I’ll exit from global config mode. And actually I’ll generate a few more log messages. CONF T. I’ll enable G0/1 again. INTERFACE G0/1. NO SHUTDOWN. And disable it again. SHUTDOWN. And let’s return to privileged exec mode. END. So, that generated a few messages, let’s check on SRV1. On SRV1, click on Services, and then Syslog. The Syslog server functionality in Packet Tracer is very primitive, but here are the messages that were sent from R1 to SRV1. Okay, in this lab we did some basic Syslog configurations. You probably won’t get any questions about syslog configuration on the CCNA exam, but I think it’s a good idea to get some hands on practice, even if it’s limited by packet tracer’s capabilities. That’s all for this lab. Next let’s take a look at a bonus lab in Boson Software’s NetSim. Okay here's today's Boson NetSim practice lab. So, as I have said Syslog configuration is not part of the new CCNA exam, so it's also not part of NetSim for CCNA. So, for today's demo I've selected a lab from NetSim for ENCOR 350-401, which is the core exam for the CCNP Enterprise certification. So that lab is system message logging. Although it is a CCNP practice lab it's actually quite simple. So here's the topology. A couple routers, couple switches, and some PCs, and one of them is a Syslog server. And these are all the commands you need to know. So, as you can see, quite simple. You can definitely do this with the commands I've already taught you. And it's just a single task with 10 steps, so let's go through the whole lab for this demonstration. Okay, first on Router1, ping SyslogServer. The ping should be successful. Okay let's see if it is in fact successful. PING 10.1.0.10. Okay and it does work. Okay, configure Router1 to send system log messages to SyslogServer. Okay, so CONF T. LOGGING, and I could use LOGGING HOST, or just LOGGING. Both of them have the same effect. So, 10.1.0.10. That's it. How many levels of logging are available to trap? So, let me see. DO SHOW LOGGING. Currently, the level is informational. So, level 6 all the way down to 0 will be logged to the server. LOGGING TRAP. How many are available? Well, all 8 are available, even though only 7 are configured at the moment, 0 through 6. Okay, if you configure a device to trap log messages up to level 7, would you receive more log messages than if you configured a device to trap log messages up to level 1? The answer to that is absolutely yes. If you configured level 1, that includes only level 1, alerts, and level 0, which is emergencies. But if you configured level 7, that includes all of the levels. Okay, configure Router1 to limit log messages to the warning severity level. Okay, so the command is LOGGING TRAP, and then WARNINGS. And let me verify that, that is step 6. DO SHOW LOGGING. And here it is. Trap logging level warnings. Okay, on Switch1 and Switch2, ping SyslogServer. Okay, let's see if both switches have connectivity. So I guess these switches have an IP address maybe on VLAN1. No, it's VLAN99, they have an IP address. Okay, so let's try that. PING 10.1.0.10, okay, that works. And from ping...not ping2, from server2 (*Switch2~!!). Okay. So we are going to do the same configurations on these switches. Configure them to send Syslog messages to the server, with a level of warning or higher. And higher means higher severity, not higher number, because the higher severities are actually lower in number. So I'll do it here on Switch2. LOGGING 10.1.0.10. LOGGING TRAP WARNINGS. And Switch1. LOGGING 10.1.0.10. LOGGING TRAP WARNINGS. Okay, and verify the configuration. DO SHOW LOGGING. We've already got a bunch of messages here, that is in the buffer. Okay, the level is warnings, looks good. Switch2, again trap logging level warnings. Okay, so that's it, pretty quick and simple lab. And since we've done the whole lab let's see if we did it correctly. So, I'll use the grade lab function here and we'll check our configurations to see if they are correct. Okay, looks good. So, all green check marks are here, so no mistakes. If we had any missing commands they would be highlighted. They would be shown here, but highlighted in red. And if we had any extra commands that we didn't need they would be highlighted in blue. Okay, so that was a quick look at Boson NetSim. This time not for CCNA but for CCNP. This is a great source of detailed, guided practice labs for the CCNA and for the CCNP. If you want to get NetSim, please follow the link in the video description. Before finishing today’s video I want to thank my JCNP-level channel members. To join, please click the ‘Join’ button under the video. Thank you to Kenneth, Seamus, H W, Brandon, Samil, Aaron, Tech Alameda, Marcel, Kone, Donald, C Mohd, Gustavo, Anthony, Biraj, Junhong, Benjamin, Tshepiso, Justin, Prakaash, Nasir, Erlison, Apogee, Marko, Daming, Jhilmar, Ed, Value, John, Funnydart, Velvijaykum, Mark, Yousif, Boson Software, Devin, Lito, Yonatan, and Vance. Sorry if I pronounced your name incorrectly, but thank you so much for your support. This is the list of JCNP-level members at the time of recording by the way, February 14th 2021. If you signed up recently and your name isn’t on here don’t worry, you’ll be in future videos. Thank you for watching. Please subscribe to the channel, like the video, leave a comment, and share the video with anyone else studying for the CCNA. If you want to leave a tip, check the links in the description. I'm also a Brave verified publisher and accept BAT, or Basic Attention Token, tips via the Brave browser. That's all for now.