Protocols & Communication

Should DNP in TCP or DNP in UDP be used for ethernet communications?

The following excerpts are from the DNP3 SPECIFICATION Volume 7 IP NETWORKING.

4.3.1 TCP Usage

TCP is the recommended transport protocol to use for most DNP3 network connections. It has facilities that substantially improve the reliability of the data transfer and is the best choice for wide area networks.

4.3.2 UDP Usage

All network devices shall support the UDP transport protocol. UDP provides for DNP3 networking the ability to broadcast to multiple destinations on a subnet. UDP can also be used on a highly reliable network where the additional overhead of TCP reliability is not needed. Because of its connectionless design, UDP has a lower octet overhead than TCP. This characteristic is important for pay-per-byte networks such as Cellular Digital Packet Data (CDPD).

Comments

  • With TCP you get a more reliable connection at the cost of throughput and ease of use.
  • With UDP you get a protocol that is much easier to configure at the cost of reliability on wide area networks that have multiple paths for messages to travel.
  • When using TCP it is important to consider socket inactivity timeouts. If the system is configured for polling at a rate of more than 10 seconds, then it is likely that the RTU will close sockets which will fail comms. It is important in this case to either:
    • increase the inactivity timeout in the RTU
    • use the Ethernet keep alive poll in the DNP3 outstation objects in ClearSCADA
    • Reduce the polling so that some comms happens to the outstation before it times out the socket.
    • The last two options will increase the overall load on the network.
  • DNP3 has good support for protocol level retries on the link layer and application layer level. While TCP may improve reliability of data transfer, in many cases, the overhead of TCP in combination with the good retry facilities inherent in the DNP3 protocol make UDP a better choice.