- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Explain the purpose of UDP?
User Datagram Protocol (UDP) provides a connectionless packet service that offers unreliable 'best effort' delivery. This represents that the packet's arrival is not guaranteed, and also there is no guarantee for the correct sequencing of forwarded packets.
An application that does not require an acknowledgement of data receipt. For example, audio or video broadcasting used UDP.
UDP is also used by application of the typical transmit of a small amount of data at one time. For example, UDP provides a protocol port to distinguish between multiple programs implemented 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 software at the destination to deliver the message to the correct application program and for the application program to send a reply.
|Source Port||Length||Destination Port||UDP Checksum|
The UDP header is classified into the following 16-bit fields.
Source Port is an optional field when it is relevant. It denotes the port of the sending process and can be assumed to be the port that should address a reply in the absence of any other data. If not utilised, a value of zero is added.
A destination port has a meaning within the context of a particular internet destination address.
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
This is used to verify the integrity of the UDP header. The checksum is performed on a pseudo-header consisting of information obtained from the IP header (Source and destination address) and the UDP header.
UDP pseudo Header
The purpose of using a pseudo-header is to test that the UDP packet has reached its correct destination. Here, the correct destination includes a specific machine and a particular protocol port number within that machine.
The UDP header itself determines only the protocol port number. Thus, to authenticate the destination UDP on the sending devices computes a checksum covering the destination IP address and the UDP packet
UDP software determines the checksum at the ultimate destination by using the destination IP address which is obtained from the IP packet header that carried the UDP message.
If the checksum agrees, that it is true that the packet has reached the intended destination host and the correct protocol port within the host.
UDP pseudo header
A user interface should allow the creation of new received ports, receive operations on the data octets and an indication 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.
The UDP module must decide the source and destination internet addresses and the internet header's protocol field. One possible UDP/IP interface will return the entire internet datagram, including the whole Internet header, to receive operation.
Such an interface would also enable the UDP to pass the whole internet datagram, complete with a header to the IP to send. The IP would verify specific fields for consistency and compute the internet header checksum.
This protocol's significant uses are the Internet Name Server and the Trivial File Transfer.
The protocol number is 17 (21 octal) when used in the Internet Protocol.
Kickstart Your Career
Get certified by completing the courseGet Started