- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is UDP?
UDP stands for User Datagram Protocol. It supports a connectionless packet service that provides unreliable 'best effort' delivery. This defines that the packet’s arrival is not protected, nor is the proper sequencing of forwarded packets. An application that does not need an acknowledgment of data receipts, such as audio or video advertising, uses UDP.
UDP is also used by applications that frequently transmit a small amount of information at one time. For example, UDP supports a protocol port to differentiate between several programs executing on a single device.
Each UDP message includes both a destination port number and a source port number. This makes it feasible for the UDP application at the destination to produce the message to the proper application program and for the application program to send a reply.
Given below is an image depicting the UDP header −
The UDP header is divided into the following 16-bit fields.
Source Port − It is an optional field when relevant. It denotes the port of the sending procedure and can be treated to be the port that must address a reply in the absence of multiple data. If not utilized, a value of zero is added.
Destination Port − It has a definition within the context of a specific Internet destination address.
Length − This is the size in bytes of the UDP packet, including the header and data. The minimum length is 8 bytes which is the length of the header alone.
UDP Checksum − It can verify the integrity of the UDP header. The checksum is implemented on a pseudo-header including data obtained from the IP header (Source and destination address) and the UDP header.
UDP pseudo Header
The goal of a pseudo-header is to test that the UDP packet has reached its proper destination. The correct destination contains a definite machine and a specific protocol port number within that machine. The UDP header itself decides just the protocol port number.
UDP software determines the checksum at the ultimate destination using the destination IP address obtained from the IP packet header that carried the UDP message. If the checksum agrees, it must be true that the packet has reached the intended destination host and the correct protocol port within the host.
Given below is an image depicting the UDP pseudo header −
Some of the components of UDP are explained below −
User Interface − A user interface should enable the generation of new received ports, receive operations on the data octets and an expression of the source port and source address, and a procedure that enables a datagram to be sent, specifying the data, source, and destination ports and addresses to be sent.
IP Interface − The UDP module must decide the source and destination internet addresses and the internet header’s protocol field. One possible UDP/IP interface will restore the whole internet datagram, including the whole Internet header, to get operation.
Protocol Application − This protocol’s significant uses are the Internet Name Server and the Trivial File Transfer.
Protocol Number − Its protocol number is 17 (21 octal) when utilized in the Internet Protocol.
- What is a User Datagram Protocol (UDP)?
- What is UDP Datagram Format in computer networks?
- What is the difference between SCTP and UDP?
- Difference between TCP and UDP
- Explain the purpose of UDP?
- Distinguish between the TCP and UDP.
- TCP and UDP in Transport Layer
- C program for file Transfer using UDP?
- User Datagram Protocol (UDP) in Computer Networks
- How to Watch TCP and UDP Ports in Real-time in Linux?
- What is Java API and what is its use?
- What is DatabaseMetaData in JDBC? What is its significance?
- What is ResultSetMetaData in JDBC? What is its significance?
- What is Account Balance and what is its significance?
- What is Scenario Analysis and what is its importance?