Specify DCOM ports to use
- Last UpdatedNov 15, 2022
- 1 minute read
- PI System
- DCOM Security and Configuration
- Interfaces
DCOM, unlike most Internet applications, dynamically assigns one TCP port to each executable process that serves DCOM objects on a computer. To find out which ports will be used, any OPC client communicating with objects owned by the OPC server initiates a connection to the remote DCOM's Service Control Manager through TCP port 135. After that initial connection, the Service Control Manager informs the client which port should be used for further communication. The default start port is 49152, and the default end port is 65535.
Note: Windows systems earlier than Windows Server 2008 used a start port of 1024, and a default end port of 4999.
While port number is arbitrary, some ports are specified as defaults for specific services. PI Server, for instance, communicates over port 5450. Specifying a range within the Microsoft default start and end port range helps to avoid port conflicts with default port settings.
Additionally, some OPC operations use asynchronous callbacks. During callbacks, the OPC client becomes a DCOM server, and the OPC server becomes a DCOM client. When a server makes a callback to a client, it creates a new connection to the client and sends method calls over a separate TCP channel. The same dynamic port allocation, described above, takes place on the OPC client side. This dynamic port allocation in this ephemeral port range makes DCOM a "firewall unfriendly" protocol.
For additional information, see the Microsoft Support article The default dynamic port range for TCP/IP has changed since Windows Vista and in Windows Server 2008.