《无线网络教学资料》rr-ch00-wireless-tcp-cuiyong.ppt
Wireless TCP,CS 80240333 Instructor:CUI Yong,1,1,Outline,Traditional TCPSolutions Split approach based solutionsLink layer solutionsEnd to end solutionsImpact of mobility,2,2,Outline,Traditional TCPSolutions Split approach based solutionsLink layer solutionsEnd to end solutionsImpact of mobility,3,3,Review of TCP/IP,IPPackets may be delivered out-of-orderPackets may be lostPackets may be duplicated,4,4,Nitin H.Vaidya Infocom06,Review of TCP/IP(contd),TCPconnection-orientedReliable deliveryAchieved by means of retransmissions if necessaryCongestion avoidance and controlEnd-to-end semanticsAcknowledgements sent to TCP sender confirm delivery of data received by TCP receiverAck for data sent only after data has reached receiver,5,5,6,Slow start,Congestionavoidance,Slow start threshold,Example assumes that acks are not delayed,Review of TCP/IP(contd),Window based flow controlCongestion window size bounds the amount of data that can be sent per round-trip timeThroughput=W/RTTCongestion Avoidance and Control,How does TCP detect a packet loss?,Retransmission timeout(RTO)TCP sender sets retransmission timer for only one packetIf ACK for the timed packet is not received before timer goes off,the packet is assumed to be lostRTO dynamically calculatedDuplicate acknowledgementsTCP sender assumes that a packet loss has occurred if it receives three dupacks consecutively,7,7,Review of TCP/IP(contd),8,ssthresh=8,ssthresh=10,cwnd=20,After timeout,Congestion Control,Fast RetransmitFast retransmit occurs when multiple(=3)dupacks come backFast recovery follows fast retransmitFast Recoveryssthresh=min(cwnd,receivers advertised window)/2(at least 2 MSS)retransmit the missing segment(fast retransmit)cwnd=ssthresh+number of dupackswhen a new ack comes:cwnd=ssthreshenter congestion avoidance,9,Congestion Control,10,Window size is reduced in half after fast retransmit and fast recovery,Receivers advertised window,After fast recovery,TCP problems in wireless network,TCP assumptionPacket loss is due to congestionNeed to reduce the transmitting rate But in wireless networkPacket loss may be caused byHigh BER,BER of a wireless channel is 10-3-10-5,while that of wired link is 10-8-10-10 or betterUnstable channelUser mobilityNeed fast retransmission,11,11,Impact of transmission errors,Random errors may cause fast retransmitretransmission of lost packetreduction in congestion windowBurst errors may cause timeoutsTimeout results in slow start Slow start reduces congestion window to 1 MSS,reducing throughputRandom errors may also cause timeoutMultiple packet losses in a window can result in timeout when using TCP-Reno(and to a lesser extent when using SACK),12,Impact of transmission errors,TCP cannot distinguish between packet losses due to congestion and transmission errorsReducing congestion window in response to errors is unnecessaryReduction in congestion window reduces the throughput:Throughput=W/RTTIdeally:W=delay*bandwidthWith loss rate p:W(=delay*bandwidth)Throughput suffers,13,Impact of random errors,14,Exponential error model2 Mbps wireless full duplex linkNo congestion losses,The throughput is inversely proportional to the error rate,Nitin H.Vaidya ASSET99,Hidden and exposed station problems,Hidden station problems,15,Exposed station problems,Instability problem,In some scenarios the throughput may drop down to zero which makes the connection unstable even if there is only one TCP connectionIf station 1 is sending to station 5,the throughput can drop down to zero in some scenarios because of the followingThe hidden and exposed station problems that may prevent station 2 from receiving RTS or sending CTS to station 1The random backoff timeHigh window size that the TCP usesSolutions for the Instability ProblemDecreasing the maximum window size of the TCP layermaking the interfering range the same as the communication range,16,In-compatibility problem,Two simultaneous TCP traffics cannot coexist in the networkOnce one session develops,the other one is shut downThe overturn can happen at any time randomlyThe main cause of this problemThe hidden station problemThe exposed node problem The exponential back-off scheme in the MAC layerSolutions for the In-Compatibility ProblemChanging the back-off policy by penalizing stations that transmit too much data,so the other stations can still use the media Adjusting the interfering and the sensing range,17,One-hop unfairness problem,If there are two simultaneous TCP connections one is a single-hop connection and the other is a multi-hop connection,the single-hop connection will be activated even if the multi-hop connection started firstCauses are hidden station problem,the exposed node problem and the exponential back-off scheme Solutions for the Unfairness ProblemActive Neighbor Estimation(ANE)based back-off scheme:used instead of the exponential back-off scheme Receiving beam forming(RBF)antennas:A directional antenna will be used to get rid of the undesired interference from competing stations.,18,Outline,Traditional TCPSolutions Split approach based solutionsLink layer solutionsEnd to end solutionsImpact of mobility,19,19,Solutions of TCP over Wireless,Snoop TCP,20,TCP over Wireless,Link layer solutions,Split approachbased solutions,End-to-endsolutions,TCP-unaware link layer,I-TCP,Mobile-TCP,ELN,WTCP,TCP SACK,TTCP,Outline,Traditional TCPSolutions Split approach based solutionsLink layer solutionsEnd to end solutionsImpact of mobility,21,21,Solutions of TCP over Wireless,Snoop TCP,22,TCP over Wireless,Link layer solutions,Split approachbased solutions,End-to-endsolutions,TCP-unaware link layer,I-TCP,Mobile-TCP,ELN,WTCP,TCP SACK,TTCP,Split approach based solutions,ConsiderationThe wired portion is more reliable than wireless portionWireless link may be a bottleneckSo separate the control A single TCP connection split into two TCP connectionsFH-MH=FH-BS+BS-MH,23,23,Split connection approach,24,Per-TCP connection state,TCP connection,TCP connection,Fixed Host,Base Station,Mobile Host,ITCP(Indirect-TCP),Consideration Splitting of TCP connection into two distinct connectionsone between the MN and BS one between BS and CN,25,A.Bakre ICDCS95,ITCP(contd),Mobile node send a special I-TCP calls to current AP to establish a connection.The Fixed Host is completely unaware of the indirection,26,ITCP Socket and State Migration,27,When MN shifts to a new APThe old AP acts as a foreign agent buffering and forwarding the packets to the new AP(foreign agent),ITCP(contd),AdvantagesNo changes in the fixed network necessary,no changes for the hosts(TCP protocol)necessary,all current optimizations to TCP still workTransmission errors on the wireless link do not propagate into the fixed networkSimple to control,wireless TCP is used only for one hop between a foreign agent and mobile hostFast retransmission of packets is possible,28,ITCP(contd),DisadvantagesLoss of end-to-end semanticsHigher latency in handoff,due to buffering of data within the foreign agent and forwarding to a new foreign agent,29,MTCP(Mobile-TCP),Problem Mobility-Connection between MN and BS is lost for small intervals of time,this leads to Time out at sender;Slow start at senderData buffered by AP may be too largeMTCP solve this problem with the help of Supervisory Host(SH),30,30,Remains one Ack to FH,Z.Haas ICC97,MTCP(contd),Supervisory host The node in the wired network that controls a number of APsNo caching,no retransmissionRemains one Ack to FHMonitors all packets,if disconnection detectedset sender window size to 0sender automatically goes into persistent mode(the state of the sender will not change no matter how long the receiver is disconnected)Old or new SH reopen the window,31,MTCP(contd),AdvantagesMaintains E2E semantics(Even though TCP connection is split at the supervisory host)Supports disconnectionNo buffer forwardingAvoids slow start at the senderDisadvantagesLoss on wireless link propagated into fixed networkAdapted TCP on wireless link,32,32,Split-based Approach:Classification,Hides transmission errors from senderPrimary responsibility at base stationIf specialized transport protocol used on wireless,then wireless host also needs modification,33,Split-based Approach:Advantages,BS-MH connection can be optimized independent of FH-BS connectionDifferent flow/error control on the two connectionsLocal recovery of errorsFaster recovery due to relatively shorter RTT on wireless link Good performance achievable using appropriate BS-MH protocolStandard TCP on BS-MH performs poorly when multiple packet losses occur per window(Selective acks improve performance for such cases),34,Split-based Approach:Disadvantages,End-to-end semantics violatedAck may be delivered to sender,before data delivered to the receiverMay not be a problem for applications that do not rely on TCP for the end-to-end semantics,35,BS retains hard stateBS failure can result in loss of data(unreliability)If BS fails,packet 40 will be lost Because it is ackd to sender,the sender does not buffer 40,36,Split-based Approach:Disadvantages,Split-based Approach:Disadvantages,BS retains hard stateHand-off latency increases due to state transferData that has been ackd to sender,must be moved to new base station,37,Split-based Approach:Disadvantages,Buffer space needed at BS for each TCP connectionBS buffers tend to get full,when wireless link slower(one window worth of data on wired connection could be stored at the base station,for each split connection)Window on BS-MH connection reduced in response to errorsmay not be an issue for wireless links with small delay-bw product,38,Split-based Approach:Disadvantages,Extra copying of data at BScopying from FH-BS socket buffer to BS-MH socket bufferincreases end-to-end latencyMay not be useful if data and acks traverse different paths(both do not go through the base station)Example:data on a satellite wireless hop,acks on a dial-up channel,39,ack,Outline,Traditional TCPSolutions Split approach based solutionsLink layer solutionsEnd to end solutionsImpact of mobility,40,40,Solutions of TCP over Wireless,Snoop TCP,41,TCP over Wireless,Link layer solutions,Split approachbased solutions,End-to-endsolutions,TCP-unaware link layer,I-TCP,Mobile-TCP,ELN,WTCP,TCP SACK,TTCP,Link layer solution,Goal:Let link layer correct all errorsMechanism FEC(Forward Error Correction):redundancy is encoded into the messageUsed to correct small number of errorsFEC incurs overhead even when errors do not occurARQ(Automatic Repeat Request):Retransmission at link layerUsed when FEC capability is exceededRetransmission overhead incurred only if errors occurHARQ:FEC+ARQ,42,42,Link level retransmissions,43,TCP connection,Link layer state,Link level retransmissions:Issues,How many times to retransmit at the link level before giving up?Finite bound-semi-reliable link layerNo bound-reliable link layerWhat triggers link level retransmissions?Link layer timeout mechanismLink level acks(negative acks,dupacks,)Other mechanisms(e.g.,Snoop,as discussed later)How much time is required for a link layer retransmission?Small fraction of end-to-end TCP RTTLarge fraction/multiple of end-to-end TCP RTT,44,Link level retransmissions:Issues,Should the link layer deliver packets as they arrive,or deliver them in-order?Link layer may need to buffer packets and reorder if necessary so as to deliver packets in-orderRetransmissions can cause head-of-the-line blocking,45,Although link to receiver 1 may be in a bad state,the link to receiver 2 may be in a good stateRetransmissions to receiver 1 are lost,and also block a packet from being sent to receiver 2,Base station,Link level retransmissions:Issues,Retransmissions can cause congestion lossesAttempting to retransmit a packet at the front of the queue,effectively reduces the available bandwidth,potentially making the queue at base station longerIf the queue gets full,packets may be lost,indicating congestion to the senderIs this desirable or not?,46,Link level retransmissions:An early study,The senders Retransmission Timeout(RTO)is a function of measured RTT(round-trip times)Link level retransmits increase RTT,therefore,RTOIf errors not frequent,RTO will not account for RTT variations due to link level retransmissionsWhen errors occur,the sender may timeout&retransmit before link level retransmission is successfulSender and link layer both retransmitDuplicate retransmissions(interference)waste wireless bandwidthTimeouts also result in reduced congestion windowDisadvantage:not accurately model real TCP stacks,47,A.DeSimone Globecom93,Link level retransmissions:A more accurate picture,Frequent errors increase RTO significantly on slow wireless linksLikelihood of interference between link layer and TCP retransmissions smallerBut congestion response will be delayed due to larger RTOWhen wireless losses do cause timeout,much time wastedLarge TCP Retransmission Timeout IntervalsGood for reducing interference with link level retransmitsBad for recovery from congestion lossesNeed a timeout mechanism that responds appropriately for both types of losses(Open problem),48,H.Balakrishnan Sigcomm96,Link level retransmissions:In-order delivery,To avoid unnecessary fast retransmit,link layer using retransmission should attempt to deliver packets“almost in-order”In-order deliveryNot all connections benefit from retransmissions or ordered delivery(audio)Need to be able to specify requirements on a per-packet basis Should the packet be retransmitted?How many times?Enforce in-order delivery?Need a standard mechanism to specify the requirements open issue(IETF PILC working group),49,R.Ludwig Sigmetrics98,Link layer schemes:Summary,When is a reliable link layer beneficial to TCP performance?If it provides almost in-order deliveryand TCP retransmission timeout large enough to tolerate additional delays due to link level retransmits,50,Link layer schemes:Classification,Hide wireless losses from TCP senderLink layer modifications needed at both ends of wireless linkTCP need not be modified,51,Snoop TCP,“Transparent”extension of TCP within the BS(foreign agent)Buffering of packets sent to the mobile nodeLost packets on the wireless link(both directions!)will be retransmitted immediately by the mobile node or base station(foreign agent),The BS therefore“snoops”the packet flow and recognizes acknowledgements in both directionsChanges of TCP only within the BS,52,H.Balakrishnan ACM95,Snoop TCP,53,Data transfer to the mobile hostFA buffers data until it receives ACK of the MH,FA detects packet loss via duplicated ACKs(DUPACKs)or time-outFast retransmission possible,transparent for the fixed network,Data transfer from the mobile hostFA detects packet loss on the wireless link via sequence numbers,FA answers directly with a NACK to the MHMH can now retransmit data with only a very short delay,Snoop TCP,Retains local recovery of Split Connection approach and link level retransmission schemesIntegration of the MAC layerMAC layer often has similar mechanisms to those of TCPTh