Knowing how to troubleshoot networks is a really important skill for any network engineer.
And knowing how to properly use logging on Cisco routers and switches is a cool requirement to help
you troubleshoot.
It's vital that you know how to use logging directly on a Cisco device as well as using a slug server
when you need to troubleshoot networks.
Now Cisco offers many options with regards to logging.
You can log directly to the consul of Urara.
You can log to a buffer you can look to assist log server as well as additional logging options in these
videos I'm going to show you how to log to the console and use various options with regard to logging
including logging levels look at logging to the buffer as well as logging to ISIS logs server.
So let's get started in this example of a simple network of two rods Rato one in rodded two connected
via They first.
Ethan etting to face on Route 1 if I go to the first Ethan interface and no shut it.
Notice the output that's displayed on the console link and then a number.
In this case three up down interface first Ethan it is 0 0 has changed state to up and then we get another
message or line protocol number five in this case up down line protocol and interface has changed to
up.
There's also a date and time stamp on the message.
So these are logging messages displayed on the console of the router.
And this number indicates service log level.
You can read more about the log protocol in RAFC 5:44.
And I won't bore you going through the entire RAFC But if you want to know the details of logging messages
and the slow protocol this is a good place to start.
I'll just point out a few things.
Certain types of functions are performed.
We have the originator which generates Suslov content to be carried in a message.
So for example a router is generating this log message and then we might have a collector that gathers
this log content for further analysis in a later video.
I'm going to show you how to configure a solar Wiens says log server.
As a collector capturing multiple syslog messages to a central server.
But for now let's start with some of the basic principles of this log.
And to do that we need to look at the priority of each.
So SLOC message.
So in the RAFC we have numerical codes 0 to 7 with the severity description.
When you configure logging on a route as an example you can configure the severity either by the number
or by the name so on all Cecka right at the moment if I type show logging noticed when I typed and a
message was shown with a level of 5 and when I typed showed logging it shows me as an example that the
console logging is set to level debugging.
I can configure the logging level by typing logging
and there are multiple options but in this example I'll configure logging Konsole use question mark
and notice I can specify a logging severity level using a number or I could specify a word.
So either debugging or using the number 7.
So let's start with the highest number seven is debugging which allows you to view debugging messages
Six's informational messages.
This would be something like an access list of violation five notices normal but significant conditions
and example would be line protocol down.
So interface if Cirrus fleshes 0.
If I shut to the interface notice five line protocol is down.
For these warning conditions.
So an example would be a configuration file is written to a server via an S&P request Shreeves errors.
This is an error condition.
An example would be interface updown messages to these critical conditions that might be something like
memory allocation failures.
One is an alert action must be taken immediately.
That might be something like temperature limit has been exceeded and emergencies the system is unstable.
So an example would be that the system is shutting down due to a missing fan tray on a switch is an
example.
So the numerical numbers are specified in this RAFC 5:44 and are specified in lots of places on the
Cisco Web site.
So here is an example.
On the Cisco Web site talking about the error message keywords and corresponding Unix s'est log definitions.
So once again notifications is five normal but significant conditions.
So let's have a look at another example showing you the differences in output on the console of a router
depending on the debugging that you set an important note to make is that if you enable a higher level
such as 7 all other levels are enabled if you enable a level such as five that means levels 0 1 2 3
4 and 5 are enabled.
So whenever you specify a level that level and all lower levels are enabled on the router.