Ethernet UDP (User Datagram Protocol) and TCP (Transmission Control Protocol) are the basic communication protocols of the internet. They can also be used as communications protocol in private networks. Choosing which internet communication protocol to implement comes down to whether you want data transmitted quickly or reliably.
TCP
- Transports data reliably by authenticating that all data is sent over completely and that it is uncorrupted
- Connection oriented, meaning that transportation of data cannot happen without a stable connection between the sending and receiving computers
- TCP is very forgiving when transmission reliability is low, giving it a good reputation for error handling; however, the advantage of error handling limits the speed and synchronous behavior of data exchange
- Header size is 20 bytes due to added error checking
- Most widely chosen protocol for transmitting data
UDP
- Enables fast, real-time connection
- Preferred for applications that can’t have latency such as live streaming and broadcasts, video calls, and gaming
- Connectionless transportation, meaning that the sending computer does not connect to the receiving computer directly
- Header size is only 8 bytes due to faster sending speeds and no error checking
Construction
The differences in these two communication protocols are due to the differences in their construction. Because TCP is built to reliably send data from one computer to another through the internet, it uses unique data transferring methods that ensure all data is received and in order. One method that TCP uses to send reliable data is a three-way handshake. This verifies that the sending and receiving computers have formed a connection before any communication takes place. The three-way handshake is a series of three acknowledgement messages between the two computers that verifies the two computers can send data back and forth. TCP also uses sequence and acknowledgement numbers to track how much data it has sent. A TCP session between two computers requires a 32-bit sequence number on each packet of data being transmitted. As the data is received, acknowledgement numbers are sent back to the host computer to confirm that the data was received in the correct sequence. The extra data being sent back and forth for TCP makes the process much slower than UDP but ensures that the data is in perfect order.
The main difference between UDP and TCP is that UDP is connectionless. Because it is connectionless, UDP doesn’t connect to the receiving computer directly and instead relies on devices in between the sending and receiving computers to hopefully transmit data correctly. UDP doesn’t require any handshake dialogues or acknowledgement. If data is not received it will simply be sent over again. Although this transmission model doesn’t provide much reliability or data integrity it is fast, simple, and has low overhead, making it perfect for time sensitive applications that don’t need exact data.
ADVANCED Motion Controls' Capabilities
- Select DigiFlex® Performance™ drives are available with Ethernet TCP networking functionality using ADVANCED Motion Controls' command set