×

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

OSI Model

OSI Model: OSI stands for Open Systems Interconnection. The ISO (International Standards Organization) was introduced the OSI model in 1983. The OSI model is a standard reference model for communication between...

6 minutes read.

Transport Layer in OSI Model

This article will help you in getting a good understanding of the transport layer in the OSI model. The transport layer is the fourth layer from the bottom in the OSI...

4 minutes read.

Error Correction and Error Detection

Error Correction and Error Detection Error correction and error detection techniques are work on the data-link layer. The data link layer ensures the frames are sent from the sender to the...

16 minutes read.

TCP/IP model in Computer Network

An essential foundation for computer networking is the TCP/IP model. It stands for Transmission Control Protocol and Internet Protocol which are the two major Internet protocols. This model outlines the...

6 minutes read.

Hamming Code Example

What is Hamming Code? Hamming code is an error-detecting and error-correcting code used in computer data storage and transmission to detect and correct errors caused by noise, interference, or data corruption....

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.

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 and Presentation Layer

Session Layer and Presentation Layer Session Layer The fifth layer is the Session layer in the OSI model, which controls connections between many computers. It manages, establishes, and terminates the session connection...

2 minutes read.

Address Mapping

Address Mapping: Internet is made of a combination of physical networks connected together by internetworking devices such as routers. A logical address is an internetwork address. A physical address is...

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.

Ring Topology in Computer Network

Ring topology is a topology that was invented by IBM in 1984 by the Institute of Electrical and Electronics Engineers. It is defined as a type of network topology where...

4 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.

Method of Joining and Fusion of Fiber Optic Cable

What is Fiber Optics Cable? Fiber optics cable transforms the information at a light pulse. We can transfer voice, data, and video through the fiber optics cable. The fiber optics cable...

3 minutes read.

Two Port Network in Computer Networks

A Two Port Network is a four-terminal electric network or circuit with 2 terminals on both sides, each connecting with more circuits or devices. Two terminals together make a port, one...

5 minutes read.

TCP vs UDP

Transmission Control Protocol (TCP) and User Datagram Protocol are the two most popular Internet protocols (IPs). TCP is a connection-oriented protocol, which means that once a connection has been made,...

4 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.

FTP: File Transfer Protocol

File Transfer Protocol File transfer protocol is commonly called FTP. The most popular service of the Internet is to download the files. In other words, it is to transfer the files...

3 minutes read.

Data Link Layer Protocols

 Data Link Layer Protocols Bluetooth Low EnergyZ-WaveZigBee Smart EnergyLoRaWANWirelessHARTLTE-A  1. Bluetooth Low Energy Bluetooth Low Energy or Bluetooth is a short-range communication protocol with the physical layer and medium access control layer. It is widely used in IoT...

3 minutes read.

Basic Networking Devices

Introduction Physical components, or network devices, allow hardware on a computer network to link and convey with one another. Network equipment such as switches, routers, gateways, hubs, repeaters, bridges, and routers...

6 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.