SlideShare a Scribd company logo
Module–2
• Transport Layer
Introduction and Transport-Layer
Services
• A transport-layer protocol provides for logical
communication between application
processes running on different hosts.
• Transport-layer protocols are implemented in
the end systems but not in network routers.
• On the sending side, the transport layer
converts the application-layer messages it
receives from a sending application process
into transport-layer packets, known as
transport-layer segments in Internet
terminology.
• The transport layer then passes the segment to
the network layer at the sending end system,
where the segment is encapsulated within a
network-layer packet (a datagram) and sent to
the destination.
• On the receiving side, the network layer
extracts the transport-layer segment from the
datagram and passes the segment up to the
transport layer.
• The transport layer then processes the received
segment, making the data in the segment
available to the receiving application.
Relationship Between Transport and
Network Layers
• A transport-layer protocol provides logical
communication between processes running on
different hosts.
• A network-layer protocol provides logical
communication between hosts.
• Transport-layer protocols live in the end
systems.
• Within an end system, a transport protocol
moves messages from application processes to
the network edge and vice versa.
• The services that a transport protocol can
provide are often constrained by the service
model of the underlying network-layer
protocol.
Overview of the Transport Layer in the
Internet
• A TCP/IP network, makes two distinct
transport-layer protocols available to the
application layer - UDP and TCP.
• In an Internet context, we refer to the transport
layer packet as a segment.
• The Internet literature also refers to the
transport-layer packet for TCP as a segment
but often refers to the packet for UDP as a
datagram.
• But this same Internet literature also uses the
term datagram for the network-layer packet.
• It is less confusing to refer to both TCP and
UDP packets as segments, and reserve the term
datagram for the network-layer packet.
• The Internet’s network-layer protocol has a
name—IP, for Internet Protocol.
• IP provides logical communication between
hosts.
• The IP service model is a best-effort delivery
service.
• IP is said to be an unreliable service.
• Extending host-to-host delivery to process-to-
process delivery is called transport-layer
multiplexing and demultiplexing.
• UDP and TCP also provide integrity checking
by including error-detection fields in their
segments’ headers.
• like IP, UDP is an unreliable service.
• TCP provides reliable data transfer-Using
flow control, sequence numbers,
acknowledgments, and timers.
• TCP thus converts IP’s unreliable service
between end systems into a reliable data
transport service between processes.
• TCP also provides congestion control.
Multiplexing and Demultiplexing
• A process can have one or more sockets, doors
through which data passes from the network to
the process and through which data passes
from the process to the network.
• Each socket has a unique identifier.
• The format of the identifier depends on
whether the socket is a UDP or a TCP socket.
• At the receiving end, the transport layer
examines the set of fields to identify the
receiving socket and then directs the segment
to that socket.
• This job of delivering the data in a transport-
layer segment to the correct socket is called
demultiplexing.
• The job of gathering data chunks at the source
host from different sockets, encapsulating each
data chunk with header information to create
segments.
• This job of passing the segments to the
network layer is called multiplexing.
Transport-layer multiplexing and demultiplexing
• The transport-layer multiplexing requires
(1) Sockets have unique identifiers, and
(2) Each segment have special fields that
indicate the socket to which the segment is to be
delivered.
• These special fields are the,
- Source port number field.
- Destination port number field.
Source and destination port-number fields in a
transport-layer segment
• Each port number is a 16-bit number, ranging
from 0 to 65535.
• The port numbers ranging from 0 to 1023 are
called well-known port numbers.
• When we develop a new application, we must
assign the application a port number.
• Each socket in the host could be assigned a
port number.
• When a segment arrives at the host, the
transport layer examines the destination port
number in the segment and directs the segment
to the corresponding socket.
• The segment’s data then passes through the
socket into the attached process.
• Two types of Multiplexing and Demultiplexing
- Connectionless Multiplexing and
Demultiplexing
- Connection-Oriented Multiplexing and
Demultiplexing
Connectionless Multiplexing and Demultiplexing
Connection-Oriented Multiplexing and Demultiplexing
Connectionless Transport: UDP
• If the application developer chooses UDP
instead of TCP, then the application is almost
directly talking with IP.
• In UDP there is no handshaking between
sending and receiving transport-layer entities
before sending a segment.
• For this reason, UDP is said to be
connectionless.
Many applications are better suited for UDP for
the following reasons:
• Finer application-level control over what data
is sent, and when.
• No connection establishment.
• No connection state.
• Small packet header overhead.
UDP Segment Structure
Fig: UDP segment structure
• The application data occupies the data field of
the UDP segment.
• The UDP header has only four fields, each
consisting of two bytes.
• The port numbers allow the destination host to
pass the application data to the correct process
running on the destination end system.
• The checksum is used by the receiving host to
check whether errors have been introduced
into the segment.
• The length field specifies the length of the
UDP segment, including the header, in bytes.
UDP Checksum
• The UDP checksum provides for error
detection.
• That is, the checksum is used to determine
whether bits within the UDP segment have
been altered as it moved from source to
destination.
• UDP at the sender side performs the 1s
complement of the sum of all the 16-bit words
in the segment, with any overflow encountered
during the sum being wrapped around.
• This result is put in the checksum field of the
UDP segment.
Principles of Reliable Data Transfer
• The service abstraction provided to the upper-
layer entities is that of a reliable channel
through which data can be transferred.
• It is the responsibility of a reliable data
transfer protocol to implement this service
abstraction.
• The sending side of the data transfer protocol
will be invoked from above by a call to
rdt_send().
• On the receiving side, rdt_rcv() will be called
when a packet arrives from the receiving side
of the channel.
• When the rdt protocol wants to deliver data to
the upper layer, it will do so by calling
deliver_data().
Building a Reliable Data Transfer Protocol
Reliable Data Transfer over a Perfectly Reliable
Channel: rdt1.0
• The underlying channel is completely reliable.
• The finite-state machine (FSM) definitions
for the rdt1.0 sender and receiver.
• The event causing the transition is shown
above the horizontal line labeling the
transition.
• The actions taken when the event occurs are
shown below the horizontal line.
• When no action is taken on an event, or no
event occurs and an action is taken, we’ll use
the symbol ^ below or above the horizontal,
respectively, to explicitly denote the lack of an
action or event.
• The initial state of the FSM is indicated by the
dashed arrow.
Reliable Data Transfer over a Channel with Bit
Errors: rdt2.0
• The control messages allow the receiver to let
the sender know what has been received
correctly, and what has been received in error
and thus requires repeating.
• Reliable data transfer protocols based on such
retransmission are known as ARQ (Automatic
Repeat reQuest) protocols.
Three additional protocol capabilities are
required in ARQ protocols to handle the
presence of bit errors:
• Error detection
• Receiver feedback
• Retransmission
• The sender will not send a new piece of data
until it is sure that the receiver has correctly
received the current packet.
• Because of this behavior, protocols such as
rdt2.0 are known as stop-and-wait protocols.
rdt2.1: Sender
rdt2.1 Receiver
rdt2.2 Sender
rdt2.2 Receiver
rdt3.0 Sender
Two basic approaches toward pipelined error
recovery can be identified:
1. Go-Back-N
2. Selective repeat.
Go-Back-N (GBN)
• In a Go-Back-N (GBN) protocol, the sender is
allowed to transmit multiple packets without
waiting for an acknowledgment.
• It is constrained to have no more than some
maximum allowable number, N, of
unacknowledged packets in the pipeline.
Sender’s view of sequence numbers in Go-Back-N
• If we define base to be the sequence number of the oldest
unacknowledged packet and nextseqnum to be the
smallest unused sequence number.
• Four intervals in the range of sequence numbers can be
identified.
• Sequence numbers in the interval [0,base-1] correspond
to packets that have already been transmitted and
acknowledged.
• The interval [base,nextseqnum-1] corresponds to packets
that have been sent but not yet acknowledged.
• Sequence numbers in the interval
[nextseqnum,base+N-1] can be used for packets that can
be sent immediately, should data arrive from the upper
layer.
• Finally, sequence numbers greater than or equal to
[base+N] cannot be used until an unacknowledged packet
currently in the pipeline has been acknowledged.
• The range of permissible sequence numbers
for transmitted but not yet acknowledged
packets can be viewed as a window of size N
over the range of sequence numbers.
• As the protocol operates, this window slides
forward over the sequence number space.
• For this reason, N is often referred to as the
window size and the GBN protocol itself as a
sliding-window protocol.
The GBN sender must respond to three types of
events:
• Invocation from above
• Receipt of an ACK
• A timeout event
Selective Repeat (SR)
• A single packet error can thus cause GBN to
retransmit a large number of packets, many
unnecessarily.
• Selective-repeat protocols avoid unnecessary
retransmissions by having the sender
retransmit only those packets that it suspects
were received in error at the receiver.
• The SR receiver will acknowledge a correctly
received packet whether or not it is in order.
• Out-of-order packets are buffered until any
missing packets are received, at which point a
batch of packets can be delivered in order to
the upper layer.
The various actions taken by the SR sender:
• Data received from above.
• Timeout.
• ACK received.
The various actions taken by the SR receiver:
• Packet with sequence number in [rcv_base,
rcv_base+N-1] is correctly received.
• Packet with sequence number in [rcv_base-N,
rcv_base-1] is correctly received.
• Otherwise Ignore the packet.
Transmission Control Protocol:
TCP
• Data referred as Segments
• Connection oriented
• Reliable
• Supports Flow Control Mechanism
• Supports Error Control Mechanism
• Follows the Three Way Handshake mechanism
• Segments should have a maximum segment
size (MSS).
TCP send and receive buffers
TCP Segment Structure
SCENARIOS
Fig: Retransmission due to a lost acknowledgment
Fig: Segment 100 not retransmitted
Fig: A cumulative acknowledgment avoids retransmission of the
first segment
Flow Control
• Avoids the sender data to overflow.
• Have the mechanism of Receiver Window
• Receiver Window is used to give the sender an
idea of how much free buffer space is available
at the receiver.
• LastByteRead: the number of the last byte in the data stream
read from the buffer by the application process in B.
• LastByteRcvd: the number of the last byte in the data stream
that has arrived from the network and has been placed in the
receive buffer at B.
• Because TCP is not permitted to overflow the allocated buffer,
we must have:
LastByteRcvd – LastByteRead <= RcvBuffer
• The receive window, denoted rwnd is set to the amount of
spare room in the buffer:
rwnd = RcvBuffer – [LastByteRcvd – LastByteRead]
The receive window (rwnd) and the receive buffer (RcvBuffer)
TCP Connection Management
• Three Way Handshake mechanism
• TCP has 3 phases
1) Connection Establishment phase
2) Data transmission phase
3) Connection Termination phase
TCP Connection Establishment
Fig: TCP three-way handshake: segment exchange
TCP Connection Termination
Client Side
Server side
Principles of Congestion Control
The Causes and the Costs of Congestion
Scenario 1: Two Senders, a Router with Infinite Buffers
Scenario 2: Two Senders and a Router with Finite Buffers
Scenario 3: Four Senders, Routers with Finite Buffers, and
Multihop Paths
CONGESTION CONTROL
Approaches to Congestion Control
• End-to-end congestion control
Congestion is informed by the end nodes (source –
destination )
• Network-assisted congestion control
Congestion can be informed by
i) Direct feedback ( router to sender node)
ii) Information from Router - Receiver – sender
Two feedback pathways for network-indicated congestion
information
Network-Assisted Congestion-Control
Example:
ATM ABR Congestion Control
Congestion-control framework for ATM ABR service
• EFCI bit (explicit forward congestion
indication)
• CI and NI bits (congestion indication (CI)
bit and a no increase (NI) bit)
TCP Congestion Control
• Congestion window mechanism
TCP Congestion control mechanisms:
• Slow Start
• Congestion Avoidance
• Fast Recovery
Slow Start

More Related Content

Similar to Computer network transport layer MODUL 2.pptx

lecturer3.pptx
lecturer3.pptxlecturer3.pptx
lecturer3.pptx
MdFarabiHasan
 
Transport protocols
Transport protocolsTransport protocols
Transport protocols
Online
 
TRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptxTRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptx
utkarshlodhi4
 
Transmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer NetworksTransmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer Networks
Manimaran A
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
syedhaiderraza
 
Transport Layer Description By Varun Tiwari
Transport Layer Description By Varun TiwariTransport Layer Description By Varun Tiwari
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdf
Shivakrishnan18
 
Mobile computing unit-5
Mobile computing unit-5Mobile computing unit-5
Mobile computing unit-5
Ramesh Babu
 
CN UNIT III.pptx
CN UNIT III.pptxCN UNIT III.pptx
CN UNIT III.pptx
VISWANATHAN R V
 
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
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
Nitesh Singh
 
Tcpip 1
Tcpip 1Tcpip 1
Tcpip 1
myrajendra
 
08 coms 525 tcpip - tcp 1
08   coms 525 tcpip - tcp 108   coms 525 tcpip - tcp 1
08 coms 525 tcpip - tcp 1
Palanivel Kuppusamy
 
Networking essentials lect3
Networking essentials lect3Networking essentials lect3
Networking essentials lect3
Roman Brovko
 
Unit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptxUnit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptx
1136NayanSonawane
 
TCP /IP
TCP /IPTCP /IP
UNIT-3 network security layers andits types
UNIT-3 network security layers andits typesUNIT-3 network security layers andits types
UNIT-3 network security layers andits types
gjeyasriitaamecnew
 
CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptx
Pondinesh2
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
Keyur Vadodariya
 
Transport layer
Transport layer Transport layer
Transport layer
Mukesh Chinta
 

Similar to Computer network transport layer MODUL 2.pptx (20)

lecturer3.pptx
lecturer3.pptxlecturer3.pptx
lecturer3.pptx
 
Transport protocols
Transport protocolsTransport protocols
Transport protocols
 
TRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptxTRANSPORT LAYER ppt.pptx
TRANSPORT LAYER ppt.pptx
 
Transmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer NetworksTransmission Control Protocol_ Computer Networks
Transmission Control Protocol_ Computer Networks
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Transport Layer Description By Varun Tiwari
Transport Layer Description By Varun TiwariTransport Layer Description By Varun Tiwari
Transport Layer Description By Varun Tiwari
 
Module 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdfModule 2.pptx.............sdvsdcdssdfsdf
Module 2.pptx.............sdvsdcdssdfsdf
 
Mobile computing unit-5
Mobile computing unit-5Mobile computing unit-5
Mobile computing unit-5
 
CN UNIT III.pptx
CN UNIT III.pptxCN UNIT III.pptx
CN UNIT III.pptx
 
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
 
New framing-protocols
New framing-protocolsNew framing-protocols
New framing-protocols
 
Tcpip 1
Tcpip 1Tcpip 1
Tcpip 1
 
08 coms 525 tcpip - tcp 1
08   coms 525 tcpip - tcp 108   coms 525 tcpip - tcp 1
08 coms 525 tcpip - tcp 1
 
Networking essentials lect3
Networking essentials lect3Networking essentials lect3
Networking essentials lect3
 
Unit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptxUnit 5.Transport Layer.pptx
Unit 5.Transport Layer.pptx
 
TCP /IP
TCP /IPTCP /IP
TCP /IP
 
UNIT-3 network security layers andits types
UNIT-3 network security layers andits typesUNIT-3 network security layers andits types
UNIT-3 network security layers andits types
 
CN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptxCN Unit 2 - cs8591.pptx
CN Unit 2 - cs8591.pptx
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
 
Transport layer
Transport layer Transport layer
Transport layer
 

Recently uploaded

Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
ihlasbinance2003
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
Victor Morales
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
JamalHussainArman
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
sachin chaurasia
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
zubairahmad848137
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
mamunhossenbd75
 

Recently uploaded (20)

Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
5214-1693458878915-Unit 6 2023 to 2024 academic year assignment (AutoRecovere...
 
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressionsKuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
KuberTENes Birthday Bash Guadalajara - K8sGPT first impressions
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptxML Based Model for NIDS MSc Updated Presentation.v2.pptx
ML Based Model for NIDS MSc Updated Presentation.v2.pptx
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.The Python for beginners. This is an advance computer language.
The Python for beginners. This is an advance computer language.
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Casting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdfCasting-Defect-inSlab continuous casting.pdf
Casting-Defect-inSlab continuous casting.pdf
 
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Heat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation pptHeat Resistant Concrete Presentation ppt
Heat Resistant Concrete Presentation ppt
 

Computer network transport layer MODUL 2.pptx

  • 2. Introduction and Transport-Layer Services • A transport-layer protocol provides for logical communication between application processes running on different hosts. • Transport-layer protocols are implemented in the end systems but not in network routers.
  • 3.
  • 4. • On the sending side, the transport layer converts the application-layer messages it receives from a sending application process into transport-layer packets, known as transport-layer segments in Internet terminology.
  • 5. • The transport layer then passes the segment to the network layer at the sending end system, where the segment is encapsulated within a network-layer packet (a datagram) and sent to the destination.
  • 6. • On the receiving side, the network layer extracts the transport-layer segment from the datagram and passes the segment up to the transport layer. • The transport layer then processes the received segment, making the data in the segment available to the receiving application.
  • 7. Relationship Between Transport and Network Layers • A transport-layer protocol provides logical communication between processes running on different hosts. • A network-layer protocol provides logical communication between hosts.
  • 8. • Transport-layer protocols live in the end systems. • Within an end system, a transport protocol moves messages from application processes to the network edge and vice versa. • The services that a transport protocol can provide are often constrained by the service model of the underlying network-layer protocol.
  • 9. Overview of the Transport Layer in the Internet • A TCP/IP network, makes two distinct transport-layer protocols available to the application layer - UDP and TCP. • In an Internet context, we refer to the transport layer packet as a segment.
  • 10. • The Internet literature also refers to the transport-layer packet for TCP as a segment but often refers to the packet for UDP as a datagram. • But this same Internet literature also uses the term datagram for the network-layer packet. • It is less confusing to refer to both TCP and UDP packets as segments, and reserve the term datagram for the network-layer packet.
  • 11. • The Internet’s network-layer protocol has a name—IP, for Internet Protocol. • IP provides logical communication between hosts. • The IP service model is a best-effort delivery service. • IP is said to be an unreliable service.
  • 12. • Extending host-to-host delivery to process-to- process delivery is called transport-layer multiplexing and demultiplexing. • UDP and TCP also provide integrity checking by including error-detection fields in their segments’ headers. • like IP, UDP is an unreliable service.
  • 13. • TCP provides reliable data transfer-Using flow control, sequence numbers, acknowledgments, and timers. • TCP thus converts IP’s unreliable service between end systems into a reliable data transport service between processes. • TCP also provides congestion control.
  • 14. Multiplexing and Demultiplexing • A process can have one or more sockets, doors through which data passes from the network to the process and through which data passes from the process to the network. • Each socket has a unique identifier. • The format of the identifier depends on whether the socket is a UDP or a TCP socket.
  • 15. • At the receiving end, the transport layer examines the set of fields to identify the receiving socket and then directs the segment to that socket. • This job of delivering the data in a transport- layer segment to the correct socket is called demultiplexing.
  • 16. • The job of gathering data chunks at the source host from different sockets, encapsulating each data chunk with header information to create segments. • This job of passing the segments to the network layer is called multiplexing.
  • 18. • The transport-layer multiplexing requires (1) Sockets have unique identifiers, and (2) Each segment have special fields that indicate the socket to which the segment is to be delivered. • These special fields are the, - Source port number field. - Destination port number field.
  • 19. Source and destination port-number fields in a transport-layer segment
  • 20. • Each port number is a 16-bit number, ranging from 0 to 65535. • The port numbers ranging from 0 to 1023 are called well-known port numbers. • When we develop a new application, we must assign the application a port number.
  • 21. • Each socket in the host could be assigned a port number. • When a segment arrives at the host, the transport layer examines the destination port number in the segment and directs the segment to the corresponding socket. • The segment’s data then passes through the socket into the attached process.
  • 22. • Two types of Multiplexing and Demultiplexing - Connectionless Multiplexing and Demultiplexing - Connection-Oriented Multiplexing and Demultiplexing
  • 25. Connectionless Transport: UDP • If the application developer chooses UDP instead of TCP, then the application is almost directly talking with IP. • In UDP there is no handshaking between sending and receiving transport-layer entities before sending a segment. • For this reason, UDP is said to be connectionless.
  • 26. Many applications are better suited for UDP for the following reasons: • Finer application-level control over what data is sent, and when. • No connection establishment. • No connection state. • Small packet header overhead.
  • 27.
  • 28. UDP Segment Structure Fig: UDP segment structure
  • 29. • The application data occupies the data field of the UDP segment. • The UDP header has only four fields, each consisting of two bytes. • The port numbers allow the destination host to pass the application data to the correct process running on the destination end system.
  • 30. • The checksum is used by the receiving host to check whether errors have been introduced into the segment. • The length field specifies the length of the UDP segment, including the header, in bytes.
  • 31. UDP Checksum • The UDP checksum provides for error detection. • That is, the checksum is used to determine whether bits within the UDP segment have been altered as it moved from source to destination.
  • 32. • UDP at the sender side performs the 1s complement of the sum of all the 16-bit words in the segment, with any overflow encountered during the sum being wrapped around. • This result is put in the checksum field of the UDP segment.
  • 33.
  • 34. Principles of Reliable Data Transfer • The service abstraction provided to the upper- layer entities is that of a reliable channel through which data can be transferred. • It is the responsibility of a reliable data transfer protocol to implement this service abstraction.
  • 35.
  • 36. • The sending side of the data transfer protocol will be invoked from above by a call to rdt_send(). • On the receiving side, rdt_rcv() will be called when a packet arrives from the receiving side of the channel. • When the rdt protocol wants to deliver data to the upper layer, it will do so by calling deliver_data().
  • 37. Building a Reliable Data Transfer Protocol Reliable Data Transfer over a Perfectly Reliable Channel: rdt1.0 • The underlying channel is completely reliable. • The finite-state machine (FSM) definitions for the rdt1.0 sender and receiver. • The event causing the transition is shown above the horizontal line labeling the transition. • The actions taken when the event occurs are shown below the horizontal line.
  • 38. • When no action is taken on an event, or no event occurs and an action is taken, we’ll use the symbol ^ below or above the horizontal, respectively, to explicitly denote the lack of an action or event. • The initial state of the FSM is indicated by the dashed arrow.
  • 39.
  • 40. Reliable Data Transfer over a Channel with Bit Errors: rdt2.0 • The control messages allow the receiver to let the sender know what has been received correctly, and what has been received in error and thus requires repeating. • Reliable data transfer protocols based on such retransmission are known as ARQ (Automatic Repeat reQuest) protocols.
  • 41. Three additional protocol capabilities are required in ARQ protocols to handle the presence of bit errors: • Error detection • Receiver feedback • Retransmission
  • 42.
  • 43.
  • 44. • The sender will not send a new piece of data until it is sure that the receiver has correctly received the current packet. • Because of this behavior, protocols such as rdt2.0 are known as stop-and-wait protocols.
  • 50.
  • 51.
  • 52. Two basic approaches toward pipelined error recovery can be identified: 1. Go-Back-N 2. Selective repeat.
  • 53. Go-Back-N (GBN) • In a Go-Back-N (GBN) protocol, the sender is allowed to transmit multiple packets without waiting for an acknowledgment. • It is constrained to have no more than some maximum allowable number, N, of unacknowledged packets in the pipeline.
  • 54. Sender’s view of sequence numbers in Go-Back-N
  • 55. • If we define base to be the sequence number of the oldest unacknowledged packet and nextseqnum to be the smallest unused sequence number. • Four intervals in the range of sequence numbers can be identified. • Sequence numbers in the interval [0,base-1] correspond to packets that have already been transmitted and acknowledged. • The interval [base,nextseqnum-1] corresponds to packets that have been sent but not yet acknowledged.
  • 56. • Sequence numbers in the interval [nextseqnum,base+N-1] can be used for packets that can be sent immediately, should data arrive from the upper layer. • Finally, sequence numbers greater than or equal to [base+N] cannot be used until an unacknowledged packet currently in the pipeline has been acknowledged.
  • 57. • The range of permissible sequence numbers for transmitted but not yet acknowledged packets can be viewed as a window of size N over the range of sequence numbers. • As the protocol operates, this window slides forward over the sequence number space. • For this reason, N is often referred to as the window size and the GBN protocol itself as a sliding-window protocol.
  • 58. The GBN sender must respond to three types of events: • Invocation from above • Receipt of an ACK • A timeout event
  • 59.
  • 60. Selective Repeat (SR) • A single packet error can thus cause GBN to retransmit a large number of packets, many unnecessarily. • Selective-repeat protocols avoid unnecessary retransmissions by having the sender retransmit only those packets that it suspects were received in error at the receiver.
  • 61.
  • 62. • The SR receiver will acknowledge a correctly received packet whether or not it is in order. • Out-of-order packets are buffered until any missing packets are received, at which point a batch of packets can be delivered in order to the upper layer.
  • 63. The various actions taken by the SR sender: • Data received from above. • Timeout. • ACK received. The various actions taken by the SR receiver: • Packet with sequence number in [rcv_base, rcv_base+N-1] is correctly received. • Packet with sequence number in [rcv_base-N, rcv_base-1] is correctly received. • Otherwise Ignore the packet.
  • 64.
  • 65.
  • 66. Transmission Control Protocol: TCP • Data referred as Segments • Connection oriented • Reliable • Supports Flow Control Mechanism • Supports Error Control Mechanism • Follows the Three Way Handshake mechanism • Segments should have a maximum segment size (MSS).
  • 67. TCP send and receive buffers
  • 70. Fig: Retransmission due to a lost acknowledgment
  • 71. Fig: Segment 100 not retransmitted
  • 72. Fig: A cumulative acknowledgment avoids retransmission of the first segment
  • 73. Flow Control • Avoids the sender data to overflow. • Have the mechanism of Receiver Window • Receiver Window is used to give the sender an idea of how much free buffer space is available at the receiver.
  • 74. • LastByteRead: the number of the last byte in the data stream read from the buffer by the application process in B. • LastByteRcvd: the number of the last byte in the data stream that has arrived from the network and has been placed in the receive buffer at B. • Because TCP is not permitted to overflow the allocated buffer, we must have: LastByteRcvd – LastByteRead <= RcvBuffer • The receive window, denoted rwnd is set to the amount of spare room in the buffer: rwnd = RcvBuffer – [LastByteRcvd – LastByteRead]
  • 75. The receive window (rwnd) and the receive buffer (RcvBuffer)
  • 76. TCP Connection Management • Three Way Handshake mechanism • TCP has 3 phases 1) Connection Establishment phase 2) Data transmission phase 3) Connection Termination phase
  • 77. TCP Connection Establishment Fig: TCP three-way handshake: segment exchange
  • 82. The Causes and the Costs of Congestion Scenario 1: Two Senders, a Router with Infinite Buffers
  • 83. Scenario 2: Two Senders and a Router with Finite Buffers
  • 84. Scenario 3: Four Senders, Routers with Finite Buffers, and Multihop Paths
  • 86. Approaches to Congestion Control • End-to-end congestion control Congestion is informed by the end nodes (source – destination ) • Network-assisted congestion control Congestion can be informed by i) Direct feedback ( router to sender node) ii) Information from Router - Receiver – sender
  • 87. Two feedback pathways for network-indicated congestion information
  • 88. Network-Assisted Congestion-Control Example: ATM ABR Congestion Control Congestion-control framework for ATM ABR service
  • 89. • EFCI bit (explicit forward congestion indication) • CI and NI bits (congestion indication (CI) bit and a no increase (NI) bit)
  • 90. TCP Congestion Control • Congestion window mechanism TCP Congestion control mechanisms: • Slow Start • Congestion Avoidance • Fast Recovery