Leave Your Message
News Categories
Featured News

Essential for Industrial Communication: Deep Analysis of TCP/IP Protocol

2026-06-03

What exactly is the TCP/IP protocol that engineers often refer to?What industrial facilities fear most is not having too many pieces of equipment, but suddenly being unable to connect them.

Examples include PLC disconnection from the host computer; HMI screen failure to refresh; SCADA system unable to collect data; communication timeout with frequency converters; or robots reporting network anomalies, among other issues.

At this point, saying "there's a network issue" covers too many possibilities and makes troubleshooting difficult.

To thoroughly investigate the issue, we must first understand TCP/IP.

TCP/IP is not a standalone protocol but a comprehensive set of network communication standards. It underpins critical applications ranging from the Internet and industrial Ethernet to PLC communications, remote monitoring systems, MES data acquisition, and gateway data transmission.

Commonly, it can be divided into four layers: the network interface layer.

Internet Layer.

transport layer 。

application layer 。

These four layers, from bottom to top, each address one specific issue.

图片1.jpg

Ⅰ.Network Interface Layer

The lowest layer is the network interface layer.

It addresses whether the device can actually connect to the network.

PLCs, HMIs, industrial PCs, servo drives, robot control cabinets, and industrial switches all require connectivity via Ethernet cables, fiber optics, or wireless networks. Factors such as whether the network card light is on, if the Ethernet cable is operational, potential faults in switch ports, and levels of field interference all fall under this layer.

This layer typically uses MAC addresses.

The IP address determines the final destination, while the MAC address identifies the next-hop device within the local network.

For example, when a host computer needs to access a PLC, data may first pass through a switch before reaching the PLC's network port. During forwarding, the switch primarily relies on the MAC address.

Common issues in industrial environments—including damaged network cables, poor contact at RJ45 connectors, faulty switch ports, abnormal optical modules, or inadequate shielding grounding—should primarily be diagnosed at this level.

This layer also performs frame checking, such as the CRC used in Ethernet to detect errors during link transmission. However, it primarily serves to identify errors rather than guarantee the delivery of service data.

Ⅱ.Internet Layer

The second layer is the Internet layer, whose core component is IP—commonly known as an IP address—which handles addressing and data forwarding.

On-site, a PLC's IP address might be 192.168.1.10, an HMI's 192.168.1.20, and an industrial control computer's 192.168.1.100. To communicate between devices, you first need to know each other's IP addresses.

If devices are on the same network segment, they are typically forwarded by a switch.

When accessing a central control room server across different network segments—such as when workshop equipment does so—a gateway or router is required.

IP only ensures best-effort forwarding and does not guarantee delivery.

Data packets may be lost, out of order, or fail to reach the destination device due to incorrect routing configuration. When TTL expires, packets are discarded to prevent infinite loops in the network.

Therefore, when encountering issues such as communication failures between network segments, temporary ping connections that then drop, or device incompatibility across different network segments, focus on examining the IP address, subnet mask, gateway, and routing configuration.

We shouldn't immediately doubt the PLC program. Often, the issue is simply a wrong address configuration or gateway setup.

III.Transmission Layer

The third layer is the transport layer.

This layer addresses not "which device to use," but "which service within that device to deliver."

This requires using a port number.

For example, Modbus TCP typically uses port 502, OPC UA uses port 4840, MQTT uses port 1883, and HTTPS uses port 443.

Find the device by IP address.

Find the service by port number.

The most common transport protocols are TCP and UDP.

图片2-1.jpg

TCP is a connection-oriented protocol. Before transmitting data, both parties must first establish a connection—commonly known as the three-way handshake. Once established, TCP employs mechanisms such as sequence numbers, acknowledgment, retransmission, and window control to ensure reliable and orderly data delivery.

Therefore, TCP is widely used in applications such as Modbus TCP, OPC UA, database data acquisition, MES data upload, and host-machine communication. These scenarios prioritize reliability—commands must be executed accurately, no data can be lost, and acquisition results must be consistent.

However, TCP comes with its drawbacks. It incurs higher overhead and is more sensitive to network jitter, packet loss, and latency. With poor network quality, issues such as connection timeouts, increased retransmissions, and slow video refresh rates may occur.

UDP, on the other hand, does not establish connections nor handle retransmission or sequencing; once data is sent, it is left to the network and upper-layer applications for processing.

It may sound unreliable, but it's fast and low-cost. It's also commonly used in scenarios requiring high real-time performance, such as device discovery, broadcast messages, partial status reporting, and time synchronization.

Therefore, it's not appropriate to simply label TCP as superior and UDP as inferior. For reliability, choose TCP; for low latency and minimal overhead, UDP may be preferable. The decision ultimately depends on specific field requirements.

IV.Application Layer

At the top is the application layer.

This layer is the part engineers interact with most frequently.

Protocols such as Modbus TCP, OPC UA, EtherNet/IP, Profinet, MQTT, SNMP, NTP, and HTTP/HTTPS can all be understood at or near this layer.

They address specific business problems.

Modbus TCP read/write register.

OPC UA enables data acquisition and system integration.

MQTT is used for device cloud integration and remote monitoring.

SNMP manages network devices such as switches and gateways.

NTP performs time synchronization.

HTTP/HTTPS is commonly used for device web configuration and platform interfaces.

Note that a connected underlying layer does not guarantee proper application functionality.

图片3.jpg

For example, while the PLC can be pinged successfully, Modbus TCP fails to read data—this could be due to Port 502 not being enabled, or incorrect register addresses, function codes, station numbers, or firewall configurations.

If OPC UA cannot connect, it may not be due to a network cable issue; instead, it could result from mismatches in certificates, security policies, ports, or service states.

Therefore, when addressing outdated practices, we should not merely ask whether they are feasible; instead, we must also inquire to what extent they have been implemented.

V.How does a complete data chain work?

Take reading PLC registers by the host computer as an example.

The application layer first generates a Modbus TCP request.

The transport layer includes TCP information specifying the port and connection status.

The internet layer adds IP information, specifying the source and destination addresses.

The network interface layer further encapsulates the data into Ethernet frames, which are then transmitted via the network card and switch.

After receiving the PLC, reverse the disassembly process.

First, examine the Ethernet frame.

Now let's look at the IP address.

Then pass it to TCP.

Finally, it is handed over to the Modbus service for processing.

This is layered encapsulation.

The layered value hierarchy follows a specific order. If the bottom layer isn't working, don't rush to check the software; if the IP address is incorrect, don't suspect the protocol; if the port isn't open, don't modify the program first; and if application parameters are wrong, don't blame the switch.

Ⅵ.Fault diagnosis and resolution on-site are carried out layer by layer.

Don't guess network issues randomly; investigate starting from Layer 4 upward.

First, check the network interface layer: Ethernet cables, ports, network card indicators, switches, optical modules, grounding, and interference.

Examine the internet layer: IP address, subnet mask, gateway, network segment, and routing.

Check the transport layer again: whether the port is open, whether TCP is established, whether there are timeouts, and whether reconnections occur frequently.

Finally, check the application layer: station number, registers, function code, certificate, account permissions, collection cycle, and protocol configuration.

By checking this way, the issue will become much clearer.

VII.Summary

TCP/IP has extensive applications—it's not limited to internet engineers; it's equally indispensable in industrial settings.

The network interface layer addresses the issue of "whether a connection can be established".

The internet layer addresses the question of "where to go."

The transport layer addresses the question of "how to deliver services."

The application layer addresses how business processes communicate.

issues such as PLC disconnection, HMI failure to update, SCADA inability to retrieve data, and gateway upload failures can all be analyzed within these four layers.

Understanding TCP/IP isn't about memorizing the protocol model, but about knowing where to start when issues arise in practice.

These are precisely the skills engineers truly need.