The difference between TCP and UDP protocols
You may have seen TCP and UDP when setting up port forwarding on the router or when configuring the firewall software. These two protocols are used for different data types.
TCP / IP is a set of ports used by the device to communicate over the Internet and most local networks. It is named after its two original protocols - Transmission Control Protocol (TCP) and Internet Protocol (IP). TCP provides applications with a way to transfer (and receive) an ordered packet of information and check for errors over the network. User Datagram Protocol (UDP) is used by applications to transport a data stream faster by bypassing error checking. When configuring network hardware or software you will see the difference.
The similarities between the two protocols
TCP and UDP are both protocols used to send bits of data - called packets - over the Internet. Both protocols are built on the IP protocol. In other words, even if you send packets over TCP or UDP, this packet will be sent to an IP address. These packets are handled similarly because they are forwarded from your computer to the intermediate router and to the destination.
TCP and UDP are not the only protocols that work on IP, however, they are most widely used.
How TCP works
TCP is the most commonly used protocol on the Internet. When you request a web page in the browser, the computer sends TCP packets to the web server's address, asking it to resend the site. The web server responded by sending a stream of TCP packets, which your web browser combined to form the web page. When you click on a link, log in, post a comment or do anything else, your web browser sends TCP packets to the server and the server sends the packets back to TCP.
The TCP protocol is highly reliable, packets sent by TCP will be monitored so data will not be lost or corrupted during transport. That is why the download file is not corrupted even if the network has a problem. Of course, if the recipient is completely offline, your computer will give up and you will see a write error message that it cannot communicate with the remote host.
The TCP protocol achieves this in two ways. First, it requests packets by numbering them. Second, it checks for errors by asking the recipient to send feedback received to the sender. If the sender does not receive the correct response, it can resend the packet to ensure the recipient receives them correctly.
Process Explorer and other system utilities can display the connection type that the process creates. Here we can see the Chrome browser with TCP connections open to many different web servers.
How UDP works
The UDP protocol works similar to TCP, but it ignores the error checking process. When an application uses the UDP protocol, packets sent to the receiver and sender do not have to wait to ensure that the recipient has received the packet, so it continues to send the next packet. If the receiver misses some UDP packets, they lose because the sender does not send them back. Therefore the device can communicate faster.
UDP is used when speed is fast and error correction is not required. For example, UDP is often used for live broadcasts and online games.
Suppose, you are watching live video playback, usually played with UDP instead of TCP. The server sends a continuous stream of UDP packets to the computer being viewed. If you lose the connection for a few seconds, the video will be stopped or jerked for a moment and then switched to the current bit of the broadcast. If you only lose small packets, the video or audio may be distorted for a moment because the video will continue to play without missing data.
This works similarly in online games. If you miss some UDP packets, the player character can move on the map when you receive a new UDP packet. Ignoring TCP's error correction will help speed up game connection and reduce latency.
The application uses TCP or UDP depending on its developer and what the application needs. Most applications need to fix errors and robustness of TCP. If you activate a network analysis tool like Wireshark, you can see the difference when packets are transported back and forth.
- Use Wireshark to analyze data packets in the network
Unless you are a network administrator or software developer, this will not affect you too much. If you configure the firewall or router software, you should select the "Both" option so that the firewall or router software applies the same rules to both TCP and UDP traffic.
See more:
- How to check open ports in Linux
- Instructions to change Port value on router
- Check that the connection is being made in the system
You should read it
May be interested
- Difference between Tor and VPNtor and vpn are the most powerful online security tools you can use today. if you are looking for a new security tool for yourself, then you need to understand the difference between tor and vpn to make the right decision.
- What is UPnP? Why should you disable it on your router?upnp is a network protocol (or set of network protocols). these protocols outline a specific communication method that all kinds of devices can use to instantly communicate with each other on a network.
- What is UPnP?upnp is a network protocol (or a set of network protocols). these protocols outline a specific communication method that every device can use to communicate instantly with each other on the network.
- Difference between Zsh and Bashboth shells provide powerful scripting languages but they are not fully compatible with each other. let's find out the difference between zsh and bash with tipsmake.com.com!
- Difference between LGA and PGA CPU socketcpu sockets may not hold a high place in your computer selection criteria list. however, they have an impact on cost and performance, so understanding the difference between the two most common types of cpu sockets is helpful.
- Differentiate POP and IMAPif you've ever set up an email application, you probably know two terms pop and imap. but do you understand the difference between these two protocols and how the impact of each protocol on your email account?
- Difference between Ethernet and LANethernet and lan are closely related, in that ethernet is the main technology that makes the concept of lan become reality. the main difference between ethernet and lan is that the operation of ethernet is decentralized, while lan is the opposite.
- Difference between LAN, MAN and WANthe network allows computers to connect and communicate with other computers through any means. lan, man and wan are three types of networks designed to operate on the area they cover. there are several similarities and differences between them.
- Difference between GDDR RAM and RAMgddr ram and system ram are common terms that you will come across in the desktop world. while these terms may seem similar and interchangeable, they are not.
- How to choose the best connection protocol for IoT devicesin iot, the question of choosing the right connection protocol can make the difference between the device. unlike the internet, iot devices have diverse connectivity protocols, including zigbee, wifi and bluetooth.