IP networking for automation engineers
IPv4 addresses, subnet masks and CIDR, gateways, private ranges, VLANs and the TCP/UDP ports of industrial protocols — what you need when commissioning PLCs, HMIs and SCADA.
Address and mask
An IPv4 address is 32 bits, written as four bytes: 192.168.10.25. The subnet mask tells which part is the network: with 255.255.255.0 (= /24, 24 network bits) all addresses 192.168.10.x are in the same subnet.
| Result | How it is computed | Example for 192.168.10.25/24 |
|---|---|---|
| Network address | IP AND mask | 192.168.10.0 |
| Broadcast | network OR NOT mask | 192.168.10.255 |
| Usable hosts | 2^(32−prefix) − 2 | 254 (.1 … .254) |
Two devices talk directly only if they are in the same subnet; otherwise they need a default gateway (router). A PLC configured 192.168.0.10/24 cannot reach 192.168.1.20/24 without a router, even on the same switch. Calculate with the IPv4 subnet calculator.
Private ranges (RFC 1918)
10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16 — not routed on the Internet, used in plants. Avoid overlapping ranges between machines that will later be connected to the same plant network; agree an addressing plan early.
Practical rules
- One subnet per machine or line, with the PLC on a fixed address; document it on the cabinet.
- Do not leave devices on DHCP if a controller expects a fixed address.
- Duplicate IP addresses cause intermittent faults — check with the engineering tool's "accessible devices" or a network scan only where allowed.
- VLANs separate traffic on shared switches (e.g. control, video, office).
- Real-time Ethernet protocols (PROFINET RT, EtherCAT) use their own EtherTypes and do not route through IP routers.
Ports of industrial protocols (IANA)
| Protocol | Port |
|---|---|
| Modbus TCP | TCP 502 (secure: 802) |
| ISO-TSAP (used by Siemens S7 communication) | TCP 102 |
| EtherNet/IP explicit / I/O | TCP/UDP 44818 / UDP 2222 |
| OPC UA binary | TCP 4840 (over TLS: 4843) |
| PROFINET RT unicast / multicast / context manager | 34962 / 34963 / 34964 |
| IEC 60870-5-104 | TCP 2404 |
| DNP3 | TCP/UDP 20000 |
| BACnet/IP | UDP 47808 |
| HART-IP | 5094 |
| MQTT / MQTT over TLS | TCP 1883 / 8883 |
| SNMP / traps | UDP 161 / 162 |
Firewalls between cells must open exactly the ports in use — and nothing else.
Connections
Open in Knowledge Graph →Loading the map…
Sources
Updated 2026-10-02