How to Set Up IEC 60870-5-104 for SCADA Remote Monitoring

By | April 2, 2026

IEC 60870-5-104 (commonly called IEC 104) is the standard protocol for SCADA communication in power utilities, water systems, and other critical infrastructure across Europe, Asia, and the Middle East.

It takes the application layer of IEC 60870-5-101 (the serial telecontrol standard) and maps it onto TCP/IP. This gives you the same proven data model — single-point indications, measured values, commands, and time-stamped events — but delivered over Ethernet and IP networks instead of serial lines.

Setting up IEC 104 involves configuring the TCP connection, ASDU addressing, information object addresses, timeout parameters, and the controlling/controlled station relationship. Get any of these wrong and you will see connection drops, missing data, or failed commands.

This guide walks you through the complete setup process, from network planning to troubleshooting.

1. IEC 104 Overview: How It Works

IEC 104 uses a client/server model over TCP/IP:

  • The controlling station (SCADA master/control center) is the TCP client. It initiates the connection.
  • The controlled station (RTU, IED, gateway) is the TCP server. It listens for incoming connections on TCP port 2404.

Once connected, both sides can send data. The controlled station sends spontaneous events (status changes, measurements) without waiting to be polled. The controlling station sends commands, general interrogation requests, and time sync messages.

This is different from Modbus where the slave never speaks unless asked. In IEC 104, the controlled station actively pushes data when events occur.

2. IEC 104 vs. IEC 101: Key Differences

FeatureIEC 60870-5-101IEC 60870-5-104
TransportSerial (RS-232/RS-485)TCP/IP over Ethernet
PortCOM portTCP port 2404
TopologyPoint-to-point or multi-dropIP network (LAN, WAN, VPN)
Link layerFT1.2 frame formatTCP handles framing
Error checkingHamming distance 4 (FT1.2)TCP checksums
AddressingLink address (1–2 bytes)IP address + ASDU address
RedundancyNot definedRedundant TCP connections supported
Application layerIdenticalIdentical (same ASDUs, same type IDs)

The application layer is the same. If you know IEC 101, you already know the data types, type identifiers, and cause-of-transmission codes. IEC 104 just changes how frames are delivered.

3. Protocol Architecture: APCI, APDU, and ASDU

Every IEC 104 message is an APDU (Application Protocol Data Unit) consisting of two parts:

APDU = APCI + ASDU

  • APCI (Application Protocol Control Information): The 6-byte header that manages the TCP connection — start byte (0x68), length, and control fields for sequence numbering and connection management.
  • ASDU (Application Service Data Unit): The actual telecontrol data — type ID, cause of transmission, ASDU address, and information objects with their values and timestamps.

The APCI is specific to IEC 104. The ASDU is shared with IEC 101.

APCI Structure (6 bytes)

ByteFieldDescription
1Start byteAlways 0x68
2LengthNumber of bytes following (APCI control fields + ASDU)
3–4Control field 1Send sequence number (I-format) or receive sequence number (S-format) or U-format type
5–6Control field 2Receive sequence number acknowledgment

4. Frame Formats: I-Format, S-Format, and U-Format

IEC 104 uses three frame types, identified by the control field bits:

FormatPurposeContains ASDU?
I-format (Information)Carries actual telecontrol data (measurements, commands, events)Yes
S-format (Supervisory)Acknowledges received I-frames without sending dataNo
U-format (Unnumbered)Connection management: STARTDT, STOPDT, TESTFRNo

U-Format Commands

CommandFull NamePurpose
STARTDT ACT / CONStart Data TransferControlling station requests data flow to begin. Controlled station confirms.
STOPDT ACT / CONStop Data TransferControlling station requests data flow to stop.
TESTFR ACT / CONTest FrameHeartbeat to verify the connection is alive during idle periods.

The connection sequence is:

  1. TCP connection established (3-way handshake)
  2. Controlling station sends STARTDT ACT
  3. Controlled station responds with STARTDT CON
  4. Data transfer begins (I-frames flow in both directions)

No I-frames or S-frames are exchanged until STARTDT is confirmed. This is a common source of confusion — the TCP connection can be up, but no data flows until STARTDT completes.

5. Network Setup and TCP Configuration

Basic Requirements

ComponentRequirement
TCP port2404 (IANA registered for IEC 104)
IP addressingStatic IPs for all stations
NetworkSame subnet or routable via gateway/VPN
FirewallPort 2404 open between controlling and controlled stations
BandwidthMinimal — IEC 104 is very lightweight (a few kbps typical)

IP Planning

  • Control center (SCADA): 10.0.0.1
  • RTU site 1: 10.0.1.10
  • RTU site 2: 10.0.1.11
  • Gateway/router: 10.0.0.254

💡 Pro Tip: IEC 104 works well over low-bandwidth links (cellular, satellite, MPLS). But latency and packet loss directly affect timeout behavior. Always tune timeout parameters for your specific network conditions.

6. Step-by-Step: Configure the Controlled Station (RTU/IED)

The controlled station is the field device — RTU, IED, or protocol gateway — that collects data and sends it to the control center.

Step 1. Set the Listening Port

Default is TCP port 2404. Leave it unless your organization requires a different port.

Step 2. Configure the ASDU Address (Common Address)

The ASDU address identifies this station in the IEC 104 network. It is a 2-byte value (1 to 65534). Each controlled station must have a unique ASDU address.

This is equivalent to the slave address in Modbus or the outstation address in DNP3.

Step 3. Map Information Object Addresses (IOAs)

Every data point (status indication, measurement, command) needs an Information Object Address (IOA). IOAs are 3 bytes (range: 1 to 16777215).

Data TypeType IDIOA Range (example)
Single-point indicationM_SP_NA_1 (1) / M_SP_TB_1 (30)1–100
Double-point indicationM_DP_NA_1 (3) / M_DP_TB_1 (31)101–200
Measured value, normalizedM_ME_NA_1 (9) / M_ME_TD_1 (34)201–400
Measured value, scaledM_ME_NB_1 (11) / M_ME_TE_1 (35)401–600
Measured value, short floatM_ME_NC_1 (13) / M_ME_TF_1 (36)601–800
Single commandC_SC_NA_1 (45) / C_SC_TA_1 (58)1001–1100
Double commandC_DC_NA_1 (46) / C_DC_TA_1 (59)1101–1200
Setpoint, scaledC_SE_NB_1 (49) / C_SE_TB_1 (62)1201–1300

⚠️ Warning: IOA numbering is entirely up to the system integrator. There is no standard range. Always document your IOA map and share it with the SCADA configuration team. Mismatched IOAs are the number one cause of “data not appearing” in SCADA.

Step 4. Configure Event Buffers

The controlled station buffers spontaneous events (status changes, measurement threshold crossings) and sends them as I-frames with timestamps. Configure:

  • Buffer size (number of events per type)
  • Whether to use timestamps (always recommended — use CP56Time2a format)

Step 5. Set the k and w Parameters

ParameterMeaningTypical Value
kMaximum number of unacknowledged I-frames the sender can transmit before waiting for an S-frame acknowledgment12
wNumber of I-frames received before the receiver must send an S-frame acknowledgment8

Rule: w must be less than or equal to 2/3 of k. If k = 12, then w should not exceed 8.

7. Step-by-Step: Configure the Controlling Station (SCADA Master)

Step 1. Add Controlled Stations

For each RTU/IED, configure:

  • IP address
  • TCP port (2404)
  • ASDU address (must match the controlled station’s setting)

Step 2. Map IOAs to SCADA Tags

Each IOA from the controlled station must be mapped to a tag in the SCADA database. This mapping connects the raw IEC 104 data point to a named variable that operators see on the HMI.

Step 3. Configure General Interrogation

Set the controlling station to send a General Interrogation (GI) command (type ID 100) after connection establishment and periodically (every 15–60 minutes). GI forces the controlled station to send the current value of all its data points — like a full integrity poll.

Step 4. Configure Clock Synchronization

Set the controlling station to send clock sync commands (type ID 103) at regular intervals to keep RTU timestamps accurate.

8. Timeout Parameters: t0, t1, t2, t3

IEC 104 defines four timeout parameters that control connection behavior. Misconfigured timeouts are the most common cause of connection instability.

ParameterPurposeTypical RangeDefault
t0Connection establishment timeout — time to complete TCP + STARTDT handshake10–30 s30 s
t1I-frame acknowledgment timeout — time to wait for ACK after sending an I-frame10–60 s15 s
t2Acknowledgment delay — time before sending an S-frame when no I-frames arrive1–10 s10 s
t3Idle supervision timeout — time before sending TESTFR ACT to check if the link is alive20–300 s20 s

Critical Rules

  • t2 must be less than t1. A good rule: t2 < t1/2. If t1 = 15 s, set t2 ≤ 7 s.
  • t3 should be greater than t1. Typically 2–4 times t1.
  • t0 should allow for network latency. On VPN/cellular links, set t0 to 30–60 s.

Example Configurations

ScenarioNetworkt0t1t2t3
LAN (fiber/Ethernet)Local10 s15 s5 s25 s
WAN (MPLS)Managed20 s30 s10 s60 s
Cellular/VPNPublic30 s45 s10 s120 s

⚠️ Warning: If you see frequent reconnections in your SCADA logs, the first thing to check is t1. If t1 is shorter than the actual network round-trip time, the controlling station will close the connection thinking the RTU is unresponsive. Increase t1 gradually until reconnections stop.

For a deep dive into timeout tuning with diagrams and real examples, see: Adjusting Timeout Values (t0–t3) in IEC 60870-5-104

9. General Interrogation and Data Flow

Normal Data Flow

During normal operation, the controlled station sends data spontaneously:

  1. A status change or measurement threshold crossing occurs.
  2. The controlled station creates an ASDU with the new value and a CP56Time2a timestamp.
  3. It sends the ASDU as an I-frame with Cause of Transmission (COT) = 3 (spontaneous).
  4. The controlling station acknowledges with an S-frame or its own I-frame.

General Interrogation (GI)

GI is used to get a full snapshot of all data points. The controlling station sends type ID 100 (C_IC_NA_1) with COT = 6 (activation).

The controlled station responds by sending all its current data with COT = 20 (interrogated by station interrogation) and finishes with a GI confirmation (COT = 10, activation termination).

When to Use GI

  • After initial connection (STARTDT confirmed)
  • After a communication interruption
  • Periodically (every 15–60 minutes) to catch any missed events
  • After a controlled station restart

10. Time Synchronization (CP56Time2a)

Accurate timestamps are essential for event sequence analysis and fault investigation. IEC 104 uses the CP56Time2a format — a 7-byte timestamp with millisecond resolution.

How It Works

  1. The controlling station sends a Clock Synchronization command (type ID 103, C_CS_NA_1).
  2. The controlled station adjusts its clock.
  3. All subsequent events include CP56Time2a timestamps.

Configuration

  • Set the controlling station to send clock sync every 10–60 minutes.
  • For higher accuracy, use SNTP or GPS/IRIG-B on the controlled station as the primary time source, and use IEC 104 clock sync as a backup.
  • Check the IV (Invalid) flag in timestamps. If the controlled station’s clock is not synchronized, it sets the IV bit to 1 — the SCADA system should flag these events as having unreliable timestamps.

11. Redundant Connections

IEC 104 Edition 2 (2006) added support for redundant TCP connections between controlling and controlled stations. This improves reliability for critical infrastructure.

How It Works

  • Two independent TCP connections are established between the SCADA master and RTU, typically over two separate network paths.
  • One connection is active (carrying data), the other is in standby.
  • If the active connection fails, the standby connection takes over.
  • The switchover uses STARTDT/STOPDT to manage which connection carries data.

Configuration

  • Both connections use the same ASDU address.
  • Each connection has independent sequence numbers (send/receive counters).
  • Configure both paths in the controlling and controlled station.
  • Test failover regularly to confirm it works within acceptable switchover time.

12. Security Considerations

IEC 104 was designed without built-in security. All traffic is unencrypted. There is no authentication. This is the same situation as Modbus TCP.

Risks

  • Unauthorized access: Any device that can reach port 2404 can read all SCADA data and send commands.
  • Command injection: An attacker can send control commands (type IDs 45–69) to open/close breakers or change setpoints.
  • Eavesdropping: All data including measurements and commands is plain text.
  • Man-in-the-middle: Traffic can be intercepted and modified.

Protection

  • IEC 62351-3 defines TLS encryption for IEC 104. The secure variant uses TCP port 19998.
  • IEC/TS 60870-5-7 defines security extensions specifically for IEC 101 and IEC 104, including authentication mechanisms.
  • Network segmentation: Keep IEC 104 traffic on a dedicated VLAN or network.
  • Firewall rules: Restrict port 2404 (and 19998 for TLS) to authorized SCADA IPs only.
  • VPN tunnels: Encrypt all IEC 104 traffic crossing WAN or public networks.
  • Monitoring: Deploy OT intrusion detection to watch for unauthorized connections and unusual commands on port 2404.

⚠️ Warning: Never expose TCP port 2404 to the internet. Thousands of IEC 104 devices have been found on Shodan with no protection. Always use VPN and firewall rules.

13. Troubleshooting Common Issues

ProblemLikely CauseSolution
TCP connection established but no dataSTARTDT not sent or not confirmedCheck that the controlling station sends STARTDT ACT and the controlled station replies with STARTDT CON.
Frequent disconnectionst1 timeout too short for network latencyIncrease t1. Monitor round-trip time and set t1 higher.
Data appears after long delayt2 too long — S-frame ACK delayedReduce t2 to 3–5 seconds.
“Link idle” alarmst3 too short — TESTFR triggers too oftenIncrease t3 to 60–120 seconds.
Connection fails at startupt0 expired before TCP handshake completesIncrease t0. Check firewall and port 2404 access.
Data points missing in SCADAIOA mismatch between RTU and SCADAVerify IOA mapping on both sides. Run General Interrogation to see all available points.
Timestamps show invalid (IV=1)RTU clock not synchronizedSend clock sync commands. Check if RTU has SNTP/GPS time source.
Commands rejected by RTUWrong type ID or IOA for command pointsCheck command type ID and IOA mapping. Verify Select-Before-Execute if required.
Duplicate events after reconnectionGI overlaps with buffered spontaneous eventsNormal behavior — SCADA should handle deduplication based on timestamps.
k limit reached — data stops flowingReceiver not sending S-frame ACKs fast enoughCheck w parameter. Ensure receiver sends ACK before k limit is reached.

Summary

IEC 60870-5-104 is a mature, well-proven protocol for SCADA communication over TCP/IP networks. It gives you spontaneous event reporting, timestamped data, general interrogation, and redundant connections — all things that simpler protocols like Modbus cannot provide.

Here is a quick checklist before going live:

  • TCP port 2404 open between controlling and controlled stations
  • ASDU address unique and matching on both sides
  • IOA map documented and verified on both sides
  • Timeout parameters tuned for your network (t2 < t1, t3 > t1)
  • STARTDT/STOPDT sequence working
  • General Interrogation configured at startup and periodically
  • Clock synchronization active (IEC 104 and/or SNTP/GPS)
  • Network segmented and port 2404 firewalled
  • Redundant connections tested if configured

The protocol handles the complexity of real-time telecontrol well. When problems occur, they are almost always in the timeout tuning, IOA mapping, or network configuration — not in the protocol itself.

Author: Zakaria El Intissar

I'm an automation and industrial computing engineer with 12 years of experience in power system automation, SCADA communication protocols, and electrical protection. I build tools and write guides for Modbus, DNP3, IEC 101/103/104, and IEC 61850 on ScadaProtocols.com to help engineers decode, analyze, and troubleshoot real industrial communication systems.

Leave a Reply

Your email address will not be published. Required fields are marked *