 Hello everyone. In this video we will study UDP services. Learning outcomes at the end of this session student will be able to discuss the various services provided by UDP such as process-to-process delivery, rudimentary error control, encapsulation, decapsulation and queuing. Before starting the UDP services in detail, I will explain UDP. What actually a UDP is? UDP stands for User Datagram Protocol. It is a connectionless, unreliable transport layer protocol. It is a simple protocol with minimum overhead. Now, these are the various services provided by UDP which contains process-to-process communication, connectionless service. UDP does not provide flow control, conjection control. It also does not provide error control except checksum. UDP provides encapsulation and decapsulation. It provides queuing. It also provides multiplexing and de-multiplexing. So, let's see each and every service in detail. First, process-to-process communication. UDP provide process-to-process communication using socket and a combination of IP addresses and port numbers. Port numbers used by UDP are shown in this table. Here total 14 ports are given. Each and every port is associated with a particular protocol. Now, let's see the another service that is connectionless service. UDP sends independent datagram. This independent datagram that means there is no relation between the individual user datagram. Even though they are coming from the same source and going to a same destination. User datagrams are not number. That means the sequence numbers are not provided by UDP to the user datagram. There is no connection establishment and connection termination. That's why it is known as connectionless service. UDP processes sends the short messages and the messages are less than 65507 bytes. Actually, the size of UDP user datagram is 65535. But, if we minus the 8 byte UDP header and the 20 byte IP header, then it becomes 65507. Now, the another service which is not provided by the UDP is flow control. So, if UDP does not provide the flow control, hence there is no window mechanism. Receiver may overflow with the incoming messages. Error control. UDP does not provide the error control except for the checksum. Sender does not know message has been lost or duplicated. Receiver detect an error through a checksum and the user datagram is slightly discarded. So, let's see checksum in detail. Here checksum includes three sections. First is pseudo header. Another is UDP header and the third one is data. Pseudo header is nothing but the part of IP datagram. So, here it includes the 32-bit source IP address, destination IP address. Again it is 32-bit. Then 8-bit protocol field and 16-bit UDP total length. The value of the protocol field for UDP is 17. This shows the format of checksum. So, the black portion is a pseudo header, this pink portion is a header and the gray part is known as data. So, here pseudo header consists of 32-bit source IP address, 32-bit destination IP address, then 8-bit protocol and the 16-bit UDP total length. Whereas, this header indicates the pink portion indicates the header of UDP which contains source port address, destination port address, UDP total length and checksum and the remaining thing is data. Now, let's consider this checksum with the help of one example. Now, look at this diagram. Here, IP address, source IP address is given, destination IP address is given, protocol field is given and the total length is also given. Now, the header of the IP datagram. Here, source port number is 1087, destination port number is 13, total length is 15 and the checksum field initially it is all zeros and the remaining field is nothing but the data. Now, let's convert this into binary. If we convert each and every field present in this checksum into binary, it will look like this. Now, once we perform the binary addition on this field, we will get this sum. When we complement this sum, we will get the checksum. Now, this checksum value is put into the this field where initially in that field all zeros are there. So, now the checksum for this user datagram is this. So, this is about the checksum. Now, the next service provided by the UDP is conjection control. Actually, UDP does not provide the conjection control. UDP assumes that the package cents are small and these packets are scattered and these does not create the conjection in the network. So, it does not provide the conjection control. But nowadays, UDP is used for real time transfer of audio and video. So, these are the some services provided by UDP and some services which does not provided by the UDP. Now, pause the video and write your answer. Question is, which of the following function does UDP perform? Options are A, process to process communication, B, host to host communication, end to end reliable data delivery and D, none of the above. Answer is process to process communication. Now, let us see the another service provided by the UDP, encapsulation and decapsulation. So, let me explain this with the help of one diagram. Now, here sender process send the message to its lower layer. The lower layer is a transport layer. In this transport layer, UDP encapsulate that message into a datagram. Then that UDP datagram where the addresses are added, that means the header is added. After this, the UDP datagram is sent to the next lower layer which is a network layer. In network layer, this user datagram is encapsulated into an IP datagram where the IP header is attached. After that, that IP datagram is sent to a next layer that is data link layer. In that layer, this IP datagram is encapsulated in a frame. So, the header and trailer is added into a frame. After that this frame is transmitted to a physical layer. Physical layer converts the beats and it transmits through a physical medium. Where the physical medium converts that beats into a signal and transmits through a physical medium. So, this process is known as encapsulation. On the another side, when the physical layer receives the beats, these beats are transmitted to the frame or the next layer, upper layer that is a data link layer. So, data link layer converts that beats into a frame. In that frame, the header is present. So, this data, data from that frame is decapsulated and the header is dropped there and the remaining data is transmitted to its upper layer. Upper layer is a network layer. Again in this network layer, IP header is dropped and the data is decapsulated and forward it to a next layer. So, in this way the messages, the message is transmitted to the receiver process. So, through this diagram, the encapsulation and the decapsulation is done, carry on. Now, this is the explanation of previous diagram. Now, let us see very important service that is queuing. In UDP, queuing is associated with port. UDP process creates the incoming and outgoing queues. Queues function as long as the process is running. When the process terminates, the queues are destroyed. So, let me explain this queuing with the help of this diagram. Now, consider the client process and that client process is a daytime process. This daytime process is transmitted or this client transmit the message to the outgoing queue. UDP present at the client side send that message to an outgoing queue or we can say that at the end of outgoing queue with the appropriate port number. If that queue is full or that queue is overflow, then operating system sends the waiting message to a client. Otherwise, it forward that message to the proper destination. On the other side, server receive that message. If that message is related with the proper server, then that message is forwarded. That means, once the message is received by server, it check whether the destination incoming queue is created properly or not. If that incoming queue is created with that port number, with that appropriate port number, then the UDP at the sender side keep that message at the end of the incoming queue and forward it to the server. If that incoming queue is full or overflow, it send the message with the help of ICMP protocol and that message is port unreachable. The same thing is happened at the client side. When the client side receive any packet from the server, it check whether the destination address or that destination address port is created or not. If that incoming port is created properly, then it send that particular message to that queue. Otherwise, it discard that particular message. So, this is all about the queuing. So, this is the explanation of queuing at client side and the explanation of queuing at server side. So, in this lecture, we have studied UDP services. This is a reference. Thank you.