SlideShare a Scribd company logo
1 of 11
Computer Networks
User Datagram Protocol
Prepared by,
P.Nivetha,
Asst.Prof,
Dept. of BCA,
Bon Secours College for Women,
Thanjavur
UDP
• It is a connectionless, unreliable transport
protocol.
• It performs very limited error checking.
• UDP is a very simple protocol using a minimum of
overhead.
• If a process wants to send a small message it can
use UDP and does not care much about
reliability.
• UDP takes much less interaction between the
sender and receiver than using TCP or SCTP.
1. User Datagram
• UDP packets, called user datagram's, have a
fixed-size header of 8 bytes.
The fields are as follows:
1. Source port number.
2. Destination port number.
3. Length.
4. Checksum.
i)Source port number
• It used by the process running on the source
host.
• It is 16 bits long, which means that the port
number can range from 0 to 65,535.
• If source host is the client(sending a Req)- is
called as ephemeral port number requested
by the process.
• If the source host is the server(Sending a
Resp)- known as well-known port number.
ii) Destination port number
• It used by the process running on the
destination host.
• It is also 16 bits long.
• If the destination host is the server(sending a
request)- known as well-known port number.
• If the destination host is the client(sending a
response)- called as ephemeral port number.
iii) Length
• 16-bit field that defines the total length of the
user datagram, header & data.
• Has a total length of 0 to 65,535 bytes.
• A user datagram is encapsulated in an IP
datagram.
• There is a field in the IP datagram that defines the
total length.
• There is another field in the IP datagram that
defines the length of the header.
UDP length = IP length - IP header's length
iv) Checksum
• It used to detect errors over the entire user datagram ,header &data.
• The checksum is used in the Internet by several protocols.
Example 10.18
 Suppose our data is a list of five 4-bit numbers that we want to send
to a destination.
 In addition to sending these numbers, we send the sum of the
numbers.
 For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11,
12,0,6,36), where 36 is the sum of the original numbers.
 The receiver adds the five numbers and compares the result with the
sum.
 If the two are the same, the receiver assumes no error, accepts the
five numbers, and discards the sum.
 Otherwise, there is an error somewhere and the data are not
accepted.
Continued…
Example 10.19
 We can make the job of the receiver easier if
we send the negative (complement) of the
sum, called the checksum.
In this case, we send (7, 11, 12,0,6, -36).
 The receiver can add all the numbers received
(including the checksum).
 If the result is 0, it assumes no error;
otherwise, there is an error.
2. UDP Operation
• UDP uses concepts common to the transport
layer.
1. Connectionless Services.
2. Flow and Error Control.
3. Encapsulation and Decapsulation.
4. Queuing
Use of UDP
• UDP is suitable for a process that requires simple
request-response communication.
• UDP is suitable for a process with internal flow
and error control mechanisms.
• UDP is a suitable transport protocol for
multicasting.
• UDP is used for management processes such as
SNMP.
• UDP is used for some route updating protocols
such as Routing Information Protocol (RIP).
Thank You

More Related Content

What's hot (20)

Free space managment46
Free space managment46Free space managment46
Free space managment46
 
Network layer tanenbaum
Network layer tanenbaumNetwork layer tanenbaum
Network layer tanenbaum
 
Media Access Control
Media Access ControlMedia Access Control
Media Access Control
 
Code generation
Code generationCode generation
Code generation
 
Applet life cycle
Applet life cycleApplet life cycle
Applet life cycle
 
Java threads
Java threadsJava threads
Java threads
 
GO BACK N PROTOCOL
GO BACK N PROTOCOLGO BACK N PROTOCOL
GO BACK N PROTOCOL
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
Deadlock
DeadlockDeadlock
Deadlock
 
Looping statements in Java
Looping statements in JavaLooping statements in Java
Looping statements in Java
 
Multiplexing
MultiplexingMultiplexing
Multiplexing
 
TCP and UDP
TCP and UDP TCP and UDP
TCP and UDP
 
Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)Sliding window protocol(ARQ technique)
Sliding window protocol(ARQ technique)
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and ExamplesBackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Transport Layer In Computer Network
Transport Layer In Computer NetworkTransport Layer In Computer Network
Transport Layer In Computer Network
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithm
 
Application Layer
Application Layer Application Layer
Application Layer
 
Interface in java
Interface in javaInterface in java
Interface in java
 
String matching algorithms
String matching algorithmsString matching algorithms
String matching algorithms
 

Similar to Unit 4 UDP

Computer networks transport layer
Computer networks  transport layerComputer networks  transport layer
Computer networks transport layerjamunaashok
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer servicesMelvin Cabatuan
 
TRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptxTRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptxutkarshlodhi4
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocolIshtdeep Hora
 
UDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithmUDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithmAyesha Tahir
 
Mobile computing unit-5
Mobile computing unit-5Mobile computing unit-5
Mobile computing unit-5Ramesh Babu
 
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & AnomaliesREMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & AnomaliesRhydham Joshi
 
Tcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerTcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerFaizan Shaikh
 
tcpheader-151221111244.pdf
tcpheader-151221111244.pdftcpheader-151221111244.pdf
tcpheader-151221111244.pdfEnumulaBhargava1
 
Chapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7thChapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7thAndy Juan Sarango Veliz
 
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptxVINAYTANWAR18
 
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 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
 
Transport Layer
Transport LayerTransport Layer
Transport Layertmavroidis
 

Similar to Unit 4 UDP (20)

Computer networks transport layer
Computer networks  transport layerComputer networks  transport layer
Computer networks transport layer
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
 
TRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptxTRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptx
 
User datagram protocol
User datagram protocolUser datagram protocol
User datagram protocol
 
UDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithmUDP and TCP Protocol & Encrytion and its algorithm
UDP and TCP Protocol & Encrytion and its algorithm
 
Mobile computing unit-5
Mobile computing unit-5Mobile computing unit-5
Mobile computing unit-5
 
Transport layer protocols : TCP and UDP
Transport layer protocols  : TCP and UDPTransport layer protocols  : TCP and UDP
Transport layer protocols : TCP and UDP
 
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & AnomaliesREMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
REMnux tutorial 4.1 - Datagrams, Fragmentation & Anomalies
 
Tcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication headerTcp header/IP Header/Authentication header
Tcp header/IP Header/Authentication header
 
tcpheader-151221111244.pdf
tcpheader-151221111244.pdftcpheader-151221111244.pdf
tcpheader-151221111244.pdf
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
CN UNIT IV ..pptx
CN UNIT IV ..pptxCN UNIT IV ..pptx
CN UNIT IV ..pptx
 
Transport layer
Transport layerTransport layer
Transport layer
 
Chapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7thChapter 3 - Computer Networking a top-down Approach 7th
Chapter 3 - Computer Networking a top-down Approach 7th
 
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx1.1.2 - Concept of Network and TCP_IP Model (2).pptx
1.1.2 - Concept of Network and TCP_IP Model (2).pptx
 
User Datagram Protocol
User Datagram ProtocolUser Datagram Protocol
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 & UDP ( Transmission Control Protocol and User Datagram 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
 
Transport Layer
Transport LayerTransport Layer
Transport Layer
 
07 coms 525 tcpip - udp
07    coms 525 tcpip - udp07    coms 525 tcpip - udp
07 coms 525 tcpip - udp
 

Recently uploaded

Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxabhijeetpadhi001
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 

Recently uploaded (20)

OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
MICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptxMICROBIOLOGY biochemical test detailed.pptx
MICROBIOLOGY biochemical test detailed.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 

Unit 4 UDP

  • 1. Computer Networks User Datagram Protocol Prepared by, P.Nivetha, Asst.Prof, Dept. of BCA, Bon Secours College for Women, Thanjavur
  • 2. UDP • It is a connectionless, unreliable transport protocol. • It performs very limited error checking. • UDP is a very simple protocol using a minimum of overhead. • If a process wants to send a small message it can use UDP and does not care much about reliability. • UDP takes much less interaction between the sender and receiver than using TCP or SCTP.
  • 3. 1. User Datagram • UDP packets, called user datagram's, have a fixed-size header of 8 bytes. The fields are as follows: 1. Source port number. 2. Destination port number. 3. Length. 4. Checksum.
  • 4. i)Source port number • It used by the process running on the source host. • It is 16 bits long, which means that the port number can range from 0 to 65,535. • If source host is the client(sending a Req)- is called as ephemeral port number requested by the process. • If the source host is the server(Sending a Resp)- known as well-known port number.
  • 5. ii) Destination port number • It used by the process running on the destination host. • It is also 16 bits long. • If the destination host is the server(sending a request)- known as well-known port number. • If the destination host is the client(sending a response)- called as ephemeral port number.
  • 6. iii) Length • 16-bit field that defines the total length of the user datagram, header & data. • Has a total length of 0 to 65,535 bytes. • A user datagram is encapsulated in an IP datagram. • There is a field in the IP datagram that defines the total length. • There is another field in the IP datagram that defines the length of the header. UDP length = IP length - IP header's length
  • 7. iv) Checksum • It used to detect errors over the entire user datagram ,header &data. • The checksum is used in the Internet by several protocols. Example 10.18  Suppose our data is a list of five 4-bit numbers that we want to send to a destination.  In addition to sending these numbers, we send the sum of the numbers.  For example, if the set of numbers is (7, 11, 12, 0, 6), we send (7, 11, 12,0,6,36), where 36 is the sum of the original numbers.  The receiver adds the five numbers and compares the result with the sum.  If the two are the same, the receiver assumes no error, accepts the five numbers, and discards the sum.  Otherwise, there is an error somewhere and the data are not accepted.
  • 8. Continued… Example 10.19  We can make the job of the receiver easier if we send the negative (complement) of the sum, called the checksum. In this case, we send (7, 11, 12,0,6, -36).  The receiver can add all the numbers received (including the checksum).  If the result is 0, it assumes no error; otherwise, there is an error.
  • 9. 2. UDP Operation • UDP uses concepts common to the transport layer. 1. Connectionless Services. 2. Flow and Error Control. 3. Encapsulation and Decapsulation. 4. Queuing
  • 10. Use of UDP • UDP is suitable for a process that requires simple request-response communication. • UDP is suitable for a process with internal flow and error control mechanisms. • UDP is a suitable transport protocol for multicasting. • UDP is used for management processes such as SNMP. • UDP is used for some route updating protocols such as Routing Information Protocol (RIP).