SlideShare ist ein Scribd-Unternehmen logo
1 von 32
TRANSPORT LAYER
TRANSPORT LAYER
Transport layer provides logical communication between application
process running on different host.
Application processes use the logical communication provided by the
transport layer to send messages to each other, free of the worry
about details of the physical infrastructure used to carry these
messages.
SERVICES PROVIDED TO UPPER
LAYERGoal of the transport layer is to efficient, reliable and cost effective service
to application layer.
To provide the service, transport layer uses service provided by network
layer.
Hardware and software within the transport layer that provides service is
called transport layer entity.
Transport layer provides two types service to application layer.
 Connection oriented service
 Connectionless service
Quality of Service
It can be said that primary function of transport layer is, enhancing the QoS
provided by network layer.
Transport layer allows user to specify some minimum, acceptable and desired
value for quality of service parameters at the time of connection set up.
list of the quality of parameters are given here.
The process of negotiating QoS parameter while
Connection establishment is called option negotiation.
Connection Establishment Delay
Connection Establishment Fail
Probability
Throughput
Transit Delay
Residual error date
Protection
Priority
Resilience
Transport Service Primitives
Transport service primitives allows transport user like application programs to
access transport service.
Difference between network service and transport service.
1. network service is used only by transport layer, while transport service is
used by number of application programs.
2. network layer service model services offered by real network, real network
can lost the packet, so network layer services are not 100% reliable.
Transport layer services are reliable, it provides reliable service using
unreliable network.
The primitives for a simple transport service.
Transport Service Primitives
Listen: executed by server. It means server is ready to accept
connection. It blocks the process of server until connection request
comes.
Connect: executed by client to request the connection. It sends
connection req. TPDU(transport protocol data unit) (packet) to server.
If server is able to handle connection then it sends Connection
accepted TPDU.
Send: executed to send data to other end.
Receive: when ever client or server is waiting for data, It executes
Receive primitive. This is also blocking primitive.
Disconnect: to disconnect connection. Two variants of disconnect.
1. Asymmetric: either side issues disconnect, connection will be
released.
2. Symmetric: both the side need to separately execute disconnect.
Transport Service Primitives
A state diagram for a simple connection management scheme. Transitions labeled in italics are caused by
packet arrivals. The solid lines show the client's state sequence. The dashed lines show the server's state
sequence.
Berkeley Sockets
Berkeley Socket Primitives for
ELEMENTS OF TRANSPORT
PROTOCOLAddressing
TSAPs, NSAPs and transport
ELEMENTS OF TRANSPORT
PROTOCOL
CONNECTION ESTABLISHMENT
Scenarios for establishing a connection using a three-way handshake. CR denotes
CONNECTION REQUEST.
(a) Normal operation,
(b) Old CONNECTION REQUEST appearing out of nowhere.
CONNECTION RELEASE
Connection at transport can be released in two way.
1. asymmetric: if one of host terminates connection, then in both the
direction, data communication will be terminated.
2. symmetric: if one of the host disconnects connection, then it can
not send the data but it can receive it.
CONNECTION RELEASE
Asymmetric Release
Abrupt disconnection with loss of data.
CONNECTION RELEASE
(a) Normal case of a three-way handshake. (b) final
ACK lost.
CONNECTION RELEASE
(c) Response DR lost (d) Response lost and
subsequent DRs lost.
CONNECTION RELEASE
TCP Connection Release uses symmetric approach. It is called Four
Way handshaking for connection termination.
FLOW CONTROL & BUFFERING
Transport layer manages end to end to flow. If the receiver is not able to
cope with the flow of data, then data flow should be control from sender
side, that part is done on Transport layer.
Data link layer is also doing flow control, but it controls flow of data
between adjacent nodes in path from source to destination.
Reasons of packet loss at receiver is slow processing speed or
insufficient buffer to store the data.
Buffer are allocated at sender and receiver side. If the network service is
reliable, so every send TPDU sent will be delivered to receiver and will be
buffered and processes at receiver, so no need to keep buffer at sender.
But if network service is unreliable and receiver may not able to handle
every incoming TPDU then sender should also keep a buffer, where copy
of TPDU resides until it’s ACK comes.
FLOW CONTROL & BUFFERING
Buffers can be allocate in fixed size when connection sets up or
buffer can be varied dynamically according to free memory. First
case is called static buffer allocation.
(a) Chained fixed-size buffers. (b) Chained variable-sized buffers. (c) One large circular buffer per connection.
FLOW CONTROL & BUFFERING
Dynamic Buffer Allocation: as connection are opened and closed,
memory available changes, so sender and receiver dynamically adjust
buffer allocations.
In dynamic buffer allocation, initially sender will request certain
number of buffers based on perceive need. receiver will grant as
many buffers as it can.Sender Receiver
<Req. 8 buffers>
<Buff Alloc. 4>
<Seq.:0,
data=m0>
< Seq.:1,
data=m1>
< Seq.:2, data=m2
> <Ack:2, Buf:2>
<Seq.:3,
data=m3><Seq.:4,
data=m4>
MULTIPLEXING
(a) Upward multiplexing. (b) Downward
multiplexing.
CRASH RECOVERY
Hosts and routers are subject to crash.
router crash is easier to handle since transport entities are alive at the host,
routers are only intermediate nodes which forwards packet, they do not have
transport layer entity.
How to recover from host crashes?
One client(host) is sending a file to server(receiver host). Transport layer at
server simply passes TPDU to transport layer. While transmission was on going,
server crashes.
Server crashes and comes up -> table initiated, does not know where it was?
Server sends a broadcast TPDU to all host, announcing that it had just crashed
and requesting that its clients inform it about status of all open connection.
Each client can be in one of two states:
S0: no outstanding TPDU
S1: one TPDU outstanding
CRASH RECOVERY
Now it seems that if TPDU is outstanding, client should transmit it, but there are
can be different hidden situations.
1. if server has first sent ACK and before it can send TPDU to next layer, server
crashes. In this case, client will get ACK so it will not retransmit, and TPDU is
lost by server.
2. if server first sends packet to next layer, then it crashes before it can send
ACK. In this case though server has already received TPDU, client thinks TPDU is
lost and it will retransmit.
Server(Receiving host) can be programmed in two ways, 1. ACK first 2. write
first
Three events are possible at server, sending ACK(A), sending packet to next
layer(W), crashing (C).
Three event can occur in six different case: AC(W) AWC C(AW), C(WA) WAC
WC(A)
Client(sending host) can be programmed in four ways, 1. always retransmit last
TPDU, 2. never retransmit last TPDU, 3. retransmit only in S0, 4. retransmit only
CRASH RECOVERY
Different combinations of client and server strategy.
UDP
User datagram protocol(UDP) is used to send and receive data without
establishing connection.
UDP packets is consist of 8 byte header followed by data.
UDP length includes 8byte header and data, size of whole segment.
UDP checksum is optional, stored as 0 if not computed.
The UDP header.
UDP
UDP does not do flow control, error control and retransmission if
packet gets lost.
Area where UDP is useful is client server application. Client sends
short request to server and gets short reply back.
Application that uses UDP this way is DNS.
If a host needs IP address of www.abc.com, it will send UDP packet to
server, server will reply with UDP packet that contains IP address of
site.
TCP
Transmission Control Protocol (TCP) was designed to provide reliable
end to end stream over unreliable network.
TCP service is obtain by creating a socket at both client and server
side. Each socket has socket address that consist of IP address and
port number.
Before sending data, connection must be established between
sending and receiving machine.
One socket can be used to establish many connection, many sender
can connect with same receiver socket. TCP connections are identified
by pair of sockets at both the end.
TCP connection are full duplex and point to point. TCP does not
support multicast and broadcast.
TCP connection is byte stream, not a message stream.
TCP
Sending and receiving TCP entities exchange data in form of segment.
TCP segment consist of 20 byte header plus optional part followed by data.
When sender transmits a segment, it also starts timer. When segment arrives
at destination, it sends acknowledgment. Acknowledgment contains equal to
sequence number of next data.
If timer for segment expires and acknowledgment does not reach to sender,
sender infers that packet is not delivered to receiver and it retransmits the
segment.
TCP HEADER
TCP HEADER
TCP HEADER
Options available with TCP
1. NAK(negative acknowledgment): host can send negative
acknowledgment, it specifies sequence number of data not yet
received.
2. timestamp: time stamp of the event when packet is send/received,
this option is used to calculate RTT(round trip time at transport layer)
3. TCP payload: host can specify maximum TCP payload(data in TCP
packet) size it is willing to accept.
TCP CONNECTION ESTABLISHMENT
TCP connection is established by Three way handshaking:
TCP CONNECTION RELEASE
TCP Connection Release uses symmetric approach. It is called Four
Way handshaking for connection termination.

Weitere ähnliche Inhalte

Was ist angesagt?

Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
asimnawaz54
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
tameemyousaf
 

Was ist angesagt? (20)

Datalinklayer tanenbaum
Datalinklayer tanenbaumDatalinklayer tanenbaum
Datalinklayer tanenbaum
 
Network Layer,Computer Networks
Network Layer,Computer NetworksNetwork Layer,Computer Networks
Network Layer,Computer Networks
 
Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
 
Internet control message protocol
Internet control message protocolInternet control message protocol
Internet control message protocol
 
Network Layer design Issues.pptx
Network Layer design Issues.pptxNetwork Layer design Issues.pptx
Network Layer design Issues.pptx
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
5. protocol layering
5. protocol layering5. protocol layering
5. protocol layering
 
Mobile Network Layer
Mobile Network LayerMobile Network Layer
Mobile Network Layer
 
Data link layer
Data link layer Data link layer
Data link layer
 
Transport layer protocol
Transport layer protocolTransport layer protocol
Transport layer protocol
 
Transport layer
Transport layerTransport layer
Transport layer
 
Distance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing AlgorithmDistance Vector & Link state Routing Algorithm
Distance Vector & Link state Routing Algorithm
 
Application layer protocols
Application layer protocolsApplication layer protocols
Application layer protocols
 
Flow & Error Control
Flow & Error ControlFlow & Error Control
Flow & Error Control
 
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)
 
Media Access Control
Media Access ControlMedia Access Control
Media Access Control
 
Computer Network - Network Layer
Computer Network - Network LayerComputer Network - Network Layer
Computer Network - Network Layer
 
Computer networks - Channelization
Computer networks - ChannelizationComputer networks - Channelization
Computer networks - Channelization
 
Unit 2 data link control
Unit 2 data link controlUnit 2 data link control
Unit 2 data link control
 
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
 

Ähnlich wie Transport layer

connectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdfconnectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdf
ImXaib
 
Chapter3 transport layer
Chapter3 transport layerChapter3 transport layer
Chapter3 transport layer
Khánh Ghẻ
 

Ähnlich wie Transport layer (20)

Transport_Layer (1).pptx
Transport_Layer (1).pptxTransport_Layer (1).pptx
Transport_Layer (1).pptx
 
Mcseminar
McseminarMcseminar
Mcseminar
 
Transport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptxTransport_Layer_Protocols.pptx
Transport_Layer_Protocols.pptx
 
Connection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion ControlConnection Establishment & Flow and Congestion Control
Connection Establishment & Flow and Congestion Control
 
connectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdfconnectionestablishmentflowandcongestioncontrol-190130165746.pdf
connectionestablishmentflowandcongestioncontrol-190130165746.pdf
 
Jaimin chp-6 - transport layer- 2011 batch
Jaimin   chp-6 - transport layer- 2011 batchJaimin   chp-6 - transport layer- 2011 batch
Jaimin chp-6 - transport layer- 2011 batch
 
Mobile Transpot Layer
Mobile Transpot LayerMobile Transpot Layer
Mobile Transpot Layer
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptx
 
Chapter03 sg
Chapter03 sgChapter03 sg
Chapter03 sg
 
Lec6
Lec6Lec6
Lec6
 
Chapter3 transport layer
Chapter3 transport layerChapter3 transport layer
Chapter3 transport layer
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Ch3 transport layer Network
Ch3 transport layer NetworkCh3 transport layer Network
Ch3 transport layer Network
 
transport layer
transport layertransport layer
transport layer
 
TCP.docx
TCP.docxTCP.docx
TCP.docx
 
計概
計概計概
計概
 
Week10 transport
Week10 transportWeek10 transport
Week10 transport
 
Transport layer
Transport layerTransport layer
Transport layer
 
Tcp
TcpTcp
Tcp
 
Transport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And DemultiplexingTransport Layer Services : Multiplexing And Demultiplexing
Transport Layer Services : Multiplexing And Demultiplexing
 

Kürzlich hochgeladen

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
jaanualu31
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
MayuraD1
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Kürzlich hochgeladen (20)

kiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal loadkiln thermal load.pptx kiln tgermal load
kiln thermal load.pptx kiln tgermal load
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills KuwaitKuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
Kuwait City MTP kit ((+919101817206)) Buy Abortion Pills Kuwait
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
Bridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptxBridge Jacking Design Sample Calculation.pptx
Bridge Jacking Design Sample Calculation.pptx
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Online food ordering system project report.pdf
Online food ordering system project report.pdfOnline food ordering system project report.pdf
Online food ordering system project report.pdf
 

Transport layer

  • 2. TRANSPORT LAYER Transport layer provides logical communication between application process running on different host. Application processes use the logical communication provided by the transport layer to send messages to each other, free of the worry about details of the physical infrastructure used to carry these messages.
  • 3. SERVICES PROVIDED TO UPPER LAYERGoal of the transport layer is to efficient, reliable and cost effective service to application layer. To provide the service, transport layer uses service provided by network layer. Hardware and software within the transport layer that provides service is called transport layer entity. Transport layer provides two types service to application layer.  Connection oriented service  Connectionless service
  • 4. Quality of Service It can be said that primary function of transport layer is, enhancing the QoS provided by network layer. Transport layer allows user to specify some minimum, acceptable and desired value for quality of service parameters at the time of connection set up. list of the quality of parameters are given here. The process of negotiating QoS parameter while Connection establishment is called option negotiation. Connection Establishment Delay Connection Establishment Fail Probability Throughput Transit Delay Residual error date Protection Priority Resilience
  • 5. Transport Service Primitives Transport service primitives allows transport user like application programs to access transport service. Difference between network service and transport service. 1. network service is used only by transport layer, while transport service is used by number of application programs. 2. network layer service model services offered by real network, real network can lost the packet, so network layer services are not 100% reliable. Transport layer services are reliable, it provides reliable service using unreliable network. The primitives for a simple transport service.
  • 6. Transport Service Primitives Listen: executed by server. It means server is ready to accept connection. It blocks the process of server until connection request comes. Connect: executed by client to request the connection. It sends connection req. TPDU(transport protocol data unit) (packet) to server. If server is able to handle connection then it sends Connection accepted TPDU. Send: executed to send data to other end. Receive: when ever client or server is waiting for data, It executes Receive primitive. This is also blocking primitive. Disconnect: to disconnect connection. Two variants of disconnect. 1. Asymmetric: either side issues disconnect, connection will be released. 2. Symmetric: both the side need to separately execute disconnect.
  • 7. Transport Service Primitives A state diagram for a simple connection management scheme. Transitions labeled in italics are caused by packet arrivals. The solid lines show the client's state sequence. The dashed lines show the server's state sequence.
  • 11. CONNECTION ESTABLISHMENT Scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. (a) Normal operation, (b) Old CONNECTION REQUEST appearing out of nowhere.
  • 12. CONNECTION RELEASE Connection at transport can be released in two way. 1. asymmetric: if one of host terminates connection, then in both the direction, data communication will be terminated. 2. symmetric: if one of the host disconnects connection, then it can not send the data but it can receive it.
  • 13. CONNECTION RELEASE Asymmetric Release Abrupt disconnection with loss of data.
  • 14. CONNECTION RELEASE (a) Normal case of a three-way handshake. (b) final ACK lost.
  • 15. CONNECTION RELEASE (c) Response DR lost (d) Response lost and subsequent DRs lost.
  • 16. CONNECTION RELEASE TCP Connection Release uses symmetric approach. It is called Four Way handshaking for connection termination.
  • 17. FLOW CONTROL & BUFFERING Transport layer manages end to end to flow. If the receiver is not able to cope with the flow of data, then data flow should be control from sender side, that part is done on Transport layer. Data link layer is also doing flow control, but it controls flow of data between adjacent nodes in path from source to destination. Reasons of packet loss at receiver is slow processing speed or insufficient buffer to store the data. Buffer are allocated at sender and receiver side. If the network service is reliable, so every send TPDU sent will be delivered to receiver and will be buffered and processes at receiver, so no need to keep buffer at sender. But if network service is unreliable and receiver may not able to handle every incoming TPDU then sender should also keep a buffer, where copy of TPDU resides until it’s ACK comes.
  • 18. FLOW CONTROL & BUFFERING Buffers can be allocate in fixed size when connection sets up or buffer can be varied dynamically according to free memory. First case is called static buffer allocation. (a) Chained fixed-size buffers. (b) Chained variable-sized buffers. (c) One large circular buffer per connection.
  • 19. FLOW CONTROL & BUFFERING Dynamic Buffer Allocation: as connection are opened and closed, memory available changes, so sender and receiver dynamically adjust buffer allocations. In dynamic buffer allocation, initially sender will request certain number of buffers based on perceive need. receiver will grant as many buffers as it can.Sender Receiver <Req. 8 buffers> <Buff Alloc. 4> <Seq.:0, data=m0> < Seq.:1, data=m1> < Seq.:2, data=m2 > <Ack:2, Buf:2> <Seq.:3, data=m3><Seq.:4, data=m4>
  • 20. MULTIPLEXING (a) Upward multiplexing. (b) Downward multiplexing.
  • 21. CRASH RECOVERY Hosts and routers are subject to crash. router crash is easier to handle since transport entities are alive at the host, routers are only intermediate nodes which forwards packet, they do not have transport layer entity. How to recover from host crashes? One client(host) is sending a file to server(receiver host). Transport layer at server simply passes TPDU to transport layer. While transmission was on going, server crashes. Server crashes and comes up -> table initiated, does not know where it was? Server sends a broadcast TPDU to all host, announcing that it had just crashed and requesting that its clients inform it about status of all open connection. Each client can be in one of two states: S0: no outstanding TPDU S1: one TPDU outstanding
  • 22. CRASH RECOVERY Now it seems that if TPDU is outstanding, client should transmit it, but there are can be different hidden situations. 1. if server has first sent ACK and before it can send TPDU to next layer, server crashes. In this case, client will get ACK so it will not retransmit, and TPDU is lost by server. 2. if server first sends packet to next layer, then it crashes before it can send ACK. In this case though server has already received TPDU, client thinks TPDU is lost and it will retransmit. Server(Receiving host) can be programmed in two ways, 1. ACK first 2. write first Three events are possible at server, sending ACK(A), sending packet to next layer(W), crashing (C). Three event can occur in six different case: AC(W) AWC C(AW), C(WA) WAC WC(A) Client(sending host) can be programmed in four ways, 1. always retransmit last TPDU, 2. never retransmit last TPDU, 3. retransmit only in S0, 4. retransmit only
  • 23. CRASH RECOVERY Different combinations of client and server strategy.
  • 24. UDP User datagram protocol(UDP) is used to send and receive data without establishing connection. UDP packets is consist of 8 byte header followed by data. UDP length includes 8byte header and data, size of whole segment. UDP checksum is optional, stored as 0 if not computed. The UDP header.
  • 25. UDP UDP does not do flow control, error control and retransmission if packet gets lost. Area where UDP is useful is client server application. Client sends short request to server and gets short reply back. Application that uses UDP this way is DNS. If a host needs IP address of www.abc.com, it will send UDP packet to server, server will reply with UDP packet that contains IP address of site.
  • 26. TCP Transmission Control Protocol (TCP) was designed to provide reliable end to end stream over unreliable network. TCP service is obtain by creating a socket at both client and server side. Each socket has socket address that consist of IP address and port number. Before sending data, connection must be established between sending and receiving machine. One socket can be used to establish many connection, many sender can connect with same receiver socket. TCP connections are identified by pair of sockets at both the end. TCP connection are full duplex and point to point. TCP does not support multicast and broadcast. TCP connection is byte stream, not a message stream.
  • 27. TCP Sending and receiving TCP entities exchange data in form of segment. TCP segment consist of 20 byte header plus optional part followed by data. When sender transmits a segment, it also starts timer. When segment arrives at destination, it sends acknowledgment. Acknowledgment contains equal to sequence number of next data. If timer for segment expires and acknowledgment does not reach to sender, sender infers that packet is not delivered to receiver and it retransmits the segment.
  • 30. TCP HEADER Options available with TCP 1. NAK(negative acknowledgment): host can send negative acknowledgment, it specifies sequence number of data not yet received. 2. timestamp: time stamp of the event when packet is send/received, this option is used to calculate RTT(round trip time at transport layer) 3. TCP payload: host can specify maximum TCP payload(data in TCP packet) size it is willing to accept.
  • 31. TCP CONNECTION ESTABLISHMENT TCP connection is established by Three way handshaking:
  • 32. TCP CONNECTION RELEASE TCP Connection Release uses symmetric approach. It is called Four Way handshaking for connection termination.