qian zhang department of computer science hkust

27
Qian Zhang Department of Computer Science HKUST Advanced Topics in Next-Generation Wireless Networks Transport Protocols in Ad hoc Networks

Upload: alaina

Post on 24-Jan-2016

26 views

Category:

Documents


0 download

DESCRIPTION

Advanced Topics in Next-Generation Wireless Networks. Transport Protocols in Ad hoc Networks. Qian Zhang Department of Computer Science HKUST. Transmission Control Protocol (TCP). Reliable ordered delivery Implements congestion avoidance and control - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Qian Zhang Department of Computer Science  HKUST

Qian ZhangDepartment of Computer Science

HKUST

Advanced Topics in Next-Generation Wireless Networks

Transport Protocols in Ad hoc Networks

Page 2: Qian Zhang Department of Computer Science  HKUST

Transmission Control Protocol (TCP)

• Reliable ordered delivery

• Implements congestion avoidance and control

• Reliability achieved by means of retransmissions if necessary

• End-to-end semantics– Acknowledgements sent to TCP sender confirm

delivery of data received by TCP receiver– Ack for data sent only after data has reached

receiver

Page 3: Qian Zhang Department of Computer Science  HKUST

Overview of TCP concepts

• Conventional TCP• Sending rate is controlled by

– Congestion window (cwnd): limits the – Slow-start threshold (ssthresh): when

• Loss detection– 3 duplicate ACKs (faster, more efficient)– Retransmission timer expires (slower,

less efficient)

• Overview of congestion control mechanisms– Slow-start phase: cwnd start from 1

and increase exponentially– Congestion avoidance (CA): increase

linearly– Fast retransmit and fast recovery:

Trigger by 3 duplicate ACKs

Slo

w s

tart

Slo

w s

tart

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

Con

gesti

on

win

dow

s s

ize

Overview

Slow-start Congestionavoidance

– Tahoe, Reno, New-Reno, SACK

# of packets in flightCA start

Page 4: Qian Zhang Department of Computer Science  HKUST

Challenges

• Throughput unfairness– Unfairness at MAC layer– Transport layer should take this into account

• Resource constraints– Power and bandwidth constraints

• Separation of congestion control and reliability control

• Completely decoupled transport layer– Wired network: transport protocol completely separated

from underlying layer– Ad hoc network: interaction with network and MAC layer

is expected for adaptivity

Page 5: Qian Zhang Department of Computer Science  HKUST

Challenges (Cont.)

• Misinterpretation of congestion– Traditional mechanism: packet loss, timeout– Ad hoc loss/delay due to

• High bit error rate due to varying link condition• Packet collisions due to contention and hidden

terminal• Path breaks due to node mobility

• Dynamically changing topology– Frequent path breaks– Partitioning and merging of networks– High delay in reestablishment of path

Page 6: Qian Zhang Department of Computer Science  HKUST

Performance of TCP

• Several factors affect TCP performance in MANET

– Wireless transmission errors

– Multi-hop routes on shared wireless medium• For instance, adjacent hops typically cannot transmit

simultaneously

– Route failures due to mobility

Page 7: Qian Zhang Department of Computer Science  HKUST

Random Errors

• If number of errors is small, they may be corrected by an error correcting code

• Excessive bit errors result in a packet being discarded, possibly before it reaches the transport layer

• Problems– Fast retransmission of lost packet

– Reduction in congestion window

reduces the throughput

– Burst errors may cause timeouts

Page 8: Qian Zhang Department of Computer Science  HKUST

Throughput over Multi-Hop Wireless Paths

• Connections over multiple hops are at a disadvantage compared to shorter connections, because they have to contend for wireless access at each hop

0

200

400

600

800

1000

1200

1400

1600

1 2 3 4 5 6 7 8 9 10

Number of hops

TCPThroughtput(Kbps)

TCP Throughput using 2 Mbps 802.11 MAC

Page 9: Qian Zhang Department of Computer Science  HKUST

Throughput Degradations withIncreasing Number of Hops

• Packet transmission can occur on at most one hop among three consecutive hops– Increasing the number of hops from 1 to 2, 3 results in

increased delay, and decreased throughput

• Increasing number of hops beyond 3 allows simultaneous transmissions on more than one link– However, degradation continues due to contention between

TCP Data and Acks traveling in opposite directions

• When number of hops is large enough, the throughput stabilizes due to effective pipelining

Page 10: Qian Zhang Department of Computer Science  HKUST

Performance Metric: Expected Throughput

• Compute the expected throughput as

where

– ti: the duration for which the shortest path from the sender to the receiver contains i hops

– Ti : the throughput obtained in the fixed, linear network with i hops

Page 11: Qian Zhang Department of Computer Science  HKUST

Impact of Mobility

measured TCP Reno throughput

Page 12: Qian Zhang Department of Computer Science  HKUST

Throughput Degrades with Increasing Speed …

Page 13: Qian Zhang Department of Computer Science  HKUST

But NOT Always …

Page 14: Qian Zhang Department of Computer Science  HKUST

mobility causeslink breakage,resulting in routefailure

TCP data and acksen route discarded

Why Does Throughput Degrade?

TCP sender times out.Starts sending packets again

Route isrepaired

No throughput

No throughputdespite route repair

Page 15: Qian Zhang Department of Computer Science  HKUST

mobility causeslink breakage,resulting in routefailure

TCP data and acksen route discarded

TCP sendertimes out.Backs off timer.

Route isrepaired

TCP sendertimes out.Resumessending

Larger route repair delaysespecially harmful

No throughput

No throughput

despite route repair

Why Does Throughput Degrade?

Page 16: Qian Zhang Department of Computer Science  HKUST

C

B

D

A

C

B

D

A

C

B

D

A

1.5 second route failure

Route from A to D is broken for ~1.5 second

When TCP sender times out after 1 second, route still broken

TCP times out after another 2 seconds, and only then resumes

Low Speed Scenario

Page 17: Qian Zhang Department of Computer Science  HKUST

C

B

D

A

C

B

D

A

C

B

D

A

0.75 second route failure

Route from A to D is broken for ~ 0.75 second

When TCP sender times out after 1 second, route is repaired

Higher (double) Speed Scenario

Page 18: Qian Zhang Department of Computer Science  HKUST

Impact of Caching

• Route caching has been suggested as a mechanism to reduce route discovery overhead [Broch98]

• Each node may cache one or more routes to a given destination

• When a route from S to D is detected as broken, node S may:– Use another cached route from local cache, or– Obtain a new route using cached route at another

node

Page 19: Qian Zhang Department of Computer Science  HKUST

Impact to TCP

Average speed (m/s)

Act

ual t

hrou

ghpu

t (a

s fr

actio

n of

exp

ecte

d th

roug

hput

)

Page 20: Qian Zhang Department of Computer Science  HKUST

Why Performance Degrades With Caching

• When a route is broken, route discovery returns a cached route from local cache or from a nearby node

• After a time-out, TCP sender transmits a packet on the new routeHowever, the cached route has also broken after it was cached

• Another route discovery, and TCP time-out interval• Process repeats until a good route is found

timeout dueto route failure

timeout, cachedroute is broken

timeout, second cachedroute also broken

Page 21: Qian Zhang Department of Computer Science  HKUST

To Cache or Not to Cache

• Caching can result in faster route “repair”

• Faster does not necessarily mean correct

• If incorrect repairs occur often enough, caching performs poorly

• Need mechanisms for determining when cached routes are stale

Page 22: Qian Zhang Department of Computer Science  HKUST

Caching and TCP performance

• Caching can reduce overhead of route discovery even if cache accuracy is not very high

• But if cache accuracy is not high enough, gains in routing overhead may be offset by loss of TCP performance due to multiple time-outs

Page 23: Qian Zhang Department of Computer Science  HKUST

How to Improve Throughput(Bring Closer to Ideal)

• Network feedback

• Inform TCP of route failure by explicit message

• Let TCP know when route is repaired– Probing– Explicit notification

• Reduces repeated TCP timeouts and backoff

Page 24: Qian Zhang Department of Computer Science  HKUST

TCP with ELFN

• Explicit Link Failure Notification – Not totally new, e.g., ECN bits in TCP

– To provide the TCP sender with information about link and route failures, so that it can avoid responding to the failures as if congestion has occurred

• How does it work?– When a TCP sender receives an ELFN: disables its

retransmission timers and enters a “stand-by” mode

– While on standby: A packet is sent at periodic intervals to probe the network to see if a route has been established

– If an acknowledgment is received: leaves stand-by mode and restores the retransmission timers

Page 25: Qian Zhang Department of Computer Science  HKUST

Measured TCP Reno w/ELFN throughput

Page 26: Qian Zhang Department of Computer Science  HKUST

Performance with Explicit Notification

0

0.2

0.4

0.6

0.8

1

2 10 20 30

mean speed (m/s)

thro

ug

hp

ut

as a

fra

ctio

n o

f id

eal

Base TCP

With explicitnotification

Page 27: Qian Zhang Department of Computer Science  HKUST

Issues: Network Feedback

• Network knows best (why packets are lost) Network feedback beneficial

Need to modify transport & network layer to receive/send feedback

Need mechanisms for information exchange between layers

• [Holland99] discusses alternatives for providing feedback (when routes break and repair)– [Chandran98] also presents a feedback scheme