User Data gram Protocol is a connectionless protocol that runs on top of IP networks. In UDP,messages are sent in the form of datagrams. As UDP is connectionless,so no handshaking takes place between the two processes on the end systems before transferring any sort of data.
UDP gives its customers an unreliable data transfer in which when a process sends a that
message in the form of a datagram, UDP gives no guarantee of delivering particular message/datagram to the socket(end node) on the receiving end system. The data grams may arrive out of order at the receiver end and thus the receiving end system may receive out of order data. i. e one can receive packet number 3 before packet number 2 and there is also a possibility of receiving a datagram twice. UDP is a stateless protocol and therefore, the servers in this case has the benefit of handling multiple clients at a time. So broadcast and multicast are available with UDP. UDP provides no flow control and congestion control which means that it can blast as fast as desired and all these situations are to be handled by the application program.
Data gram Structure :
The first eight (8) bytes of a datagram contain header information and the remaining bytes contains message data. A UDP datagram header consists of four (4) fields with each having its size equal to two bytes each:
- Source port number
- Destination port number
- Datagram size
Size is 16 bits i. e from 0 to 15. This port number indicates the sender. Cleared to zero if not used.
Destination Port Number:
Size is also 16 bits. This port number tells about the port to which this packet is addressed to.
Size of this field is 16 bits. The field shows the length in bytes of the UDP header and the encapsulated data. The minimum value for this field is 8. The practical limit for the data length which is imposed by the underlying IPv4 protocol is 65,507 bytes (65,535 ? 8 byte UDP header ? 20 byte IP header)
UDP verifies the integrity of the application through checksum. The checksum field is used for error-checking of the header and data. If the checksum is omitted in IPv4, the field uses the value all-zeros.
UDP is often used for streaming multimedia applications as it is loss tolerant and rate sensitive. Other UDP uses are Domain Name System (DNS) Simple Network Management Protocol (SNMP), the Routing Information Protocol (RIP) and the Dynamic Host Configuration Protocol (DHCP).
|← Transmission Control Protocol (TCP) - Segment Structure & Application||Open System Interconnection Model Layers Reference TCP IP OSI pdf →|