Hi Kevin,
This what we have been able to zero down the problem too:
Establishing an OPC UA connection with a security policy other than "No Security" on Siemens S7 OPC UA server requires Ignition OPC UA client to renew the Secure Channel at an interval of 45 minutes.
UA Part 4: Services - 5.5.2 OpenSecureChannel (opcfoundation.org)
Our Siemens PLC CPU/OPC server takes ~6-14 seconds to establish/secure/renew a connection/channel as per our WireShark Logs.
For our setup we have chosen Basic256Sha256-Sign&Encrypt security policy for OPC UA secure channel on the PLC and exchanged self-signed OPC UA certificates between the client and server.
Normally, OPC UA should use asymmetric encryption to secure the initial connection. Once the channel is secure, then in order to work around the slower communication performance with asymmetric encryption, a symmetric encryption key is exchanged for communications.
Exploring OPC UA - Symmetric vs Asymmetric Encryption (softwaretoolbox.com)
Is this also true for renewing a secure channel using OpenSecureChannel service? Is the renewal of a secure channel using asymmetric encryption or symmetric encryption ?
Renewal of secure channel takes place at the communication layer level:

What we have observed is that the longer the length of the OpenSecureChannel request message from Ignition (PC) to PLC for “renewing the existing Secure Channel”, the longer it takes for PLC’s CPU to process and respond to the request. In our setup, no data is received from PLC OPC UA Server while it’s processing the renewal request. All publish request to the PLC during this “request and response window” go unanswered and all data/commands being sent to the PLC are lost.
We have found the length of Secure Channel renewal request message to vary between two identical machine with same OPC UA Server Security settings.

Wireshark analysis has divulged the following results:
-
Secure Channel renewal request message packet length of 1768 bytes for Basic256Sha256 security policy takes 16.59 seconds for PLC OPC server to process and respond to on machine 1.
-
Secure Channel renewal request message packet length of 308 bytes for Basic256Sha256 security policy takes 7.64 seconds for PLC OPC server to process and respond to on machine 2. Wireshark logs for the corresponding frames attached.
Test.pcapng (148.2 KB)
-
Secure Channel renewal request message packet length of 186 bytes for No security policy takes 10 milliseconds for PLC OPC server to process and respond to on machine 1.
We don’t have an issue with session timeouts or with setting up a session as listed here "BadTimeout during OpenSecureChannel" message in the OPC UA client when trying to... - ID: 109825991 - Industry Support Siemens .
Changing max session timeout and max number of OPC UA sessions setting in OPC UA on TIA has had no effect either. Our Communication Load setting in TIA is at 50%.
What we want to know:
- Is the amount of processing time required for renewing a secure channel a limitation of the OPC UA server on S7-1200 PLC or of SIMANTICC OPC UA S7-1200 Basic Runtime Licence?
- Is it possible to change the Secure Channel renewal request message packet length on Ignition(Client) or Server side OPC UA ?
- How do we change OPC UA value for SecureChannelLifetime on PLC? Its currently defaulted to 3600000 ms.
- How do we speed up renewal of SecureChannel ?
- How do we implement or cross check a hybrid process that automatically switches from very secure, asymmetric encryption (RSA) when a connection is established to high-performance, symmetric encryption for actual communications after connection is established?
We are running 180 instances of Ignition edge on 180 PC connected to 180 S7-1200 PLC's