Modbus TCP Network Setup
Key Takeaway
How to set up a Modbus TCP network — IP addressing, TCP port 502, firewall rules, multi-master access, VLAN segmentation, and gateway devices.
Quick Answer
Modbus TCP runs on standard Ethernet using TCP port 502. Configure static IP addresses on industrial devices, open port 502 on firewalls, and use VLANs to segment OT Modbus traffic from IT networks.
MBAP Header
Modbus TCP wraps the standard PDU in an MBAP (Modbus Application Protocol) header containing transaction ID, protocol ID, length, and unit ID. No CRC — TCP handles error detection.
Port 502
IANA-registered port for Modbus TCP. Must be open on firewalls between master and slave. Some devices allow port changes for security.
Multi-Master Access
Multiple masters can poll the same Modbus TCP slave simultaneously (most slaves support 4-16 concurrent connections). Read-only from multiple masters is safe; concurrent writes need application-level coordination.
Gateway Devices
Serial-to-TCP converters bridge legacy RS-485 Modbus RTU devices onto Ethernet networks. Configure slave address mapping and baud rate matching in the gateway.
OT Network Segmentation
Isolate Modbus TCP devices on dedicated VLANs. See data center protocol guide and Modbus security for network design best practices.
Frequently Asked Questions
TCP port 502 by default. Must be open on firewalls between master and slave.
Yes. Multiple masters can connect simultaneously. Most slaves support 4-16 concurrent connections. Concurrent writes need coordination.