The User Datagram Protocol (UDP) was written by David Patrick Reed. The protocol was released in 1980, and the original specification for the protocol was outlined on the 28th of August, 1980, by Jon Postel. The User Datagram Protocol (UDP) is one of the core protocols of the transport layer of the Internet protocol suite. The Internet protocol suite has four layers, and the transport layer protocol is placed between the application layer and the Internet layer.
The application layer of the Internet protocol suite includes protocols that provide client-server services like the World Wide Web. The Internet layer of the Internet protocol suite includes the Internet Protocol (IP) that is responsible for the delivery of data on the Internet. Due to the unreliable nature of the Internet Protocol (IP), there is no guarantee the data will arrive and whether it will contain errors. Therefore, the transport layer includes protocols that enable application layer protocols to reliable send and receive data.
The User Datagram Protocol (UDP) is one of the core protocols of the transport layer of the Internet protocol suite; the other core protocol of the transport layer is the Transmission Control Protocol (TCP). ` The difference between UDP and TCP: is that TCP provides a connection based transmission model, and UDP provides a connectionless based transmission model. This results in TCP providing a slower and more reliable delivery of application layer data, whereas UDP provides a faster and unreliable delivery of application layer data. UDP is viewed as a lightweight, simple and quick transport layer protocol, whereas TCP is complex, reliable and slow.
The User Datagram Protocol (UDP) is not suitable for many application layer protocols, because it does not guarantee a reliable delivery of data. UDP is a connectionless based transmission model: which means that no 'handshake' is conducted between the host computer sending the data and the host computer receiving the data. Therefore, UDP is not suitable for sending and receiving emails.
However, UDP is suitable for other application layer protocols: that only submit simple queries and where a quick transmission of data is required. One example of an application layer protocol that uses UDP is the Domain Name System (DNS): where queries are made for the address of hostnames. Due to the simplicity of such DNS query responses, a sequence number for the data is not requried.
UDP is also suitable for application layer protocols where data needs to be sent quickly. When application data is sent by TCP is can take seconds, which is not noticeable for applications like email, but it is noticeable for applications like real time video and voice transmission. Therefore, Internet applications like Skype and Online games will typically use UDP rather than TCP.
UDP functions in a similar fashion to TCP, the difference is it is less complex. UDP will accept a data stream from an application layer protocol, it will then split this data into segments. When all the segments are combined they are referred to as a datagram. The UDP datagram contains a header, which includes information to help route the data. TCP has ten fields within it's header, and UDP has four fields within it's header. The four core UDP header fields are:
Through a system of encapsulation, the UDP datagram will be inserted into a Internet Protocol (IP) datagram. The Internet Protocol (IP) will handle the delivery of data, because the Internet Protocol (IP) header includes the address of the source and destination computer. When the IP address is combined with the UDP port number, this ensures that the data is sent to the correct application at the host computer. IANA assigns application layer protocols to specific UDP and TCP port number. The IP address can be likened to the address of a house, and the port number of UDP as a room within that house.