Data and ComputerData and ComputerCommunications Communications Eighth Edition Eighth Edition by William Stallings by William Stallings Lecture slides by Lawrie Brown Lecture slides by Lawrie Brown Chapter 20 Chapter 20 ± ± Transport Protocols Transport Protocols
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
The foregoing observations should make usThe foregoing observations should make us
reconsider the widely held view that birds livereconsider the widely held view that birds live
only in the present. In fact, birds are aware of only in the present. In fact, birds are aware of
more than immediately present stimuli; theymore than immediately present stimuli; theyremember the past and anticipate the future.remember the past and anticipate the future.
network service of arbitrary length messagesnetwork service of arbitrary length messages
eg. reliable packet switched network with X.25eg. reliable packet switched network with X.25 eg. frame relay with LAPF control protocoleg. frame relay with LAPF control protocol
eg. IEEE 802.3 with connection oriented LLC serviceeg. IEEE 802.3 with connection oriented LLC service
transport service is a simple, end to end protocoltransport service is a simple, end to end protocol
between two systems on same networkbetween two systems on same network issues are: addressing, multiplexing, flow control,issues are: addressing, multiplexing, flow control,
connection establishment and terminationconnection establishment and termination
issues:issues: longer transmission delay between transport entitieslonger transmission delay between transport entities
compared with actual transmission time delayscompared with actual transmission time delays
communication of flow control infocommunication of flow control info variable transmission delay so difficult to use timeoutsvariable transmission delay so difficult to use timeouts
want TS flow control because:want TS flow control because: receiving user can not keep upreceiving user can not keep up
receiving transport entity can not keep upreceiving transport entity can not keep up which can result in buffer overflowingwhich can result in buffer overflowing
managing flow difficult because of gap betweenmanaging flow difficult because of gap betweensender and receiver sender and receiver
fixed timer fixed timer based on understanding of network behavior based on understanding of network behavior
can not adapt to changing network conditionscan not adapt to changing network conditions
too small leads to unnecessary retoo small leads to unnecessary re--transmissionstransmissions too large and response to lost segments is slowtoo large and response to lost segments is slow
should be a bit longer than round trip timeshould be a bit longer than round trip time
adaptive schemeadaptive scheme may not ACK immediatelymay not ACK immediately can not distinguish between ACK of original segmentcan not distinguish between ACK of original segment
and reand re--transmitted segmenttransmitted segment
conditions may change suddenlyconditions may change suddenly
receiver must recognize duplicatesreceiver must recognize duplicates
if duplicate received prior to closing connectionif duplicate received prior to closing connection receiver assumes ACK lost and ACKs duplicatereceiver assumes ACK lost and ACKs duplicate
sender must not get confused with multiple ACKssender must not get confused with multiple ACKs
need a sequence number space large enough to notneed a sequence number space large enough to not
cycle within maximum life of segmentcycle within maximum life of segment
credit allocation quite robust with unreliable netcredit allocation quite robust with unreliable net
can ack data & grant creditcan ack data & grant credit
or just one or other or just one or other
lost ACK recovers on next receivedlost ACK recovers on next received
have problem if AN=i, W=0 closing windowhave problem if AN=i, W=0 closing window
then send AN=i, W=j to reopen, but this is lostthen send AN=i, W=j to reopen, but this is lost
sender thinks window closed, receiver thinks it opensender thinks window closed, receiver thinks it open solution is to use persist timer solution is to use persist timer
if timer expires, send somethingif timer expires, send something
could be recould be re--transmission of previous segmenttransmission of previous segment
need to associate sequence number with FINneed to associate sequence number with FIN receiver waits for all segments before FINreceiver waits for all segments before FIN
after restart all state info is lostafter restart all state info is lost
may have half open connectionmay have half open connection as side that did not crash still thinks it is connectedas side that did not crash still thinks it is connected
close connection using keepalive timer close connection using keepalive timer wait for ACK for (time out) * (number of retries)wait for ACK for (time out) * (number of retries)
when expired, close connection and inform user when expired, close connection and inform user
send RST i in response to any i segment arrivingsend RST i in response to any i segment arriving
user must decide whether to reconnectuser must decide whether to reconnect have problems with lost or duplicate datahave problems with lost or duplicate data
a complex set of primitives:a complex set of primitives:
incl. passive & active open, active open withincl. passive & active open, active open withdata, send, allocate, close, abort, statusdata, send, allocate, close, abort, status
passive open indicates will accept connectionspassive open indicates will accept connections
active open with data sends data with openactive open with data sends data with open
flow control uses credit allocation of number of flow control uses credit allocation of number of
octetsoctets data buffered at transmitter and receiver data buffered at transmitter and receiver
sent when transport entity readysent when transport entity ready
unless PUSH flag used to force sendunless PUSH flag used to force send
can flag data as URGENT, sent immediatelycan flag data as URGENT, sent immediately
if receive data not for current connection, RSTif receive data not for current connection, RSTflag is set on next segment to reset connectionflag is set on next segment to reset connection
in absence of push, can deliver data atin absence of push, can deliver data at
own convenienceown convenience
may deliver from each segment receivedmay deliver from each segment received higher O/S overheads but more responsivehigher O/S overheads but more responsive
may buffer data from multiple segmentsmay buffer data from multiple segments
less O/S overheads but slower less O/S overheads but slower
TCP has a queue of segments transmittedTCP has a queue of segments transmittedbut not acknowledgedbut not acknowledged
will retransmit if not ACKed in given timewill retransmit if not ACKed in given time
first onlyfirst only -- single timer, send one segment onlysingle timer, send one segment onlywhen timer expires, efficient, has delayswhen timer expires, efficient, has delays
batchbatch -- single timer, send all segments whensingle timer, send all segments whentimer expires, has unnecessary transmissionstimer expires, has unnecessary transmissions
individualindividual -- timer for each segment, complextimer for each segment, complex
effectivenesseffectiveness depends in part on receiver¶sdepends in part on receiver¶saccept policyaccept policy
static timer likely too long or too shortstatic timer likely too long or too short
estimate round trip delay by observing pattern of estimate round trip delay by observing pattern of delay for recent segmentsdelay for recent segments
set time to value a bit greater than estimateset time to value a bit greater than estimate simple average over a number of segmentssimple average over a number of segments
exponential average using time series (RFC793)exponential average using time series (RFC793)
if segment is reif segment is re--transmitted, ACK may be for:transmitted, ACK may be for:
first copy of the segment (longer RTT than expected)first copy of the segment (longer RTT than expected)
second copysecond copy
no way to tellno way to tell
don¶t measure RTT for redon¶t measure RTT for re--transmitted segmentstransmitted segments
calculate backoff when recalculate backoff when re--transmission occurstransmission occurs
use backoff RTO until ACK arrives for segmentuse backoff RTO until ACK arrives for segmentthat has not been rethat has not been re--transmittedtransmitted