Skip to content
Matteo Fiameni
← Field notes

A · From the field

Two machines, the same address:one-to-one NAT at the cell

Two cells from different machine builders with their PLCs on the same IP address: why you don't renumber, how a cell 1:1 NAT connects them and what to ask for in the specification.

· 7 min read

  • NAT
  • OT networks
  • IPAM
  • integration
Two identical industrial machine cabinets side by side on a dark factory floor, each with a small amber module at its base; from each module a single cable runs to a common rail, the two cables parallel and distinct
AI-generated illustration

A line with cells delivered turnkey by two machine builders. Each with its own cabinet, its own PLC, its own operator panel and a switch inside. The MES had to read status, counters and results from both. When it was time to connect them to the factory network, the two PLCs had the same address: the builder's default, in the same private subnet.

Nobody had made a mistake. Each builder had done its job: the machine worked, accepted in the workshop with those addresses. The problem only appears when two finished machines have to talk to the same system. In the multi-vendor projects I have worked on, it is almost the rule.

01Why plugging them in is not enough

Two devices with the same address on the same network fight over the ARP replies: traffic ends up now at one, now at the other. It is a well-known problem and an annoying one to diagnose, to the point that there is an RFC just for detecting the conflicts (RFC 5227). The typical symptom during commissioning is a PLC that answers intermittently, or returns the other machine's counters.

Putting them in two VLANs does not help either. The MES still has to reach both, and a router cannot route to two destinations with the same address.

02Why you don't renumber

Everyone's first answer is: let's change the address of one of them. Once the machine has been delivered, it is a different story. The builder has to touch the PLC, the panels, sometimes the supervisory software and its own service procedures, which take that address for granted. Then acceptance has to be repeated.

It is a paid job, and from then on your machine is different from every other one the builder supports. I managed it once, with a machine still in the workshop, before acceptance. After that, I stopped proposing it.

You don't renumber downstream. Either you ask for it in the specification, or you put in a NAT.

03The cell 1:1 NAT

The idea is simple: a translator at the edge of each cell. Inside, the cell stays as it left the workshop. Towards the factory, every device that needs to be reached has a unique address, taken from the plant's address plan. The translation is fixed, one external address for one internal address: RFC 2663 calls it static address assignment, «one-to-one» (RFC 2663).

Two identical cells, two unique addresses

Nothing changes inside the cells; the MES only sees addresses from the factory plan

Simplified diagram. The addresses are an example, taken from the RFC 1918 private ranges.

It is not a site improvisation. Cisco and Rockwell Automation, in their reference architecture for plant networks, describe NAT exactly this way: whoever builds machines and skids reuses the same addresses, and NAT lets them do it without conflicts in the plant network (IndustryWeek, 2015). Many industrial switches and routers have the feature; each manufacturer gives it its own name.

04Where to put it

Fine

Cell edge device

A small router or firewall per cell. The cell boundary is already a boundary of responsibility: inside, the builder decides; outside, the factory.

Fine, if documented

Cell switch with NAT

When the builder already supplies it in the cabinet and hands over the configuration.

I'd avoid it

Central firewall

Every new cell touches a device shared by the whole plant. I keep it for crossings between zones.

In the case I started from, the NAT ended up on the cell edge device. It is also the right place to filter: the cell exposes to the MES only what is needed, not the whole cabinet.

05The address plan, before the cables

NAT solves the conflict, but it moves the problem: now every cell has two addresses, and someone has to know which is which. In the factories I see, the address plan is kept by IT, for offices and servers, often in an Excel sheet. The cells appear as «builder's cabinet» and nothing more.

The result is that the translations live only in the device configuration. After a year nobody knows which external address is which machine. That is why I decide the plan before cabling and keep it in an IPAM, even a simple one.

  1. Step 1A block of the production network reserved for cells, with free space to grow without renumbering.
  2. Step 2One external subnet per cell, always with the same structure: cell A in 10.20.21.0/24, B in 10.20.22.0/24.
  3. Step 3For every translation: external address, internal address, translating device, owner.
  4. Step 4The plan is updated when the cell arrives, not when someone notices.

06What does not get through NAT

NAT changes the addresses in the packet headers, not in the content. Protocols that write an address inside the message break: the textbook example is active FTP, which negotiates the data address on the control channel (RFC 3027). For industrial protocols it has to be checked case by case, with the builder.

OPC UA. The server in the PLC answers the endpoint request with its own address, the internal one. The MES client connects to the translated address and gets back an address that does not exist from outside. The specification covers this: the client must handle the case where the URL used to reach the server differs from what the server knows, for example behind a NAT (OPC 10000-12, A.1), and the host name in the certificate is checked against the one exposed by the NAT too (OPC 10000-4, 5.5.1). In practice: either the server is configured with an endpoint on the external address, or you check that the client replaces the host. Test it before acceptance.

The builder's diagnostics. Tools that discover devices by broadcast on the local network see nothing from outside the cell: broadcast does not cross the NAT. The technician works inside the cell, or through a remote access that lands inside the cell.

Remote access. This is the most dangerous temptation: «since the NAT is there, let's forward a port for service». No. Remote service uses outbound connections, approved and time-limited, like any other supplier access.

The easy case
Reading from the MES into the cell, a connection that starts outside towards a known address, usually works straight away. The trouble comes with what starts inside, or carries addresses in the message.

07What to ask for in the specification

The right time to decide is before the order, when asking costs one line. After acceptance it costs a site visit.

In the specification of a new machine

Seven requirements

  • The machine's internal subnet and addresses, declared in the offer.
  • A single connection point to the factory, with 1:1 NAT in the cabinet or ready for our device.
  • The list of protocols and ports that cross the cell edge, in both directions.
  • For OPC UA, a configurable endpoint and a certificate consistent with the address the MES sees.
  • Which diagnostic tools do not work through the NAT.
  • Remote service outbound only, approved and time-limited. No modem in the cabinet.
  • Acceptance testing with the cell already behind the NAT.

The last point is the one that makes the difference. A cell accepted with the technician's laptop plugged into the internal switch has passed a test that will never be repeated in production.

Sources (6)

Share this note