The eight severities
| Level | Name | IOS keyword | Example |
|---|---|---|---|
| 0 | Emergency | emergencies | The system is unusable |
| 1 | Alert | alerts | %SYS-1-CPURISINGTHRESHOLD |
| 2 | Critical | critical | Serious hardware failure |
| 3 | Error | errors | %LINK-3-UPDOWN |
| 4 | Warning | warnings | %IP-4-DUPADDR |
| 5 | Notice | notifications | %LINEPROTO-5-UPDOWN, %SYS-5-CONFIG_I |
| 6 | Informational | informational | Informational messages (the default logging trap level) |
| 7 | Debug | debugging | Output of debug commands |
The lower the number, the more severe. A level includes every more severe one: logging trap warnings sends 0 to 4. A phrase to remember them: “Every Awesome Cisco Engineer Will Need Ice cream Daily”.
The parts of a Cisco message
| Part | Example | What it is |
|---|---|---|
| PRI | <189> | Syslog facility × 8 + severity (only in what is sent to the server) |
| Number | 101: | Message number |
| Date and time | Dec 14 18:30:05.112 PST: | With service timestamps; a leading * means the clock is not synchronized |
| IOS facility | %SYS | The part of the system that generates the message |
| Severity | 5 | From 0 (emergency) to 7 (debug) |
| Mnemonic | CONFIG_I | The short name of the event |
| Text | Configured from console by ana… | The description, with the specific data |
How it works: from the event on the router to the line on the server
Five steps: the parts of a message, a failure with three messages, the severity filter, the facility and an alert.
The parts of a message
Ana saves a change from the NOC and R1 sends %SYS-5-CONFIG_I. Read it from left to right. <189> is the PRI: syslog facility × 8 + severity; 189 = 23 × 8 + 5, that is, local7 (IOS's default facility) and notice. 101 is the message number. Dec 14 18:30:05.112 PST is the router's time, with milliseconds and time zone thanks to service timestamps. %SYS-5-CONFIG_I says who is speaking (SYS, the system), the severity (5) and the event (CONFIG_I, configured). At the end comes the text with the data: who, through which line and from which address.
One failure, three messages
The link to Toronto (Gi0/0/3) is cut. Three messages arrive within two milliseconds. %LINK-3-UPDOWN: the physical layer went down (severity 3, error). %OSPF-5-ADJCHG: OSPF loses neighbor 3.3.3.3 “because the interface went down” (notice). A second later, %LINEPROTO-5-UPDOWN: the line protocol is down too (notice). The IOS facility (LINK, OSPF, LINEPROTO) says which part of the system is speaking; the timestamps show the order. To find the cause, look for the first message: here, the LINK one. That is why millisecond timestamps and an NTP-synchronized clock matter.
logging trap: only what matters reaches the server
The server is getting too much noise, so the NOC configures logging trap warnings. The chosen level includes every more severe one: severities 0 to 4 are sent. When the link comes back, R1 generates three messages: %LINK-3-UPDOWN up (severity 3) goes out to the server; %LINEPROTO-5-UPDOWN and %OSPF-5-ADJCHG (severity 5) do not, but they are still in R1's buffer (logging buffered debugging keeps everything). Each destination has its own level: logging console, logging monitor, logging buffered and logging trap.
logging facility: the server sorts by facility
The NOC wants to keep Vancouver's logs apart: it configures logging facility local5 on R1 and an rsyslog rule, local5.* → vancouver.log. %IP-4-DUPADDR arrives: someone gave a computer the default gateway's IP, 192.168.10.1. The PRI is now <172> = 21 × 8 + 4: local5 and warning. Watch out for the typical mix-up: the syslog facility (local5, in the PRI) lets the server sort messages; the IOS facility (IP, in %IP-4-DUPADDR) says which part of the router is speaking. They are different things.
A severity 1 alert
R1 has a CPU threshold configured (process cpu threshold type total rising 90 interval 5). When the CPU stays above 90% for 5 seconds, it sends %SYS-1-CPURISINGTHRESHOLD with the three busiest processes. Severity 1, alert: act now. Its PRI is <169> = 21 × 8 + 1. With logging trap warnings it gets through, because 1 is more severe than 4. To remember the order of the severities, from 0 to 7: Emergency, Alert, Critical, Error, Warning, Notice, Informational and Debug.
Where messages go
| Destination | Command | Default level |
|---|---|---|
| Console | logging console | debugging |
| Remote sessions (vty) | logging monitor + terminal monitor | debugging |
| Memory buffer | logging buffered | debugging |
| Syslog server | logging host 192.168.20.50 + logging trap | informational |
To verify: show logging shows each destination's level, the counters and the buffer. Good practice: timestamps with service timestamps and NTP, logging source-interface so messages always leave from the same IP, and a trap level that does not flood the server.
Syslog facility and IOS facility
| Syslog facility | IOS facility | |
|---|---|---|
| Where it appears | In the PRI (<189>) | In the tag (%LINK, %OSPF…) |
| Values | 0–23; network devices use local0–local7 (16–23) | SYS, LINK, LINEPROTO, OSPF, IP, SEC… |
| What it is for | Letting the server sort messages | Knowing which part of the router is speaking |
| Changed with | logging facility local5 | It cannot be changed |
Frequently asked questions
Why doesn't the server receive severity 5 messages?
Because logging trap is set to a more severe level (for example, warnings = 4). Only messages at that level or more severe are sent. The default is informational (6).
What does the asterisk before the time mean?
That the router's clock is not synchronized (no NTP and no trusted configured time). A dot means it was synchronized but lost its reference. With nothing in front, the time is reliable.
Is syslog reliable?
Over UDP 514, no: if a message is lost, nobody resends it. To avoid losing them you can use syslog over TCP or TLS, and also keep a copy in the router's buffer.
How do I read a message I don't know?
Look up the facility and mnemonic (for example, LINK-3-UPDOWN) in Cisco's message guide: it explains what it means and what to do. The severity tells you how urgent it is.
What if I want debug messages on the server?
With logging trap debugging everything is sent, debug included. Do it only for a short while and carefully: a debug can generate thousands of messages per second.
What you take away
- A Cisco message looks like number: date: %FACILITY-SEVERITY-MNEMONIC: text.
- There are 8 severities, from 0 (emergency) to 7 (debug): the lower, the more severe.
- logging trap sets the severity from which messages are sent to the server; it includes every more severe one. Default: informational.
- The PRI is facility × 8 + severity; IOS uses local7 by default and you change it with logging facility.
- The syslog facility (local7) is not the IOS facility (LINK, OSPF…).
- One failure produces several messages: the first one in time is usually the cause.
NEXT STEP
From this lesson to the CCNA 2.0 Course
Syslog, SNMP and network management (domain 5.0) are part of The House of Routing's CCNA 2.0 Course, with the Canadá Logística lab. We will let you know when it opens.
Upcoming protocol lessons
Sources
- Cisco · IOS XE 17 configuration guides (Network Management: Troubleshooting and Fault Management, System Message Logging)
- IETF · RFC 3164 · The BSD syslog Protocol
- IETF · RFC 5424 · The Syslog Protocol
- Cisco · 200-301 CCNA v2.0 Exam Topics (5.6)
Lesson prepared with AI assistance and checked against the sources cited. The bytes of every packet are generated according to the standard and verified with an independent tool.