TEchMyEducation

easy tech learning...

user datagram protocol in computer networks Its advantage and disadvantage tcp vs udp

1 comment

user datagram protocol in computer networks

The full name of UDP is the User Datagram Protocol.
This protocol was designed by David P Reed in 1980. It has been defined in RFC 768.
This is a simple transport layer communication protocol. This is a connection-less protocol, which means when a data transfer occurs, then this protocol does not establish connection between sender and receiver.

In UDP the receiver does not generate any acknowledgment to receive data, send and send the data. It transmits data directly. In this, the use of the communication mechanism is very less. UDP can be called an unreliable protocol but it uses ip services which provides the best delivery mechanism.
In the user datagram protocol, data packet is called datagram. UDP does not guarantee that your data will reach your destination. This data can also be reached in less quantity (i.e. some data packets may also be destroyed in the middle of the transmission.)
It is also not necessary that the data will reach the receiver till the sequence in which we have sent the data. This data segment is not sent back (i.e., it does not transmit deleted data packets again)
The dp protocol is used to transfer such data where we require more speed than the accuracy and reliability because it provides faster service than TCP.

user datagram protocol in computer networks
NEESSITY OF UDP (Why it's needed?)
  • The udp protocol is used to transfer such data where we require more speed than the accuracy and reliability because it provides faster service than TCP.
  • If the data flow is in the same direction then it can be used.
  • It can be used for streaming applications.
  • This is a connection-less protocol.

user datagram protocol in computer networks
It has four parameters
Source Port - Its size is 16 bit. It is used to identify the source port of data.
Destination Port - its size is 16 bit. It is used to identify destination port of data.
Length - This defines the length of the datagram. It stores the length of the data and header.
Checksum- This field stores the checksum value that is generated by sender before sending it.

user datagram protocol in computer networks
Difference between UDP and TCP
TCP vs UDP
Its full name is Transmission Control Protocol
Its full name is the User Datagram Protocol.

This is a connection oriented protocol and the device communicating in it has to establish connection before communication, and later it has to be maintained and terminated.
UDP is a connection-less protocol. And the device communicating in it does not have to establish, maintain, and terminate connection.

Its speed is slow.
Its speed is very fast.

This is reliable.
Very unreliable (incredible).

Its header size is 20 bytes.
Its header size is 8 bytes.

It takes the acknowledgment of data and transmits lost data.
Takes no acknowledgment and does not send missing data again.

It uses 3-way handshake to set up connection.
It does not use any handshake.

It uses error-detection and error-correction methods.
errors are not checked and detected, it discards (corrupted) the corrupted packet directly.

The congestion is controlled in it.
There is no flow control or congestion control.

There is a sequence number of each byte in it.
Byte does not have a sequence.

The following protocols are needed for TCP: - HTTP, FTP, SMTP, Telnet etc.

It requires these protocols.
DNS, DHCP, SNMP, VOIP, RIP etc.

user datagram protocol in computer networks
Disadvantages of UDP: -
  1. Through this we can broadcast and multicast transmission.
  2. It is fast with TCP.
  3. It uses small size packets with small header (8 byte). By which it takes less time to process packets and the use of memory is less.
  4. It does not need to establish and maintain connections.
  5. There is no acceptance in it, it also increases the speed.
  6. UDP is used whenever you want to transmit a data packet.
user datagram protocol in computer networks
Disadvantages of UDP
  1. This is unreliable transport protocol.
  2. There is no such function in it, to know that the data has been received.
  3. Do not control congestion too.
  4. error recovery only sees the application layer.

1 comment :