Difference between TCP and UDP in data transmission over the internet

When we talk about computer networks and routers, we will often find references to TCP and UDP which are two protocols used to send data over the Internet or in a local network.
When configuring some hardware or software network components, it may be important to know the difference between UDP and TCP which we are going to explain trying to be simple and understandable.
TCP and UDP are protocols used for sending bits of data, known as packets, over the Internet .
They are over the internet IP protocol so if you are sending a packet via TCP or UDP, that packet is definitely sent to an IP address.
TCP and UDP are not the only protocols that work on IP, however they are the most widely used.
For example another common protocol and ICMP, the one used by PING.
TCP stands for Transmission Control Protocol and is the most commonly used protocol on the Internet.
When you load a web page, the computer sends TCP packets to the web server address, asking you to show us that web page for you.
The web server responds by sending a flow of TCP packets, which the web browser puts together to form the web page and display it on the screen.
When you click on a link, go to a site or post a comment, the browser sends TCP packets to the server and the server replies with other TCP packets.
TCP ensures that the recipient receives the packets.
The recipient (for example the web server) sends the confirmation of receipt to the sender (our computer).
If the sender does not receive confirmation, he sends back the packets, and only stops after a certain period of time if the recipient does not reply because offline.
The packages are also checked for errors.
TCP is very reliable and packets are tracked so that no data is lost or damaged in transit.
This is the reason why file downloads are not damaged even if you are using a slow or interrupted network.
With a program to see connections, ports and use of the internet on your PC from programs and sites, you can see the type of connections of each process such as, for example, those of Google Chrome.
READ ALSO: How computers talk to each other on the network via TCP / IP
UDP is an acronym for User Datagram Protocol .
A datagram is the same as a packet of information so the UDP protocol works similarly to the TCP one, with one difference, it does not check for errors.
When using UDP, packets are sent to the recipient quickly without waiting and without making sure the recipient has received them, continuing to send packets.
If the recipient loses some UDP packets, he has no way of asking for them again.
In practice, a UDP communication does not give any guarantee of data reception .
The advantage is that computers can communicate with each other faster .
UDP is used when the network speed is high and error checking may be unnecessary.
For example, UDP is often used for streaming live video and online games .
A live streaming video is a continuous stream of data that is sent to the computer.
If a few frames are lost, it is skipped and it will certainly not be possible to ask to see it later.
UDP streaming streams differ from TCP streams precisely because the pieces of video not received are skipped.
If you lose the connection for a few seconds, the video freezes for a moment and then jumps to the resume point skipping the lost packets.
If less packet loss occurs, the video or audio can be distorted for a few moments and return to good immediately afterwards.
With online games the story is similar, if you lose some UDP packets, the players go from one point to another without seeing movement.
What matters is to stay current in the game, without looking at the past and what has possibly been lost.
Skipping the bug fix that TCP would do will speed up the game connection and reduce latency.
Conclusion
Whether an application uses the TCP or UDP protocol depends on its developer and cannot be changed.
Most programs want error correction and prefer the robustness of the TCP protocol, while some applications need speed and rely on UDP.
With a program like Wireshark you can see the various packages traveling back and forth on your computer.
If you are configuring a router or firewall to open certain ports, if you are not sure whether an application uses TCP or UDP, you can choose to open " both " to apply the same rule to both TCP and UDP traffic.

Leave Your Comment

Please enter your comment!
Please enter your name here