If you’ve researched the subject of online privacy before, you’ve probably encountered the acronyms TCP and UDP. What exactly do these mean and why should you care? Let’s take a closer look at these protocols and find out how they impact your digital activity.
What is UDP?
UDP stands for User Datagram Protocol. It’s a protocol used on networks, whether they are global or local.
The term “protocol” refers to a set of rules which govern the interaction between computers and other devices. Without protocols, networks would not be able to authenticate which users are sending and receiving data, and the internet would be a free-for-all. Thus, the UDP protocol helps to keep the online world running.
UDP isn’t just any old protocol. It’s an important alternative to the more famous TCP protocol which is ubiquitous across the web.
What is TCP?
TCP (Transmission Control Protocol) is a vital network protocol used to transmit data over networks. TCP functions in conjunction with IP (Internet Protocol) as TCP/IP. This term is listed in the network settings of your computer, smartphone or mobile device. The IP part refers to the addressing and forwarding of data packets from source to destination, while TCP oversees the transmission reliability.
In May 1974, the Institute of Electrical and Electronic Engineers (IEEE) released “A Protocol for Packet Network Intercommunication,” written by Bob Kahn and Vint Cerf, which described an internetworking protocol for sharing resources using packet-switching between the nodes. The protocol was developed along with Gérard Le Lann to integrate concepts from the French CYCLADES project.
A central control component of the model was the Transmission Control Program that integrated connection-oriented links and datagram services between hosts. Later, the monolithic Transmission Control Program was split into a modular architecture consisting of the Transmission Control Protocol at the transport layer and the Internet Protocol at the internet layer. The model was then informally named TCP/IP, or formally the Internet Protocol Suite.
What is TCP used for?
The purpose of Transmission Control Protocol is to manage the data transfer so it is reliable. On the Internet, for example, data is transmitted in packets – units of data sent independently over the network and reassembled after they have reached the destination to return the original data.
Data transmission on a network is carried out in layers, with protocols on each layer complimenting the functions of other layers. This layer set is referred to as a protocol stack. Both TCP and IP work together in the stack, one above the other. For example, in one stack, you may have HTTP – TCP – IP – wifi. This means that when, for instance, a computer is opening a web page, it utilizes the HTTP protocol to obtain the web page in HTML, the TCP manages the transmission, IP – the network channeling, and wifi takes care of the local area network transmission.
Thus, the Transmission Control Protocol is liable for safeguarding reliability during transmission. Data transmission is reliable when the following requirements are satisfied:
- All the packets arrive at the destination and no packets are lost (users don’t want letters or sentences to be missing when they send an email or instant messages).
- There’s no delay that might impact data quality (users want a conversation during a VoIP call or streaming audio to be unfailing, so all spoken words are recognizable).
- All data packets are reconstructed in the proper order (users want words in an emailed sentence to be in the order they were written).
How TCP works
Transmission Control Protocol labels packets so they are numbered and ensures they have a deadline to arrive at their destination, as well as other technical provisions. When a packet is received, the sending device will be notified with an acknowledgment packet. If following the time-out, an acknowledgment has not been received, the source will send a copy of the missing or belated packet.
Out-of-order packets will not be acknowledged; therefore, all packets will always be assembled in order, without any holes and within a prearranged and adequate delay.
Although IP has a comprehensive mechanism for addressing (IP addresses), Transmission Control Protocol does not have such a complex addressing system since it does not require one. It only utilizes numbers specified by the device it is functioning on to detect where packets for each service are being sent and received. These numbers are referred to as ports. For example, internet browsers utilize port 80 for TCP, and port 25 is used for email. The port number will usually be included in the IP address for a service, e.g. 192.168.66.5:80.
How does UDP networking work?
Unlike TCP, the UDP protocol uses “datagrams” to send information. These datagrams are like packets, only they aren’t authenticated or checked when sent.
As with all networking systems, UDP has to be connected to a specific UDP port before it can be used. Ports are linked to your IP address, and they act like your mailbox in real life – allowing data to arrive at your location or leave for distant UDP servers.
Different protocols have different port numbers assigned to them, but TCP and UDP can override many of these protocols and use a wide variety of ports to establish online connections. It’s not really practical to list them all here, but you can find plenty of lists of available UDP port online if you want to learn a little more.
What is UDP used for?
You may think that with its weaker authentication processes, UDP would be less desirable than TCP for most data transmission processes. However, that is not necessarily the case. The beauty of UDP is that it doesn’t require what is known as “congestion control.” Rather, it just streams into your computer without obstructions, and there’s no need to devote resources to checking every packet as it arrives.
This makes UDP networking a popular option for professional gamers (and it’s commonly used at E-sports events, for example). It’s also used in situations where constant streams of accurate information are needed, from the flow of weather data to fluctuations in the prices of stocks and shares.
With currency traders now relying on microsecond advantages to get ahead of the pack, the financial sector is a heavy user of UDP, so it’s not an also-ran. It’s a vital part of the internet’s infrastructure.
Can UDP servers be used with VPNs?
If you use a VPN service and want to mix fast data transmission with anonymity and security, this will be the billion dollar question. Most VPN providers offer TCP and UDP as options on their servers, so it’s a question that many people face, even if they don’t have the technical background needed to work out the right answer.
You’ll probably benefit from using a UDP port for VPN networking if your internet activity revolves around streaming. If you use online gaming platforms, want to use your VPN to work around Netflix geo-blockers, or use Voice Over IP services heavily, the UDP protocol will most likely work best.
Is UDP the best option for live streaming?
If you are a heavy user of streaming sites like Twitch, YouTube or Netflix, you’ll probably experience better performance when you use UDP as opposed to TCP/IP.
There are a number of good reasons for this. However, above all, UDP offers much lower latency rates than TCP (most of the time). That’s because packets being received by your system aren’t authenticated before receipt. If packets are sent back by TCP, they can result in serious congestion, slowing down or breaking streams entirely.
However, there are some qualifications to mention regarding streaming. If you use UDP regularly, you might notice some image corruption and a loss of quality. If data isn’t checked as it arrives, corrupt data is accepted along with clean packets, and this can affect the quality of both audio and visuals.
So if you’re more concerned with picture quality than smooth transmission, it might be a good idea to try TCP instead of UDP networking.
What similarities exist between UDP and TCP?
Both TCP and UDP act as layer protocols on top of IP, which is universally used to connect online users together. This allows data to be sent between two IP addresses, and it’s the reason why you’ll see both referred to as UDP/IP or TCP/IP.
What is the difference between TCP and UDP?
|Reliability||Less reliable||More reliable|
|Security||Less secure||More secure|
|Ordering||No ordering of packets||Rearranges data packets in a specified order|
|Error Detection||Carries out error checking but discards erroneous packets. Does not attempt error recovery.||Carries out error checking and error recovery|
|Header Size||8 bytes||20 – 60 bytes,|
As we’ve mentioned above, in TCP transmissions, computers communicate by sending and receiving “packets” of data, which have to be authenticated before acceptance. Like parcels in a distribution network, these packets are checked before delivery and they are also numbered to ensure that data arrives in the proper form.
With the UDP protocol, however, datagrams are used to send information and they aren’t authenticated before delivery. This tends to make UDP faster, if less reliable than TCP/IP.
UDP is also a “connectionless” protocol while TCP is a connection-oriented protocol. This means that data packets sent using TCP can only be transmitted if a connection is established between the sender and the receiver. This allows the two computers to authenticate the data being transferred.
With UDP, this connection isn’t established, which is why it is referred to as “connectionless.” Instead, data is funneled through a number of UDP servers from A to B, without a direct connection between the two.
TCP is less vulnerable than UDP to what is known as “packet forging”. When data packets arrive via TCP, the protocol has to authenticate them and send this authentication signal back to the sender before the data can be used.
With UDP, there is no authentication. This means that cyber-criminals or surveillance agencies could easily intercept your stream of data, forging an IP address to gain access to your internet traffic.
Moreover, because UDP is a connectionless protocol, firewalls tend to intercept the data sent via UDP meaning that it can be hard to put in place measures to compensate for the protocol’s security shortcomings.
For these reasons, many experts recommend that VPN users switch from a UDP port to TCP/IP when sending confidential messages or networking in repressive countries. UDP may have speed advantages, but its security risks are very real.
In all, TCP and UDP have their strong and weak points and understanding the differences between both popular protocols enables you to make a good decision when faced with a choice between the two.