PurushottamKamble
1,995 views
13 slides
Nov 30, 2018
Slide 1 of 13
1
2
3
4
5
6
7
8
9
10
11
12
13
About This Presentation
User Datagram protocol header format
Size: 59.66 KB
Language: en
Added: Nov 30, 2018
Slides: 13 pages
Slide Content
User Datagram Protocol (UDP)
Learning Outcome At the end of this lecture, students will be able to, Explain the format of a UDP packet. Identify the services provided by the UDP. 2
Where UDP is positioned in the TCP/IP protocol suite? 3 Recall SCTP TCP UDP Fig. 1. Transport Layer
User Datagram Protocol (UDP) 4 Characteristics: End-to-End: An application sends/receives data to/from another application. Connectionless: Application does not need pre-established connection before sending data; not need to terminate the connection when finished. Application Identification: Each application assigned with an Integer number called PROTOCOL PORT NUMBER. Service: UDP Provides unreliable datagram service Packets may be lost or delivered out of order. No buffering before transmission.(accept and transmit immediately)
User Datagram Protocol (UDP) 5 Transport-level protocol in addition to TCP Supports Network Applications Placed directly on the top of the Internet Protocol (IP) Main purpose is to outline the network traffic in the form of datagrams. Datagram = first 8 bytes contain header information + remaining bytes contain data. Fig. 2. UDP User Datagram Data Header 8 bytes 8 to 65535 bytes
UDP Header Format 6 Fig. 3 . UDP Datagram Header Format Source port number Destination port number Total length Checksum 16 31 Source Port Number - 16 bits port number Destination Port Number- 16 bits port number Total Length (UDP header + data) - 16 bits count of octets Checksum - 16 bits field. I f 0, then there is no checksum If 1 , then it is a checksum over a pseudo header + UDP data area
UDP Vs TCP 7 Performance: TCP uses window based flow control scheme. TCP’s slow start algorithm reduces throughput. TCP has extra overhead per segment. UDP sends small, inefficient Datagrams. Reliability: TCP provides reliable, in-order transfer. UDP provides unreliable service. Packet loss due to overflows and errors. Out-of-order datagrams. Multicast and Broadcast: Only supported by UDP. Data Size: UDP datagram limited to 64KB
UDP Multiplexing & Demultiplexing 8 Fig. 4. UDP Demultiplexing Sender: Multiplexing of UDP Datagrams. UDP datagrams are received from multiple application programs. A single sequence of UDP datagrams is passed to IP Layer. Receiver: Demultiplexing of UDP Datagrams. A single sequence of UDP datagrams is received from IP Layer. UDP datagram received is passed to appropriate application. PORT 1 PORT 2 PORT 3 IP Layer UDP Datagram arrives UDP : Demultiplexing Based on PORT
Ports used in UDP 9 Port Protocol Description 7 Echo Echoes a received datagram back to the sender 9 Discard Discards any datagram that is received 11 Users Active users 13 Daytime Returns the date and the time 17 Quote Returns the quote of the day 19 Chargen Return a string of characters 56 Domain Domain Name Service(DNS) 67 Bootps Server port to download bootstrap information 68 Bootpc Client port to download bootstrap information 69 TFTP Trivial File transfer protocol 111 RPC Remote Procedure Call 123 NTP Network Time Protocol 161 SNMP Simple Network Management Protocol Table. 1. Well-Known Ports used in UDP
The following is a dump of a UDP header in hexadecimal format. 10 CB84000D001C001C THINK… What is the source port number? What is the destination port number? What is the total length of the user datagram? What is the length of the data? Is the packet directed from a client to a server or vice versa? What is the client process?
Solution The source port number is the first four hexadecimal digits (CB84) 16 or 52100. The destination port number is the second four hexadecimal digits (000D) 16 or 13. The third four hexadecimal digits (001C) 16 define the length of the whole UDP packet as 28 bytes. The length of the data is the length of the whole packet minus the length of the header, or 28 – 8 = 20 bytes. Since the destination port number is 13 (well-known port), the packet is from the client to the server. The client process is the Daytime (see Table 1). 11
References “Computer Networks” by Andrew S. Tanenbaum 4 th edition by Pearson. 12