TCP vs UDP: What’s the main difference? | NordVPN (2024)

Contents

  • What is TCP?
  • What is UDP?
  • How do TCP and UDP work?
    • How does TCP work?
    • How does UDP work?
  • What is the main difference between TCP and UDP?
  • TCP vs UDP: Speed differences
  • Does OpenVPN use TCP or UDP?
  • Which protocol does NordVPN use?
  • FAQ

What is TCP?

TCP (transmission control protocol) is a network protocol that transfers your data over the internet from your device to a web server. You use the TCP protocol whenever you chat to your friends on Skype, send emails, watch online videos, or simply browse the web.

TCP is connection-based, so it establishes a connection between the receiver and sender and maintains it while transferring data. It guarantees that the data arrives completely intact. Because of its reliability, TCP is the most popular network protocol.

Using TCP provides several advantages:

  • TCP vs UDP: What’s the main difference? | NordVPN (1)

    TCP operates independently of operating systems, allowing for greater interoperability across systems and devices.

  • TCP vs UDP: What’s the main difference? | NordVPN (2)

    TCP checks for errors as it transmits data, ensuring that the data it sends reaches its destination intact.

  • TCP vs UDP: What’s the main difference? | NordVPN (3)

    TCP optimizes and alters the speed at which is transmits data depending on the capacities of the receiver.

  • TCP vs UDP: What’s the main difference? | NordVPN (4)

    TCP confirms that data has reached its destination and attempts a retransfer if the first transmission didn’t work.

Despite its benefits, TCP also comes with some disadvantages:

What is UDP?

UDP stands for user datagram protocol. Compared to TCP, the UDP network protocol is less reliable, but faster and more straightforward. It’s often used in situations where higher speeds are crucial, like in streaming or gaming.

UDP is connectionless, so it doesn’t establish a prior connection between two parties. It has the potential to lose data along the way, but in return you’ll have much higher speeds.

Let’s take a closer look at the advantages of UDP.

  • TCP vs UDP: What’s the main difference? | NordVPN (8)

    UDP sends smaller packets with less overhead, reducing end-to-end delay.

  • TCP vs UDP: What’s the main difference? | NordVPN (9)

    UDP delivers data even if some of the packets are missing, meaning that packet loss won’t disrupt the entire transmission.

  • TCP vs UDP: What’s the main difference? | NordVPN (10)

    One UDP transmission can be sent to multiple receivers at once through broadcast and multicast functionality.

  • TCP vs UDP: What’s the main difference? | NordVPN (11)

    UDP transmission is just faster and more efficient than other options, like TCP.

UDP does have a few drawbacks, of course, which we’ll cover now.

  • TCP vs UDP: What’s the main difference? | NordVPN (12)

    UDP does not check whether or not a data packet reached its destination successfully.

  • TCP vs UDP: What’s the main difference? | NordVPN (13)

    UDP cannot guarantee that a transmission arrives intact. Some packets may have been lost, but there’s no way for the sender to clarify that from their side.

  • TCP vs UDP: What’s the main difference? | NordVPN (14)

    If a router has to prioritize one data packet over another, it is likely to transmit a TCP packet over a UDP packet.

  • TCP vs UDP: What’s the main difference? | NordVPN (15)

    UDP does not send data in a specific sequence, so packets can arrive in any order.

How do TCP and UDP work?

TCP is more reliable than UDP. It transfers your data packets from your device to a web server. UDP is faster and simpler, but it doesn’t guarantee the delivery of packets.

How does TCP work?

TCP works by sending small packets of data through the internet, to be reassembled on arrival with the receiver. Here’s how it looks in practice:

  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.

TCP vs UDP: What’s the main difference? | NordVPN (16)

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.

How does UDP work?

UDP works by completing the same job as TCP without needing 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.

TCP vs UDP: What’s the main difference? | NordVPN (17)

Is UDP secure? It’s almost impossible to set up a firewall allowing only some UDP communications and blocking the rest. However, while it is much easier to secure TCP, UDP connections are not left entirely unprotected. Users can employ proxies for particular applications or establish a tunnel connection between the remote user and the company’s inside network.

What is the main difference between TCP and UDP?

The main difference between TCP and UDP is that UDP is faster than TCP. UDP has a speed advantage because the user doesn’t have to allow or acknowledge receipt of the data to be resent. This lets UDP establish connections faster and transfer data faster. However, this also causes some concerns over how safe UDP actually is. In terms of the UDP vs TCP VPN debate, OpenVPN works best on a UDP port, although it can be configured to run on any port.

Here’s how they compare side by side:

TCPUDP
ReliabilityHighLower
SpeedLowerHigh
Transfer methodPackets are delivered in a sequencePackets are delivered in a stream
Error detection and correctionYesNo
Congestion controlYesNo
AcknowledgementYesOnly the checksum

Both UDP and TCP divide your data into smaller units called data packets. These include the sender’s and receiver’s IPs, various configurations, the actual data you are sending, and the trailer — the data that indicates the end of the packet.

So, which is better — UDP or TCP? It all depends on what you use them for. If you need a fast and constant data transmission for an application to work properly, you will have to use UDP. Otherwise, TCP is a stable and reliable protocol for transferring data and not losing any of it along the way.

TCP vs UDP: Speed differences

UDP is faster than TCP but is also more error-prone. The reason is that UDP doesn’t use such an acute checking of packets as TCP and employs a more continuous data flow. TCP sends its data in sequence, so it uses more flow control. It makes the connection safer and smoother but reduces speed due to a lot of back-and-forth communication between the sender and receiver.

Does OpenVPN use TCP or UDP?

OpenVPN is compatible with both TCP and UDP, but which you’ll prefer will depend on what you need it for. OpenVPN is an open-source VPN protocol used by many leading VPN providers, including NordVPN. TCP is more reliable, but there are many uses where UDP is preferred and this is usually the default protocol on most VPN services.

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. When you set up a VPN, it’s important to choose the setup that works best for your specific needs, working on a case by case basis. You can switch protocol to OpenVPN UDP or TCP in the NordVPN app.

Check out our video on TCP vs UDP below.

TCP vs UDP: What’s the main difference? | NordVPN (18)

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.

FAQ

Online security starts with a click.

Stay safe with the world’s leading VPN

Get NordVPN

Learn More

Certainly! Here's an overview of the concepts mentioned in the article:

What is TCP?

  • Definition: Transmission Control Protocol - a network protocol used for transmitting data over the internet.
  • Functionality: Establishes a connection between sender and receiver, ensuring data integrity and reliability during transmission.
  • Advantages: Reliable data transfer, error checking, congestion control.
  • Disadvantages: Slower speed compared to UDP, potential data loss affecting overall transmission.

What is UDP?

  • Definition: User Datagram Protocol - a less reliable but faster network protocol.
  • Functionality: Doesn’t establish prior connections; focuses on speed, commonly used in streaming, gaming.
  • Advantages: Faster speeds, smaller packet sizes, multicast functionality.
  • Disadvantages: Less reliable, doesn’t guarantee data arrival or intact transmission.

How do TCP and UDP work?

TCP:

  • Operation: Sends sequenced data packets, uses acknowledgments, and retransmits if packets are lost.
  • Features: Error correction, packet sequencing, congestion control.

    UDP:

  • Operation: Sends data in a stream without sequence numbers, lacks error correction or acknowledgment.
  • Features: Speed-focused, less overhead, potential for data loss.

Main difference between TCP and UDP:

  • TCP: More reliable, slower due to data integrity measures.
  • UDP: Faster but less reliable, sacrifices data integrity for speed.

TCP vs UDP: Speed differences:

  • TCP: Slower due to its checks and sequencing, more reliable.
  • UDP: Faster but less reliable, focuses on speed over data integrity.

Does OpenVPN use TCP or UDP?

  • OpenVPN: Compatible with both TCP and UDP.
  • Usage: Depends on specific needs; UDP preferred for speed-centric activities like gaming, streaming, while TCP for more static uses like emailing or web browsing.

Which protocol does NordVPN use?

  • NordVPN: Defaults to UDP for speed without compromising much on security.
  • Recommendation: Use UDP unless issues arise, switch to TCP if necessary for stability.

FAQ:

  • Online Security: NordVPN emphasizes security with its VPN services, allowing users to choose between TCP and UDP based on their requirements.

By understanding the differences between TCP and UDP and their respective applications, users can make informed decisions about which protocol suits their specific needs, whether for speed, reliability, or a balance between the two.

TCP vs UDP: What’s the main difference? | NordVPN (2024)
Top Articles
Latest Posts
Article information

Author: Gov. Deandrea McKenzie

Last Updated:

Views: 5886

Rating: 4.6 / 5 (66 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Gov. Deandrea McKenzie

Birthday: 2001-01-17

Address: Suite 769 2454 Marsha Coves, Debbieton, MS 95002

Phone: +813077629322

Job: Real-Estate Executive

Hobby: Archery, Metal detecting, Kitesurfing, Genealogy, Kitesurfing, Calligraphy, Roller skating

Introduction: My name is Gov. Deandrea McKenzie, I am a spotless, clean, glamorous, sparkling, adventurous, nice, brainy person who loves writing and wants to share my knowledge and understanding with you.