SlideShare a Scribd company logo
8.1
Chapter 8
Transport Layer:
UDP and TCP
 Computer Networks
 Al-Mustansiryah University
 Elec. Eng. Department College of Engineering
Fourth Year Class
8.2
8-1 PROCESS-TO-PROCESS DELIVERY
The transport layer is responsible for process-to-process
delivery—the delivery of a packet, part of a message,
from one process to another. Two processes
communicate in a client/server relationship, as we will
see later.
8.3
•Connection-oriented Requires a session connection (analogous to a phone
call) be established before any data can be sent. This method is often called a
"reliable" network service. It can guarantee that data will arrive in the same
order. Connection-oriented services set up virtual links between end systems
through a network.
•Connectionless Does not require a session connection between sender and
receiver. The sender simply starts sending packets (called datagrams) to the
destination. This service does not have the reliability of the connection-oriented
method, but it is useful for periodic burst transfers.
8.4
8-2 USER DATAGRAM PROTOCOL (UDP)
The User Datagram Protocol (UDP) is called a
connectionless, unreliable transport protocol. It does not
add anything to the services of IP except to provide
process-to-process communication instead of host-to-
host communication.
8.5
Figure 8.9 User datagram format
8.6
Example 1 :The following is a dump of a UDP header in hexadecimal format.
CB84000D001C001C
a. What is the source port number?
b. What is the destination port number?
c. What is the total length of the user datagram?
d. What is the length of the data?
8.7
Solution:
a. The source port number is the first four hexadecimal digits (CB84), which
means that the source port number is 52100.
b. The destination port number is the second four hexadecimal digits (000D),
which means that the destination port number is 13.
c. The third four hexadecimal digits (001C) define the length of the whole UDP
packet as 28 bytes.
d. The length of the data is the length of the whole packet minus the length of the
header, or 28 – 8 = 20 bytes.
8.8
UDP length
= IP length – IP header’s length
Note
8.9
8-3 TCP
TCP is a connection-oriented protocol; it creates a
virtual connection between two TCPs to send data. In
addition, TCP uses flow and error control mechanisms
at the transport level.
8.10
The bytes of data being transferred in
each connection are numbered by TCP.
The numbering starts with a randomly
generated number.
Note
8.11
Example 2 :Suppose a TCP connection is transferring a file of 5,000 bytes. The first
byte is numbered 10,001. What are the sequence numbers for each segment if data are
sent in five segments, each carrying 1,000 bytes?
8.12
The value in the sequence number field
of a segment defines the
number of the first data byte
contained in that segment.
Note
8.13
The value of the acknowledgment field
in a segment defines
the number of the next byte a party
expects to receive.
The acknowledgment number is
cumulative.
Note
8.14
Figure 8.16 TCP segment format
8.15
Source port address. This is a 16-bit field that defines the port number of the
application program in the host that is sending the segment
Destination port address. This is a 16-bit field that defines the port number of the
application program in the host that is receiving the segment
Sequence number. This 32-bit field defines the number assigned to the first byte of data
contained in this segment
Acknowledgment number. This 32-bit field defines the byte number that the receiver
of the segment is expecting to receive from the other party. If the receiver of the segment
has successfully received byte number x from the other party, it returns x + 1 as the
acknowledgment number.
8.16
Header length. This 4-bit field indicates the number of 4-byte words in the TCP
header. The length of the header can be between 20 and 60 bytes. Therefore, the value
of this field is always between 5 (5* 4= 20) and 15 (15 * 4= 60).
Reserved. This is a 6-bit field reserved for future use.
Control. This field defines 6 different control bits or flags
Window size. This field defines the window size of the sending TCP in bytes. Note
that the length of this field is 16 bits, which means that the maximum size of the
window is 65,535 bytes.
Checksum. This 16-bit field contains the checksum
Urgent pointer. This 16-bit field, which is valid only if the urgent flag is set, is used
when the segment contains urgent data
8.17
Table 8.3 Description of flags in the control field
8.18
Flow Control
Flow control assists the reliability of TCP transmission by
adjusting the effective rate of data flow between the two services
in the session. Window Size field in the TCP header specifies the
amount of data that can be transmitted before an
acknowledgement must be received.
8.19
Figure 8.18 Connection establishment using three-way handshaking
8.20
A SYN segment cannot carry data, but it
consumes one sequence number.
A SYN + ACK segment cannot
carry data, but does consume one
sequence number.
An ACK segment, if carrying no data,
consumes no sequence number.
8.21
Figure 8.19 Data transfer
8.22
Figure 8.20 Connection termination using three-way handshaking
8.23
The FIN segment consumes one
sequence number if it does
not carry data.
The FIN + ACK segment consumes
one sequence number if it
does not carry data.
8.24
Figure 8.22 Sliding window
rwnd = buffer size − number of waiting bytes to be pulled
8.25
What is the value of the receiver window (rwnd) for
host A if the receiver, host B, has a buffer size of 5000
bytes and 1000 bytes of received and unprocessed data?
Example 8.4
Solution
The value of rwnd = 5000 − 1000 = 4000. Host B can
receive only 4000 bytes of data before overflowing its
buffer. Host B advertises this value in its next segment
to A.
8.26
What is the size of the window for host A if the value of
rwnd is 3000 bytes and the value of cwnd is 3500 bytes?
Example 8.5
Solution
The size of the window is the smaller of rwnd and cwnd,
which is 3000 bytes.
8.27
TCP UDP
Connection
TCP is a connection-oriented
protocol.
UDP is a connectionless protocol.
Ordering of
data packets
TCP rearranges data packets in
the order specified.
UDP has no inherent order as all
packets are independent of each
other.
Speed of
transfer
The speed for TCP is slower
than UDP.
UDP is faster because there is no
error-checking for packets.
Reliability
There is absolute guarantee
that the data transferred
remains intact and arrives in
the same order in which it was
sent.
There is no guarantee that the
messages or packets sent would
reach at all.
Header Size TCP header size is 20 bytes UDP Header size is 8 bytes.
8.28
TCP UDP
Streaming
of data
Data is read as a byte stream, Packets are sent individually
Data Flow
Control
TCP does Flow Control. TCP
requires three packets to set up a
socket connection,
UDP does not have an option for
flow control
Acknowle
dgement
Acknowledgement segments No Acknowledgment
Ad

More Related Content

What's hot (20)

IP addressing seminar ppt
IP addressing seminar pptIP addressing seminar ppt
IP addressing seminar ppt
Smriti Rastogi
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
rahul kundu
 
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
 
MD-5 : Algorithm
MD-5 : AlgorithmMD-5 : Algorithm
MD-5 : Algorithm
Sahil Kureel
 
Routing Information Protocol
Routing Information ProtocolRouting Information Protocol
Routing Information Protocol
Kashif Latif
 
RTP & RTCP
RTP & RTCPRTP & RTCP
RTP & RTCP
VijayIndra Shekhawat
 
Congestion control in TCP
Congestion control in TCPCongestion control in TCP
Congestion control in TCP
selvakumar_b1985
 
Ch6 bandwidth utilisation multiplexing and spreading
Ch6 bandwidth utilisation multiplexing and spreadingCh6 bandwidth utilisation multiplexing and spreading
Ch6 bandwidth utilisation multiplexing and spreading
Alban Landry MOUNGALA
 
Packet scheduling
Packet schedulingPacket scheduling
Packet scheduling
Manuel Pizarro
 
Mobile transportlayer
Mobile transportlayerMobile transportlayer
Mobile transportlayer
Rahul Hada
 
The medium access sublayer
 The medium  access sublayer The medium  access sublayer
The medium access sublayer
Lal Bahadur Gehlot
 
Tcp and udp
Tcp and udpTcp and udp
Tcp and udp
Ahmad Khalid Nasrat
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networking
Harshita Yadav
 
Tcp
TcpTcp
Tcp
Varsha Kumar
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
Melvin Cabatuan
 
Tcp presentation
Tcp presentationTcp presentation
Tcp presentation
Ramla Sheikh
 
Flow Control
Flow ControlFlow Control
Flow Control
selvakumar_b1985
 
Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point Protocol
Phan Vuong
 
csma ca
 csma ca csma ca
csma ca
Haroon Khan
 
Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)Chapter 3 : User Datagram Protocol (UDP)
Chapter 3 : User Datagram Protocol (UDP)
Ministry of Higher Education
 
IP addressing seminar ppt
IP addressing seminar pptIP addressing seminar ppt
IP addressing seminar ppt
Smriti Rastogi
 
Introduction of tcp, ip & udp
Introduction of tcp, ip & udpIntroduction of tcp, ip & udp
Introduction of tcp, ip & udp
rahul kundu
 
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
 
Routing Information Protocol
Routing Information ProtocolRouting Information Protocol
Routing Information Protocol
Kashif Latif
 
Ch6 bandwidth utilisation multiplexing and spreading
Ch6 bandwidth utilisation multiplexing and spreadingCh6 bandwidth utilisation multiplexing and spreading
Ch6 bandwidth utilisation multiplexing and spreading
Alban Landry MOUNGALA
 
Mobile transportlayer
Mobile transportlayerMobile transportlayer
Mobile transportlayer
Rahul Hada
 
switching techniques in data communication and networking
switching techniques in data communication and networkingswitching techniques in data communication and networking
switching techniques in data communication and networking
Harshita Yadav
 
Transport layer services
Transport layer servicesTransport layer services
Transport layer services
Melvin Cabatuan
 
Point To Point Protocol
Point To Point ProtocolPoint To Point Protocol
Point To Point Protocol
Phan Vuong
 

Similar to Transport layer udp and tcp network (20)

MK-PPT Chapter 5.ppt advanced computer networks
MK-PPT Chapter 5.ppt advanced computer networksMK-PPT Chapter 5.ppt advanced computer networks
MK-PPT Chapter 5.ppt advanced computer networks
1JT19IS042SandhyaH
 
04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt
dhivyak49
 
TCP and UDP comparison and itsi application.pptx
TCP and UDP comparison and itsi application.pptxTCP and UDP comparison and itsi application.pptx
TCP and UDP comparison and itsi application.pptx
Mugabo4
 
20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks 20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks
Kathirvel Ayyaswamy
 
Transport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxTransport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptx
AnkitKumar891632
 
transport layer
transport layertransport layer
transport layer
BishalWosti1
 
Unit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptxUnit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptx
1136NayanSonawane
 
計概
計概計概
計概
allan3160
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
Ahmed Elnaggar
 
Osi model
Osi modelOsi model
Osi model
Anuj Kumar
 
Transport layer.pptx
Transport layer.pptxTransport layer.pptx
Transport layer.pptx
MohammedAnas871930
 
2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt
2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt
2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt
vihashni2310922
 
TCP/IP Basics
TCP/IP BasicsTCP/IP Basics
TCP/IP Basics
sanjoysanyal
 
Lec6
Lec6Lec6
Lec6
amrnaser3
 
unit 3 ns.ppt
unit 3 ns.pptunit 3 ns.ppt
unit 3 ns.ppt
Kamesh486870
 
UNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptxUNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptx
LAVANYAsrietacin
 
Transport layer
Transport layer   Transport layer
Transport layer
AnusuaBasu
 
Cs8591 u4
Cs8591 u4Cs8591 u4
Cs8591 u4
Kathirvel Ayyaswamy
 
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
Rhydham Joshi
 
Transmission control protocol (TCP) Group 6 (1).pptx
Transmission control protocol (TCP) Group 6 (1).pptxTransmission control protocol (TCP) Group 6 (1).pptx
Transmission control protocol (TCP) Group 6 (1).pptx
TayybaGhaffar1
 
MK-PPT Chapter 5.ppt advanced computer networks
MK-PPT Chapter 5.ppt advanced computer networksMK-PPT Chapter 5.ppt advanced computer networks
MK-PPT Chapter 5.ppt advanced computer networks
1JT19IS042SandhyaH
 
04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt04 MK-PPT End-to-End Protocols.ppt
04 MK-PPT End-to-End Protocols.ppt
dhivyak49
 
TCP and UDP comparison and itsi application.pptx
TCP and UDP comparison and itsi application.pptxTCP and UDP comparison and itsi application.pptx
TCP and UDP comparison and itsi application.pptx
Mugabo4
 
20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks 20CS2007 Computer Communication Networks
20CS2007 Computer Communication Networks
Kathirvel Ayyaswamy
 
Transport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxTransport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptx
AnkitKumar891632
 
2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt
2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt
2-CN_UDP_TCP_f7a922763a77c5ea2bc334f8e36c71f8.ppt
vihashni2310922
 
UNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptxUNIT IV-Transport Layer.pptx
UNIT IV-Transport Layer.pptx
LAVANYAsrietacin
 
Transport layer
Transport layer   Transport layer
Transport layer
AnusuaBasu
 
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
Rhydham Joshi
 
Transmission control protocol (TCP) Group 6 (1).pptx
Transmission control protocol (TCP) Group 6 (1).pptxTransmission control protocol (TCP) Group 6 (1).pptx
Transmission control protocol (TCP) Group 6 (1).pptx
TayybaGhaffar1
 
Ad

Recently uploaded (20)

Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023
Rajesh Prasad
 
🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...
🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...
🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...
SanjeetMishra29
 
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control Monthly May 2025
Water Industry Process Automation & Control
 
Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...
Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...
Optimizing Reinforced Concrete Cantilever Retaining Walls Using Gases Brownia...
Journal of Soft Computing in Civil Engineering
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
Jimmy Lai
 
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdfGROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
kemimafe11
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptxUnleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
SanjeetMishra29
 
vtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdfvtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdf
RaghavaGD1
 
Deepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber ThreatsDeepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber Threats
RaviKumar256934
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB
22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB
22PCOAM16_MACHINE_LEARNING_UNIT_IV_NOTES_with_QB
Guru Nanak Technical Institutions
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
22PCOAM16 ML Unit 3 Full notes PDF & QB.pdf
Guru Nanak Technical Institutions
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software ApplicationsJacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia - Excels In Optimizing Software Applications
Jacob Murphy Australia
 
Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023Urban Transport Infrastructure September 2023
Urban Transport Infrastructure September 2023
Rajesh Prasad
 
🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...
🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...
🚀 TDX Bengaluru 2025 Unwrapped: Key Highlights, Innovations & Trailblazer Tak...
SanjeetMishra29
 
AI Chatbots & Software Development Teams
AI Chatbots & Software Development TeamsAI Chatbots & Software Development Teams
AI Chatbots & Software Development Teams
Joe Krall
 
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
[PyCon US 2025] Scaling the Mountain_ A Framework for Tackling Large-Scale Te...
Jimmy Lai
 
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdfGROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
GROUP 2 - MANUFACTURE OF LIME, GYPSUM AND CEMENT.pdf
kemimafe11
 
Frontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend EngineersFrontend Architecture Diagram/Guide For Frontend Engineers
Frontend Architecture Diagram/Guide For Frontend Engineers
Michael Hertzberg
 
Slide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptxSlide share PPT of SOx control technologies.pptx
Slide share PPT of SOx control technologies.pptx
vvsasane
 
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx22PCOAM16 Unit 3 Session 23  Different ways to Combine Classifiers.pptx
22PCOAM16 Unit 3 Session 23 Different ways to Combine Classifiers.pptx
Guru Nanak Technical Institutions
 
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFTDeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
DeFAIMint | 🤖Mint to DeFAI. Vibe Trading as NFT
Kyohei Ito
 
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptxUnleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
Unleashing the Power of Salesforce Flows &amp_ Slack Integration!.pptx
SanjeetMishra29
 
vtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdfvtc2018fall_otfs_tutorial_presentation_1.pdf
vtc2018fall_otfs_tutorial_presentation_1.pdf
RaghavaGD1
 
Deepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber ThreatsDeepfake Phishing: A New Frontier in Cyber Threats
Deepfake Phishing: A New Frontier in Cyber Threats
RaviKumar256934
 
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
01.คุณลักษณะเฉพาะของอุปกรณ์_pagenumber.pdf
PawachMetharattanara
 
VISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated detailsVISHAL KUMAR SINGH Latest Resume with updated details
VISHAL KUMAR SINGH Latest Resume with updated details
Vishal Kumar Singh
 
Ad

Transport layer udp and tcp network

  • 1. 8.1 Chapter 8 Transport Layer: UDP and TCP  Computer Networks  Al-Mustansiryah University  Elec. Eng. Department College of Engineering Fourth Year Class
  • 2. 8.2 8-1 PROCESS-TO-PROCESS DELIVERY The transport layer is responsible for process-to-process delivery—the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, as we will see later.
  • 3. 8.3 •Connection-oriented Requires a session connection (analogous to a phone call) be established before any data can be sent. This method is often called a "reliable" network service. It can guarantee that data will arrive in the same order. Connection-oriented services set up virtual links between end systems through a network. •Connectionless Does not require a session connection between sender and receiver. The sender simply starts sending packets (called datagrams) to the destination. This service does not have the reliability of the connection-oriented method, but it is useful for periodic burst transfers.
  • 4. 8.4 8-2 USER DATAGRAM PROTOCOL (UDP) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It does not add anything to the services of IP except to provide process-to-process communication instead of host-to- host communication.
  • 5. 8.5 Figure 8.9 User datagram format
  • 6. 8.6 Example 1 :The following is a dump of a UDP header in hexadecimal format. CB84000D001C001C a. What is the source port number? b. What is the destination port number? c. What is the total length of the user datagram? d. What is the length of the data?
  • 7. 8.7 Solution: a. The source port number is the first four hexadecimal digits (CB84), which means that the source port number is 52100. b. The destination port number is the second four hexadecimal digits (000D), which means that the destination port number is 13. c. The third four hexadecimal digits (001C) define the length of the whole UDP packet as 28 bytes. d. The length of the data is the length of the whole packet minus the length of the header, or 28 – 8 = 20 bytes.
  • 8. 8.8 UDP length = IP length – IP header’s length Note
  • 9. 8.9 8-3 TCP TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level.
  • 10. 8.10 The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. Note
  • 11. 8.11 Example 2 :Suppose a TCP connection is transferring a file of 5,000 bytes. The first byte is numbered 10,001. What are the sequence numbers for each segment if data are sent in five segments, each carrying 1,000 bytes?
  • 12. 8.12 The value in the sequence number field of a segment defines the number of the first data byte contained in that segment. Note
  • 13. 8.13 The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative. Note
  • 14. 8.14 Figure 8.16 TCP segment format
  • 15. 8.15 Source port address. This is a 16-bit field that defines the port number of the application program in the host that is sending the segment Destination port address. This is a 16-bit field that defines the port number of the application program in the host that is receiving the segment Sequence number. This 32-bit field defines the number assigned to the first byte of data contained in this segment Acknowledgment number. This 32-bit field defines the byte number that the receiver of the segment is expecting to receive from the other party. If the receiver of the segment has successfully received byte number x from the other party, it returns x + 1 as the acknowledgment number.
  • 16. 8.16 Header length. This 4-bit field indicates the number of 4-byte words in the TCP header. The length of the header can be between 20 and 60 bytes. Therefore, the value of this field is always between 5 (5* 4= 20) and 15 (15 * 4= 60). Reserved. This is a 6-bit field reserved for future use. Control. This field defines 6 different control bits or flags Window size. This field defines the window size of the sending TCP in bytes. Note that the length of this field is 16 bits, which means that the maximum size of the window is 65,535 bytes. Checksum. This 16-bit field contains the checksum Urgent pointer. This 16-bit field, which is valid only if the urgent flag is set, is used when the segment contains urgent data
  • 17. 8.17 Table 8.3 Description of flags in the control field
  • 18. 8.18 Flow Control Flow control assists the reliability of TCP transmission by adjusting the effective rate of data flow between the two services in the session. Window Size field in the TCP header specifies the amount of data that can be transmitted before an acknowledgement must be received.
  • 19. 8.19 Figure 8.18 Connection establishment using three-way handshaking
  • 20. 8.20 A SYN segment cannot carry data, but it consumes one sequence number. A SYN + ACK segment cannot carry data, but does consume one sequence number. An ACK segment, if carrying no data, consumes no sequence number.
  • 22. 8.22 Figure 8.20 Connection termination using three-way handshaking
  • 23. 8.23 The FIN segment consumes one sequence number if it does not carry data. The FIN + ACK segment consumes one sequence number if it does not carry data.
  • 24. 8.24 Figure 8.22 Sliding window rwnd = buffer size − number of waiting bytes to be pulled
  • 25. 8.25 What is the value of the receiver window (rwnd) for host A if the receiver, host B, has a buffer size of 5000 bytes and 1000 bytes of received and unprocessed data? Example 8.4 Solution The value of rwnd = 5000 − 1000 = 4000. Host B can receive only 4000 bytes of data before overflowing its buffer. Host B advertises this value in its next segment to A.
  • 26. 8.26 What is the size of the window for host A if the value of rwnd is 3000 bytes and the value of cwnd is 3500 bytes? Example 8.5 Solution The size of the window is the smaller of rwnd and cwnd, which is 3000 bytes.
  • 27. 8.27 TCP UDP Connection TCP is a connection-oriented protocol. UDP is a connectionless protocol. Ordering of data packets TCP rearranges data packets in the order specified. UDP has no inherent order as all packets are independent of each other. Speed of transfer The speed for TCP is slower than UDP. UDP is faster because there is no error-checking for packets. Reliability There is absolute guarantee that the data transferred remains intact and arrives in the same order in which it was sent. There is no guarantee that the messages or packets sent would reach at all. Header Size TCP header size is 20 bytes UDP Header size is 8 bytes.
  • 28. 8.28 TCP UDP Streaming of data Data is read as a byte stream, Packets are sent individually Data Flow Control TCP does Flow Control. TCP requires three packets to set up a socket connection, UDP does not have an option for flow control Acknowle dgement Acknowledgement segments No Acknowledgment
  翻译: