Your IP: Unknown · Your Status: Unprotected Protected

Blog How-To

What is TCP and UDP? A simple explanation

Nov 21, 2019 · 3 min read

What is TCP and UDP? A simple explanation

Whether your data is transferred quickly and in full depends on which network protocols you use, UDP or TCP. They both do the same job but in different ways. One is more reliable and the other one is faster. Find out which one you need below.

The definition of TCP and UDP

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are both network protocols that transfer your data over the internet from your device to a web server. You use one of these protocols whenever you chat to your friends on Skype, send emails, watch online videos or simply browse the web.

Both UDP and TCP divide your data into smaller units called data packets. These include the sender and receiver’s IPs, various configurations, the actual data you are sending, and the trailer – the data that indicates the end of the packet. The only difference between the two protocols is the way data packets are moved. Let’s delve into that in more detail.

How TCP and UDP work

TCP is the most commonly used protocol on the internet because it’s considered to be more reliable. Here’s what it does to send your data:

  1. TCP assigns each data packet a unique identifier and a sequence number. This lets the receiver identify which packet was received and which one is arriving next.
  2. Once the data packet is received, and if it’s in the correct order, the receiver sends an acknowledgement to the sender.
  3. The sender can now send another packet.
  4. If the packet is lost or sent in the wrong order the receiver stays silent, indicating that the same data packet needs to be resent.

How TCP works

Because the data is sent in sequence, it helps with data congestion and flow control, and makes it easier to spot and fix any errors. This also means that data sent over TCP is more likely to reach its destination in full. However, it has a downside. There’s a lot of back and forth communication between the two parties so it takes longer to establish a connection and exchange data.

UDP completes the same job without the need of unique identifiers or sequence numbers. It sends data in a stream and only has a checksum to ensure that the data arrived uncorrupted. UDP has almost no error correction, nor does it care about lost packets. It’s more error prone, but it sends data much faster than TCP.

How UDP works

Each of these protocols have strengths and weaknesses:

TCP UDP
Reliability High Lower
Speed Lower High
Transfer method Packets are delivered in a sequence Packets are delivered in a stream
Error detection and correction Yes No
Congestion control Yes No
Acknowledgement Yes Only the checksum

OpenVPN: TCP vs. UDP

Are the UDP and TCP protocols compatible with VPN services? Yes. They both work with OpenVPN, an open-source VPN protocol used by many leading VPN providers, including NordVPN. OpenVPN runs on both network protocols and they both provide privacy and security. Which one to choose depends on what you’re using your VPN for. TCP is more reliable, so you may think that TCP is the best option, but there are times when UDP might be preferred.

UDP is a great option if you are gaming, streaming or using VoIP services. It may lose a packet or two but it won’t have a huge impact on your overall connection. Using TCP for such services might cause lag (especially if you’re connected to servers on the other side of the world), which can completely ruin your experience. Therefore, OpenVPN via TCP is recommended for static uses such as emailing, web browsing and file transfer.

Which protocol does NordVPN use?

NordVPN wants to provide the best browsing experience without compromising on speed, so we use the UDP protocol by default. We recommend trying the UDP protocol first and only switching to TCP if you experience any issues.

To change UDP to TCP on NordVPN (for Windows users):

  1. Go to Settings by clicking on a gear icon in the top right-hand corner;
  2. Select Advanced from the menu on the left-hand side;
  3. Under Protocol choose TCP.

To change UDP to TCP on NordVPN (for MacOS users):

  1. Open the Preferences panel by clicking on the slider button in the upper left-hand corner or finding NordVPN on your menu bar and selecting Preferences (default hotkey: Cmd + ,).
  2. Connection: Prefer UDP over TCP will be on by default. Click on the checkbox to turn it off.

If your speed has dropped, you can also try a few tricks to boost your VPN speed.

For more cybersecurity tips, subscribe to our free monthly newsletter below!


Emily Green
Emily Green successVerified author

Emily Green is a content writer who loves to investigate the latest internet privacy and security news. She thrives on looking for solutions to problems and sharing her knowledge with NordVPN readers and customers.


Subscribe to NordVPN blog