×

User Datagram Protocol

User Datagram Protocol: UDP stands for the User Datagram Protocol. UDP was developed by David P Reed in 1980. It is a connection-less and unreliable protocol. In this protocol, when the data transfer occurs, it does not establish the connection between the sender and receiver. It sends the data directly. The receiver does not send any acknowledgment of the receiving data in this protocol. In the UDP, the data packet is called datagram.

UDP does not guarantee any user data, whether it will reach its destination or not. In this protocol, it is not necessary that the data reach the receiver in the same sequencer in which the sender has sent the data.

Importance of UDP

  • The UDP protocol is used to transfer data where you need a higher speed than accuracy and reliability.
  • If the data flow is in the same direction, UDP is used.
  • It is also used for streaming applications, for example, YouTube and online gaming.
  • It provides faster data transfer speed than the TCP protocol.

User Datagram Protocol Format

The UDP format is very simple. The header size of the UDP is 8 bytes (8 bytes mean 64 bits). The format of UDP is shown below in the figure.

User Datagram Protocol

It has four fields shown below:

  • Source Port Number: The size of the source port is 16 bits. It is used to identify the process of the sender.
  • Destination Port Number: The size of the destination port is 16 bits. It is used to identify the process of the receiver.
  • Total length: The size of the total length is 16 bits. It defines the total length of the UDP and also stores the length of the data and header.

                                       UDP length = IP length - IP header's length

  • Checksum: The size of the checksum port is 16 bits. It is used to detect errors across the entire user datagram.

Advantages of UDP 

  1. You can easily broadcast and multicast transmission through the UDP.
  2. It is faster than TCP.
  3. It uses the small size of the header (8 bytes).
  4. It takes less memory than other protocols.
  5. Whenever data packets need to be transmitted, then UDP is used.

Disadvantages of UDP 

  1. It is an unreliable protocol for transmission.
  2. There is no such function in it to know that the data has been received or not.
  3. The handshake method is not used in UDP.
  4. It does not control the congestion.
  5. The main disadvantage of using routers with UDP is that once transmission failure occurs, the routers do not transmit the datagram again.

UDP is used in the following applications.

  1. Domain name system.
  2. Simple network management protocol.
  3. Routing information protocol.
  4. Trivial file transfer protocol.

Services of UDP and TCP

ServicesUDPTCP
Sequence data deliveryNoYes
Multi-StreamingNoNo
Multi-HomingNoNo
Connection-OrientedNoYes
Connection-lessYesNo
Allows half-closed connectionN/AYes
Application PDU bundlingNoYes
Congestion ControlNoYes
Application PDU fragmentationNoYes
Preserve message boundariesYesNo
Partial reliable data transferNoNo
Selective AcknowledgementsNoOptional

Related Topics

Working of ARP

The majority of computer programmes and applications send and receive messages using logical addresses (IP addresses), but the actual communication takes place over physical addresses (MAC addresses), which is found...

4 minutes read.

Transmission Control Protocol

Transmission Control Protocol: TCP stands for Transmission Control Protocol. It was introduced in 1974. It is a connection-oriented and reliable protocol. It establishes a connection between the source and destination...

3 minutes read.

4G Mobile Communication Technology

What is 4G? 4G is a fourth-generation wireless or mobile communication system, succeeding 3G (third generation) wireless communication and preceding 5G (fifth generation) communication. It is based on the capabilities defined by...

4 minutes read.

TCP

TCP is a transport layer protocol that helps to establish connections. TCP means Transmission Control Protocol. It guarantees secure data transmission between two network-connected devices. The data can only be...

5 minutes read.

Define Framing in Computer Network

Framing is a function of the data link layer, which provides a way for a sender to transmit a set of bits that should be meaningful to the user. The...

7 minutes read.

What is Framing in a Computer Network?

In the stream of bits, the data is stored by transmitting the bit by the connection of two devices through cable. This type of connection for data transmission is called...

6 minutes read.

Controlled Access Protocols in Computer Networks

In this tutorial, we will discuss Controlled Access Protocols in Computer Networks. Introduction On a shared platform, it is a strategy to minimise data frame collision. As in controlled access technique, every...

7 minutes read.

Uses of Computer Networks

During the twentieth century, the most significant technology is information collecting, processing, and distribution. Computers and communications have been integrated, which has considerably influenced the organization of computer systems. The previous...

6 minutes read.

Session Layer in OSI Model

This article will help you in getting a better understanding of the Session layer in the OSI model. The session layer is the fifth layer from the bottom in the OSI...

4 minutes read.

Advantages and Disadvantages of LAN

Before we move to advantages and disadvantages of LAN, first we discuss about what is LAN. Local area network is referred to by its abbreviation, LAN. A system that connects PCs...

3 minutes read.

Computer Network Switching

Switching Many numbers of connected devices are called the network. Whenever a company has multiple devices, there has a problem of how to connected them to make the one to one...

5 minutes read.

APIPA: Automatic Private IP Addressing

What is APIPA? APIPA stands for Automatic Private IP Addressing. It is a word used by Microsoft to describe address auto configuration, which enables a Local Area Network (LAN) computer to...

3 minutes read.

Fixed and Flooding Routing Algorithms

Introduction Before going to study fixed and flooding routing algorithms, we have to take a look back to revisit the topic of routing. Routing can be defined as Routing: What is it? Routing...

3 minutes read.

Computer Network Tutorial

What is Data Communication and Computer Network? Data Communication is the process of exchanging digital data between two or more computers that act as source and receiver through wireless media or...

7 minutes read.

Difference between Active and Passive FTP

What is FTP? FTP stands for File Transfer Protocol. It is a type of protocol that is used for transferring files over a network. FTP uses the TCP-based protocol. For a...

3 minutes read.

Unicast Routing Protocol

Unicast Routing Protocol: Unicast is a point to point communication arrangement that only occurs between the sender and receiver. Routing Information Protocol RIP is an open standard protocol that can work with...

3 minutes read.

Cyclic Redundancy Check Example

What is Cyclic Redundancy Check? A cyclic redundancy check (CRC) is a type of error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data....

5 minutes read.

Data Link Control

Data Link Control Data-link control is the main function of the data link layer. It deals with the configuration and coordination for connection between two neighboring nodes: node-to-node communication. The task...

10 minutes read.

Computer Network Architecture

Computer network architecture is a design in which all the computers are organized in a computer network. The architecture defines how computers must communicate with each other to obtain maximum...

4 minutes read.

Data link layer in OSI model

This article will help you in getting a good understanding of the topic called the Data link layer in the OSI model. It is the second bottom most layer in the...

3 minutes read.