SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
© Peter R. Egli 2015
1/21
Rev. 3.40
Transport Protocols indigoo.com
Peter R. Egli
INDIGOO.COM
INTRODUCTION TO PRINCIPLES OF
TRANSPORT PROTOCOLS FOR TCP/IP NETWORKS
TRANSPORT
PROTOCOLS
© Peter R. Egli 2015
2/21
Rev. 3.40
Transport Protocols indigoo.com
Contents
1. Transport layer functions
2. Elements of transport protocols (addressing)
3. Elements of transport protocols (connection establishment)
4. Elements of transport protocols (connection release)
5. Elements of transport protocols (flow control and buffering)
6. Elements of transport protocols (multiplexing)
7. Elements of transport protocols (crash recovery)
8. Elements of transport protocols (programming API)
9. Transport layer characteristics
© Peter R. Egli 2015
3/21
Rev. 3.40
Transport Protocols indigoo.com
1. Transport layer functions (1/3)
The transport layer is the interface between the network and application („network API“).
The transport layer provides 2 main functions to the application:
1. Data transport service (transport data to another remote or local application)
2. Some level of QoS (Quality of Service)
Data transport
service
No QoS (=best-effort service)
Transport Layer provides some
kind of QoS to upper layers.
OSI Layer 1
OSI Layer 2
OSI Layer 3
OSI Layer 4
OSI Layer > 4
Physical layer
Data link layer
Network layer
Transport layer
Upper layers
(application layer)
QoS: Quality of Service
OSI: Open SystemS Interconnection
© Peter R. Egli 2015
4/21
Rev. 3.40
Transport Protocols indigoo.com
1. Transport layer functions (2/3)
QoS:
IP and lower layers do not provide any QoS. The service is best-effort (send packets, but do
not provide any delivery guarantee). It is up to the upper layers to deal with network problems.
The transport layer may hide network imperfections (problems on the network) from
the application.
Possible problems on the network are (incomplete list):
Packet loss:
Packet loss typically occurs in congested IP routers (too many packets have to be forwarded
to the same outbound interface at the same time).
Packet duplicates:
Packet duplicates may occur due to routing loops or retransmissions due to a slow network.
Out of order packets:
Due to different transmission paths one IP packet may get ahead of another IP packet.
Bit errors:
Bit errors may occur due to various electromagnetic interferences. Bit errors are typically
relatively high on wireless links.
Delay of packets:
Packets get delayed in the network due to buffering, transmission delay etc.
Different transport protocols provide different levels of QoS (from none to full QoS).
© Peter R. Egli 2015
5/21
Rev. 3.40
Transport Protocols indigoo.com
1. Transport layer functions (3/3)
Possible QoS (Quality of Service) characteristics or functions of the transport protocol:
Connection establishment delay:
How long does it take to establish a transport connection?
Connection establishment failure probability:
How often does a connection establishment fail?
In-order delivery:
Does the transport protocol take care of packet ordering?
Throughput:
Does the transport protocol optimize throughput?
Transit delay:
Does the transport protocol minimize delay, i.e. send packets as quickly as possible?
Error ratio:
Does the transport protocol detect errors or even correct errors?
Priority:
Does the transport layer provide a priority mechanism (send high priority packets first)?
Resilience:
Do transport connections survive a system crash (persistence of connection)?
Protection:
Does the transport protocol provide protection against eavesdropping, wiretapping etc.?
© Peter R. Egli 2015
6/21
Rev. 3.40
Transport Protocols indigoo.com
2. Elements of transport protocols (1/14)
Addressing:
A TSAP (Transport Service Access Point) is the access point to the transport service for an
application. A TSAP contains a port number as transport address.
TSAPs provide multiplexing / demultiplexing between different applications.
Likewise the NSAP (Network Service Access Point) is the access point to the network service
for the transport layer. An NSAP contains an IP address, i.e. the address of a hop / node in
the network.
App Srv SrvApplication layer
Transport layer
Network layer
Data link layer
Physical layer
Transport
connection
TSAP with
port=1208
NSAP NSAP
TSAP with
port=1522
Server
processes
Application
process
TSAP with
port=1836
© Peter R. Egli 2015
7/21
Rev. 3.40
Transport Protocols indigoo.com
3. Elements of transport protocols (2/14)
Connection establishment (1/5):
Prior to exchanging data a client and server must establish a connection
(like a telephone connection).
On some architectures (Unix) a single server acts as a proxy and spawns the actual
server process that provides the service (“xinetd” daemon).
App PS
Host 1 Host 2
App PS
Host 1 Host 2
Srv
TSAPs
1. The application connects to the
process server’s (PS) TSAP.
2. The process server launches the
respective application service (Srv)
and passes it the connection (TSAP).
© Peter R. Egli 2015
8/21
Rev. 3.40
Transport Protocols indigoo.com
3. Elements of transport protocols (3/14)
Connection establishment (2/5):
Duplicate packet problem:
A network can duplicate packets. E.g. on a very slow network
this happens when every packet is retransmitted once.
Proposed Solution 1:
The transport layers use a session / connection identifier.
Each host maintains a table with used session identifiers.
Duplicate packets can be detected and discarded.
But:
Possibly large tables.
Difficult and slow to manage.
Tables will not survive a host crash / reboot.
Host 1 Host 2
© Peter R. Egli 2015
9/21
Rev. 3.40
Transport Protocols indigoo.com
3. Elements of transport protocols (4/14)
Connection establishment (3/5):
Proposed Solution 2 (duplicate packet problem):
A. Limit the lifetime (T) of packets in network through:
* Hop counter (TTL)
* Restricted subnet design
* Timestamp each packet (each host is required to have a clock that survives a crash).
B. Make sure that time T passes after a packet with sequence number x is sent (forbidden
regions).
Duplicate packets can be detected and discarded.
But:
A real time clock (RTC) is required
that survives system reboots
(needs special hardware).
Forbidden regions are difficult
to avoid.
Source: http://authors.phptr.com/tanenbaumcn4/
© Peter R. Egli 2015
10/21
Rev. 3.40
Transport Protocols indigoo.com
3. Elements of transport protocols (5/14)
Connection establishment (4/5):
Proposed Solution 3 (duplicate packet problem):
A. Put a sequence number (~timestamp) into each packet.
B. Client and server acknowledge each others
sequence numbers (synchronize each others
sequence numbers).
Fool-proof.
Simple.
No special requirements for sequence number
(may be derived from system tick).
The 4-way handshake may be collapsed into a 3-way
handshake.
Host 1 Host 2
4-way
handshake
3-way
handshake
Seq-#: Sequence number
Ack-#: Acknowledge number
ISN: Initial Sequence Number
CR: Connect Request
ACK: Acknowledge (packet with Ack-#)
© Peter R. Egli 2015
11/21
Rev. 3.40
Transport Protocols indigoo.com
3. Elements of transport protocols (6/14)
Connection establishment (5/5):
Proposed Solution 3 (duplicate packet problem):
The solution is foolproof. Duplicate packets can always be detected.
Host 1 Host 2 Host 1 Host 2 Host 1 Host 2
Old duplicate packets
Normal operation: Old connection request
appearing out of the blue:
Duplicate connection request
and duplicate Ack:
REJECT: Connection reject
DATA: Packet with user data
© Peter R. Egli 2015
12/21
Rev. 3.40
Transport Protocols indigoo.com
4. Elements of transport protocols (7/14)
Connection release (1/3):
Problem:
Asymmetric release (only 1 peer closes the connection)
is abrupt and may cause data loss.
Proposed solution:
Either side will disconnect its (outgoing) direction of the
duplex connection (possibly collapsed into 3-way handshake).
No data loss.
But:
Not fool-proof (DR packet may get lost
and thus connection not closed, see next slide).
Host 1 Host 2
No data delivered after
a disconnect request
Host 1 Host 2
DR: Disconnect Request
© Peter R. Egli 2015
13/21
Rev. 3.40
Transport Protocols indigoo.com
4. Elements of transport protocols (8/14)
Connection release (2/2):
Problem:
No protocol/procedure exists that can
guarantee the proper connection
termination in case of packet loss
(“Two-army problem”,
“Army-in-the-middle-problem”).
Army-in-the-middle situation:
The blue army has 4 troops (2 on either side of valley) while the white army has 3 troops. If both blue armies charge at the
same time they can vanquish the white army. If only one of the blue armies charges it will succumb (3 white troops
against 2 blue troops). This means: the blue armies have to synchronize their attack.
But in order to synchronize they need to send a messenger through the valley; of course the messenger can get
caught by the white army (‘lost packet’).
Approach #1:
The blue army #1 sends a messenger to tell blue army #2 to attack @ 1400.
Problem:
The blue army #1 does not know if the messenger managed to convey message or if he was caught.
Thus blue army #1 will not attack.
Approach #2:
The blue army #2 sends back a messenger to acknowledge to blue army #1 that it got the message.
Problem:
The blue army #2 does not know if acknowledge-messenger reached blue army #1. Thus blue army #2 will not attack.
 This play can be continued ad infinitum. No algorithm exists to make the acknowledgment procedure fool-proof.
Source: http://authors.phptr.com/tanenbaumcn4/
© Peter R. Egli 2015
14/21
Rev. 3.40
Transport Protocols indigoo.com
4. Elements of transport protocols (9/14)
Connection release (3/3):
Proposed solution:
Start a timer when sending the DR. When it times out release the connection anyway.
Host 1 Host 2
Normal case of 3-way handshake:
Send DR
+ start timer
Release
connection
Send Ack
Send DR
+ start timer
Release
connection
Host 1 Host 2
Final Ack lost:
Send DR
+ start timer
Release
connection
Send Ack
Send DR
+ start timer
Timeout:
Release
connection
Host 1 Host 2
Response lost:
Send DR
+ start timer
Release
connection,
Send Ack
Send DR
+ start timer
Release
connection
Timeout:
Send DR
+ start timer
Send DR
+ start timer
Host 1 Host 2
Response and subsequent DR lost:
Send DR
+ start timer
Send DR
+ start timer
Timeout:
Release
connection
Timeout:
Send DR
+ start timer
N timeouts:
Release
connection
© Peter R. Egli 2015
15/21
Rev. 3.40
Transport Protocols indigoo.com
5. Elements of transport protocols (10/14)
Flow control and buffering:
Problem:
The sender process may send at much higher speed than the receiver process can handle
the data thus causing overflow (= packet loss).
Proposed solution:
The receiver buffers incoming packets.
A sliding window mechanism provides a “backpressure” to the sender process when the buffer
is imminent to overflow (or better prevents the receive buffer from becoming full in
the first place). The receiver process continuously tells the sending process how much
empty space is left in its receive buffer. The sender process never sends more data than can be
accommodated in the receive buffer.
More details see TCP flow control.
Buffer B
(receive buffer)
Buffer A
(send buffer)
Process A Process B
Empty space
in buffer
Buffer info update:
Currently empty space for 5 packets
© Peter R. Egli 2015
16/21
Rev. 3.40
Transport Protocols indigoo.com
6. Elements of transport protocols (11/14)
Multiplexing:
Multiplexing in the transport layer can be used for optimization.
a. Upward multiplexing:
Traffic from a “data stream” is distributed over several transport connections (TSAPs). An
application may use multiple TCP connections to improve throughput (TCP’s throughput
depends on delay, so overall throughput may be improved over physical lines with high delay).
b. Downward multiplexing:
Many “data streams” share the same transport connection using multiple NSAPs, possibly over
multiple network interfaces (load balancing). Stream Control Transmission Protocol (SCTP) is
a transport protocol that may use downward multiplexing (multi-homing).
a. Upward multiplexing:
App
TSAP
NSAP
Phys.
ports
b. Downward multiplexing:
App
TSAP
NSAP
Phys.
ports
© Peter R. Egli 2015
17/21
Rev. 3.40
Transport Protocols indigoo.com
7. Elements of transport protocols (12/14)
Crash recovery (1/2):
Problem:
A crash of one host (server) during the transmission leads to a connection loss which results
in data loss.
Proposed Solution:
The client retransmits only unacknowledged packets.
But:
Does not work in all cases because
the server sends the ACK and writes the
data to the application sequentially
(see next slide).
Host
crash
Duplicate DATAn
or missing DATAn
packet!
write
Host 1
(client)
Host 2
(file server)
© Peter R. Egli 2015
18/21
Rev. 3.40
Transport Protocols indigoo.com
7. Elements of transport protocols (13/14)
Crash recovery (2/2):
No matter what the strategy of the hosts is, it is impossible to recover 100%-ly and
transparently to the application from transport layer crashes. More generally: A crash at layer N
can only be handled at layer N+1 (a system crash is a crash at every layer).
Thus:
It is left to the application layer to handle crashes of the remote host (client or server).
Generally applications detect that the remote host has died and then simply restart the
connection and retransmit everything.
Result:
OK = Protocol works correctly
DUP = Protocol creates a duplicate message
LOST = Protocol loses a message
State:
S0 = No unacknowledged packet outstanding
S1 = 1 unacknowledged packet outstanding
Action:
A = Server sending acknowledgment
W = Server writing to output process
C = Crashing
Strategy used by
the sending host
Strategy used by the receiving host
First ACK, then write First write, then ACK
AC(W) AWC C(AW) C(WA) WAC WC(A)
Always retransmit OK DUP OK OK DUP DUP
Never retransmit LOST OK LOST LOST OK OK
Retransmit in S0 OK DUP LOST LOST DUP OK
Retransmit in S1 LOST OK OK OK OK DUP
Source: http://authors.phptr.com/tanenbaumcn4/
© Peter R. Egli 2015
19/21
Rev. 3.40
Transport Protocols indigoo.com
Process A
LISTEN()
CONNECT()
RECEIVE()SEND()
RECEIVE() SEND()
CONNECTION REQUEST
DATA
DATA
DISCONNECT REQUEST
DISCONNECT()
8. Elements of transport protocols (14/14)
Programming API:
The programming API of the transport layer depends on the platform / language / framework
that is used. However, the transport APIs of different platforms are usually very similar.
A generic API of a connection-oriented transport protocol could look as follows:
Primitive
(function)
Description
LISTEN
This function blocks until another process
tries to connect (calls CONNECT), thus does a
passive open.
CONNECT
Sends a connection request packet, thus does
an active open.
This function is the counterpart to the LISTEN
function.
SEND Send user data.
RECEIVE Blocks until a user data packet arrives.
DISCONNECT
Sends a disconnect request to close the
connection.
Process B
© Peter R. Egli 2015
20/21
Rev. 3.40
Transport Protocols indigoo.com
9. Transport layer characteristics (1/2)
A transport layer protocol is either connection-oriented or connection-less.
Connection-oriented transport protocols:
The peers establish a connection prior to a data exchange.
This is similar to a telephone line that needs setting up a connection prior to a conversation.
Connection-less transport protocols:
The peers send packets without a prior connection establishment.
This is similar to the traditional postal service.
Process A Process B
Process A Process B
© Peter R. Egli 2015
21/21
Rev. 3.40
Transport Protocols indigoo.com
9. Transport layer characteristics (2/2)
Reliable versus unreliable service:
Transport protocols provide reither eliable (guaranteed delivery) or unreliable (best-effort)
service.
Combinations:
The characteristics connection-oriented / connection-less and reliable / unreliable can be
combined. Usually connection-oriented protocols provide reliable transport service.
Reliable Unreliable
Connection-oriented TCP, SCTP -
Connection-less RUDP UDP
Process A Process B
UDP: Unreliable, connection-less message (datagram) delivery protocol.
TCP: Reliable, connection-oriented stream transfer protocol.
SCTP: Reliable, connection-oriented message transfer protocol.
RUDP: Reliable UDP (mixture between TCP and UDP)

Contenu connexe

Tendances (20)

Arp and rarp
Arp and rarpArp and rarp
Arp and rarp
 
Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing Osi , tcp/ip protocol and Addressing
Osi , tcp/ip protocol and Addressing
 
Unit 4 - Network Layer
Unit 4 - Network LayerUnit 4 - Network Layer
Unit 4 - Network Layer
 
Datalinklayer tanenbaum
Datalinklayer tanenbaumDatalinklayer tanenbaum
Datalinklayer tanenbaum
 
Congestion avoidance in TCP
Congestion avoidance in TCPCongestion avoidance in TCP
Congestion avoidance in TCP
 
ASYNCHRONOUS TRANSFER MODE (ATM)
ASYNCHRONOUS TRANSFER MODE (ATM)ASYNCHRONOUS TRANSFER MODE (ATM)
ASYNCHRONOUS TRANSFER MODE (ATM)
 
Routing algorithms
Routing algorithmsRouting algorithms
Routing algorithms
 
Mobile Transport layer
Mobile Transport layerMobile Transport layer
Mobile Transport layer
 
Rarp
RarpRarp
Rarp
 
Chapter 4 data link layer
Chapter 4 data link layerChapter 4 data link layer
Chapter 4 data link layer
 
OSI MODEL
    OSI MODEL    OSI MODEL
OSI MODEL
 
TCP-IP Reference Model
TCP-IP Reference ModelTCP-IP Reference Model
TCP-IP Reference Model
 
RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION           RANDOM ACCESS PROTOCOL IN COMMUNICATION
RANDOM ACCESS PROTOCOL IN COMMUNICATION
 
Network layer logical addressing
Network layer logical addressingNetwork layer logical addressing
Network layer logical addressing
 
Mobile Computing I-Unit Notes
Mobile Computing I-Unit NotesMobile Computing I-Unit Notes
Mobile Computing I-Unit Notes
 
Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]Inter Process Communication Presentation[1]
Inter Process Communication Presentation[1]
 
Chapter 4 a interprocess communication
Chapter 4 a interprocess communicationChapter 4 a interprocess communication
Chapter 4 a interprocess communication
 
Packet switching
Packet switchingPacket switching
Packet switching
 
Issues in routing protocol
Issues in routing protocolIssues in routing protocol
Issues in routing protocol
 
Network Layer
Network LayerNetwork Layer
Network Layer
 

En vedette

Transport protocols
Transport protocolsTransport protocols
Transport protocolsOnline
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)Fatbardh Hysa
 
The Transport Layer
The Transport LayerThe Transport Layer
The Transport Layeradil raja
 
Network Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerNetwork Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerAbdelkhalik Mosa
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 
TCP - Transmission Control Protocol
TCP - Transmission Control ProtocolTCP - Transmission Control Protocol
TCP - Transmission Control ProtocolPeter R. Egli
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram ProtocolPeter R. Egli
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name SystemPeter R. Egli
 
transport layer
transport layer transport layer
transport layer usman19
 
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesCS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesWei Tsang Ooi
 
Useful Ideas for face painting for beginners
Useful Ideas for face painting for beginnersUseful Ideas for face painting for beginners
Useful Ideas for face painting for beginnersThe Gallery London
 
Telecom self organizing network
Telecom self organizing networkTelecom self organizing network
Telecom self organizing networkPankaj Chomal
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Peter R. Egli
 

En vedette (20)

Transport Layer
Transport LayerTransport Layer
Transport Layer
 
Transport protocols
Transport protocolsTransport protocols
Transport protocols
 
Transport layer (computer networks)
Transport layer (computer networks)Transport layer (computer networks)
Transport layer (computer networks)
 
The Transport Layer
The Transport LayerThe Transport Layer
The Transport Layer
 
Transport layer
Transport layer Transport layer
Transport layer
 
Network Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport LayerNetwork Fundamentals: Ch4 - Transport Layer
Network Fundamentals: Ch4 - Transport Layer
 
Transport layer
Transport layerTransport layer
Transport layer
 
transport layer
transport layertransport layer
transport layer
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
TCP - Transmission Control Protocol
TCP - Transmission Control ProtocolTCP - Transmission Control Protocol
TCP - Transmission Control Protocol
 
Domain name system
Domain name systemDomain name system
Domain name system
 
UDP - User Datagram Protocol
UDP - User Datagram ProtocolUDP - User Datagram Protocol
UDP - User Datagram Protocol
 
DNS - Domain Name System
DNS - Domain Name SystemDNS - Domain Name System
DNS - Domain Name System
 
transport layer
transport layer transport layer
transport layer
 
Transport layer
Transport layerTransport layer
Transport layer
 
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked GamesCS4344 09/10 Lecture 10: Transport Protocol for Networked Games
CS4344 09/10 Lecture 10: Transport Protocol for Networked Games
 
Useful Ideas for face painting for beginners
Useful Ideas for face painting for beginnersUseful Ideas for face painting for beginners
Useful Ideas for face painting for beginners
 
Telecom self organizing network
Telecom self organizing networkTelecom self organizing network
Telecom self organizing network
 
Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)Overview of SCTP (Stream Control Transmission Protocol)
Overview of SCTP (Stream Control Transmission Protocol)
 
Sctp tutorial
Sctp tutorialSctp tutorial
Sctp tutorial
 

Similaire à Transport Protocols

Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Chapter3 transport layer
Chapter3 transport layerChapter3 transport layer
Chapter3 transport layerKhánh Ghẻ
 
Lec 4(packet delay layered Architecture)
Lec 4(packet delay layered Architecture)Lec 4(packet delay layered Architecture)
Lec 4(packet delay layered Architecture)maamir farooq
 
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 batchJaimin Jani
 
Ch3 transport layer Network
Ch3 transport layer NetworkCh3 transport layer Network
Ch3 transport layer Networkcairo university
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)NYversity
 
group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressingAnitha Selvan
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxGirT2
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batchJaimin Jani
 
Lecture 06 and 07.pptx
Lecture 06 and 07.pptxLecture 06 and 07.pptx
Lecture 06 and 07.pptxHanzlaNaveed1
 
MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)Krishan Pareek
 

Similaire à Transport Protocols (20)

Lec9
Lec9Lec9
Lec9
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Chapter3 transport
Chapter3 transportChapter3 transport
Chapter3 transport
 
Chapter3 transport layer
Chapter3 transport layerChapter3 transport layer
Chapter3 transport layer
 
Lec 4(packet delay layered Architecture)
Lec 4(packet delay layered Architecture)Lec 4(packet delay layered Architecture)
Lec 4(packet delay layered Architecture)
 
Lec6
Lec6Lec6
Lec6
 
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
 
Tcp
TcpTcp
Tcp
 
Transport laye
Transport laye Transport laye
Transport laye
 
Ch3 transport layer Network
Ch3 transport layer NetworkCh3 transport layer Network
Ch3 transport layer Network
 
Computer network (13)
Computer network (13)Computer network (13)
Computer network (13)
 
group11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressinggroup11_DNAA:protocol stack and addressing
group11_DNAA:protocol stack and addressing
 
Week4 lec1-bscs1
Week4 lec1-bscs1Week4 lec1-bscs1
Week4 lec1-bscs1
 
Chapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptxChapter Five - Transport Layer.pptx
Chapter Five - Transport Layer.pptx
 
transport layer
transport layertransport layer
transport layer
 
Jaimin chp-3 - data-link layer- 2011 batch
Jaimin   chp-3 - data-link layer- 2011 batchJaimin   chp-3 - data-link layer- 2011 batch
Jaimin chp-3 - data-link layer- 2011 batch
 
TCP Vs UDP
TCP Vs UDP TCP Vs UDP
TCP Vs UDP
 
Transport layer
Transport layerTransport layer
Transport layer
 
Lecture 06 and 07.pptx
Lecture 06 and 07.pptxLecture 06 and 07.pptx
Lecture 06 and 07.pptx
 
MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)MC0087 Internal Assignment (SMU)
MC0087 Internal Assignment (SMU)
 

Plus de Peter R. Egli

LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosLPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosPeter R. Egli
 
Data Networking Concepts
Data Networking ConceptsData Networking Concepts
Data Networking ConceptsPeter R. Egli
 
Communication middleware
Communication middlewareCommunication middleware
Communication middlewarePeter R. Egli
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Peter R. Egli
 
Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Peter R. Egli
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET PlatformPeter R. Egli
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud ComputingPeter R. Egli
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingPeter R. Egli
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration TechnologiesPeter R. Egli
 
Overview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyOverview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyPeter R. Egli
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development KitPeter R. Egli
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Peter R. Egli
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingPeter R. Egli
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBAPeter R. Egli
 
Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Peter R. Egli
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging ServicePeter R. Egli
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Peter R. Egli
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State TransferPeter R. Egli
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented MiddlewarePeter R. Egli
 

Plus de Peter R. Egli (20)

LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M ScenariosLPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
LPWAN Technologies for Internet of Things (IoT) and M2M Scenarios
 
Data Networking Concepts
Data Networking ConceptsData Networking Concepts
Data Networking Concepts
 
Communication middleware
Communication middlewareCommunication middleware
Communication middleware
 
Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)Transaction Processing Monitors (TPM)
Transaction Processing Monitors (TPM)
 
Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)Business Process Model and Notation (BPMN)
Business Process Model and Notation (BPMN)
 
Microsoft .NET Platform
Microsoft .NET PlatformMicrosoft .NET Platform
Microsoft .NET Platform
 
Overview of Cloud Computing
Overview of Cloud ComputingOverview of Cloud Computing
Overview of Cloud Computing
 
MQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message QueueingMQTT - MQ Telemetry Transport for Message Queueing
MQTT - MQ Telemetry Transport for Message Queueing
 
Enterprise Application Integration Technologies
Enterprise Application Integration TechnologiesEnterprise Application Integration Technologies
Enterprise Application Integration Technologies
 
Overview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technologyOverview of Microsoft .Net Remoting technology
Overview of Microsoft .Net Remoting technology
 
Android Native Development Kit
Android Native Development KitAndroid Native Development Kit
Android Native Development Kit
 
Web services
Web servicesWeb services
Web services
 
Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)Overview of Spanning Tree Protocol (STP & RSTP)
Overview of Spanning Tree Protocol (STP & RSTP)
 
MSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message QueueingMSMQ - Microsoft Message Queueing
MSMQ - Microsoft Message Queueing
 
Common Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBACommon Object Request Broker Architecture - CORBA
Common Object Request Broker Architecture - CORBA
 
Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)
 
JMS - Java Messaging Service
JMS - Java Messaging ServiceJMS - Java Messaging Service
JMS - Java Messaging Service
 
Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)Web Services (SOAP, WSDL, UDDI)
Web Services (SOAP, WSDL, UDDI)
 
REST - Representational State Transfer
REST - Representational State TransferREST - Representational State Transfer
REST - Representational State Transfer
 
MOM - Message Oriented Middleware
MOM - Message Oriented MiddlewareMOM - Message Oriented Middleware
MOM - Message Oriented Middleware
 

Dernier

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Dernier (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

Transport Protocols

  • 1. © Peter R. Egli 2015 1/21 Rev. 3.40 Transport Protocols indigoo.com Peter R. Egli INDIGOO.COM INTRODUCTION TO PRINCIPLES OF TRANSPORT PROTOCOLS FOR TCP/IP NETWORKS TRANSPORT PROTOCOLS
  • 2. © Peter R. Egli 2015 2/21 Rev. 3.40 Transport Protocols indigoo.com Contents 1. Transport layer functions 2. Elements of transport protocols (addressing) 3. Elements of transport protocols (connection establishment) 4. Elements of transport protocols (connection release) 5. Elements of transport protocols (flow control and buffering) 6. Elements of transport protocols (multiplexing) 7. Elements of transport protocols (crash recovery) 8. Elements of transport protocols (programming API) 9. Transport layer characteristics
  • 3. © Peter R. Egli 2015 3/21 Rev. 3.40 Transport Protocols indigoo.com 1. Transport layer functions (1/3) The transport layer is the interface between the network and application („network API“). The transport layer provides 2 main functions to the application: 1. Data transport service (transport data to another remote or local application) 2. Some level of QoS (Quality of Service) Data transport service No QoS (=best-effort service) Transport Layer provides some kind of QoS to upper layers. OSI Layer 1 OSI Layer 2 OSI Layer 3 OSI Layer 4 OSI Layer > 4 Physical layer Data link layer Network layer Transport layer Upper layers (application layer) QoS: Quality of Service OSI: Open SystemS Interconnection
  • 4. © Peter R. Egli 2015 4/21 Rev. 3.40 Transport Protocols indigoo.com 1. Transport layer functions (2/3) QoS: IP and lower layers do not provide any QoS. The service is best-effort (send packets, but do not provide any delivery guarantee). It is up to the upper layers to deal with network problems. The transport layer may hide network imperfections (problems on the network) from the application. Possible problems on the network are (incomplete list): Packet loss: Packet loss typically occurs in congested IP routers (too many packets have to be forwarded to the same outbound interface at the same time). Packet duplicates: Packet duplicates may occur due to routing loops or retransmissions due to a slow network. Out of order packets: Due to different transmission paths one IP packet may get ahead of another IP packet. Bit errors: Bit errors may occur due to various electromagnetic interferences. Bit errors are typically relatively high on wireless links. Delay of packets: Packets get delayed in the network due to buffering, transmission delay etc. Different transport protocols provide different levels of QoS (from none to full QoS).
  • 5. © Peter R. Egli 2015 5/21 Rev. 3.40 Transport Protocols indigoo.com 1. Transport layer functions (3/3) Possible QoS (Quality of Service) characteristics or functions of the transport protocol: Connection establishment delay: How long does it take to establish a transport connection? Connection establishment failure probability: How often does a connection establishment fail? In-order delivery: Does the transport protocol take care of packet ordering? Throughput: Does the transport protocol optimize throughput? Transit delay: Does the transport protocol minimize delay, i.e. send packets as quickly as possible? Error ratio: Does the transport protocol detect errors or even correct errors? Priority: Does the transport layer provide a priority mechanism (send high priority packets first)? Resilience: Do transport connections survive a system crash (persistence of connection)? Protection: Does the transport protocol provide protection against eavesdropping, wiretapping etc.?
  • 6. © Peter R. Egli 2015 6/21 Rev. 3.40 Transport Protocols indigoo.com 2. Elements of transport protocols (1/14) Addressing: A TSAP (Transport Service Access Point) is the access point to the transport service for an application. A TSAP contains a port number as transport address. TSAPs provide multiplexing / demultiplexing between different applications. Likewise the NSAP (Network Service Access Point) is the access point to the network service for the transport layer. An NSAP contains an IP address, i.e. the address of a hop / node in the network. App Srv SrvApplication layer Transport layer Network layer Data link layer Physical layer Transport connection TSAP with port=1208 NSAP NSAP TSAP with port=1522 Server processes Application process TSAP with port=1836
  • 7. © Peter R. Egli 2015 7/21 Rev. 3.40 Transport Protocols indigoo.com 3. Elements of transport protocols (2/14) Connection establishment (1/5): Prior to exchanging data a client and server must establish a connection (like a telephone connection). On some architectures (Unix) a single server acts as a proxy and spawns the actual server process that provides the service (“xinetd” daemon). App PS Host 1 Host 2 App PS Host 1 Host 2 Srv TSAPs 1. The application connects to the process server’s (PS) TSAP. 2. The process server launches the respective application service (Srv) and passes it the connection (TSAP).
  • 8. © Peter R. Egli 2015 8/21 Rev. 3.40 Transport Protocols indigoo.com 3. Elements of transport protocols (3/14) Connection establishment (2/5): Duplicate packet problem: A network can duplicate packets. E.g. on a very slow network this happens when every packet is retransmitted once. Proposed Solution 1: The transport layers use a session / connection identifier. Each host maintains a table with used session identifiers. Duplicate packets can be detected and discarded. But: Possibly large tables. Difficult and slow to manage. Tables will not survive a host crash / reboot. Host 1 Host 2
  • 9. © Peter R. Egli 2015 9/21 Rev. 3.40 Transport Protocols indigoo.com 3. Elements of transport protocols (4/14) Connection establishment (3/5): Proposed Solution 2 (duplicate packet problem): A. Limit the lifetime (T) of packets in network through: * Hop counter (TTL) * Restricted subnet design * Timestamp each packet (each host is required to have a clock that survives a crash). B. Make sure that time T passes after a packet with sequence number x is sent (forbidden regions). Duplicate packets can be detected and discarded. But: A real time clock (RTC) is required that survives system reboots (needs special hardware). Forbidden regions are difficult to avoid. Source: http://authors.phptr.com/tanenbaumcn4/
  • 10. © Peter R. Egli 2015 10/21 Rev. 3.40 Transport Protocols indigoo.com 3. Elements of transport protocols (5/14) Connection establishment (4/5): Proposed Solution 3 (duplicate packet problem): A. Put a sequence number (~timestamp) into each packet. B. Client and server acknowledge each others sequence numbers (synchronize each others sequence numbers). Fool-proof. Simple. No special requirements for sequence number (may be derived from system tick). The 4-way handshake may be collapsed into a 3-way handshake. Host 1 Host 2 4-way handshake 3-way handshake Seq-#: Sequence number Ack-#: Acknowledge number ISN: Initial Sequence Number CR: Connect Request ACK: Acknowledge (packet with Ack-#)
  • 11. © Peter R. Egli 2015 11/21 Rev. 3.40 Transport Protocols indigoo.com 3. Elements of transport protocols (6/14) Connection establishment (5/5): Proposed Solution 3 (duplicate packet problem): The solution is foolproof. Duplicate packets can always be detected. Host 1 Host 2 Host 1 Host 2 Host 1 Host 2 Old duplicate packets Normal operation: Old connection request appearing out of the blue: Duplicate connection request and duplicate Ack: REJECT: Connection reject DATA: Packet with user data
  • 12. © Peter R. Egli 2015 12/21 Rev. 3.40 Transport Protocols indigoo.com 4. Elements of transport protocols (7/14) Connection release (1/3): Problem: Asymmetric release (only 1 peer closes the connection) is abrupt and may cause data loss. Proposed solution: Either side will disconnect its (outgoing) direction of the duplex connection (possibly collapsed into 3-way handshake). No data loss. But: Not fool-proof (DR packet may get lost and thus connection not closed, see next slide). Host 1 Host 2 No data delivered after a disconnect request Host 1 Host 2 DR: Disconnect Request
  • 13. © Peter R. Egli 2015 13/21 Rev. 3.40 Transport Protocols indigoo.com 4. Elements of transport protocols (8/14) Connection release (2/2): Problem: No protocol/procedure exists that can guarantee the proper connection termination in case of packet loss (“Two-army problem”, “Army-in-the-middle-problem”). Army-in-the-middle situation: The blue army has 4 troops (2 on either side of valley) while the white army has 3 troops. If both blue armies charge at the same time they can vanquish the white army. If only one of the blue armies charges it will succumb (3 white troops against 2 blue troops). This means: the blue armies have to synchronize their attack. But in order to synchronize they need to send a messenger through the valley; of course the messenger can get caught by the white army (‘lost packet’). Approach #1: The blue army #1 sends a messenger to tell blue army #2 to attack @ 1400. Problem: The blue army #1 does not know if the messenger managed to convey message or if he was caught. Thus blue army #1 will not attack. Approach #2: The blue army #2 sends back a messenger to acknowledge to blue army #1 that it got the message. Problem: The blue army #2 does not know if acknowledge-messenger reached blue army #1. Thus blue army #2 will not attack.  This play can be continued ad infinitum. No algorithm exists to make the acknowledgment procedure fool-proof. Source: http://authors.phptr.com/tanenbaumcn4/
  • 14. © Peter R. Egli 2015 14/21 Rev. 3.40 Transport Protocols indigoo.com 4. Elements of transport protocols (9/14) Connection release (3/3): Proposed solution: Start a timer when sending the DR. When it times out release the connection anyway. Host 1 Host 2 Normal case of 3-way handshake: Send DR + start timer Release connection Send Ack Send DR + start timer Release connection Host 1 Host 2 Final Ack lost: Send DR + start timer Release connection Send Ack Send DR + start timer Timeout: Release connection Host 1 Host 2 Response lost: Send DR + start timer Release connection, Send Ack Send DR + start timer Release connection Timeout: Send DR + start timer Send DR + start timer Host 1 Host 2 Response and subsequent DR lost: Send DR + start timer Send DR + start timer Timeout: Release connection Timeout: Send DR + start timer N timeouts: Release connection
  • 15. © Peter R. Egli 2015 15/21 Rev. 3.40 Transport Protocols indigoo.com 5. Elements of transport protocols (10/14) Flow control and buffering: Problem: The sender process may send at much higher speed than the receiver process can handle the data thus causing overflow (= packet loss). Proposed solution: The receiver buffers incoming packets. A sliding window mechanism provides a “backpressure” to the sender process when the buffer is imminent to overflow (or better prevents the receive buffer from becoming full in the first place). The receiver process continuously tells the sending process how much empty space is left in its receive buffer. The sender process never sends more data than can be accommodated in the receive buffer. More details see TCP flow control. Buffer B (receive buffer) Buffer A (send buffer) Process A Process B Empty space in buffer Buffer info update: Currently empty space for 5 packets
  • 16. © Peter R. Egli 2015 16/21 Rev. 3.40 Transport Protocols indigoo.com 6. Elements of transport protocols (11/14) Multiplexing: Multiplexing in the transport layer can be used for optimization. a. Upward multiplexing: Traffic from a “data stream” is distributed over several transport connections (TSAPs). An application may use multiple TCP connections to improve throughput (TCP’s throughput depends on delay, so overall throughput may be improved over physical lines with high delay). b. Downward multiplexing: Many “data streams” share the same transport connection using multiple NSAPs, possibly over multiple network interfaces (load balancing). Stream Control Transmission Protocol (SCTP) is a transport protocol that may use downward multiplexing (multi-homing). a. Upward multiplexing: App TSAP NSAP Phys. ports b. Downward multiplexing: App TSAP NSAP Phys. ports
  • 17. © Peter R. Egli 2015 17/21 Rev. 3.40 Transport Protocols indigoo.com 7. Elements of transport protocols (12/14) Crash recovery (1/2): Problem: A crash of one host (server) during the transmission leads to a connection loss which results in data loss. Proposed Solution: The client retransmits only unacknowledged packets. But: Does not work in all cases because the server sends the ACK and writes the data to the application sequentially (see next slide). Host crash Duplicate DATAn or missing DATAn packet! write Host 1 (client) Host 2 (file server)
  • 18. © Peter R. Egli 2015 18/21 Rev. 3.40 Transport Protocols indigoo.com 7. Elements of transport protocols (13/14) Crash recovery (2/2): No matter what the strategy of the hosts is, it is impossible to recover 100%-ly and transparently to the application from transport layer crashes. More generally: A crash at layer N can only be handled at layer N+1 (a system crash is a crash at every layer). Thus: It is left to the application layer to handle crashes of the remote host (client or server). Generally applications detect that the remote host has died and then simply restart the connection and retransmit everything. Result: OK = Protocol works correctly DUP = Protocol creates a duplicate message LOST = Protocol loses a message State: S0 = No unacknowledged packet outstanding S1 = 1 unacknowledged packet outstanding Action: A = Server sending acknowledgment W = Server writing to output process C = Crashing Strategy used by the sending host Strategy used by the receiving host First ACK, then write First write, then ACK AC(W) AWC C(AW) C(WA) WAC WC(A) Always retransmit OK DUP OK OK DUP DUP Never retransmit LOST OK LOST LOST OK OK Retransmit in S0 OK DUP LOST LOST DUP OK Retransmit in S1 LOST OK OK OK OK DUP Source: http://authors.phptr.com/tanenbaumcn4/
  • 19. © Peter R. Egli 2015 19/21 Rev. 3.40 Transport Protocols indigoo.com Process A LISTEN() CONNECT() RECEIVE()SEND() RECEIVE() SEND() CONNECTION REQUEST DATA DATA DISCONNECT REQUEST DISCONNECT() 8. Elements of transport protocols (14/14) Programming API: The programming API of the transport layer depends on the platform / language / framework that is used. However, the transport APIs of different platforms are usually very similar. A generic API of a connection-oriented transport protocol could look as follows: Primitive (function) Description LISTEN This function blocks until another process tries to connect (calls CONNECT), thus does a passive open. CONNECT Sends a connection request packet, thus does an active open. This function is the counterpart to the LISTEN function. SEND Send user data. RECEIVE Blocks until a user data packet arrives. DISCONNECT Sends a disconnect request to close the connection. Process B
  • 20. © Peter R. Egli 2015 20/21 Rev. 3.40 Transport Protocols indigoo.com 9. Transport layer characteristics (1/2) A transport layer protocol is either connection-oriented or connection-less. Connection-oriented transport protocols: The peers establish a connection prior to a data exchange. This is similar to a telephone line that needs setting up a connection prior to a conversation. Connection-less transport protocols: The peers send packets without a prior connection establishment. This is similar to the traditional postal service. Process A Process B Process A Process B
  • 21. © Peter R. Egli 2015 21/21 Rev. 3.40 Transport Protocols indigoo.com 9. Transport layer characteristics (2/2) Reliable versus unreliable service: Transport protocols provide reither eliable (guaranteed delivery) or unreliable (best-effort) service. Combinations: The characteristics connection-oriented / connection-less and reliable / unreliable can be combined. Usually connection-oriented protocols provide reliable transport service. Reliable Unreliable Connection-oriented TCP, SCTP - Connection-less RUDP UDP Process A Process B UDP: Unreliable, connection-less message (datagram) delivery protocol. TCP: Reliable, connection-oriented stream transfer protocol. SCTP: Reliable, connection-oriented message transfer protocol. RUDP: Reliable UDP (mixture between TCP and UDP)