Explainer
Why an S7-400H PN interface carries only one IP address
Short answer
The integrated PN interface of an S7-400H CPU carries one IPv4 address, so Modbus TCP to the DCS and S7 communication share that address and are separated by TCP port and connection resources. A VLAN or routed subnet separates the traffic logically; a physically separate DCS network needs a second interface, a communication processor with its own address on its own subnet.

On this page
- Can an S7-400H PN interface carry a separate IP for Modbus TCP?
- How do Modbus TCP and S7 communication share one IP address?
- How many Modbus clients can connect to the PN CPU on port 502?
- Do you need a second IP to separate the DCS from the Siemens network?
- How do you add a second interface on its own subnet?
- Why should Siemens devices not talk Modbus TCP to each other?
- What happens to the Modbus session after an H switchover?
- How do you prove the DCS link works?
- Questions asked
No. The PN interface integrated in an S7-400H CPU carries a single IPv4 address, so the DCS's Modbus TCP link and the communication with Siemens devices share that address, and no setting in the project adds a second one. What you can separate is the traffic: by TCP port on the shared address, by connection resources, by a VLAN in the switch, or, where the DCS network must be physically apart, by a second interface with its own address. The documented limits, the decision for each case and the commissioning checks follow.
Can an S7-400H PN interface carry a separate IP for Modbus TCP? #
No. The integrated PN interface of an S7-400H CPU carries exactly one IPv4 address, and there is no second address field to configure: S7 communication, the open Modbus TCP connections and engineering access all answer on that single address.
The address lives in one place. You enter it as the IP address of the CPU's PN interface in the hardware configuration of the S7-400 station and download it into the CPU with the rest of the station configuration; the interface has no alias or secondary-address entry, and nothing you download adds one. The question is therefore never which address serves Modbus, but which service answers on the shared one.
Two consequences follow. The DCS's wish for its own, unique address is met outside the interface, by a NAT device in front of the CPU or by a second interface, both covered below. And anything that filters or routes by that address applies to every service on it at once: a switch rule that blocks the CPU's address blocks S7 communication and engineering access along with the DCS link.
How do Modbus TCP and S7 communication share one IP address? #
By TCP port, not by address: the destination port selects the service, so the Modbus server listens on the well-known port 502 while S7 communication runs over ISO-on-TCP on the well-known port 102, both on the same wire and the same address.
Both numbers are IANA well-known assignments, which is why DCS drivers and engineering tools default to them. An incoming request to the Modbus port is handed to the CPU's Modbus server function; a request to the S7 port goes to the protocol stack that Siemens devices and the engineering PC use. Neither service needs to know the other exists, which is why running Modbus TCP and S7 comms together on one S7 CPU PN port works without any address juggling.
Set the role from the DCS side. Most DCS gateways act as Modbus master, which makes the CPU the server: it listens passively and the DCS opens the connection. Configure the open Modbus TCP connection with the CPU as the passive endpoint, set its local port to the value the DCS driver uses, and enter the DCS's address as the partner if only that peer may connect. With the roles reversed, the same interface also polls devices as Modbus client, as shown for Modbus TCP polling of power meters from a PROFINET network.
After download and RUN, the connection diagnostics show the link as established once the DCS connects; while they show waiting, the CPU is listening and the DCS has not arrived yet.
How many Modbus clients can connect to the PN CPU on port 502? #
One at a time. With the CPU as Modbus server, the integrated PN interface communicates with only 1 Modbus client through port 502 at any one time, so a second client is refused while the first is attached.
The ceiling above that slot is the CPU itself: the total of open communication connections is a resource quoted in the technical data of the exact CPU, and you size the DCS link below it with margin for engineering access and any other open connections. For the integrated interface the practical reading is short: one DCS client fits, two do not.
Two documented routes exist for more clients. The Modbus TCP server function of an S7-400 communication processor communicates with a maximum of 4 clients at any one time via port 502, and a multiplexing gateway in front of the CPU serves several DCS servers over the single connection it holds, the pattern described for multiplexing Modbus TCP clients on an S7-410H PN interface.
Worked example: a DCS with two servers, each holding two client sessions to the PLC, needs 2 x 2 = 4 simultaneous sessions. On the integrated interface only one attaches, so 4 - 1 = 3 sessions are refused at any instant and those clients cycle between connected and failed. On the CP's server function the same 4 sessions fit its maximum of 4 with nothing to spare; if each DCS server merges its polls into one session, 2 x 1 = 2 sessions run with two slots free. Decision: a single DCS client stays on the PN interface; two or more simultaneous clients move to the CP or to a multiplexer.
Do you need a second IP to separate the DCS from the Siemens network? #
Usually no. Decide by requirement: a VLAN or routed subnet in the managed switch isolates DCS traffic logically while the CPU keeps its single address, and only a physically separate DCS network needs a second interface with its own address.
| Requirement on the DCS link | What meets it | Second address on the CPU? |
|---|---|---|
| Reach the PLC at one known address | Hand the DCS the CPU's existing address | No |
| Keep Modbus traffic logically apart from Siemens traffic | A VLAN or routed subnet on the managed switch, CPU on the shared segment | No |
| Keep the DCS network physically separate | A second interface, a communication processor, on its own subnet | Yes, on that interface |
| Limit who may open a connection | The partner address in the connection configuration plus firewall rules | No |
| Give the DCS a dedicated address without touching the CPU | One-to-one NAT on a router or firewall in front | No |
The VLAN work happens in the switch, not in the PLC; the switch-side steps for configuring VLAN traffic separation on industrial managed switches apply to this case. Check off which row applies before touching hardware: for every row except the third, the CPU's configuration stays exactly as it is, and the remaining work is connection setup plus the verification at the end.
How do you add a second interface on its own subnet? #
Add a communication processor. An S7-400 Ethernet CP in the rack is a second interface with its own single IPv4 address on its own subnet, and you confirm in the catalog that the exact module is released for the H station and for the Modbus TCP function.
- Insert the module into the hardware configuration of the H station and give it an address on a different subnet from the PN interface, for example the CPU at 192.168.1.10 and the CP at 192.168.2.10, then compile and download. Fit the matching module on each CPU side of the H pair so each CPU owns one.
- Book the Modbus TCP server connection on that interface with the CP's documented Modbus TCP function, and leave the CPU's integrated port to S7 communication and PROFINET.
- Check that no static route or gateway setting bridges the two subnets; the point of the second interface is that DCS traffic cannot reach the Siemens segment and Siemens traffic cannot reach the DCS.
- Prove the separation in both directions: from the DCS segment the CPU's integrated address must be unreachable, and from the Siemens segment the DCS-side address must be.
Why should Siemens devices not talk Modbus TCP to each other? #
Because you lose more than you gain. Modbus TCP between two Siemens controllers is slower than native S7 communication, drops the S7 stack's diagnostic functions, and needs the Modbus blocks plus their programming on both ends.
The workaround this rules out is the Modbus middleman: because the CPU has one address, it is tempting to let a second Siemens controller talk Modbus to the DCS and native S7 to the 400H. That adds a CPU that must run the Modbus blocks, doubles the programming for the same data, and strips the diagnostics the native link would have carried.
Decision: run Modbus TCP only where the partner is not a Siemens controller, here the DCS. Between Siemens stations, native S7 communication is faster, keeps its diagnostics, and in an H system can be booked as a switchable connection that follows the master CPU, exactly the behavior the Modbus session lacks.
What happens to the Modbus session after an H switchover? #
It drops, and the DCS must rebuild it. Each CPU of the H pair has its own PN interface and address, the open Modbus TCP session terminates on the CPU that held it, and unlike a switchable S7 connection it does not follow the new master after a switchover.
The DCS therefore addresses a CPU, not the redundant pair, and the master role moves to the other CPU's address after the switchover. Design the DCS side for exactly that: automatic reconnect with a retry interval set longer than the switchover takes, and, where the driver supports primary and backup targets, the address of each CPU. The DCS-side requirements of such an interface are laid out for the S7-300 case in what a redundant Modbus DCS interface needs.
Where PROFINET S2 redundancy shares the same CPU port with the Modbus session, read running PROFINET S2 and Modbus TCP together on an S7-400H CPU port before booking the connection.
How do you prove the DCS link works? #
With five checks, the last one a forced switchover. Ping the CPU address from the DCS segment, read a known register with a test client, write a value through and watch it in the data block, then force a switchover and time the reconnect.
- From a laptop on the DCS segment, ping the address the DCS targets, with the example addressing 192.168.1.10. Expected reading: replies, and none from the second-interface address if you built a separated network.
- Connect a Modbus test client to the configured Modbus port and read a known holding register. Expected reading: the value matches the data block viewed online, word order included.
- Write a test value from the DCS and read it back in the PLC data block. Expected reading: match, with the correct data type and word order.
- Where partner filtering is configured, attempt the connection from a host that is not the listed partner. Expected reading: refused.
- Force a switchover with the process in a safe state. Expected reading: the session drops, the DCS reconnects within its retry window, and the data resumes with good quality, no stale values held as good.
Questions asked
Does a NAT device in front of the CPU change what the PLC sees?
With one-to-one NAT on a router or firewall, the DCS connects to the firewall's address and the CPU keeps its single configured address, so nothing changes in the project. Two details follow: the CPU's connection diagnostics show the NAT device's inside address as the partner, so any partner filtering must reference that address rather than the DCS's, and the forwarding rule must map the Modbus port to the CPU's address.
Is one address per interface also the rule on other SIMATIC PN CPUs?
Yes. Every integrated PN interface, on S7-1200, S7-1500, S7-300 and S7-400 CPUs alike, carries one IPv4 address, so a second address always means a second interface. The S7-1500 offers a virtual interface for IP-based applications as of firmware version 2.8, but that changes where applications such as OPC UA are reachable from, not how many addresses the PN interface holds.
How does the DCS detect a session that died silently after a switchover?
A TCP session can sit half-open when the CPU that held it goes away without a proper close, so the DCS may show connected while the data freezes. Enable TCP keep-alive in the DCS driver, set its interval well inside the data-freshness time your process allows, and let a failed keep-alive trigger the reconnect logic. Confirm the behavior with the forced switchover in commissioning instead of assuming driver defaults.
Is the one-client limit on the Modbus port a parameter you can raise?
No. It is the documented behavior of the Modbus server function on the integrated PN interface, not a setting in the CPU or the project: the connection to the first client must be cleared down before the next client can attach through that port, and no download changes it. To serve several clients at once, move the server role to a communication processor's Modbus TCP function or place a multiplexing gateway in front of the CPU.


