Transport Layer Concepts and Protocols
Transport Layer Concepts and Protocols
Pilani Campus
Computer Networks
Lecture No. 5
Original contents
J.F Kurose and K.W. Ross
Position of transport layer
Transport layer create packet from the message received by the application layer
Packetizing - divides long message into smaller ones smaller ones are
encapsulated into the data field of the TL packet and headers are added
Connection-oriented delivery
Connectionless Delivery
• Treats each packet independently
• No connection
Packet carrying the request must specify to which server program the request
must be delivered
PROVIDING RELIABILITY
Flow control
Error control
application
• more than one transport protocol available to transport
network
apps data link
physical
– Internet: TCP and UDP
Sliding Window
• congestion control
• flow control
• connection setup
local or
▪ UDP: User Datagram Protocol regional ISP
Sender:
application ▪ is passed an application- application
app. msg
layer message
transport ▪ determines segment TThhtransport
app. msg
header fields values
network (IP) ▪ creates segment network (IP)
physical physical
Transport Layer Actions
Receiver:
application ▪ receives segment from IP application
▪ checks header values
transport
app. msg ▪ extracts application-layer transport
message
network (IP) network (IP)
▪ demultiplexes message up
link to application via socket link
physical physical
Th app. msg
Multiplexing/Demultiplexing
HTTP
Transport FTP Transport
Layer Layer
Telnet
Network Network
Layer Layer
Hnnetwork
Ht HTTP msg transport
transport
network link network
link physical link
physical physical
Multiplexing / Demultiplexing
HTTP server
client
application application
transport
Hn Ht HTTP msg
Multiplexing / Demultiplexing
HTTP server
client1 client2
application P-client1 P-client2 application
transport
application
Transport Layer
Reliable Channel RDT protocol RDT protocol
(sending side) (receiving side)
Network Layer
Unreliable Channel
sending receiving
process process
application data data
transport
reliable channel
transport
network
unreliable channel
sending receiving
process process
application data data
transport
sender-side of receiver-side
Complexity of reliable data reliable data
transfer protocol
of reliable data
transfer protocol
transfer protocol will depend
(strongly) on characteristics of transport
network
unreliable channel (lose, unreliable channel
corrupt, reorder data?)
reliable service implementation
Principles of reliable data transfer
sending receiving
process process
application data data
transport
sender-side of receiver-side
Sender, receiver do not know reliable data
transfer protocol
of reliable data
transfer protocol
the “state” of each other, e.g.,
was a message received? transport
network
▪ unless communicated via a unreliable channel
message
reliable service implementation
Reliable data transfer protocol (rdt): interfaces
rdt_send(): called from above, deliver_data(): called by rdt
(e.g., by app.). Passed data to to deliver data to upper layer
deliver to receiver upper layer
sending receiving
process process
rdt_send() data data
deliver_data()
unreliable channel
udt_send(): called by rdt rdt_rcv(): called when packet
to transfer packet over arrives on receiver side of
Bi-directional communication over
unreliable channel to receiver unreliable channel channel
Reliable data transfer: getting started
We will:
▪ incrementally develop sender, receiver sides of reliable data transfer
protocol (rdt)
▪ consider only unidirectional data transfer
• but control info will flow in both directions!
▪ use finite state machines (FSM) to specify sender, receiver
event causing state transition
actions taken on state transition
state: when in this “state”
next state uniquely state state
determined by next 1 event
event 2
actions
Reliable data transfer: getting started
send receive
side side
We’ll:
incrementally develop sender, receiver sides of reliable data transfer protocol
(rdt)
consider only unidirectional data transfer
– but control info will flow on both directions!
use finite state machines (FSM) to specify sender, receiver
U L/R .008
sender
= = = 0.00027
RTT + L / R 30.008 microsec
onds
sender receiver
Increase utilization
by a factor of 3!
U L/R 8ms
= = = 0.08
sender 100ms
D+L/R microsec
onds
Sender Operation:
1. [0, base-1] - packets that have already been transmitted and acknowledged
2. [base,nextsequence-1] - packets that have been sent but not yet ack
4. Seqnum > N+1 cannot be used until unack packet in the pipelimne is ack
ACK0 ACK1
ACK4
ACK1
01234 5678 9
Sender Receiver
BITS Pilani, Pilani Campus
Another Example