Steps for creating device using port forwarding

Hi, first time user here.

i am trying to make this work:

Server with Ignition 8 
    |
    |
    |   Router 1
    |-- WAN IP
    |   LAN IP
    |       |
    |       |-- modbus TCP device
    |       |-- micrologix device
    |
    |
    |   Router 2
    |-- WAN IP
    |   LAN IP
    |       |
    |       |-- siemens S7-300 device
    |       |-- siemens S7-300 device
    |
    |
    |   Router 3
    |-- WAN IP
        LAN IP
            |
            |-- modbus RTU over TCP device (serial comm)
            |-- modbus TCP device

I want to be able to reach all these devices with ignition. At the moment the devices i could get working are the modbus TCP ones. I set up port forwarding in the router and at the ignition
gateway configuracion declared the ip and port (WAN side) of the device and worked without issues.

I can also reach and read the micrologix and S7s from the LAN side of the routers but not from the WAN side. Here lies my confusion with these devices: i can do the port forward in the router
but the ignition gateway configuration does not “ask” for the device port. i guess it assumes the default ports for the protocols (44818 and 102) but i can’t find where or how to point the
ignition gateway to the ports used on the WAN side. I have been looking in the forum and found something about “host override” but i am not sure if this applies to devices or to OPC servers
that the ignition OPC UA client can communicate to. Also (in case host override works for devices) what are and how should i configure the “discovery” and “endpoint” URLs?

Also, i can connect to the RTU over TCP device using a third party program (modbus poll) but in the ignition gateway configurator i don’t find where i assign the ID to the devices, so i got
stuck there. is there any guide for this?

I hope any of you can help me.

Regards.

Hi sorry I do not have the solution to your problem.

However, why dont you add an Ignition gateway at each of the LAN? This way you can protect your data through the gateway.

This comes in the address, so the driver will look at device [ModbusDev1] port 502 as an example, and in your address config, [ModbusDev1]1.HRF1 will be the first node and [ModbusDev1]2.HRF1 will be the second etc.

I've only done Modbus port forwarding, maybe @pturmel or other AB guru's can advise the ports required to forward to get AB working in this setup

IIRC, a recent version of Ignition added the ability to override the port that the Logix driver targets, specifically for cases like this. Try adding :port to the end of the hostname/IP in the device settings. I don’t know about the Siemens driver.

However, let me throw cold water on your plan. These PLC protocols are extremely sensitive to network latency. When Ignition is on the same LAN, replies to data requests arrive in a millisecond or two, or even less. Put that same connection through a WAN and the typical response is now 20 or more milliseconds. That crushes your throughput to these PLCs. And since they are polling protocols, you will always have high data traffic.

Instead, you should put Ignition (Edge, perhaps) and/or some MQTT device in each location. That device can run the latency-sensitive protocol at full capacity, then push data through your WAN using protocols that are not latency sensitive (MQTT or Remote Tag Providers or OPC/UA).

If you proceed with the plan to run drivers over the WAN, you will regret it.

Thanks. I guess i have to find the docs for the path especification.

https://docs.inductiveautomation.com/display/DOC80/Modbus+Addressing

oops.
thanks for the advice. the routers have both WAN and LAN sides but in reality the WAN side is facing the internal LAN of the facility, not a modem or others such devices, so i am hoping it is fast enough for this application.

1 Like

thanks!

i guess i should have done that from the beginning, now we have the routers and have to go with it.

Well, it seems i am out of luck with this.
Today i went back to the facility and tried several formats for the host (“host:port”, “host/port”, “host.port”, etc…) but looking at the ignition logs i saw that everytime it failed with “error resolving hostname”. So i guess the ports for AB and siemens are hardwired in the driver making it impossible to point it to another custom port in a router. I guess i will have to replace my routers with “edge” gateways.

is there some guru who can validate or refute my conclusions?

Actually, I only vaguely recall the port support for the Logix v21+ driver, not the MicroLogix driver. I think you are out of luck.

:cold_sweat:

thanks for the feedback.

LAN(WAN)-LAN should be fast enough,
do not worry too much about latency, usually default timeout of 2000ms is OK.
MLX and S7 can be connected in pretty much same manner. I will continue to analyze the MLX as I do not like the second one, reminds me of another S word.
I see that the router WAN IP is 10.13.233.116.
On MLX you can only go on the default 44818 port, newer Logix V21+ allow different ports to be used.
Now let’s check the obvious steps. Most probably you are almost there, just a small mishap

  1. Do you have the correct port forwarding from 10.13.233.116:44818 to MLX_IP:44818 ?
  2. Does the firewall in router allow 44818 to go through? (What type of router do you use?)
  3. Do you have the gateway in the MLX setup with the correct LAN IP of the router?
  4. Have you enabled Web in MLX; Can you see MLX in the browser from the WAN side?
  5. Can you connect with RSLinx from the WAN side?
  6. Is the timeout over 2000ms?
  7. Do you have the connection path as 1,0?
1 Like

Hey. Thanks a lot.

`

  1. Do you have the connection path as 1,0?

`

This was the issue. It's kind of strange (i guess) that it worked from the LAN side without specifying the connection path but it needed that parameter in order to work from the WAN side. Strange but fortunately it worked.

Also, i had to port forward WAN side port 44818 -> LAN side port 44818 in order to work because my version of ignition does not allow the use of custom ports for the kind of connections required in my application. I am using old PLCs so it is most legacy devices, probably the new ones do allow it.

By the way, it also works for S7-300 (WAN side port 102 -> LAN side port 102) but i will have to use an auxiliary equipment because i have 2 devices under the router and can't use the same WAN side port in the port forwarding schema.

There is no need for “Connection path” on LAN->LAN setup.

For S7, go to Device, click “Show advanced properties”.
The first item is the port, you can change it there.
Now you can do, for example, WAN side port 1102-> LAN side port 102.

In the case you have several AB devices using the legacy driver, you cannot change the port, 44818 is set in stone.
I have asked a couple of times to have the port visible to be able to change it, but no luck for me :frowning:
Still, you have another chance, you can NAT the devices from LAN to WAN (if the router allows that), and you are good to go, no need for an auxiliary router.