CChhaapptteerr 1111 
UUsseerr DDaattaaggrraamm 
PPrroottooccooll 
Objectives 
Upon completion you will be able to: 
• Be able to explain process-to-process communication 
• Know the format of a UDP user datagram 
• Be able to calculate a UDP checksum 
• Understand the operation of UDP 
• Know when it is appropriate to use UDP 
• Understand the modules in a UDP package 
TCP/IP Protocol Suite 1
Figure 11.1 Position of UDP in the TCP/IP protocol suite 
TCP/IP Protocol Suite 2
11.1 PROCESS-TO-PROCESS 
COMMUNICATION 
Before we examine UDP, we must first uunnddeerrssttaanndd hhoosstt--ttoo--hhoosstt 
ccoommmmuunniiccaattiioonn aanndd pprroocceessss--ttoo--pprroocceessss ccoommmmuunniiccaattiioonn aanndd tthhee 
ddiiffffeerreennccee bbeettwweeeenn tthheemm.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
PPoorrtt NNuummbbeerrss 
SSoocckkeett AAddddrreesssseess 
TCP/IP Protocol Suite 3
Figure 11.2 UDP versus IP 
TCP/IP Protocol Suite 4
Figure 11.3 Port numbers 
TCP/IP Protocol Suite 5
Figure 11.4 IP addresses versus port numbers 
TCP/IP Protocol Suite 6
Figure 11.5 ICANN ranges 
TCP/IP Protocol Suite 7
NNoottee:: 
The well-known port numbers are less 
than 1024. 
TCP/IP Protocol Suite 8
TTaabbllee 1111..11 WWeellll--kknnoowwnn ppoorrttss uusseedd wwiitthh UUDDPP 
TCP/IP Protocol Suite 9
ExamplE 1 
In UNIX, the well-known ports are stored in a file called 
/etc/services. Each line in this file gives the name of the server 
and the well-known port number. We can use the grep utility to 
extract the line corresponding to the desired application. The 
following shows the port for TFTP. Note TFTP can use port 69 
on either UDP or TCP. 
$ grep tftp /etc/services 
tftp 69/tcp 
tftp 69/udp 
See Next Slide 
TCP/IP Protocol Suite 10
ExamplE 1 (ContinuEd) 
SNMP uses two port numbers (161 and 162), each for a 
different purpose, as we will see in Chapter 21. 
$ grep snmp /etc/services 
snmp 161/tcp #Simple Net Mgmt Proto 
snmp 161/udp #Simple Net Mgmt Proto 
snmptrap 162/udp #Traps for SNMP 
TCP/IP Protocol Suite 11
Figure 11.6 Socket address 
TCP/IP Protocol Suite 12
11.2 USER DATAGRAM 
UDP packets are called user datagrams and have aa ffiixxeedd--ssiizzee hheeaaddeerr ooff 
88 bbyytteess.. 
TCP/IP Protocol Suite 13
Figure 11.7 User datagram format 
TCP/IP Protocol Suite 14
NNoottee:: 
UDP length = 
IP length − IP header’s length 
TCP/IP Protocol Suite 15
11.3 CHECKSUM 
UDP checksum calculation is different from tthhee oonnee ffoorr IIPP aanndd IICCMMPP.. 
HHeerree tthhee cchheecckkssuumm iinncclluuddeess tthhrreeee sseeccttiioonnss:: aa ppsseeuuddoohheeaaddeerr,, tthhee UUDDPP 
hheeaaddeerr,, aanndd tthhee ddaattaa ccoommiinngg ffrroomm tthhee aapppplliiccaattiioonn llaayyeerr.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
CChheecckkssuumm CCaallccuullaattiioonn aatt SSeennddeerr 
CChheecckkssuumm CCaallccuullaattiioonn aatt RReecceeiivveerr 
OOppttiioonnaall UUssee ooff tthhee CChheecckkssuumm 
TCP/IP Protocol Suite 16
Figure 11.8 Pseudoheader for checksum calculation 
TCP/IP Protocol Suite 17
Figure 11.9 Checksum calculation of a simple UDP user datagram 
TCP/IP Protocol Suite 18
11.4 UDP OPERATION 
UDP uses concepts common to the transport layer. TThheessee ccoonncceeppttss wwiillll 
bbee ddiissccuusssseedd hheerree bbrriieeffllyy,, aanndd tthheenn eexxppaannddeedd iinn tthhee nneexxtt cchhaapptteerr oonn tthhee 
TTCCPP pprroottooccooll.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
CCoonnnneeccttiioonnlleessss SSeerrvviicceess 
FFllooww aanndd EErrrroorr CCoonnttrrooll 
EEnnccaappssuullaattiioonn aanndd DDeeccaappssuullaattiioonn 
QQuueeuuiinngg 
MMuullttiipplleexxiinngg aanndd DDeemmuullttiipplleexxiinngg 
TCP/IP Protocol Suite 19
Figure 11.10 Encapsulation and decapsulation 
TCP/IP Protocol Suite 20
Figure 11.11 Queues in UDP 
TCP/IP Protocol Suite 21
Figure 11.12 Multiplexing and demultiplexing 
TCP/IP Protocol Suite 22
11.5 USE OF UDP 
We discuss some uses of the UDP pprroottooccooll iinn tthhiiss sseeccttiioonn.. 
TCP/IP Protocol Suite 23
11.6 UDP PACKAGE 
To show how UDP handles the sending and receiving ooff UUDDPP ppaacckkeettss,, 
wwee pprreesseenntt aa ssiimmppllee vveerrssiioonn ooff tthhee UUDDPP ppaacckkaaggee.. TThhee UUDDPP ppaacckkaaggee 
iinnvvoollvveess ffiivvee ccoommppoonneennttss:: aa ccoonnttrrooll--bblloocckk ttaabbllee,, iinnppuutt qquueeuueess,, aa 
ccoonnttrrooll--bblloocckk mmoodduullee,, aann iinnppuutt mmoodduullee,, aanndd aann oouuttppuutt mmoodduullee.. 
TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: 
CCoonnttrrooll--BBlloocckk TTaabbllee 
IInnppuutt QQuueeuueess 
CCoonnttrrooll--BBlloocckk MMoodduullee 
IInnppuutt MMoodduullee 
OOuuttppuutt MMoodduullee 
TCP/IP Protocol Suite 24
Figure 11.13 UDP design 
TCP/IP Protocol Suite 25
TTaabbllee 1111..22 TThhee ccoonnttrrooll--bblloocckk ttaabbllee aatt tthhee bbeeggiinnnniinngg ooff eexxaammpplleess 
TCP/IP Protocol Suite 26
ExamplE 2 
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. 
TCP/IP Protocol Suite 27
ExamplE 3 
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 takes the first FREE entry and inserts the information 
received. The module does not allocate a queue at this moment 
because no user datagrams have arrived for this destination 
(see Table 11.3). 
See Next Slide 
TCP/IP Protocol Suite 28
TTaabbllee 1111..33 CCoonnttrrooll--bblloocckk ttaabbllee aafftteerr EExxaammppllee 33 
TCP/IP Protocol Suite 29
ExamplE 4 
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). See Table 11.4. 
See Next Slide 
TCP/IP Protocol Suite 30
TTaabbllee 1111..44 CCoonnttrrooll--bblloocckk aafftteerr EExxaammppllee 44 
TCP/IP Protocol Suite 31
ExamplE 5 
After a few seconds, a user datagram arrives for port 52,222. 
The input module checks the table and cannot find an 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. 
TCP/IP Protocol Suite 32

More Related Content

PPT
Chap 09 icmp
PPT
Chap 17 dns
PPT
Chap 12 tcp
PPT
Chap 08 ip
PPT
Chap 19 ftp & tftp
PPT
Chap 20 smtp, pop, imap
PPT
Chap 07 arp & rarp
PPT
Chap 02 osi model
Chap 09 icmp
Chap 17 dns
Chap 12 tcp
Chap 08 ip
Chap 19 ftp & tftp
Chap 20 smtp, pop, imap
Chap 07 arp & rarp
Chap 02 osi model

What's hot (20)

PPT
Chap 14 rip, ospf
PPT
Chap 05 ip addresses classfless
PPT
Chap 21 snmp
PPT
Chap 27 next generation i pv6
PPT
Chap 06 delivery and routing of ip packets
PPT
Chap 22 www http
PPT
Chap 28 security
PPT
Chap 24 mobile ip
PPT
Chap 04 ip addresses classful
PPT
Chap 13 stream control transmission protocol
PPT
Chap 23 ip over atm
PPT
Chap 10 igmp
PPT
Chap 25 multimedia
PPT
PPT
PPT
PPTX
icmp , igmp
PDF
Meeting 7 : host configuration: dhcp
PPT
Chap 14 rip, ospf
Chap 05 ip addresses classfless
Chap 21 snmp
Chap 27 next generation i pv6
Chap 06 delivery and routing of ip packets
Chap 22 www http
Chap 28 security
Chap 24 mobile ip
Chap 04 ip addresses classful
Chap 13 stream control transmission protocol
Chap 23 ip over atm
Chap 10 igmp
Chap 25 multimedia
icmp , igmp
Meeting 7 : host configuration: dhcp
Ad

Viewers also liked (11)

PPTX
Week13 lec2
PPTX
Week14 lec2
PPTX
PPT
Chap 03 underlying technology
PPT
Chap 15 multicasting
PPT
Chap 12 tcp
PPT
Chap 26 vpn
PDF
CS6551 COMPUTER NETWORKS
PDF
Transport layer services
PPT
OSI Transport Layer
PPTX
Congestion control in tcp
Week13 lec2
Week14 lec2
Chap 03 underlying technology
Chap 15 multicasting
Chap 12 tcp
Chap 26 vpn
CS6551 COMPUTER NETWORKS
Transport layer services
OSI Transport Layer
Congestion control in tcp
Ad

Similar to Chap 11 udp (20)

PPT
User datagram protocol
PPT
Unithhhvuuhuuhgjfjfjgjfjfjfjfnfjfjfjfjfjfjfjfjfjfj4-1.ppt
PPT
Chap 18 telnet
PPT
PPT
Transportlayer.ppt
PDF
PowerPoint_merge (2).pdf
PPT
PowerPoint_merge.ppt
PPT
Unityfyfyufhufhhcfhfufhufhhufufhyrruruuf4-2.ppt
PPT
Chap-13.ppt
PPT
TransportLayerServices.ppt
PPT
Telnethappy
PPT
PDF
Internet technology unit 3
PPTX
User Datagram Protocol
PPT
UDP and TCP header.ppt
PPT
Internet Control Message Protocol for Computer Networks
PPT
Computer Network - Transport Layer Services
PDF
Multipath TCP Upstreaming
PPT
User Datagram protocol For Msc CS
User datagram protocol
Unithhhvuuhuuhgjfjfjgjfjfjfjfnfjfjfjfjfjfjfjfjfjfj4-1.ppt
Chap 18 telnet
Transportlayer.ppt
PowerPoint_merge (2).pdf
PowerPoint_merge.ppt
Unityfyfyufhufhhcfhfufhufhhufufhyrruruuf4-2.ppt
Chap-13.ppt
TransportLayerServices.ppt
Telnethappy
Internet technology unit 3
User Datagram Protocol
UDP and TCP header.ppt
Internet Control Message Protocol for Computer Networks
Computer Network - Transport Layer Services
Multipath TCP Upstreaming
User Datagram protocol For Msc CS

More from Noctorous Jamal (6)

PPT
Chap 18 telnet
PPT
Chap 16 bootp & dhcp
PPT
Chap 01 intro
PPT
Lecture 8 The Communication System Finalterm Slides
PPT
Lecture 7 The Communication System Finalterm Slides
PPT
Lecture 6 The Communication System Finalterm Slides
Chap 18 telnet
Chap 16 bootp & dhcp
Chap 01 intro
Lecture 8 The Communication System Finalterm Slides
Lecture 7 The Communication System Finalterm Slides
Lecture 6 The Communication System Finalterm Slides

Recently uploaded (20)

PDF
Exploratory_Data_Analysis_Fundamentals.pdf
PDF
Visual Aids for Exploratory Data Analysis.pdf
PPTX
Management Information system : MIS-e-Business Systems.pptx
PPTX
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
PPTX
Current and future trends in Computer Vision.pptx
PDF
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
PPTX
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
PPTX
CyberSecurity Mobile and Wireless Devices
PPTX
Information Storage and Retrieval Techniques Unit III
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PDF
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
PPTX
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PDF
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
PPT
Total quality management ppt for engineering students
PDF
III.4.1.2_The_Space_Environment.p pdffdf
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
Abrasive, erosive and cavitation wear.pdf
PDF
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf
Exploratory_Data_Analysis_Fundamentals.pdf
Visual Aids for Exploratory Data Analysis.pdf
Management Information system : MIS-e-Business Systems.pptx
Chemical Technological Processes, Feasibility Study and Chemical Process Indu...
Current and future trends in Computer Vision.pptx
ChapteR012372321DFGDSFGDFGDFSGDFGDFGDFGSDFGDFGFD
Sorting and Hashing in Data Structures with Algorithms, Techniques, Implement...
CyberSecurity Mobile and Wireless Devices
Information Storage and Retrieval Techniques Unit III
August -2025_Top10 Read_Articles_ijait.pdf
Improvement effect of pyrolyzed agro-food biochar on the properties of.pdf
AUTOMOTIVE ENGINE MANAGEMENT (MECHATRONICS).pptx
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
"Array and Linked List in Data Structures with Types, Operations, Implementat...
BIO-INSPIRED HORMONAL MODULATION AND ADAPTIVE ORCHESTRATION IN S-AI-GPT
Total quality management ppt for engineering students
III.4.1.2_The_Space_Environment.p pdffdf
August 2025 - Top 10 Read Articles in Network Security & Its Applications
Abrasive, erosive and cavitation wear.pdf
UNIT no 1 INTRODUCTION TO DBMS NOTES.pdf

Chap 11 udp

  • 1. CChhaapptteerr 1111 UUsseerr DDaattaaggrraamm PPrroottooccooll Objectives Upon completion you will be able to: • Be able to explain process-to-process communication • Know the format of a UDP user datagram • Be able to calculate a UDP checksum • Understand the operation of UDP • Know when it is appropriate to use UDP • Understand the modules in a UDP package TCP/IP Protocol Suite 1
  • 2. Figure 11.1 Position of UDP in the TCP/IP protocol suite TCP/IP Protocol Suite 2
  • 3. 11.1 PROCESS-TO-PROCESS COMMUNICATION Before we examine UDP, we must first uunnddeerrssttaanndd hhoosstt--ttoo--hhoosstt ccoommmmuunniiccaattiioonn aanndd pprroocceessss--ttoo--pprroocceessss ccoommmmuunniiccaattiioonn aanndd tthhee ddiiffffeerreennccee bbeettwweeeenn tthheemm.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: PPoorrtt NNuummbbeerrss SSoocckkeett AAddddrreesssseess TCP/IP Protocol Suite 3
  • 4. Figure 11.2 UDP versus IP TCP/IP Protocol Suite 4
  • 5. Figure 11.3 Port numbers TCP/IP Protocol Suite 5
  • 6. Figure 11.4 IP addresses versus port numbers TCP/IP Protocol Suite 6
  • 7. Figure 11.5 ICANN ranges TCP/IP Protocol Suite 7
  • 8. NNoottee:: The well-known port numbers are less than 1024. TCP/IP Protocol Suite 8
  • 9. TTaabbllee 1111..11 WWeellll--kknnoowwnn ppoorrttss uusseedd wwiitthh UUDDPP TCP/IP Protocol Suite 9
  • 10. ExamplE 1 In UNIX, the well-known ports are stored in a file called /etc/services. Each line in this file gives the name of the server and the well-known port number. We can use the grep utility to extract the line corresponding to the desired application. The following shows the port for TFTP. Note TFTP can use port 69 on either UDP or TCP. $ grep tftp /etc/services tftp 69/tcp tftp 69/udp See Next Slide TCP/IP Protocol Suite 10
  • 11. ExamplE 1 (ContinuEd) SNMP uses two port numbers (161 and 162), each for a different purpose, as we will see in Chapter 21. $ grep snmp /etc/services snmp 161/tcp #Simple Net Mgmt Proto snmp 161/udp #Simple Net Mgmt Proto snmptrap 162/udp #Traps for SNMP TCP/IP Protocol Suite 11
  • 12. Figure 11.6 Socket address TCP/IP Protocol Suite 12
  • 13. 11.2 USER DATAGRAM UDP packets are called user datagrams and have aa ffiixxeedd--ssiizzee hheeaaddeerr ooff 88 bbyytteess.. TCP/IP Protocol Suite 13
  • 14. Figure 11.7 User datagram format TCP/IP Protocol Suite 14
  • 15. NNoottee:: UDP length = IP length − IP header’s length TCP/IP Protocol Suite 15
  • 16. 11.3 CHECKSUM UDP checksum calculation is different from tthhee oonnee ffoorr IIPP aanndd IICCMMPP.. HHeerree tthhee cchheecckkssuumm iinncclluuddeess tthhrreeee sseeccttiioonnss:: aa ppsseeuuddoohheeaaddeerr,, tthhee UUDDPP hheeaaddeerr,, aanndd tthhee ddaattaa ccoommiinngg ffrroomm tthhee aapppplliiccaattiioonn llaayyeerr.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: CChheecckkssuumm CCaallccuullaattiioonn aatt SSeennddeerr CChheecckkssuumm CCaallccuullaattiioonn aatt RReecceeiivveerr OOppttiioonnaall UUssee ooff tthhee CChheecckkssuumm TCP/IP Protocol Suite 16
  • 17. Figure 11.8 Pseudoheader for checksum calculation TCP/IP Protocol Suite 17
  • 18. Figure 11.9 Checksum calculation of a simple UDP user datagram TCP/IP Protocol Suite 18
  • 19. 11.4 UDP OPERATION UDP uses concepts common to the transport layer. TThheessee ccoonncceeppttss wwiillll bbee ddiissccuusssseedd hheerree bbrriieeffllyy,, aanndd tthheenn eexxppaannddeedd iinn tthhee nneexxtt cchhaapptteerr oonn tthhee TTCCPP pprroottooccooll.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: CCoonnnneeccttiioonnlleessss SSeerrvviicceess FFllooww aanndd EErrrroorr CCoonnttrrooll EEnnccaappssuullaattiioonn aanndd DDeeccaappssuullaattiioonn QQuueeuuiinngg MMuullttiipplleexxiinngg aanndd DDeemmuullttiipplleexxiinngg TCP/IP Protocol Suite 19
  • 20. Figure 11.10 Encapsulation and decapsulation TCP/IP Protocol Suite 20
  • 21. Figure 11.11 Queues in UDP TCP/IP Protocol Suite 21
  • 22. Figure 11.12 Multiplexing and demultiplexing TCP/IP Protocol Suite 22
  • 23. 11.5 USE OF UDP We discuss some uses of the UDP pprroottooccooll iinn tthhiiss sseeccttiioonn.. TCP/IP Protocol Suite 23
  • 24. 11.6 UDP PACKAGE To show how UDP handles the sending and receiving ooff UUDDPP ppaacckkeettss,, wwee pprreesseenntt aa ssiimmppllee vveerrssiioonn ooff tthhee UUDDPP ppaacckkaaggee.. TThhee UUDDPP ppaacckkaaggee iinnvvoollvveess ffiivvee ccoommppoonneennttss:: aa ccoonnttrrooll--bblloocckk ttaabbllee,, iinnppuutt qquueeuueess,, aa ccoonnttrrooll--bblloocckk mmoodduullee,, aann iinnppuutt mmoodduullee,, aanndd aann oouuttppuutt mmoodduullee.. TThhee ttooppiiccss ddiissccuusssseedd iinn tthhiiss sseeccttiioonn iinncclluuddee:: CCoonnttrrooll--BBlloocckk TTaabbllee IInnppuutt QQuueeuueess CCoonnttrrooll--BBlloocckk MMoodduullee IInnppuutt MMoodduullee OOuuttppuutt MMoodduullee TCP/IP Protocol Suite 24
  • 25. Figure 11.13 UDP design TCP/IP Protocol Suite 25
  • 26. TTaabbllee 1111..22 TThhee ccoonnttrrooll--bblloocckk ttaabbllee aatt tthhee bbeeggiinnnniinngg ooff eexxaammpplleess TCP/IP Protocol Suite 26
  • 27. ExamplE 2 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. TCP/IP Protocol Suite 27
  • 28. ExamplE 3 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 takes the first FREE entry and inserts the information received. The module does not allocate a queue at this moment because no user datagrams have arrived for this destination (see Table 11.3). See Next Slide TCP/IP Protocol Suite 28
  • 29. TTaabbllee 1111..33 CCoonnttrrooll--bblloocckk ttaabbllee aafftteerr EExxaammppllee 33 TCP/IP Protocol Suite 29
  • 30. ExamplE 4 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). See Table 11.4. See Next Slide TCP/IP Protocol Suite 30
  • 31. TTaabbllee 1111..44 CCoonnttrrooll--bblloocckk aafftteerr EExxaammppllee 44 TCP/IP Protocol Suite 31
  • 32. ExamplE 5 After a few seconds, a user datagram arrives for port 52,222. The input module checks the table and cannot find an 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. TCP/IP Protocol Suite 32