How to determine the Syslog Facility using tcpdump

How to determine the Syslog Facility using tcpdump

Each Syslog message contains a priority value. The priority value is enclosed within the characters < >. The priority value can be between 0 and 191 and consists of a Facility value and a Level value. Facility being the type of message, such as a kernel or mail message. And level being a severity level of the message.

To calculate the priority value the following formula is used : Priority = Facility * 8 + Level

So to determine the facility value of a syslog message we divide the priority value by 8. The remainder is the level value.

My Cisco Config :

logging trap debugging
logging source-interface Vlan100
logging host 192.168.1.67    – SYSLOG Server

Below is an example of the tcpdump syntax :

Using the above example this would give us a facility of 17 (local1) and a level of 5 (notice)

Severity Levels

0 Emergency: system is unusable
1 Alert: action must be taken immediately
2 Critical: critical conditions
3 Error: error conditions
4 Warning: warning conditions
5 Notice: normal but significant condition
6 Informational: informational messages
7 Debug: debug-level messages

Facilities available

0 kernel messages
1 user-level messages
2 mail system
3 system daemons
4 security/authorization messages
5 messages generated internally by syslogd
6 line printer subsystem
7 network news subsystem
8 UUCP subsystem
9 clock daemon
10 security/authorization messages
11 FTP daemon
12 NTP subsystem
13 log audit
14 log alert
15 clock daemon
16 local use 0 (local0)
17 local use 1 (local1)
18 local use 2 (local2)
19 local use 3 (local3)
20 local use 4 (local4)
21 local use 5 (local5)
22 local use 6 (local6)
23 local use 7 (local7)