profinet — IEC 61158 Real-Time Cyclic IO & DCP (0x8892 / UDP 34964)
- Default Port / Protocol
- EtherType 0x8892 (or UDP 34964)
- Host Endpoint Rule
- MAC-Only or IP
- Wireshark Display Filter
- pn_rt || pn_dcp
- Standards & Specs
- IEC 61158, IEC 61784-2, PROFINET IO
What It Does on the Wire
Factory-floor deterministic Ethernet on 0x8892 (or routed over UDP 34964 with transport udp): profinet stamps exact frameid, cyclic counters, and DCP identify requests without touching a live Siemens line.
PROFINET (profinet, IEC 61158) is the dominant real-time industrial Ethernet fieldbus across discrete manufacturing, robotics, and Siemens SIMATIC automation cells. Cyclic Real-Time (RT_CLASS_1/RT_CLASS_3) I/O data and Discovery and Basic Configuration Protocol (DCP) frames run directly over Layer 2 (EtherType 0x8892) prepended with a 16-bit FrameID (0x8000..0xfbff RT cyclic, 0xfefe/0xfeff DCP Identify) and suffixed with a 4-byte cyclic trailer (CycleCounter, DataStatus, TransferStatus).
FrameAssembly emits native 0x8892 Layer 2 frames over MAC-only or IP hosts by default—and when you append transport udp over IP hosts, it automatically switches to PROFINET RT over UDP (dstport 34964) for routed L3 factory-backbone conduits.
OT Switch QoS (vlan 0 pcp 6) & Cyclic Real-Time Watchdog Testing
Emit priority-tagged (vlan 0 pcp 6) cyclic I/O frames (frameid 0x8000, incrementing cycle) to verify industrial switch latency and OT IDS dissectors.
PROFINET DCP Identify & Unauthorized Set-IP Alerting
Craft profinet service "identify" request (frameid 0xfefe) and service "set" frames to test Claroty, Dragos, Nozomi, and Suricata ICS asset-discovery alerts.
Routed Cell-Zone PROFINET over UDP (34964) Firewall Rules
Add transport udp to verify Purdue Level 2/3 firewall ACLs permitting or blocking routed PROFINET RT_CLASS_UDP frames.
RFC Wire Header Layout (profinet)
Select any 32-bit wire word or field slice below to inspect which .frasm modifiers control those octets and what defaults the compiler writes.
Minimal Quickstart (profinet_quickstart.frasm)
Select Preview Packets to compile in-browser and inspect timestamps + wire byte lengths, or open directly in the Playground.
host io_controller { mac 00:0e:8c:aa:00:01 }
host io_device { mac 00:0e:8c:bb:00:10 }
compile {
io_controller -> io_device profinet frameid 0x8000 cycle 100 datastatus 0x35 vlan 0 pcp 6
}Handled Automatically on the Wire
- Sets Ethernet II EtherType to
0x8892on Layer 2 frames, or encapsulates inside IPv4/IPv6 + UDPdstport 34964whentransport udpis specified. - Encodes the 16-bit big-endian
FrameID, pads cyclic RT payloads to minimum length, and appends the 4-byteCycleCounter+DataStatus(0x35Valid/Primary/Run/OK) +TransferStatus(0x00) trailer. - Constructs structured PROFINET DCP headers (
ServiceID,ServiceType,Xid) whenservice/get/set/request/responseis selected.
PROFINET DCP Station Discovery + Cyclic 802.1p Priority-Tagged I/O + Routed UDP
Captures a PLC IO-Controller discovering a field IO-Device via DCP, exchanging cyclic 0x8000 real-time frames on priority tag vlan 0 pcp 6, and sending a routed transport udp frame.
host plc_s7_1500 { ip 10.110.1.10 mac 00:0e:8c:15:00:01 }
host et200sp_io { ip 10.110.1.20 mac 00:0e:8c:20:00:02 }
compile {
// 1. DCP Identify request & response over Layer 2 (0x8892)
plc_s7_1500 -> et200sp_io profinet frameid 0xfefe service "identify" request xid 0x01020304 wait 2ms
plc_s7_1500 <- et200sp_io profinet frameid 0xfeff service "identify" response xid 0x01020304 wait 2ms
// 2. Priority-tagged (VLAN 0, PCP 6) cyclic RT_CLASS_1 I/O exchange
plc_s7_1500 -> et200sp_io profinet frameid 0x8000 cycle 3200 datastatus 0x35 vlan 0 pcp 6 wait 1ms
plc_s7_1500 <- et200sp_io profinet frameid 0x8001 cycle 3200 datastatus 0x35 vlan 0 pcp 6 wait 2ms
// 3. Routed PROFINET over UDP port 34964
plc_s7_1500 -> et200sp_io profinet frameid 0x8000 cycle 3232 datastatus 0x35 transport udp
}# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show profinet_dcp_and_rt_io.frasm
# 2. Compile .frasm -> classic .pcap, nanosecond .pcapng, or pipe via '-'
frameassembly profinet_dcp_and_rt_io.frasm profinet_dcp_and_rt_io.pcap
frameassembly profinet_dcp_and_rt_io.frasm profinet_dcp_and_rt_io.pcapng
# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse profinet_dcp_and_rt_io.pcap profinet_dcp_and_rt_io_edited.frasm
# 4. Verify dissected protocol fields in tshark
tshark -r profinet_dcp_and_rt_io.pcap -Y "pn_rt || pn_dcp"All profinet 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 profinet:
src_host -> dst_host profinet [frameid <0..65535>] [cycle <0..65535>] [datastatus <0..255>] [transferstatus <0..255>] [service "<text>"] [xid <number>] [request | response | read | write | get | set | connect | release] [transport udp]| Keyword / Option | Accepted Value | Default | Effect on Packet |
|---|---|---|---|
| frameid <0..65535> | 16-bit PROFINET FrameID (e.g. 0x8000, 0xfefe) | 0x8000 (RT_CLASS_1 cyclic) | Writes the 2-byte PROFINET FrameID ahead of the RT or DCP payload. |
| cycle <0..65535> | 16-bit 31.25us Cycle Counter | 0 | Sets the 16-bit CycleCounter in the 4-byte cyclic PROFINET RT trailer. |
| datastatus <0..255> | 8-bit RT DataStatus flags | 0x35 (State=Primary, DataValid, ProviderRun, StationOK) | Sets the DataStatus byte in the cyclic RT trailer (0x35 healthy; clear bit 0x04 to simulate invalid I/O). |
| transferstatus <0..255> | 8-bit TransferStatus byte | 0x00 | Sets the final TransferStatus byte of the cyclic PROFINET RT trailer. |
| service "<text>" | get | set | read | write | connect | release | DCP / IO service selector | Cyclic RT when omitted | Selects DCP get/set/identify or IO read/write/connect/release PDU encoding. |
| request | response | PDU direction role flag | request | Toggles DCP ServiceType (0 Request vs 1 Response Success). |
| xid <number> | 32-bit DCP Transaction ID | 1 | Sets the 4-byte Xid correlation field in PROFINET DCP frames. |
| transport udp | Optional UDP encapsulation override (IP hosts required) | Raw Ethernet 0x8892 | Encapsulates the PROFINET frame inside IPv4/IPv6 + UDP dstport 34964. |
Cross-Layer Wrappers Valid with profinet
802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol
10 options
Cross-Layer Wrappers Valid with profinet
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). |
| comment "<text>" | Quoted UTF-8 annotation | Omitted | Attaches an Enhanced Packet Block opt_comment annotation when compiling to .pcapng (Wireshark pkt_comment filter). |
| payload "<text>" | hexpayload "<hex>" | Quoted text or hex bytes (choose one) | Omitted | Appends or overrides raw payload bytes ("deadbeef", "de:ad:be:ef", or "\x01\x02") and updates packet lengths and checksums. |
| srcmac <mac> | dstmac <mac> | ethertype <0..65535> | Colon/hyphen/Cisco MAC · EtherType 0..65535 (e.g. 0x0800) | Host MAC / RFC multicast MAC / auto EtherType | Overrides the 14-byte Ethernet II source MAC, destination MAC, or standalone Layer 2 16-bit EtherType. |
| fcs | badfcs | Ethernet CRC-32 trailer flags (choose one) | Omitted | fcs appends a valid IEEE 802.3 4-byte CRC-32 Frame Check Sequence trailer; badfcs XOR-corrupts the CRC-32 for NIC/tap negative tests. |
| 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> [label <0..1048575>] [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>] | Repeatable label stack (0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255) | Unlabeled (auto bos=0 on outer labels, bos=1 on bottom) | Prepends one or more 32-bit MPLS label shims (0x8847, e.g. mpls 16000 mpls 24010) ahead of Layer 2 EoMPLS or Layer 3 payloads. |
| srcport <0..65535> | dstport <0..65535> | Port number 0..65535 | srcport 49152 (remembered), EtherType 0x8892 (or UDP 34964) | Overrides source or destination port and remembers the port pair automatically on <- replies. |
| transport udp | Optional UDP encapsulation override | Ethernet 0x8892 (UDP 34964 when transport udp is set) | Wraps the protocol frame inside an IPv4/IPv6 + UDP header instead of raw Ethernet or raw IP encapsulation. |
Gotchas & Quick Fixes
transport udp Requires IP Addresses on Both Endpoints
host io1 { mac 00:0e:8c:00:00:01 }
io1 -> io2 profinet transport udphost io1 { ip 10.110.1.10 mac 00:0e:8c:00:00:01 }
io1 -> io2 profinet transport udpNative Layer 2 profinet (0x8892) works on MAC-only hosts, whereas profinet transport udp builds an IP + UDP 34964 header and requires ip on both hosts.
PROFINET Supports transport udp Only (Never transport tcp)
plc -> io profinet transport tcpplc -> io profinet transport udpPer IEC 61158, routed PROFINET Real-Time uses UDP port 34964; TCP is not a valid PROFINET RT transport.