Tag: TCP

What does UDP mean?

UDP explained

UDP stands for User Datagram Protocol, and it is a popular communications protocol that offers a high-speed solution. It is used for producing low-latency and loss tolerating connections between the different applications on the Internet.

User Datagram Protocol boosts the speed of the communication process by allowing the transfer of data before the receiver provides an agreement. For that reason, User Datagram Protocol is the preferred option for time-sensitive communications, such as Domain Name System (DNS) lookup, Voice over IP (VoIP), video or audio transmissions.

How does it work?

UDP divides each message into multiple packets named datagrams and transfers them over the different network devices, like routers, switches, security gateways, until they reach their target host or server.

For distinguishing the queries of the users, each datagram holds a header with precise port numbers. In addition, it provides a checksum choice, which serves for verifying that the data transfer is complete. That is essential because User Datagram Protocol splits the messages, yet it doesn’t put them back together, and it doesn’t number them.

The most attractive feature of User Datagram Protocol is exactly that it offers high-speed communication. That is due to the fact it is a connectionless protocol. It boosts the speed of the transfer, but packets can get lost, and there is a potential for a DDoS attack to occur.

Applications relying on UDP

UDP and DNS 

DNS (Domain Name System) implements a group of different protocols, and one of the essential ones is exactly the User Datagram Protocol. Here are some of the key reasons why DNS uses User Datagram Protocol:

  • Thanks to User Datagram Protocol, DNS optimizes its work by implementing it for sending small data packets. That is very beneficial for the process of DNS resolution. The DNS queries for DNS data (DNS records) are mostly small, and UDP is able to transfer them quickly. 
  • DNS provides quick answers because UDP allows the transfer of data without completing a handshake process. The Domain Name System values that!
  • User Datagram Protocol is able to support a large number of DNS users simultaneously, thanks to the absence of connection conditions. On the other side, for instance, TCP has Receive and Send buffers.

UDP vs. TCP

UDP and TCP are probably the most popular protocols out there. Both of them run on top of IP – UDP/IP and TCP/IP. Yet, they are very different.

  • UDP is connectionless, and TCP is a connection-oriented protocol.
  • TCP is considered a reliable protocol because it ensures the delivery of data packets. UDP does not guarantee the delivery of the packets.
  • TCP implements a three-way-handshake procedure. UDP does not wait for agreement.
  • UDP is way quicker than TCP. That is because it does not involve error checking, flow control, or guarantee. 
  • TCP includes a flow control mechanism that does not allow a lot of packets to be sent to the destination simultaneously. User Datagram Protocol does not follow such a mechanism.

What is TCP?

Transmission Control Protocol (TCP) is a communication standard, one of the first internet protocols (TCP/IP). It is connection-oriented, for all kind of devices and applications to exchange messages through a particular network. 

Data is organized in a specific way by TCP to be transmitted between client and server. The purpose is to protect the data on their trip around the network from the sending to the delivery.

TCP is a very popular protocol in network communications. 

How does it work?

Transmission Control Protocol (TCP) was created for sending packets on the Internet, making sure the proper data and messages’ are delivered through networks. It works through a process that involves different steps. 

As mentioned previously, TCP is connection-oriented. This means it has to make sure the connection between source and destination is not only set, but also kept until the whole exchange of data (sending and receiving of messages) is completed.

Thus, the first step is TCP sets the connection needed by a source and its destination. During this period, there’s a connection, but there’s not data transmission yet. 

Then communication starts. TCP gets messages from the sender (server or application) and split them up into packets. TCP organizes the chopped data with numbers to have control over all the packets and protect messages’ integrity. 

Already chopped and numbered, messages will go to the IP layer for transporting. They will be sent and re-sent by the different devices involved in the network (gateways, routers, etc.) until they reach their destination. All packets belonging to a message have the same destination. But they all can travel following a different route. 

As soon as they arrive, they are rebuilding. Yes, through the numbers assigned to every message’s packet, it puts all packets together again. 

Once messages are built, they are delivered to their recipient. 

You know that network congestion, traffic load balancing maneuvers, and other factors can affect networks’ performance. TCP can solve those problems if such causes affect packets and get duplicated, disordered, delivered, or lost. The protocol can identify the specific issue, then request the lost data to be transmitted again, and reorganize in the proper order, disordered packets.

If, after fixing problems, messages still don’t get delivered, the source is informed about the failure.

Without a doubt, Transmission Control Protocol (TCP) is a reliable standard and a key for the Internet to work better and more precisely. 

There are different protocols, but if you need accuracy and you can’t afford the loss of data (packets), TCP is ideal for you. That is why it is widely used by very well-known Internet applications like SSH (secure shell), FTP (file transfer protocol) or IMAP (message access protocol), SMTP (simple mail transfer protocol), HTTP (hypertext transfer protocol).

Advantages of TCP

  • It guarantees accurate end-to-end data delivery. The bytes received will be the exact ones (same order) originally sent. 
  • Its functionality includes not only issues’ detection (duplicated, lost packets, etc.), but also the ability to fix them.
  • It operates with network congestion avoidance, an algorithm that includes different mechanisms to control congestion problems (AIMD, congestion window, slow start…).

Disadvantages of TCP

  • It is focused on accurate delivery, and that takes time. TCP’s process and additional fixing of problems, in case they occur, can cause delays. We talk about seconds or milliseconds, but in the context of a demanding world (Internet), that can mean much.
  • It’s not a choice for real-time applications like voice-over IP or streaming media. The reason is TCP’s process doesn’t have a fast transmission as a goal.

Conclusion

TCP is a reliable tool, very popular on networks. If it is about accuracy for delivering data, no doubt TCP is the choice. 

Navigation