60
1 Transport Layer for Transport Layer for Mobile Ad Hoc Mobile Ad Hoc Networks Networks Based on slides by: Eric Law, UCR March 2005

1 Transport Layer for Mobile Ad Hoc Networks Based on slides by: Eric Law, UCR March 2005

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

1

Transport Layer for Mobile Transport Layer for Mobile Ad Hoc NetworksAd Hoc Networks

Based on slides by: Eric Law, UCR

March 2005

2

The Quest for the Transport Layer Assess the state of the art of transport

protocols Target environment: mobile ad hoc nets

(MANET) Which is the best TCP variant? Do we need a new transport protocol? The question is very timely…

Introduction

3

Network Architecture at a Crossroads The community recognizes the need for change Wireline-centric network design is “obsolete” New network environments have emerged

Ad hoc, sensors, consumer-owned, delay-tolerant New networking technologies have emerged

UWB, cooperative approaches, MIMO, directed antennas

Introduction

4

New Class of Networks

Thousands of nodes, highly resource constrained, highly unreliable wireless links, low duty cycle (smartdust)

Tens - thousands of nodes, Nano-sensors

Hundreds of nodes, resource constrained, unreliable wireless links (Sensors)

Tens of nodes, resource constrained, wireless links, charged every day (PDAs)

Tens of nodes, resource constrained, wireless

links, line powered (embedded devices)

Tens of nodes, resource constrained, wireless

links, line powered (computers)

Introduction

5

A New Era Has BegunNew Machines

New Environments Applications

New Networks

Introduction

6

The Role of Networking is Central

WirelessNetworking

EmbeddedSystems

Sensors

Embedded Sensor

Applications

Introduction

7

Revisiting the Architecture

The vision:Wireless as an integral part of the networkMultiple wireless hops: not just the last

milePockets of wireless ad hoc connectivity

A new protocol stack is required Is TCP/IP capable of delivering?

Introduction

8

Revisiting The Hourglass

Introduction

Email WWW Voice...

SMTP HTTP RTP...

TCP UDP

IP

Ethernet PPP…

MultiAccess async sync...

copper fiber radio...

User Application

Application Protocol

Transport Protocol

Media Access Protocol

Media Sharing Principles

Physical System

Internet Protocol

9

Problem: Evaluate TCP

Why does TCP perform poorly in MANETs?Developed for wire-line networks.Assume all losses are due to congestion.

Many TCP variants have been proposed.How good are they? Are they sufficient?

Are there any other alternatives?Are non-TCP protocols the solution?

10

Our goal

Identify the problems of TCP in MANETs. Evaluate various major TCP variants.

12 TCP variants, 7 improvement techniques Observations:

Most TCP variants are NOT sufficient.A new transport layer protocol is needed.

11

Overview of Results The best TCP variants:

TCP-Westwood and TCP-Jersey seem the best. Both protocols estimate bandwidth more accurately.

TCP mechanisms: Feedback from intermediate nodes leads to big gains.

The best non-TCP approaches: Ad-hoc Transport Protocol (ATP) seems to address

most issues Non-window based: estimates achievable rate periodically

Split-TCP: promising new way of looking at transport layer

Dynamically buffer packets mid-path Key: Separation of congestion control from reliability.

12

Roadmap

Overview of TCP The problems of TCP over MANETs Overview of best transport protocols In depth

Specific problems of TCP over MANETs Details of major TCP variants Discussion - other efforts

Conclusion

13

Overview of TCP concepts

Conventional TCP: Tahoe, Reno, New-Reno

Sending rate is controlled by Congestion window (cwnd): limits the # of

packets in flight Slow-start threshold (ssthresh): when CA s

tart Loss detection

3 duplicate ACKs (faster, more efficient) Retransmission timer expires (slower, less

efficient) Overview of congestion control mechanis

ms Slow-start phase: cwnd start from 1 and in

crease exponentially Congestion avoidance (CA): increase linearl

y Fast retransmit and fast recovery: Trigger b

y 3 duplicate ACKs

Slow start

Slow start

Congestion

avoidance

Congestiondetected

Congestion

avoidance

Fast retransmit/fast recovery

1

2

3

4

threshold

threshold

Time

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 220

2

4

6

8

10

12

14

16

18

20

22

24

26

28

30

32

34

Congestion windows size

Overview

Slow-start Congestionavoidance

14

What is different in MANETs?1. Mobility

Route stability and availability2. High bit error rate

Packets can be lost due to “noise”3. Unpredictability/Variability

Difficult to estimate time-out, RTT, bandwidth4. Contention: packets compete for airtime

Intra-flow and inter-flow contentions5. Long connections have poor performance

More than 4 hops thruput drops dramatically

Overview

15

Overview of the Best Protocols TCP-Westwood [Casetti et. al.]

Estimate bandwidth to alleviate the effect of wireless errors. TCP-Jersey [Xu et. al.]

Estimate bandwidth to alleviate the effect of wireless errors. Congestion warning assists the determination of packet loss

due to wireless error from congestion. ATP [Sundaresan et. al.]

Rate based transmission, periodic rate feedback, no timeout concept, reliability provided by SACK.

Split-TCP [Kopparty et. al.] Separating congestion control from reliability. Dropped packets are recovered from the most recent proxy in

stead of the source.

Overview

16

Why does TCP fail in MANETs?Specific problems are identified:1. TCP misinterprets route failures as congestion2. TCP misinterprets wireless errors as congestion3. Intra-flow and inter-flow contention reduce

throughput and fairness4. Delay spike causes TCP to invoke unnecessary

retransmissions RTO too small unnecessary retransmissions.

5. Inefficiency due to the loss of retransmitted packet

When retransmitted packet is lost timer expires performance drops

Overview

17

Roadmap

Overview of TCP The problems of TCP over MANETs Overview of best transport protocols In depth

Specific problems of TCP over MANETs Details of major TCP variants Discussion - other efforts

Conclusion

18

Specific problems of TCP over MANETs

TCP misinterprets route failures as congestionEffects: Reduce sending rate Buffered packets (Data and ACKs) at

intermediate nodes are dropped.Sender encounters timeout.

Under prolonged disconnection, a series of timeouts may be encountered.

19

TCP misinterprets wireless errors as congestion Effects: Incorrect execution of congestion contro

l Performance drops. Wireless channel is error-prone compared to wireli

ne Fading, interference, noise

Specific problems of TCP over MANETs

20

Intra-flow and inter-flow contention Effects: Increased delay, unpredictability, and u

nfairness. Inter-flow contention: contention of nearby flows. Intra-flow contention: between packets of the sam

e flow (e.g. forward data and reverse ACKs). Wireline: only packet on same link “compete”

Data stream

ACKs stream

Specific problems of TCP over MANETs

Two nearby flows

21

Delay spike causes TCP to invoke unnecessary retransmissionsEffects: Performance drops and

many unnecessary retransmissions. [Ludwig & Katz]

Variability: Spikes are not uncommon here

Spikes throw off parameter estimation and tuning

RTO, window size, slow-start threshold

Specific problems of TCP over MANETs

22

Inefficiency due to the loss of retransmitted packetEffects: Performance drops

significantly under high loss environment (e.g. MANETs).

Losing a retransmitted packet hurts TCP can recover from one loss (fast

retransmission)Wired networks: packet loss rate is low.Here, high packet loss makes the

problem significant

Specific problems of TCP over MANETs

23

Classification of Transport protocols TCP variants try to improve the

performance by the following ways: Estimating the available bandwidth Determining route failure and wireless error Reducing contention Detecting spurious retransmission Exploiting buffering capability

New approaches: Non TCP variants Use rate based instead of window based

approach Enable dynamic buffering (split TCP)

24

Estimating the available bandwidth TCP-Vegas [Brakmo et. al.]

Use difference = expected rate - actual rate to regulate the sending rate. Pro: Avoid congestion and typical loss at the end of the slow-start. Con: Route changes invalidate rate calculation. Unfairness problems.

TCP-Westwood [Casetti et. al.] Use the rate of return of ACKs to estimate bandwidth. Sender re-computes the cwnd and ssthresh upon any loss. Pro: Robust to wireless errors. Con: Route changes invalidate bandwidth estimation. Depends on the behavi

or of returned ACKs. TCP-Jersey [Xu et. al.]

Use the rate of return of ACKs to estimate bandwidth. Intermediate nodes warn sender of congestion Pro: Robust to wireless error Pro:Avoids congestion proactively Con: Require assistance from intermediate nodes. Depends on the behavior

of returned ACKs.

Details of some major TCP variants

25

Determining Route Failure and Wireless Error Explicit Link Failure Notification (ELFN) [Holland & Vaidya]

Upstream node of the failed link notifies the sender of the failure. Disable timers, stop all data transmission and send probing to detect restore

d route. Pro: Avoid execution of congestion control upon route failures. Con: Old TCP states (cwnd and timer) are used after route restoration.

Ad-hoc TCP (ATCP) [Liu & Singh] Hide errors from TCP sender (timeout and the 3rd DUPACKs). Employ ECN and route failure notification to assist TCP’s decision. Pro: Does not modify TCP itself. Con: Require assistance from intermediate nodes.

ADTCP [Fu et. al.] Use multiple metrics to determine the network behavior:

Congestion, Channel error, Route change, Disconnection states. Pro: Does not rely on intermediate node feedback. Con: Thresholds used to determine network states must be carefully defined.

Details of some major TCP variants

26

Reducing Contention Adaptive Congestion Window Limit (CWL) [Chen et. al.]

Upper bound of bandwidth-delay product of a chain is kN. 1/8 < k < 1/4, N is the “round-trip hop-count x packet size” From experiment, k approximately 1/5 of the round-trip hop-count. Pro: Adapt the maximum cwnd to avoid excessive contention. Con: Can only apply in chain of nodes. Does not account for the nearby flows.

Link RED (LRED) and Adaptive Pacing (AP) [Fu et. al.] Intermediate nodes mark packets when:

the average # of retires of current transmission > threshold. Sender reduces sending rate. Nodes back-off an additional time if they start to markpackets Pro: Avoid congestion and reduce contention. Con: Require modification at link-layer on each node.

TCP Adaptive Delayed Acknowledgement (TCP-ADA) [Singh & Kankipati] Send one ACK for a window of data. Pro: Reduce the number of ACKs and thus reduce contention. Con: Increase burstiness of the forward transmissions.

Details of some major TCP variants

1 2 3 4 5 6 7

27

Detecting Spurious Retransmission TCP-Eifel [Ludwig & Katz]

Use timestamp option of TCP to solve retransmission ambiguity.

Sender can determine whether the received ACK is from original transmission or retransmission.

After retransmission, if next ACK is from original transmission spurious!

Restore the cwnd and ssthresh if spurious retransmission is detected.

Pro: Robust to sudden delay spike. Con: Require the use of timestamp option or modifi

cation of TCP header.

Details of some major TCP variants

28

Buffering capability and Sequence information (TCP-BuS)[Kim et.al.] Use explicit route failure notification to detect route failure. When route failure occurs, intermediate nodes buffer the pen

ding packets and TCP sender doubles the retransmission timeout (RTO) value.

Avoid timeouts and unnecessary retransmissions. Pro: Reduce the number of timeout events reduce the num

ber of retransmissions. Con: Require assistance from intermediate nodes. Special ro

uting protocol is used.

Exploiting Buffering CapabilityDetails of some major TCP variants

29

Non-TCP based approaches

30

A Rate-based Transport Layer Protocol Ad-hoc Transport Protocol (ATP) [Sundaresan et. al.]

Feedback from intermediate nodes path failure, queueing delay, periodic feedback on rate

Rate based transmission Entirely rate-controlled. (no window concept) Evenly distribute transmissions over time. (reduce burstniess)

Decoupling of congestion control and reliability Does not require the arrival of ACKs to clock out segment. Does not employ cumulative ACKs but solely relies on periodic SACK (wi

th 20 SACK blocks) to identify losses. Pro: 1) Estimate rate accurately. 2) Reduce traffic on the reverse path. 3) Rec

over more than one lost segment at a time. Con: 1) Incompatibility problem. 2) Require the assistance from the intermed

iate nodes. 3) Fastest possible time to detect and recover packet lost is 1 second.

31

Split-TCP: a new approach Split-TCP: work done at UCR [Kopparty et. al.]

Setup proxies along the connection many short TCP connections. Congestion control and reliability are separated. Proxies buffer packets from the previous proxy or the source. Any dropped packets are recovered from the most recent proxy but

not from the source. Pro: Enhance parallelism. Reduce bandwidth consumption on retra

nsmission. Con: Optimal frequency of proxy placement is not clear.

R SP P P

32

Split TCP in more detail

33

What is our idea: Split-TCP

• Split long TCP connection into shorter segments:

• Small segments can be more adaptive to conditions

• Proxies “glue” segments together.

• Proxies buffer packets and “becomes responsible” for the delivery of the packet.

•INTUITION: separate reliability from congestion control

• the former is end-to-end but the latter is not!

34

TCP Proxies : Functionality

• Proxies send an Local ACK (LACK) to the previous proxy or the source upon the receipt of a TCP packet.

• Thus, the flow of the packet now occurs in stages.

• End to end ack to ensure end to end reliability.

35

Improving Throughput

• When link failures occur in one segment, TCP data may still be transmitted on other segments.

• Thus the throughput improves.

SA

B C P X YZ

DLink Failure

Data transfer continues in spite of failure

36

Improving Fairness

• Proxies alleviate the unfair advantage that shorter connections have over longer connections.

• Now longer connections are split into shorter segments.

• The throughput of longer connections however cannot equal that of shorter connections due to interactions between segments.

• Packets cannot be sent and received at the proxy at the same time – adjacent TCP segments have to transport data in stages.

37

Alleviating The 802.11 Capture Effect

•Intuition: Localize capture effect

•Instead of the capturing the whole path TCP connection, only the region spanned by a segment is captured

•Thus, it is possible to have two TCP sessions in the vicinity of each other: S1-P1 segmentS1-P1 segment does not bother P3 - D2 segmentP3 - D2 segment

S1 P1 D1

S2 P2P3

D2

38

1.Throughput Improvement

• Mobile Ad Hoc Network with 50 nodes in 1 Km X 1 Km area – 3 TCP connections

• Speed uniform between 0 and 10 m/s – random waypoint model.• At a time between 50 and 60 seconds a link failure occurs.

• Notice that after this, if proxies are used performance is better.

• Fair share for all three connections in spite of failure.

• If no proxies are used the share of channel of the connection with failed link taken by other two connections.

• Elimination of intra-segment contention on connection with failed link improves performance

39

2. Fairness Improvement

• Multiple TCP connections with varying lengths in terms of hop count.

• Longer connections achieve lower throughput than shorter ones.

• Introduction of proxies improves throughput

• For a connection of length 16 hops, the throughput improves from around 22 Kbps to 27 Kbps.

• Improvement in fairness

40

3. Alleviating Capture Effect

• Two connections are active in the vicinity of each other.

• Both are heavily loaded.

• Connection 2 begins slightly later than Connection 1.

• If TCP is used without proxies, Connection 2 has a very low share of the throughput until Connection 1 is done sending its data.

• TCP with proxies alleviates this effect – fairer share of bandwidth is available to Connection 2.

41

Conclusion of Overview

We identify the factors that degrade the performance of TCP over MANETs.

We identify the most promising TCP variants: TCP-Westwood, TCP-JerseyCurrent TCP variants do not seem sufficient

Promising transport protocols emergeSplit-TCP, ATP

42

TCP VariantsAdditional Information

43

TCP-Vegas Rate-based congestion control

diff = expected rate – actual rate If diff < a, Vegas increases cwnd linearly If diff > b, Vegas decreases cwnd linearly If a< diff < b, Vegas keeps cwnd unchanged

Modified slow-start Allows cwnd to grow exponentially only in every other RTT If diff > c, Vegas switches from slow-start to congestion avoidanc

e

New retransmission Reads and records transmission time. When DUPACK arrives, checks if it is expired. Retransmits without waiting for third DUPACK.

Bandwidth Estimation

44

TCP-Westwood - I Bandwidth estimation

Measure the rate of return of ACKs. Adaptive to variation of inter-arrival of ACKs. Exponentially goes to zero upon prolonged absence o

f ACKs.

Faster recovery Compute cwnd and ssthresh using the estimated ba

ndwidth upon any loss event.

Bandwidth Estimation

45

TCP-Westwood - II Main idea: Bandwidth estimation

Sender monitors ACKs to estimate the bandwidth available to the connection.

Two pieces of information are used: ACK reception rate. Information the ACKs conveys (amount of data delivered).

Bandwidth calculation The sampled bandwidth (bk) at time tk is:

where dk is amount of data delivered and Δk is the time difference between the recent and the last reception of ACK.

Discrete-time filter (Tustin approximation). The filtered estimate of the available bandwidth at time tk is:

where and 1/τ is the cutoff frequency of the filter.

The weight ak are made to depend on Dk to counteract the effect of non-deterministic inter-arrival times.

46

TCP-Jersey Available Bandwidth Estimation

Time-sliding window estimator

Congestion Warning (CW) Mark all packets if the average queue length exceeds a threshol

d. DUPACK with CW mark congestion DUPACK without CW mark wireless error Adjust cwnd and ssthresh if receives (DUP)ACK with CW mark

Explicit retransmit If DUPACK without CW mark, retransmits with cwnd unchanged

Bandwidth Estimation

47

Explicit Link Failure Notification (ELFN) Upstream node of the failed link sends a “host

unreachable” ICMP message to the sender. Sender disables retransmission timers and

enters a “standby” mode. Periodic probing to detect restored route. Restores retransmission timers and continues

transmissions when ACK is received.

Route Failure and Wireless Error Determination

48

Link RED (LRED) and Adaptive Pacing (AP) Link RED (LRED)

Maintain an average # of retries of recent packet transmission. If exceeds the minimum threshold minth, LRED marks packets w

ith probability depending on the average # of retries value. TCP will then reduces sending rate.

Adaptive Pacing (AP) Distribute traffic in a more balanced way. Let some nodes wait an extra amount of back-off period. Use in conjunction with LRED. When LRED starts to mark packets, AP increases the back-off ti

me of the pending transmission.

Contention Reduction

49

Congestion Window Limit (CWL) The maximum spatial reuse of wireless channel i

s 1/4 of the chain.

When 1 transmits, 2 and 3 cannot transmit, but 4 can. Assume perfect scheduling and no contention.

TCP achieves best throughput when cwnd is approximately 1/5 of the round-trip hop-count (RTHC).

Adaptively adjust the maximum cwnd to ensure the spatial reuse is not exceeded.

Contention Reduction

1 2 3 4 5 6 7 8 9

50

51

Other Transport Layer EffortsCan FAST TCP and XCP work well over MANETs? Do not seem suitable for MANETs.

Basic idea: React faster to change. Fast TCP [Jin et. al.]

Determine equilibrium by queuing delay and loss information. cwnd far away from equilibrium? Rapid (Large) change. cwnd approach equilibrium? Small change.

XCP [Katabi et. al.] Explicit congestion signaling.

Intermediate nodes estimate spare bandwidth and generate feedback to the sender.

Neither protocol can deal with mobility. Mobility and route changes will throw off calculations.

52

Ad-hoc TCP (ATCP) Normal state

Connection initialization. TCP works normally.

Loss state RTO almost expired or ATCP receives the 3rd DUPACK. TCP in persist mode (no congestion control). ATCP retransmits lost segment.

Congested state When ECN is received. TCP works normally.

Disconnected state When “Destination Unreachable” is received. TCP in persist mode. Send probe packets to detect re-connection.

Route Failure and Wireless Error Determination

53

ADTCP Classification of network states

Congestion(CONG), Channel error(CHERR), Route change(RTCHG), Disconnection(DISC)

Multiple metrics Inter-packet delay difference (IDD) Short-term throughout (STT) Packet Out-of-order delivery Ratio (POR) Packet Loss Ratio (PLR)

Identifying network states

Route Failure and Wireless Error Determination

54

Detecting Spurious Retransmission TCP-Eifel [Ludwig & Katz]

Use timestamp option of TCP to solve retransmission ambiguity. Sender can determine whether the received ACK is from original transmissio

n or retransmission. After retransmission, if next ACK is from original transmission spurious!

Restore the cwnd and ssthresh if spurious retransmission is detected. Pro: Robust to sudden delay spike. Con: Require the use of timestamp option or modification of TCP header.

Forward RTO-Recovery (F-RTO) [Sarolahti et. al.] If the first ACK after retransmission advances the window, send two new seg

ments. If the next ACK still advances the window retransmission is likely to be spu

rious. (It should be a DUPACK generated by the new transmitted segments) Pro: Does not require the use of timestamp option. Con: Only detect spurious retransmission triggered by timeout.

Details of some major TCP variants

55

TCP Adaptive Delayed Acknowledgement (TCP-ADA) Reduce # of ACKs reduce contention on forward data

transmissions. Maximizing the number of packet received before an AC

K is sent, K, increases TCP throughout. K is equal to a full window of packets. Receiver: estimate the average inter-arrival time of dat

a packets. Wait “wait factor x average inter-arrival time” bef

ore sending the corresponding cumulative ACK. If the waiting time is completed, sends ACK.

Contention Reduction

56

ACK Congestion Control (ACC) & ACK Filtering (AF) ACK Congestion Control (ACC)

Reduce frequency of ACKs. Use RED to mark ECN bit of packets. Packet with ECN bit set

Sender: reduces the sending rate Receiver: increases multiplicatively the delayed-ACK factor, d

For each subsequent RTT with no packet with ECN bit set Receiver: decrease linearly the delayed-ACK factor, d

ACK Filtering (AF) ACKs are cumulative. Traverse the queue to remove some (or all) of the ACKs of the

same flow.

Asymmetry Alleviation

57

Delayed retransmissions due to the use of coarse-grained timer [Brakmo et. al.]

Timer Effects:Inaccuracy in the calculation of the RTO

performance drops. RTT and mean variance estimates are computed using co

arse-grained timer (around 500ms). This granularity influence also how often TCP checks for a

n timeout event. Calculated RTO is >= actual RTO.

Why is it bad for MANETs? TCP heavily relies on this inefficient timeout mechanism t

o detect losses. Why?

cwnd is usually small. Not enough DUPACKs to trigger the fast retransmit.

Specific problems of TCP over MANETs

58

So Far, So Good: Next Steps Split-TCP: a new way to look at transport layer

Separate congestion control from reliability Use control theory to analyze the problem

Use directed antennas to improve TCP thruput “Focusing” the beam, minimizes interference Challenge: co-develop an appropriate MAC protocol

Exploit other physical layer capabilities CDMA, cooperative diversity

R SP P P

59

Exciting Projects at UCR

Exploit Spatial Diversity in MANETs MIMO systems: multiple element antennas Cooperative diversity: virtual MIMO

Develop secure wireless networks Detecting misbehavior and intrusions Develop a complete comprehensive architecture

Develop UWB-based networks Design a CDMA-based MAC protocol Develop a routing protocol

60

Alleviating Asymmetry ACK Congestion Control (ACC)

Use Random Early Detection (RED) algorithm to mark packets. When sender receives packets with mark reduce the sending rate. When receiver receives packets with mark multiplicatively increase the del

ay-ACK factor, d. If receiver receives no mark for a RTT linearly decrease the factor d. Pro: Reduce congestion on the constrained reverse path. Con: Require RED to be implemented in each node. Increase burstiness of the

forward data flow. ACK Filtering (AF)

Take the advantage of the fact that ACKs are cumulative. Remove some (or all) the ACKs buffered in the queue that belong to the same

flow. Pro: Reduce congestion on the constrained reverse path. Con: Special queue management is needed. Increase burstiness of the forwar

d data flow.

Details of some major TCP variants