mcgraw-hill©the mcgraw-hill companies, inc., 2000 chapter 11 user datagram protocol (udp)
DESCRIPTION
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Figure 11-1 Position of UDP in the TCP/IP protocol suiteTRANSCRIPT
![Page 1: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/1.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Chapter 11
User DatagramProtocol(UDP)
![Page 2: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/2.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
CONTENTSCONTENTS• PROCESS-TO-PROCESS COMMUNICATION• USER DATAGRAM• CHECKSUM• UDP OPERATION• USE OF UDP• UDP PACKAGE
![Page 3: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/3.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-1
Position of UDP in the TCP/IP protocol suite
![Page 4: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/4.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
PROCESS TO
PROCESSCOMMUNICATION
11.111.1
![Page 5: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/5.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-2
UDP versus IP
![Page 6: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/6.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-3
Port numbers
![Page 7: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/7.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-4IP addresses versus port numbers
![Page 8: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/8.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-5
IANA ranges
![Page 9: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/9.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-6
Socket addresses
![Page 10: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/10.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
USER DATAGRAM
11.211.2
![Page 11: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/11.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-7
User datagram format
![Page 12: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/12.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
UDP length UDP length IP length IP length IP header’s length IP header’s length
![Page 13: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/13.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
CHECKSUM
11.311.3
![Page 14: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/14.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-8
Pseudoheader added to the UDP datagram
![Page 15: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/15.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-9
Checksum calculation of a simple UDP user datagram
![Page 16: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/16.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
UDP OPERATION
11.411.4
![Page 17: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/17.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-10
Encapsulation and decapsulation
![Page 18: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/18.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-11Queues in UDP
![Page 19: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/19.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-12Multiplexing and demultiplexing
![Page 20: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/20.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
USE OF UDP
11.511.5
![Page 21: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/21.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
UDPPACKAGE
11.611.6
![Page 22: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/22.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Figure 11-13 UDP package
![Page 23: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/23.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
StateState Process IDProcess ID Port NumberPort Number Queue NumberQueue Number
---------------- ------------------------ ---------------------------- ------------------------------------
IN-USE 2,345 52,010 34
IN-USE 3,422 52,011
FREE
IN-USE 4,652 52,012 38
FREE
Control-block table at the beginning
![Page 24: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/24.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 1Example 1
The first activity is the arrival of a user datagram with destination port number 52,012. The input module searches for this port number and finds it. Queue number 38 has been assigned to this port, which means that the port has been previously used. The input module sends the data to queue 38. The control-block table does not change.
![Page 25: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/25.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 2Example 2
After a few seconds, a process starts. It asks the operating system for a port number and is granted port number 52,014. Now the process sends its ID (4,978) and the port number to the control-block module to create an entry in the table. The module does not allocate a queue at this moment because no user datagrams have arrived for this destination
![Page 26: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/26.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
StateState Process IDProcess ID Port NumberPort Number Queue NumberQueue Number
---------------- ------------------------ ---------------------------- ------------------------------------
IN-USE 2,345 52,010 34
IN-USE 3,422 52,011
IN-USE 4,978 52,014
IN-USE 4,652 52,012 38
FREE
Modified table after Example 2
![Page 27: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/27.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 3Example 3
A user datagram now arrives for port 52,011. The input module checks the table and finds that no queue has been allocated for this destination since this is the first time a user datagram has arrived for this destination. The module creates a queue and gives it a number (43).
![Page 28: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/28.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
StateState Process IDProcess ID Port NumberPort Number Queue NumberQueue Number
---------------- ------------------------ ---------------------------- ------------------------------------
IN-USE 2,345 52,010 34
IN-USE 3,422 52,011 43
IN-USE 4,978 52,014
IN-USE 4,652 52,012 38
FREE
Modified table after Example 3
![Page 29: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/29.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 4Example 4
After a few seconds, a user datagram arrives for port 52,222. The input module checks the table and cannot find the entry for this destination. The user datagram is dropped and a request is made to ICMP to send an “unreachable port” message to the source.
![Page 30: McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 11 User Datagram Protocol (UDP)](https://reader036.vdocuments.us/reader036/viewer/2022062505/5a4d1bdb7f8b9ab0599dcba6/html5/thumbnails/30.jpg)
McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000
Example 5Example 5
After a few seconds, a process needs to send a user datagram. It delivers the data to the output module which adds the UDP header and sends it.