When configuring a LAN or VPN, you are often asked to choose between TCP and UDP. Here is what you need to know about these two protocols widely used for IP connections, and therefore on Intern,et.

When configuring a LAN or VPN you are often asked

When configuring a LAN or VPN, you are often asked to choose between TCP and UDP. Here is what you need to know about these two protocols widely used for IP connections, and therefore on Intern,et.

If the Internet and local networks can now be used by anyone – and so much the better! –, the fact remains that they are based on complex technologies. And it sometimes happens that when configuring software, we find ourselves confronted with somewhat obscure parameters, whose role is not easy to guess. This is particularly the case for the TCP and UDP protocols which appear in certain device or application settings such as Internet boxes or VPNs. It’s not easy to choose when you don’t know what it’s all about… Without going into overly technical considerations, it’s good to know what these two acronyms stand for and, above all, to know their respective advantages and disadvantages when it comes to make a choice.

What are the TCP/IP and UDP/IP protocols used for?

TCP and UDP – their real names, TCP/IP and UDP/IP – are network communication protocols. Simply put, they are two “ways” of communicating by transferring digital data streams. Because, on a computer network, as on a road, there is a “code” which is based on rules so that everyone understands each other well while preventing data from circulating in an anarchic manner.

TCP and UDP are thus two techniques used for the transport of data in IP – Internet Protocol, the protocol which governs all exchanges on the Internet. These two protocols make it possible to send data from a source machine to a destination machine in packets – this is the very principle of the IP protocol, where everything circulates in the form of data packets. Both obviously use IP addresses to identify the sender and the recipient, but also port numbers (from 1 to 65535) to identify the applications that communicate. In fact, TCP and UDP are used for exactly the same thing – transporting packets – but they do it quite differently.

What are the particularities of the TCP protocol?

TCP/IP is a bilateral protocol – we also speak of “connected mode” – which is based on exchanges between the source machine and the destination machine. The acronym TCP stands for Transmission Control Protocol, either transmission control protocol in French. With TCP, the two machines communicate constantly. Thus, the source machine first establishes a connection with the destination machine: a form of polite “contact” to introduce itself and warn it that it is going to send it data. A classic procedure called handshaking (handshake). Once the connection is established, the source sends numbered packets in a certain order to the receiver, which acknowledges receipt each time after verifying that the data is intact thanks to a control mechanism. If this is not the case, the source immediately resends the missing or corrupted packet. To put it simply, TCP is thus considered to be a protocol focused on the quality of transmission. Quality that is paid for in speed, because, due to the permanent exchanges between the source and the recipient, the transmission of data takes time.

What are the particularities of the UDP protocol?

UDP stands for User Datagram Protocol, user datagram protocol, in French, which is hardly meaningful. Unlike TCP/IP, UDP/IP is a one-way protocol – also known as a “connectionless” or “unconnected” mode of transmission – in which there is no constant exchange, not even “politeness”. . In UDP, the source machine sends unnumbered packets to the destination machine, but without warning it. There is no conversation. And there is no resending of data if a packet is lost or corrupted along the way. There is indeed an error check on arrival, but the recipient must do with what he receives, without acknowledging (good) receipt and without being able to request a return. Because of this, UDP is “faster” and “lighter” than TCP. This protocol is mainly used in cases where the loss of a packet is not critical and when speed and real time take precedence – such as video streaming streams for example.

As you will have understood, TCP and UDP differ on two levels: quality and speed. Because of its permanent exchanges, TCP is well suited to communications requiring perfect, lossless data transmission. At the cost of a very relative slowness. It is a protocol described as “robust” and used by most applications (web browser, file transfer, messaging, etc.). More “rustic”, UDP favors speed over reliability. And since it doesn’t require a persistent connection, it frees up system resources on each side, making applications lighter. It is mainly used in applications requiring real time, such as video games or audio-video conversations.

In summary, when you have to choose between the two protocols during a configuration, choose TCP for reliability and UDP for speed. And if you have any doubts, do comparative tests to see what works best in practice, the choice being always reversible.

ccn5