Categorized | Networking

What Is UDP?

Posted on 25 June 2010

UDP, for User Datagram Protocol, is one of the two main protocols of the Internet’s protocol suite, the other being the TCP. For its transport functions, it does very little, for apart from the multiplexing and demultiplexing functions and some simple error-checking capabilities, UDP adds nothing to IP. UDP takes messages from the application process and attaches source and destination port number fields for the multiplexing and demultiplexing service, adds some other insignificant fields, and adds the segment to the network layer. In turn, the network layer then encapsulates the segment into an IP datagram and proceeds to make what is known as the “best effort” to deliver the segment to the receiving host. When the segment arrives at the receiving host, the UDP then uses the port numbers and the IP port and the destination address to deliver the data to the appropriate application process. The handshaking element between the sending and the receiving layers is totally lacking with UDPs, and that’s why UDP is also rendered connectionless. One example of an application layer protocol that uses UDP is DNS (for Domain Name Server). Whenever a DNS application in a host makes an enquiry, a DNS query is constructed by the application and passed to the UDP socket. The network layer encapsulates the segment into a datagram, which is then sent to the name server. The DNS application then waits for a response, and if none is forthcoming (probably because the UDP lost the query or the response), it will try to send the query to another name server or inform the client that it cannot get a reply.

In practice, DNS almost always runs over UDP. Contrary to a popular belief, TCP isn’t always preferable to UDP despite the fact that TCP is touted as the more reliable option for data transfer service. However, here are some of the reasons that make UDP the better data transfer service for many applications:

1. No connection establishment. There are no delays as UDP does not need to establish a connection. Thus, an application such as DNS would be much slower over TCP than over UDP.

2. Unregulated send rate. Unlike its TCP counterpart, which has a congestion control mechanism that throttles the sender when one or more links between the sender and the receiver become congested, UDP has no such restrictions. These restrictions can seriously affect real-time applications, which may tolerate packet loss but have a minimum send rate. The capability of UDP to send data is only constrained by the capacity of the applications to generate data.

3. TCP has connection state in the end systems, which includes receiving and sending buffers, congestion control parameters, and sequence and acknowledgment number parameters. This state information is needed to implement TCP’s reliable data transfer service and to provide congestion control. UDP, on its part, does not maintain connection state and does not track any of these parameters. For this reason, a server devoted to a particular application can typically support many more active clients when the application runs over UDP rather than over TCP.

For more information on UDP read this article.

http://www.tech-faq.com/udp.shtml

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Diigo
  • Faves
  • Live
  • MySpace
  • RSS
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
  • DotNetKicks
  • LinkArena
  • LinkedIn
  • MyShare
  • Netvibes
  • Webride
  • Diggita
  • Internetmedia
  • MSN Reporter

Leave a Reply

Computer virus,spyware

Random Posts