Home     Blog

UDP (User Datagram Protocol)

User Datagram Protocol or UDP is part of the Internet Protocol suite. By using UDP, programs running on different computers on a network can send short messages known as Datagrams to one another. UDP can be used in networks where TCP is traditionally implemented, but unlike TCP, it does not guarantee reliability or correct data sequencing. Datagrams may go missing without notice or arrive in a different order from how they were sent. David P. Reed formulated the protocol in 1980 and officially defined it in RFC 768.

UDP uses a simple communication model without implicit transmission checks for guaranteeing reliability, sequencing, or datagram integrity. Though these factors might seem to suggest that UDP is not a useful protocol, it is still widely used in particular areas where speed, more than reliability, is of utmost importance. With UDP, error checks and corrections are carried out in the communicating application, not at the network layer. However, if error checks and corrections are needed at the network layer, the application can use Transmission Control Protocol (TCP) or Stream Control Transmission Protocol (SCTP), which are specifically formulated for this reason.  Since UDP does not have the overhead of checking whether the data has reached the destination every time it is sent, it makes the protocol that much faster and more efficient. UDP is often used for time sensitive applications where missing data is preferred to late arriving data.

udp UDP (User Datagram Protocol)

UDP is a stateless protocol that is useful for servers engaged in answering short queries from a large number of clients. While TCP is mainly used for communication between a server and a single client, UDP is used for packet broadcast or multi-casting whereby the data is sent to all the clients in the network. Frequent network applications that use UDP include: Trivial File Transfer Protocol (TFTP) , Voice over IP (VoIP), IPTV, Domain Name System (DNS), etc.

Since UDP lacks any kind of mechanism to control or avoid network congestion, other forms of network based control mechanisms need to be implemented to ensure smooth flow of traffic in a UDP network. One of the solutions being designed to tackle this problem is DCCP or Datagram Congestion Control Protocol, which is aimed at monitoring and controlling traffic congestion in a UDP network.

A typical IP network consists of five layers:

  • The Physical Layer consisting of the actual channel for data flow like coaxial, twisted pair, or fiber optic cables

  • The Data Link Layer implementing Wi-Fi, ISDN, GPRS etc.

  • The Network / Internet Layer

  • Transport Layer implementing TCP, UDP, etc.

  • Application Layer running DNS, FTP, HTTP, POP3, SMTP, Telnet, etc.

As shown above, UDP belongs to the fourth layer. Although the entire amount of UDP traffic in a network is a small fraction of the whole, a number of key applications in the fifth layer like DNS and SNMP or simple network management protocol use UDP.

UDP Packet

The UDP header comprises of only four fields. The use of two of those is optional (light red background in diagram).

udp data packet UDP (User Datagram Protocol)

Source Port
Source port recognizes the sending port and should be understood to be the port to respond to if required. If not used, then its value should be zero.

Destination Port
Destination port recognizes the destination port and is mandatory.

Length
A 16-bit length field indicates the length in bytes of the complete datagram: header and data.

Checksum
The 16-bit checksum field is implemented for error checking the header and data. The algorithm for computing the checksum is different for transmission over IPv4 and IPv6.

Additional Reading on UDP

The UDP protocol is defined in RFC 768: User Datagram Protocol.

VN:F [1.9.17_1161]
Rating: 9.0/10 (2 votes cast)
UDP (User Datagram Protocol), 9.0 out of 10 based on 2 ratings
Follow Will.Spencer on

Comments (6)

 

  1. Alifiya says:

    Hey perfect information as per my need..thanks

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
  2. none says:

    This content has sections that are identical to the wikipedia page on UDP. Did the same person write both or was this copied from wikipedia?

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
    • Will.Spencer says:

      Probably Wikipedia copied us again.

      VN:F [1.9.17_1161]
      Rating: 0.0/5 (0 votes cast)
  3. dusky says:

    useful article….contents and diagram are in sufficient….

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
  4. sumanth says:

    really cool………. yar thanks…..

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)
  5. Kay says:

    wonderful and well explained
    thank you ,
    be blessed for the effort and willingness to help .

    VA:F [1.9.17_1161]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply

Related Posts

  • TCP (Transmission Control Protocol)

    The Transmission Control Protocol (TCP) is one of the central protocols of the Internet Protocol Suite. TCP is one of the two original components of the entire Internet Protocol Suite, commonly referred to as TCP/IP. IP manages the lower-level transmissions from machine to machine and TCP functions at a higher level, concerned only with the [...]...


  • PPP (Point-to-Point Protocol)

    PPP (Point-to-Point Protocol), is the most widely used method for transporting IP packets over a serial link between the user and the Internet Service Provider (ISP). Although PPP is primarily used over dialup lines, variants such as PPoE (PPP over Ethernet) and PPoA (PPP over ATM) extend PPP to new data-link layer protocols. PPP was [...]...


  • ARP (Address Resolution Protocol)

    ARP is the Address Resolution Protocol. The ARP protocol maps addresses between the Data Link Layer and the Network Layer of the OSI Model. The Data Link layer of TCP/IP networks utilizes MAC addresses; the Network Layer of TCP/IP networks utilizes IP addresses. ARP and RARP The ARP protocol is used to map IP addresses [...]...


  • NNTP (Network News Transfer Protocol)

    NNTP (Network News Transfer Protocol) is the protocol used by Usenet news servers and clients (readers). Usenet is a huge shared message system which is used on the Internet. Usenet consists of newsgroups such as comp.sys.ibm.pc.hardware.video and rec.collecting.sport.hockey. The NNTP protocol exists on the Application Layer of the OSI Model. NNTP utilizes TCP port 119; [...]...


  • RTP (Real-time Transport Protocol)

    RTP (Real-time Transport Protocol) is used to encapsulate VoIP data packets inside UDP packets. RTP is defined in RFC 3550 – RTP: A Transport Protocol for Real-Time Applications. RTP provides end-to-end network transport functions suitable for applications transmitting real-time data, such as audio, video or simulation data, over multicast or unicast network services. RTP does [...]...