syslogSyslog Event Logging over UDP or TCPWake Up the SIEM Without Breaking Production (rtr -> siem syslog)
What It Does on the Wire
Compute <PRI> = facility * 8 + severity automatically (or override pri directly) and ship clean RFC 5424 log frames over UDP 514 or transport tcp to verify SIEM alert rules.
Syslog (syslog, RFC 5424) is the universal log transport used by routers, firewalls, Linux servers, and OT gateways to ship security and operational events to SIEM collectors (Splunk, Elastic, Sentinel, QRadar, Graylog, rsyslog). By default, syslog sends over UDP port 514, and adding transport tcp switches cleanly to TCP port 514.
FrameAssembly computes the RFC <PRI> header (facility * 8 + severity, or an explicit pri 0..191 override) and formats a clean RFC 5424 Version 1 message with hostname, app, procid, msgid, and msg fields.
Test SIEM Parsers & Detection Rules Without Touching Production
Craft SSH failed-login, firewall deny, or BGP neighbor-down syslog packets with exact hostnames and severity codes, then replay them into a staging log collector.
Verify UDP 514 vs TCP 514 Log Relay Firewall Paths
Test both stateless UDP 514 forwarding and reliable transport tcp syslog delivery across DMZ firewalls.
Checkmk Event Console & NMS Severity Mapping
Send severity 0 (Emergency) through severity 7 (Debug) messages across local0–local7 (facility 16..23) to confirm alert paging thresholds.
Minimal Quickstart (syslog_quickstart.frasm)
Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.
host edge_fw { ip 10.10.0.1 }host siem_node { ip 10.10.50.10 }compile { edge_fw -> siem_node syslog facility 4 severity 4 hostname "fw-dmz-01" app "sshd" msg "Failed password for invalid user admin from 198.51.100.77"}What the Compiler Calculates So You Don't Have To
- Computes
<PRI> = facility * 8 + severityautomatically (defaultfacility 16local0,severity 6info-><134>). - Formats a complete RFC 5424
<PRI>1 TIMESTAMP HOSTNAME APP PROCID MSGID - MSGwire payload that Wireshark and syslog-ng/rsyslog parse out of the box. - Supports
transport tcpto stream syslog messages over TCP port514with automatic TCP sequence tracking.
Multi-Severity Security Audit over UDP 514 & Reliable TCP 514
Sends a firewall drop alert and OSPF adjacency warning over UDP 514, then opens a TCP 514 session to deliver a high-priority authentication alert.
host branch_fw { ip 172.16.1.1 }host log_relay { ip 172.16.100.10 }compile { // 1. Stateless UDP 514 security & routing logs branch_fw -> log_relay syslog facility 4 severity 4 hostname "branch-fw-01" app "filterlog" msgid "DROP" msg "Blocked TCP SYN 203.0.113.99:44112 -> 172.16.1.10:3389" wait 2ms branch_fw -> log_relay syslog facility 16 severity 3 hostname "branch-fw-01" app "ospfd" msgid "ADJCHG" msg "Neighbor 172.16.0.2 Down: Dead timer expired" wait 4ms // 2. Reliable TCP 514 syslog stream (transport tcp) branch_fw -> log_relay tcp syn srcport 52514 dstport 514 win 65535 mss 1460 wait 1ms branch_fw <- log_relay tcp syn ack win 65535 mss 1460 wait 1ms branch_fw -> log_relay tcp ack wait 1ms branch_fw -> log_relay syslog facility 10 severity 2 hostname "branch-fw-01" app "sudo" procid "4812" msg "Critical privilege escalation alert" transport tcp}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show syslog_siem_pipeline.frasm
# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly syslog_siem_pipeline.frasm syslog_siem_pipeline.pcap
frameassembly syslog_siem_pipeline.frasm syslog_siem_pipeline.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse syslog_siem_pipeline.pcap syslog_siem_pipeline_edited.frasmAll syslog Keywords & Header Options
Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after syslog:
src_host -> dst_host syslog [facility <0..23>] [severity <0..7>] [pri <0..191>] [hostname "<text>"] [app "<text>"] [procid "<text>"] [msgid "<text>"] [msg "<text>"] [transport <udp|tcp>]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| facility <0..23> | Facility code 0..23 (4 auth, 10 authpriv, 16..23 local0..local7) | 16 (local0) | Sets the RFC 5424 Facility number multiplied by 8 inside <PRI>. |
| severity <0..7> | Severity 0..7 (0 emerg, 2 crit, 3 err, 4 warn, 6 info, 7 debug) | 6 (Informational) | Sets the 3-bit Severity level (0 is highest urgency, 7 is debug). |
| pri <0..191> | Combined Priority value (0..191) | Computed from facility * 8 + severity | Directly sets the <PRI> value, overriding facility and severity. |
| hostname "<text>" | app "<text>" | procid "<text>" | msgid "<text>" | Quoted text fields | Standard RFC 5424 defaults | Populates the structured RFC 5424 header fields before the log message body. |
| msg "<text>" | Quoted log message text | "FrameAssembly syslog message" | Sets the UTF-8 log message text at the end of the syslog record. |
| transport <udp|tcp> | udp or tcp | udp | Switches Layer 4 delivery between UDP port 514 and TCP port 514. |
Cross-Layer Wrappers Valid with syslog
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
12 options
Cross-Layer Wrappers Valid with syslog
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
| Option | Range / Format | Default | Effect on Packet |
|---|---|---|---|
| wait <number><ns|us|ms|s|m> | Time gap (ns, us, ms, s, m) | 10ms | Advances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | Colon, hyphen, or Cisco dot MAC | Host MAC / RFC multicast MAC | Overrides the 14-byte Ethernet II source or destination MAC address for this single packet. |
| vlan <0..4095> [pcp <0..7>] [dei <0|1>] | VLAN ID 0..4095, PCP 0..7, DEI 0..1 | Untagged | Wraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority. |
| qinq <0..4095> [innervlan <0..4095>] | Outer S-VLAN 0..4095, Inner C-VLAN 0..4095 | Untagged (innervlan 1 when qinq is set) | Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100). |
| mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255 | Unlabeled (at most 1 mpls tag per packet) | Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header. |
| ttl <0..255> [dscp <0..63>] [ecn <0..3>] | TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3 | ttl 64, dscp 0, ecn 0 | Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings. |
| ipid <0..65535> [df] [mf] [fragoffset <0..8191>] | IPv4 ID, DF/MF flags, fragment offset 0..8191 | ipid 1, flags 0, fragoffset 0 | Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6). |
| flowlabel <0..1048575> | 20-bit IPv6 Flow Label (0..1048575) | 0 | Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts). |
| srcport <0..65535> | dstport <0..65535> | Port number 0..65535 | srcport 49152 (remembered), UDP 514 (or TCP 514 via transport tcp) | Overrides source or destination port and remembers the port pair automatically on <- replies. |
| transport <tcp|udp> | tcp or udp (supported on 9 dual-L4 protocols) | transport udp | Switches Layer 4 transport between TCP (psh ack + length framing where required) and UDP. |
| seq <number> | acknum <number> | win <0..65535> | syn | ack | psh | fin | rst | TCP sequence/ack numbers, window size, flags & RFC 7323 options | psh ack, win 65535, automatic TCP seq/acknum | When using TCP (transport tcp or default TCP): overrides automatic TCP sequence tracking, flags, or mss/wscale/sackperm/tsval/tsecr. |
Gotchas & Quick Fixes
Facility Must Be 0..23 and Severity Must Be 0..7
edge_fw -> siem_node syslog facility 30 severity 9edge_fw -> siem_node syslog facility 16 severity 4RFC 5424 defines facilities 0 through 23 and severities 0 through 7 (giving maximum priority 23 * 8 + 7 = 191).
Use msg (Not message) for the Log Body
edge_fw -> siem_node syslog message "Interface Gi0/1 down"edge_fw -> siem_node syslog msg "Interface Gi0/1 down"The log text option in .frasm is msg "<text>".