Choosing an Edge Gateway: Protocol Drivers, Buffering and Management

Edge gateway selection: PLC drivers, store-and-forward capacity calculation, hardware, routing on dual network interfaces, remote management and a checklist.
Technical summary
Technology
Edge gateway, OPC UA, MQTT, Sparkplug B, Modbus TCP, S7comm, Linux, nftables
Topic
Choosing edge hardware and software for production data collection
Level
Intermediate
Prerequisites
  • Basic knowledge of PLC communication protocols
  • The concept of IT/OT network separation
In this article8 sections

Unexplained gaps in the historian, counters that don’t match at the end of the shift, discovering that a PLC can be pinged from the IT network. When we trace these problems in data collection projects, we often arrive at the same point: a wrongly chosen or wrongly configured edge gateway. The gateway reads the different protocols in the field, converts data into meaningful names and units, buffers it when the connection drops, and becomes a controlled transition point between the OT network and the upper layers. Below, we set out in order the technical criteria to look at in selection, decision tables and a buffering calculation.

What job will the gateway do in the architecture?

“Edge gateway” is a name given to very different products on the market: from a simple Modbus RTU–TCP converter to an industrial PC running containers. Before opening a catalogue, write down which tasks the gateway will take on in your architecture:

  • Collection: Reading data (polling) from sources such as PLCs, drives and energy analysers, or receiving it through subscriptions.
  • Normalisation: Converting raw addresses (DB12.DBW40, 40001) into meaningful names, units and scaled values.
  • Pre-processing: Deadband, report by exception, simple calculations (counter differences, deriving states).
  • Buffering: Storing data when the connection to the centre drops and sending it in order later.
  • Publishing: Serving data as an OPC UA server, via MQTT/Sparkplug B, or by writing directly to the historian.
  • Network boundary: Transferring data only at application level between the OT network and the upper network, without routing.

If the need is only serial-to-Ethernet conversion, a simple protocol converter is enough; we described that scenario in the article migrating from Modbus RTU to Modbus TCP. The focus here is on data collection gateways that take on most of the tasks above.

Protocol drivers and PLC compatibility

The first screening criterion is that it can read the devices on site reliably. Build the inventory down to model and firmware level. The sentence “Siemens is supported” says nothing on its own: does it mean classic S7 access on S7-300/400, access on S7-1200/1500 that requires PUT/GET permission and non-optimised blocks, or access only via the PLC’s OPC UA server? Ask the vendor in writing.

What to check Why it matters
PLC family and access method Different series from the same manufacturer require different drivers and PLC settings
Driver source The manufacturer’s own driver, a licensed third party or open source; support and updates depend on this
Read optimisation Being able to read consecutive addresses in blocks determines PLC load and cycle time
Number of connections The PLC’s simultaneous connection capacity is limited; how many connections does the gateway open?
Licensing per driver In some products, drivers or tag counts are licensed separately; this changes the total cost
Northbound protocols OPC UA server, MQTT, Sparkplug B, REST, database write support

We compared which access method requires which PLC setting on the S7 series, and its effect on security, in the article methods for reading data from S7 PLCs. Before buying, test on at least one pilot PLC, with the real tag list and at the target read interval. The driver list in the catalogue does not guarantee compatibility with the firmware version on site. A gateway bought without a pilot brings surprises during commissioning.

Store-and-forward and connection outages

A connection outage is not an exception; it is planned for. Central server maintenance, a WAN outage, a broker update, a DMZ firewall change. During this time, the gateway must write data to disk and, when the connection comes back, send it in order and with its original timestamps. Questions to ask the vendor:

  • Is the buffer in memory or in persistent storage? Is the buffer lost in a power cut?
  • When capacity is full, is the oldest data deleted or is new data rejected? Can this behaviour be configured?
  • When the connection comes back, how are historical data and live data distinguished? (In Sparkplug B, the is_historical flag is for this; details are in the MQTT Sparkplug B guide.)
  • Can the resend rate be limited? If all the data accumulated over a weekend is pushed to the centre at once, it strains the historian and the broker.

Example calculation: The gateway reads 2,000 tags; each tag changes on average once every 10 seconds and is recorded on change. On average, 200 values are generated per second. Assuming 32 bytes per value (tag ID, timestamp, value, quality), the daily data volume is:

200 values/s × 32 bytes × 86,400 s ≈ 553 MB/day
7-day outage target                  ≈ 3.9 GB
×2 for index/format overhead         ≈ 8 GB of buffer space

Real values vary with the product and storage format; the purpose of the calculation is to see what order of magnitude of storage is needed. Don’t estimate the change rate; measure it during the pilot. Set the outage target (one shift, or a weekend) together with the operations team. Because writing is continuous, storage must be industrial grade and its write endurance (TBW) must be stated in the datasheet. Consumer-grade SD cards can fail early under this workload.

Hardware options

Option Advantage Limitation Suitable scenario
Box gateway (ready-made software) Fast commissioning, web interface, low power Drivers and customisation limited to the product Standard collection per line or machine
Industrial PC (fanless) Flexible software, containers, high processing power Operating system maintenance and security hardening are left to you Area-level collection, local computation, many drivers
PLC add-on module / PLC-based edge Close to the PLC, manufacturer support, in the rack Tied to the manufacturer’s ecosystem, limited resources Single-vendor lines, machine builder integration
Virtualised edge (on a server) Central management, high resources Network dependency on the field; hardware not in the OT cabinet Plants with server infrastructure in the control room

Physical conditions are the most often overlooked part. For a gateway going into a cabinet, check: DIN-rail mounting, 24 V DC supply and a redundant power input, operating temperature range, fanless design, suitability for dust and vibration conditions, relevant EMC and, if needed, hazardous area certificates. Measure the in-cabinet temperature in summer, not in winter. Office-type mini PCs quickly run into thermal problems inside a cabinet. A cabinet is not an office.

Network location and dual-interface design

Data collection gateways are usually installed with two network interfaces: one facing the cell or area network (south), the other facing the upper layer or DMZ (north). The security value of this design depends on a single condition: the gateway must not route between the two networks. It should only read and publish data at application level; a packet coming from the IT side must under no circumstances pass into the PLC network. A common mistake is IP forwarding left enabled in the default image. A two-legged gateway with forwarding enabled is a router.

To verify and fix this on a Linux-based gateway:

# IP forwarding must be off (0)
sysctl net.ipv4.ip_forward net.ipv6.conf.all.forwarding
printf "net.ipv4.ip_forward = 0\nnet.ipv6.conf.all.forwarding = 0\n" | sudo tee /etc/sysctl.d/99-edge.conf
sudo sysctl --system

# /etc/nftables.conf (example): forward chain closed,
# management access only from the defined workstation
table inet filter {
  chain input {
    type filter hook input priority 0; policy drop;
    ct state established,related accept
    iif "lo" accept
    iifname "eth1" ip saddr 10.20.0.10 tcp dport 22 accept
  }
  chain forward {
    type filter hook forward priority 0; policy drop;
  }
}

In the example, eth1 is the north interface and 10.20.0.10 the management workstation; outbound MQTT/OPC UA connections receive replies via the established rule. If the gateway will also serve clients such as SCADA as an OPC UA server, add a separate rule allowing the relevant port (default TCP 4840) only from those clients’ addresses. The meaning of the parameter is explained in the Linux kernel ip-sysctl documentation. On box gateways, verify the same behaviour (routing/NAT off) in the product settings; if you can’t see it in the menu, test with a packet between the two networks.

Connection direction is also a decision. The gateway connecting by itself to the broker or historian to the north (an outbound connection) is easier to control than allowing connections from the upper network into the gateway. Whether it sits in the DMZ or on the area network depends on the plant’s zone structure; we compared the options in the article OT DMZ design.

Remote management, updates and backup

If you try to manage thirty gateways one by one through their web interfaces, a year later you will have thirty different configurations and forgotten updates. Management features to assess:

  • Central management: Configuration, drivers and tag lists should be distributed centrally; health data such as CPU, disk, buffer usage and driver errors should be monitorable.
  • Secure updates: Signed firmware, rollback to the previous version on a failed update (such as A/B partitioning), and the ability to update in a planned window.
  • Configuration backup: Exportable, text-based configuration that can be put under version control. The goal: to replace a failed device with a new one and bring it into service within minutes by loading the configuration.
  • Identity and access: Changing the default password at first boot, role-based permissions, central authentication if possible; management access only from the management network.
  • Security features: Secure boot, TPM, the ability to disable unused services, sending logs to a central system (syslog).
  • Lifecycle: How long the manufacturer provides security updates and its vulnerability disclosure process. Verify the support period on the manufacturer’s current lifecycle page.

Selection checklist

  • All PLCs and devices on site are listed at model/firmware level; the driver and access method for each have been verified with a pilot.
  • The required northbound protocols (OPC UA, MQTT/Sparkplug B, historian write) and security options (TLS, certificates) are supported.
  • The tag and driver licensing model is included in the total cost.
  • Store-and-forward is on persistent storage; capacity has been calculated for the target outage time; the behaviour when full is known.
  • Storage is industrial grade; write endurance is specified.
  • Mounting, power, temperature and environmental conditions have been checked against the realities of the cabinet.
  • Routing between the two interfaces is off and tested; the gateway establishes connections outbound.
  • Central management, signed updates, rollback and configuration backup are available.
  • Device health metrics and logs are connected to the monitoring system.
  • The spare device and configuration restore procedure for a failure is written down and has been tried at least once.

For gateway selection, pilot testing and a standard configuration template, see our edge gateways and protocol conversion page, and for the complete data collection architecture, our IIoT and production data collection page.

Frequently asked questions

Can’t we get data directly from SCADA instead of an edge gateway?

You can; if SCADA is already reading the PLCs, its OPC UA or MQTT output is a good source. But devices SCADA does not read, a need for buffering, and SCADA licence or load limits can make a separate edge layer necessary.

How do we determine store-and-forward capacity?

Multiply the number of values generated per second, the storage size per value and the longest acceptable outage; add a margin for format and index overhead. Don’t estimate the change rate; measure it during the pilot.

Which network should the gateway sit on: the cell network or the DMZ?

A collecting gateway usually sits close to the devices it reads, on the cell or area network, and establishes an outbound connection to the broker or historian in the DMZ. Putting it directly in the DMZ requires opening access to PLCs from the DMZ; that is why it is generally not preferred.

Is a gateway that can run containers always better?

It provides flexibility, but it also leaves maintenance of the operating system, container images and security updates to you. For standard collection and publishing, a gateway with ready-made software needs less maintenance; container support makes sense if there is a need for local computation and custom applications.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Industrial

PLC, PROFINET/PROFIBUS and SCADA communication, IT/OT network segmentation and industrial field connectivity. We install and monitor without stopping the production line.

Knowledge Center

Other articles