What is UDP (User Datagram Protocol)?

UDP (User Datagram Protocol) allows datagrams to be sent over the network without establishing a connection, as it contains sufficient address information in the header of the datagram. Also, there is no confirmation or flow control, so the packages may be in front of each other and it is not known whether it is correct because there is no delivery or purchase confirmation.

What is UDP (User Datagram Protocol)?

Understanding User Datagram Protocol

Its main use is for real-time transmission of DHCP, BOOTP, DNS, and other protocols where connect/disconnect packet exchanges are larger or unprofitable than transmitted information, and also when retransmission is not possible due to strict latency requirements of audio and video.

What Does It Do?

UDP provides protocol ports used to distinguish many programs running on the same machine. That is, in addition to the data, each UDP message contains both the destination port number and the source port number, which makes it possible for the target UDP software to deliver the message to the correct recipient and send a reply.

UDP uses Internet Protocol (IP) as the basic protocol to transfer a message from one machine to another and provides a distribution service like this:

  • Not Connection-Oriented: It does not use approvals, does not order incoming messages or provides feedback to control the speed of information flow between machines. Therefore, UDP messages cannot be duplicated or accessed without ordering.
  • Unreliable: An application program using UDP accepts full responsibility for addressing reliability issues such as loss, duplication and delay of messages, out-of-order delivery and connection loss.

Message Format

  • UDP message length (16 bit). Specifies the average length of the UDP message in bytes, including the header. The minimum length is 8 bytes.
  • UDP checksum (16 bit, optional). Message error checksum. A so-called header, including source and destination IP addresses, is used for the calculation. To know this data, the UDP protocol must interact with the IP protocol.
  • Data: Data sent by applications travel here. The data sent by the source application is received by the destination application after switching between all networks.

Ports

UDP uses ports to allow communication between applications. Since the port field is 16 bits long, the valid value range is between 0 and 65,535. Port 0 is reserved but is a value that is allowed as the source port if the sending process does not expect to receive messages in response.

Ports 1 through 1023 are called “well known” ports, and on Unix-like operating systems, superuser access is required to connect to one of these ports.

Ports are 1024 to 49,151 registered ports. Ports 49,152 to 65,535 are temporary ports and are used by clients as temporary ports, especially when communicating with servers.

In practice, each application program must negotiate with the operating system to receive a protocol port and an associated port number so that it can send a datagram. Once the port has been assigned, any datagram sent by it by the application program will have the port number in the PORT SOURCE field.

While the input is processed, it accepts incoming IP software and multiplex datagrams based on the DESTINATION CONNECTION PORT.

The UDP port can be thought of as a queue. When an application negotiates the use of the port with the operating system, the operating system creates a buffer in the buffer and an internal standby queue that stores incoming messages.

When UDP receives a datagram, it verifies if the destination port number corresponds to one of the ports in use. If this port number is missing, ICMP sends an inaccessible port error message and discards the datagram. If it finds the port, it sorts the new datagram on the port and waits for the application to access that location.

   Related Articles


What is TCP?
What is TCP/IP?
HTTP/HTTPS
What is WEP?
What is WPA?

Add a Comment

Your email address will not be published. Required fields are marked *

error: