CMPE 257 Wireless and Mobile Networking Spring 2002 Week 5 CMPE 257 Spring 2002 1 Today Multicast routing in MANETs Transport layer CMPE 257 Spring 2002 2 Transport Layer Outline TCP IP basics Impact of transmission errors on TCP performance Approaches to improve TCP performance Classification Discussion of selected approaches TCP over satellite CMPE 257 Spring 2002 3 Transport Layer Outline Impact of mobility on TCP performance How to improve TCP with mobility Issues in MANETs CMPE 257 Spring 2002 4 Internet Protocol IP Best effort service Packets may be delivered out oforder Packets may be lost Packets may be duplicated CMPE 257 Spring 2002 5 Transmission Control Protocol Reliable ordered delivery Implements flow and congestion control Reliability through retransmissions End to end semantics ACKs sent to TCP sender confirm delivery of data by TCP receiver ACK for data sent only after it reached receiver CMPE 257 Spring 2002 6 TCP Basics Cumulative acknowledgements ACK i acknowledges receipt of packets through I TCP uses byte sequence numbers For simplicity usually refer to packet sequence numbers CMPE 257 Spring 2002 7 Cumulative ACKs New ACK generated only on receipt of new in sequence packet 40 39 33 41 38 34 40 34 37 35 39 35 36 38 36 CMPE 257 Spring 2002 37 8 Delayed ACKs ACK delayed until Another packet is received or Delayed ACK timer expires 200 ms typical Reduces ACK traffic CMPE 257 Spring 2002 9 Delayed ACKs New ACK not produced on receipt of packet 36 but on receipt of 37 40 39 38 33 41 37 35 40 39 35 CMPE 257 Spring 2002 38 37 10 Duplicate ACKs A dupack is generated whenever an out of order segment arrives at the receiver CMPE 257 Spring 2002 11 Duplicate ACKs 40 39 38 37 34 42 41 36 40 36 Above example assumes delayed acks CMPE 257 Spring 2002 39 36 Dupack On receipt of 38 12 Duplicate ACKs Duplicate ACKs are not delayed Duplicate ACKs may be generated when a packet is lost or a packet is delivered out of order OOO CMPE 257 Spring 2002 13 Out of Order Packets 40 39 37 38 34 41 40 36 39 37 36 36 Dupack On receipt of 38 CMPE 257 Spring 2002 14 Number of Dupacks 40 39 New Ack 41 New Ack 42 37 New Ack 34 40 39 34 41 40 36 Dupack CMPE 257 Spring 2002 36 37 36 New Ack New Ack 38 36 Dupack 36 39 New Ack 38 15 Window Based Control Sliding window protocol Window size minimum of receiver s advertised window function of available receiver buffer size congestion window determined by sender based on feedback from the network CMPE 257 Spring 2002 16 Sliding Window Sender s window 1 2 3 4 5 6 7 8 9 10 11 12 13 Acks received Not transmitted Ack 5 1 2 3 4 5 6 7 8 9 10 11 12 13 Sender s window CMPE 257 Spring 2002 17 Self Clocking New data sent when old data is ack d Helps maintain equilibrium Congestion window size bounds the amount of data that can be sent per round trip time Throughput W RTT CMPE 257 Spring 2002 18 Window Size Ideal size delay bandwidth What if window size delay bw Inefficiency wasted bandwidth What if delay bw Queuing at intermediate routers Potential for packet loss CMPE 257 Spring 2002 19 TCP Packet Loss Detection TCP assumes that packet loss indicates congestion Packet loss detection Retransmission timeout RTO Duplicate acknowledgements CMPE 257 Spring 2002 20 RTO For very packet transmitted TCP sender starts timer If acknowledgement for timed packet not received before timer RTO packet assumed lost RTO dynamically calculated CMPE 257 Spring 2002 21 RTO Calculation RTO mean 4 mean deviation Large variations in the RTT increase the deviation leading to larger RTO CMPE 257 Spring 2002 22 Exponential Backoff Double RTO on each timeout T1 T2 2 T1 Timeout interval doubled Packet transmitted Time out occurs before ack received packet retransmitted CMPE 257 Spring 2002 23 Duplicate ACKs Timeouts can take too long How to initiate retransmission sooner Dupacks may be generated due to Use Duplicate ACKs as loss indicator Packet loss or Out of order packet delivery TCP sender assumes packet loss if it receives 3 consecutive dupacks CMPE 257 Spring 2002 24 Note on Duplicate ACKs 12 8 11 10 9 7 3 dupacks are also generated if a packet is delivered at least 3 places beyond its in sequence location CMPE 257 Spring 2002 25 TCP Congestion Control Slow start Congestion avoidance Fast retransmit Fast recovery Selective acknowledgements SACK CMPE 257 Spring 2002 26 Slow Start Initially cwnd 1 MSS max segment size Increment cwnd by 1 MSS on each new ACK Slow start ends when cwnd reaches the slowstart threshold cwnd grows exponentially in slow start Factor of 1 5 per RTT if every other packet ack d Factor of 2 per RTT if every packet ack d Could be less if sender does not always have data to send CMPE 257 Spring 2002 27 Congestion Avoidance On each new ACK increase cwnd by 1 cwnd packets cwnd increases linearly with time during congestion avoidance 1 2 MSS per RTT if every other packet ack d 1 MSS per RTT if every packet ack d CMPE 257 Spring 2002 28 Congestion Window size segments 14 Congestion avoidance 12 10 Slow start threshold 8 6 4 Slow start 2 0 0 1 Assumes acks are not delayed 2 3 4 5 6 7 8 Time round trips CMPE 257 Spring 2002 29 Congestion On detecting a packet loss TCP sender assumes network congestion CMPE 257 Spring 2002 30 Timeout On a timeout slow start is invoked cwnd is reduced to the initial value of 1 MSS Slow start threshold is set to half the window size before packet loss or ssthresh maximum min cwnd receiver s advertised window 2 2 MSS CMPE 257 Spring 2002 31 Congestion window segments After timeout cwnd 20 25 20 15 10 ssthresh 8 ssthresh 10 5 0 Time round trips CMPE 257 Spring 2002 32 Fast Retransmit When sender receives multiple 3 duplicate ACKs assumes packet lost without waiting for timeout Retransmits packet TCP Tahoe slow start congestion avoidance fast retransmit CMPE 257 Spring 2002 33 Fast Recovery Avoids slow start after single packet loss Operates in conjunction with fast retransmit After TCP sender receives 3 duplicate ACKs Retransmits one packet Reduces cwnd by half Every subsequent duplicate ACK clocks transmission New ACK causes sender to exit fast recovery CMPE 257 Spring 2002 34 Fast Recovery ssthresh min cwnd receiver s advertised window 2 at least 2 MSS retransmit the missing segment fast retransmit cwnd ssthresh number of dupacks when a new ack comes cwnd ssthreh Enter congestion avoidance Congestion window cut in half CMPE 257 Spring 2002 35 Window size segments 10 After fast recovery 8 6 4 2 0 Time round trips After fast retransmit
View Full Document