Any way to know what port the Ignition OPC UA server will use for a device connection?

I am talking thru TCP driver. Over port 23.

Let’s say the server is 1.1.1.1 and the device is 1.1.1.2

So we set the device driver up to 1.1.1.2:23

Is there any way to know where the connection will come from? 1.1.1.1:5000 or is random and changes?
image

image

Pseudo-random. Google “tcp ephemeral ports”.

2 Likes

No, it’s unknown (an ephemeral port).

2 Likes

Lol I figured.

Would it be a waste of time If I summited it to ideascale? I suppose it wouldn’t be trivial to add a configurable block of ports you could use for connections like this. From the server side.

The ephemeral port is chosen by the operating system, not by an application. Some operating systems allow you to constrain the range, but I’ve only seen it for global effect on all TCP traffic.

Note that both ends normally end up on an ephemeral port–the “23” is used just for the first packet in typical applications.

Tools like wireshark will remember what port was used to open a connection and will keep the connection’s packets together. As long as it sees that first packet.

Hmmm. Learned something new today.

1 Like

It doesn't need to see the first packet, it sees the destination port in the TCP header.

It's very common to have functional captures that didn't capture the connection being made.

Guess I should use your EthIP driver instead with these devices :laughing:

As always thank you for sharing your seemingly endless knowledge!!