SlideShare une entreprise Scribd logo
1  sur  32
Chapter        11

                   User Datagram
                      Protocol
 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 understand host-to-host
   communication and process-to-process communication and the
   difference between them.




    The topics discussed in this section include:

    Port Numbers
    Socket Addresses




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
Note:

      The well-known port numbers are less
                  than 1024.




TCP/IP Protocol Suite               8
Table 11.1 Well-known ports used with UDP




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 a fixed-size header of
   8 bytes.




TCP/IP Protocol Suite                                        13
Figure 11.7   User datagram format




TCP/IP Protocol Suite                       14
Note:

                   UDP length =
           IP length − IP header’s length




TCP/IP Protocol Suite                  15
11.3 CHECKSUM
   UDP checksum calculation is different from the one for IP and ICMP.
   Here the checksum includes three sections: a pseudoheader, the UDP
   header, and the data coming from the application layer.




    The topics discussed in this section include:

    Checksum Calculation at Sender
    Checksum Calculation at Receiver
    Optional Use of the Checksum




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. These concepts will
   be discussed here briefly, and then expanded in the next chapter on the
   TCP protocol.




    The topics discussed in this section include:

    Connectionless Services
    Flow and Error Control
    Encapsulation and Decapsulation
    Queuing
    Multiplexing and Demultiplexing

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 protocol in this section.




TCP/IP Protocol Suite                                          23
11.6 UDP PACKAGE
   To show how UDP handles the sending and receiving of UDP packets,
   we present a simple version of the UDP package. The UDP package
   involves five components: a control-block table,      input queues, a
   control-block module, an input module, and an output module.




    The topics discussed in this section include:
    Control-Block Table
    Input Queues
    Control-Block Module
    Input Module
    Output Module

TCP/IP Protocol Suite                                        24
Figure 11.13   UDP design




TCP/IP Protocol Suite              25
Table 11.2 The control-block table at the beginning of examples




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
Table 11.3 Control-block table after Example 3




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
Table 11.4 Control-block after Example 4




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

Contenu connexe

Tendances

What Is User Datagram Protocol?
What Is User Datagram Protocol?What Is User Datagram Protocol?
What Is User Datagram Protocol?Simplilearn
 
Transport protocols
Transport protocolsTransport protocols
Transport protocolsOnline
 
Ch 19 Network-layer protocols Section 1
Ch 19  Network-layer protocols Section 1Ch 19  Network-layer protocols Section 1
Ch 19 Network-layer protocols Section 1Hossam El-Deen Osama
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake Alok Tripathi
 
Features of tcp (part 2) .68
Features of tcp  (part 2) .68Features of tcp  (part 2) .68
Features of tcp (part 2) .68myrajendra
 
Multicastingand multicast routing protocols
Multicastingand multicast routing protocolsMulticastingand multicast routing protocols
Multicastingand multicast routing protocolsIffat Anjum
 
Point to point protocol | PPP - Nitish Jadia
Point to point protocol | PPP - Nitish JadiaPoint to point protocol | PPP - Nitish Jadia
Point to point protocol | PPP - Nitish JadiaNitish Jadia
 
TCP- Transmission Control Protocol
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol Akhil .B
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layertmavroidis
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)Kruti Niranjan
 
TCP/IP Protocol Architeture
TCP/IP Protocol ArchitetureTCP/IP Protocol Architeture
TCP/IP Protocol ArchitetureManoj Kumar
 
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSComputer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSKrishna Nanda
 

Tendances (20)

What Is User Datagram Protocol?
What Is User Datagram Protocol?What Is User Datagram Protocol?
What Is User Datagram Protocol?
 
Tcp
TcpTcp
Tcp
 
Transport protocols
Transport protocolsTransport protocols
Transport protocols
 
Tcp IP Model
Tcp IP ModelTcp IP Model
Tcp IP Model
 
Tcp and udp
Tcp and udpTcp and udp
Tcp and udp
 
Ch 19 Network-layer protocols Section 1
Ch 19  Network-layer protocols Section 1Ch 19  Network-layer protocols Section 1
Ch 19 Network-layer protocols Section 1
 
TCP/IP 3-way Handshake
TCP/IP 3-way Handshake TCP/IP 3-way Handshake
TCP/IP 3-way Handshake
 
TCP vs UDP / Sumiet23
TCP vs UDP / Sumiet23TCP vs UDP / Sumiet23
TCP vs UDP / Sumiet23
 
TCP/IP and UDP protocols
TCP/IP and UDP protocolsTCP/IP and UDP protocols
TCP/IP and UDP protocols
 
Features of tcp (part 2) .68
Features of tcp  (part 2) .68Features of tcp  (part 2) .68
Features of tcp (part 2) .68
 
Multicastingand multicast routing protocols
Multicastingand multicast routing protocolsMulticastingand multicast routing protocols
Multicastingand multicast routing protocols
 
Routing protocols
Routing protocolsRouting protocols
Routing protocols
 
Understanding TCP/IP
Understanding TCP/IPUnderstanding TCP/IP
Understanding TCP/IP
 
Point to point protocol | PPP - Nitish Jadia
Point to point protocol | PPP - Nitish JadiaPoint to point protocol | PPP - Nitish Jadia
Point to point protocol | PPP - Nitish Jadia
 
TCP- Transmission Control Protocol
TCP-  Transmission Control Protocol TCP-  Transmission Control Protocol
TCP- Transmission Control Protocol
 
Tcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport LayerTcp Udp Icmp And The Transport Layer
Tcp Udp Icmp And The Transport Layer
 
ARP
ARPARP
ARP
 
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
TCP & UDP ( Transmission Control Protocol and User Datagram Protocol)
 
TCP/IP Protocol Architeture
TCP/IP Protocol ArchitetureTCP/IP Protocol Architeture
TCP/IP Protocol Architeture
 
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLSComputer Communication Networks- TRANSPORT LAYER PROTOCOLS
Computer Communication Networks- TRANSPORT LAYER PROTOCOLS
 

Similaire à User datagram protocol (20)

Chap 11 udp
Chap 11 udpChap 11 udp
Chap 11 udp
 
Chap 13
Chap 13Chap 13
Chap 13
 
Chap 14
Chap 14Chap 14
Chap 14
 
Chap 02 osi model
Chap 02 osi modelChap 02 osi model
Chap 02 osi model
 
Transportlayer.ppt
Transportlayer.pptTransportlayer.ppt
Transportlayer.ppt
 
Chap 18 telnet
Chap 18 telnetChap 18 telnet
Chap 18 telnet
 
IGMP.ppt
IGMP.pptIGMP.ppt
IGMP.ppt
 
Icmp
IcmpIcmp
Icmp
 
Icmp
IcmpIcmp
Icmp
 
Chap 12 tcp
Chap 12 tcpChap 12 tcp
Chap 12 tcp
 
Chap-13.ppt
Chap-13.pptChap-13.ppt
Chap-13.ppt
 
TransportLayerServices.ppt
TransportLayerServices.pptTransportLayerServices.ppt
TransportLayerServices.ppt
 
User Datagram Protocol
User Datagram ProtocolUser Datagram Protocol
User Datagram Protocol
 
Ch11
Ch11Ch11
Ch11
 
UDP and TCP header.ppt
UDP and TCP header.pptUDP and TCP header.ppt
UDP and TCP header.ppt
 
Telnethappy
TelnethappyTelnethappy
Telnethappy
 
Chap 10 igmp
Chap 10 igmpChap 10 igmp
Chap 10 igmp
 
PowerPoint_merge (2).pdf
PowerPoint_merge (2).pdfPowerPoint_merge (2).pdf
PowerPoint_merge (2).pdf
 
PowerPoint_merge.ppt
PowerPoint_merge.pptPowerPoint_merge.ppt
PowerPoint_merge.ppt
 
Transport layer
Transport layer   Transport layer
Transport layer
 

Plus de Mohd Arif

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcpMohd Arif
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarpMohd Arif
 
Project identification
Project identificationProject identification
Project identificationMohd Arif
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniquesMohd Arif
 
Presentation
PresentationPresentation
PresentationMohd Arif
 
Pointers in c
Pointers in cPointers in c
Pointers in cMohd Arif
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peerMohd Arif
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systemsMohd Arif
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdpMohd Arif
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgetingMohd Arif
 
Network management
Network managementNetwork management
Network managementMohd Arif
 
Networing basics
Networing basicsNetworing basics
Networing basicsMohd Arif
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformMohd Arif
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and sslMohd Arif
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psecMohd Arif
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardwareMohd Arif
 
H.323 vs. cops interworking
H.323 vs. cops interworkingH.323 vs. cops interworking
H.323 vs. cops interworkingMohd Arif
 

Plus de Mohd Arif (20)

Bootp and dhcp
Bootp and dhcpBootp and dhcp
Bootp and dhcp
 
Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
Project identification
Project identificationProject identification
Project identification
 
Project evalaution techniques
Project evalaution techniquesProject evalaution techniques
Project evalaution techniques
 
Presentation
PresentationPresentation
Presentation
 
Pointers in c
Pointers in cPointers in c
Pointers in c
 
Peer to-peer
Peer to-peerPeer to-peer
Peer to-peer
 
Overview of current communications systems
Overview of current communications systemsOverview of current communications systems
Overview of current communications systems
 
Overall 23 11_2007_hdp
Overall 23 11_2007_hdpOverall 23 11_2007_hdp
Overall 23 11_2007_hdp
 
Objectives of budgeting
Objectives of budgetingObjectives of budgeting
Objectives of budgeting
 
Network management
Network managementNetwork management
Network management
 
Networing basics
Networing basicsNetworing basics
Networing basics
 
Loaders
LoadersLoaders
Loaders
 
Lists
ListsLists
Lists
 
Iris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platformIris ngx next generation ip based switching platform
Iris ngx next generation ip based switching platform
 
Ip sec and ssl
Ip sec and  sslIp sec and  ssl
Ip sec and ssl
 
Ip security in i psec
Ip security in i psecIp security in i psec
Ip security in i psec
 
Intro to comp. hardware
Intro to comp. hardwareIntro to comp. hardware
Intro to comp. hardware
 
Heap sort
Heap sortHeap sort
Heap sort
 
H.323 vs. cops interworking
H.323 vs. cops interworkingH.323 vs. cops interworking
H.323 vs. cops interworking
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

User datagram protocol

  • 1. Chapter 11 User Datagram Protocol 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 understand host-to-host communication and process-to-process communication and the difference between them. The topics discussed in this section include: Port Numbers Socket Addresses 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. Note: The well-known port numbers are less than 1024. TCP/IP Protocol Suite 8
  • 9. Table 11.1 Well-known ports used with UDP 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 a fixed-size header of 8 bytes. TCP/IP Protocol Suite 13
  • 14. Figure 11.7 User datagram format TCP/IP Protocol Suite 14
  • 15. Note: UDP length = IP length − IP header’s length TCP/IP Protocol Suite 15
  • 16. 11.3 CHECKSUM UDP checksum calculation is different from the one for IP and ICMP. Here the checksum includes three sections: a pseudoheader, the UDP header, and the data coming from the application layer. The topics discussed in this section include: Checksum Calculation at Sender Checksum Calculation at Receiver Optional Use of the Checksum 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. These concepts will be discussed here briefly, and then expanded in the next chapter on the TCP protocol. The topics discussed in this section include: Connectionless Services Flow and Error Control Encapsulation and Decapsulation Queuing Multiplexing and Demultiplexing 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 protocol in this section. TCP/IP Protocol Suite 23
  • 24. 11.6 UDP PACKAGE To show how UDP handles the sending and receiving of UDP packets, we present a simple version of the UDP package. The UDP package involves five components: a control-block table, input queues, a control-block module, an input module, and an output module. The topics discussed in this section include: Control-Block Table Input Queues Control-Block Module Input Module Output Module TCP/IP Protocol Suite 24
  • 25. Figure 11.13 UDP design TCP/IP Protocol Suite 25
  • 26. Table 11.2 The control-block table at the beginning of examples 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. Table 11.3 Control-block table after Example 3 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. Table 11.4 Control-block after Example 4 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