Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Reliable Stream Transport Service (TCP)

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 8

Reliable Stream Transport

Service (TCP)
Need for Stream Delivery
Lowest Level
• Packets are lost or destroyed
• Network hardware fails
• Network too heavily loaded
• Packet switching changes routes dynamically
– Packets out of order
– Deliver them after substantial delay
– Deliver duplicates
Highest Level
• Large volume of data
– Complex
– Build error detection and recovery into each
application program
Properties of The Reliable Delivery
Service
• Interface between application programs and
TCP reliable delivery service can be
characterized by 5 features
– Stream orientation
– Virtual Circuit Connection
– Buffered Transfer
– Unstructured Stream
– Full duplex connection
Providing Reliability
• Reliable protocol use a single fundamental
technique known as positive
acknowledgement with retransmission
• Sender keeps a record of each packet it sends
& waits for the acknowldement
• Sender starts a timer when it sends a packet
• Retransmits the packet if the timer expires
before ack arrives
Connection Establishment

Active participant Passive participant


(client) (server)
SYN,
Sequ
enceN
um =
x
um = y,
uenceN
, S e q = x +1
K t
SY N
+ AC
wled gmen
k no
Ac
ACK,
Ackno
wledg
men t=y+
1

CS 640 6
Connection Termination
Active participant Passive participant
(server) (client)
FIN, S
equen
ceNu
m=
x

n t = x+1
l ed gme
Ackn
ow u m = y
N
eq u ence
S
FIN,

Ackno
wledg
ment
=y + 1

CS 640 7
State Transition Diagram
CLOSED
Active open/SYN
Passive open Close
Close

LISTEN

SYN/SYN + ACK Send/SYN


SYN/SYN + ACK
SYN_RCVD SYN_SENT
ACK SYN + ACK/ACK

Close/FIN ESTABLISHED

Close/FIN FIN/ACK
FIN_WAIT_1 CLOSE_WAIT
AC FIN/ACK
ACK K Close/FIN
+
FI
FIN_WAIT_2 N/
AC CLOSING LAST_ACK
K
ACK Timeout after two ACK
segment lifetimes
FIN/ACK
TIME_WAIT CLOSED

CS 640 8

You might also like