Syslog and NTP: severity levels, logging buffered, syslog server and clock synchronization
Sign in to read this lesson
Messages such as %LINK-3-UPDOWN that we see on the console are syslog messages. For them to be useful the clock must be correct, so the router is synchronized with an NTP server (ntp server). Sequence numbers can be used instead of timestamps. Syslog has eight severity levels from 0 (emergencies) to 7 (debugging); the lower the number, the more important the message. logging console selects the level, logging buffered keeps messages in RAM and logging host sends them to an external syslog server; by default levels 0–6 go to the server.
What you will learn
- Syslog message format: %FACILITY-SEVERITY-MNEMONIC: description, for example
%LINK-3-UPDOWN(severity 3 = errors),%LINEPROTO-5-UPDOWN(severity 5 = notifications). - For timestamps to be useful the clock must be correct: with
ntp server <address>the router gets its time from an NTP server; verify withshow ntp status. Instead of timestamps you can use sequence numbers withservice sequence-numbers. - Eight severity levels: 0 Emergencies, 1 Alerts, 2 Critical, 3 Errors, 4 Warnings, 5 Notifications, 6 Informational, 7 Debugging. When you select a level, that level and every level with a lower number (more important) are shown.
logging console errorsshows only levels 0–3 on the console.logging buffered 8192keeps messages in a buffer in RAM (lost at reboot); view them withshow logging.logging host 10.20.0.60sends messages to an external syslog server; the default level is informational (0–6). To send debug messages too, uselogging trap 7(debugging).
The lesson has 5 key points, an explanation and 5 questions. It opens with a package.