Trying to set the default screen for a Vision client on startup using the IP address, but even though the PC has two ethernet ports with only one that can connect to the gateway, the client tag for IPAddress and system.net.getIpAddress both are returning the IP address on the port not connected to Ignition.
Any ideas on how to get the other address? Or even both IP addresses?
That breaks if there's any NAT between the client and the gateway. Consider this technique:
Note the use of a fake UDP connection (no actual packets sent) to coerce the OS to expose the source interface and IP selected for the route to the Ignition Gateway.