123
1 CMPE 257 - Wireless and Mobile Networking CMPE 257 Spring 2006 End-to-End Protocols 2 Wireless and Mobile Networks

CMPE 257 Spring 2006 End-to-End Protocols 2

  • Upload
    clara

  • View
    28

  • Download
    0

Embed Size (px)

DESCRIPTION

CMPE 257 Spring 2006 End-to-End Protocols 2. Wireless and Mobile Networks. Announcements. Exam: June 7 th in class. Project presentations and demos: June 12 th . 4-7pm. Homework 4 (routing) is up. Today. E2E protocols continued. E2E Protocols. Reliable point-to-point. - PowerPoint PPT Presentation

Citation preview

Page 1: CMPE 257 Spring 2006 End-to-End Protocols 2

1CMPE 257 - Wireless and Mobile Networking

CMPE 257

Spring 2006End-to-End Protocols 2

Wireless and Mobile Networks

Page 2: CMPE 257 Spring 2006 End-to-End Protocols 2

2CMPE 257 - Wireless and Mobile Networking

Announcements

• Exam:– June 7th in class.

• Project presentations and demos:– June 12th. 4-7pm.

• Homework 4 (routing) is up.

Page 3: CMPE 257 Spring 2006 End-to-End Protocols 2

3CMPE 257 - Wireless and Mobile Networking

Today

• E2E protocols continued.

Page 4: CMPE 257 Spring 2006 End-to-End Protocols 2

4CMPE 257 - Wireless and Mobile Networking

E2E Protocols

• Reliable point-to-point.• Reliable multipoint.

Page 5: CMPE 257 Spring 2006 End-to-End Protocols 2

5CMPE 257 - Wireless and Mobile Networking

Reliable Point-to-Point Transport: Outline

TCP/IP basics. Impact of transmission errors on TCP performance. Approaches to improve TCP performance on wireless

networks.– Classification.

• TCP on single-hop infrastructure-based wireless networks.

• TCP on MANETs.

Page 6: CMPE 257 Spring 2006 End-to-End Protocols 2

6CMPE 257 - Wireless and Mobile Networking

Classification

• E2E versus cross-layer approaches.– E2E approaches: connection end points try to

distinguish between congestion and non-congestion losses.

– Cross-layer approaches: combination of e2e and intermediate node participation.

Page 7: CMPE 257 Spring 2006 End-to-End Protocols 2

7CMPE 257 - Wireless and Mobile Networking

Cross-Layer Approaches

Link layer error recovery.Link layer retransmission.

TCP-awareness: Snoop [Balakrishnan95]

– TCP-unawareness.

• Split connection.

Page 8: CMPE 257 Spring 2006 End-to-End Protocols 2

8CMPE 257 - Wireless and Mobile Networking

TCP-Aware Link Layer Retransmission

Page 9: CMPE 257 Spring 2006 End-to-End Protocols 2

9CMPE 257 - Wireless and Mobile Networking

Snoop Protocol [Balakrishnan95]

• More sophisticated link-level retransmission scheme.

• End-to-end semantics retained.• Soft state at base station.

Page 10: CMPE 257 Spring 2006 End-to-End Protocols 2

10CMPE 257 - Wireless and Mobile Networking

Snoop Protocol

FH MHBSwireless

physical

link

network

transport

application

physical

link

network

transport

application

physical

link

network

transport

application

rxmt

Per TCP-connection state

TCP connection

Page 11: CMPE 257 Spring 2006 End-to-End Protocols 2

11CMPE 257 - Wireless and Mobile Networking

Snoop Protocol

• Buffers data packets at base station.– Data sent by FH not yet ack’d by MH.– Allow link layer retransmission.

• When dupacks received by BS from MH (or local timeout), retransmit on wireless link, if packet in buffer.

• Prevents fast retransmit by TCP sender at FH by suppressing dupacks at BS.

Page 12: CMPE 257 Spring 2006 End-to-End Protocols 2

12CMPE 257 - Wireless and Mobile Networking

Snoop : Example

FH MHBS

40 39 3738

3634

Example assumes delayed ack - every other packet ack’d

36

37

38

35 TCP statemaintained at

link layer

Page 13: CMPE 257 Spring 2006 End-to-End Protocols 2

13CMPE 257 - Wireless and Mobile Networking

Snoop : Example

41 40 3839

3634

36

37

38

35 39

Page 14: CMPE 257 Spring 2006 End-to-End Protocols 2

14CMPE 257 - Wireless and Mobile Networking

Snoop : Example

42 41 3940

36

Duplicate acks are not delayed

36

dupack

37

38

39

40

Page 15: CMPE 257 Spring 2006 End-to-End Protocols 2

15CMPE 257 - Wireless and Mobile Networking

Snoop : Example

40

363636

Duplicate acks

4143 42

37

38

39

40

41

Page 16: CMPE 257 Spring 2006 End-to-End Protocols 2

16CMPE 257 - Wireless and Mobile Networking

Snoop : Example

FH MHBS

41

3636

3744 43

36

37

38

39

40

41

42

Discarddupack

Dupack triggers retransmissionof packet 37 from base station

BS needs to be TCP-aware to

be able to interpret TCP headers

Page 17: CMPE 257 Spring 2006 End-to-End Protocols 2

17CMPE 257 - Wireless and Mobile Networking

Snoop : Example

37

36

36

4245 44

36

37

38

39

40

41

42

43

36

Page 18: CMPE 257 Spring 2006 End-to-End Protocols 2

18CMPE 257 - Wireless and Mobile Networking

Snoop : Example

42

36

36

4346 45

36

37

38

39

40

41

42

43

41

36

44

TCP sender does notfast retransmit

Page 19: CMPE 257 Spring 2006 End-to-End Protocols 2

19CMPE 257 - Wireless and Mobile Networking

Snoop : Example

43

3636

4447 46

36

37

38

39

40

41

42

43

41

36

44

TCP sender does notfast retransmit

45

Page 20: CMPE 257 Spring 2006 End-to-End Protocols 2

20CMPE 257 - Wireless and Mobile Networking

Snoop : Example

FH MHBS

44

3636

4548 47

36

42

43

41

36

44

45

43

46

Page 21: CMPE 257 Spring 2006 End-to-End Protocols 2

21CMPE 257 - Wireless and Mobile Networking

Performance

0

400000

800000

1200000

1600000

2000000

16K

32K

64K

128K

256K

no e

rror

1/error rate (in bytes)

bit

s/s

ec

base TCP

Snoop

2 Mbps Wireless link

Page 22: CMPE 257 Spring 2006 End-to-End Protocols 2

22CMPE 257 - Wireless and Mobile Networking

Snoop Protocol: Advantages

• Snoop prevents fast retransmit from sender despite transmission errors and out-of-order delivery on the wireless link.

• If wireless link delay-bandwidth product less than 4 packets: simple (TCP-unaware) link level retransmission scheme can suffice.– Since delay-bandwidth product is small,

retransmission scheme can deliver lost packet without causing MH to send 3 dupacks.

Page 23: CMPE 257 Spring 2006 End-to-End Protocols 2

23CMPE 257 - Wireless and Mobile Networking

Snoop Protocol: Advantages

• Higher throughput can be achieved.• Local recovery from wireless losses.• Fast retransmit not triggered at sender

despite out-of-order link layer delivery.• End-to-end semantics retained.• Soft state at base station.

– Loss of the soft state affects performance, but not correctness.

Page 24: CMPE 257 Spring 2006 End-to-End Protocols 2

24CMPE 257 - Wireless and Mobile Networking

Snoop Protocol:Disadvantages

• Link layer at base station needs to be TCP-aware.

• Not useful if TCP headers are encrypted (IPsec).

• Cannot be used if TCP data and TCP ACKs traverse different paths.

Page 25: CMPE 257 Spring 2006 End-to-End Protocols 2

25CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks Approach

• TCP-unaware approximation of TCP-aware link layer.

• Attempts to imitate Snoop without making BS TCP-aware.

• Snoop implements two features at BS:– Link layer retransmission.

– Dupack handling: reduced interference between TCP and link layer retransmissions (drop dupacks).

Page 26: CMPE 257 Spring 2006 End-to-End Protocols 2

26CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks

• Implements same two features:– at BS : link layer retransmission.

– at MH : reducing interference between TCP and link layer retransmissions (by delaying dupacks).

Page 27: CMPE 257 Spring 2006 End-to-End Protocols 2

27CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks Protocols

• TCP receiver delays dupacks (third and subsequent) for interval D, when out-of-order packets received.

• Dupack delay intended to give link level retransmit time to succeed.

• Benefit: Delayed dupacks can result in recovery from a transmission loss without triggering a response from the TCP sender.

• Disadvantage: Recovery from congestion losses delayed.

Page 28: CMPE 257 Spring 2006 End-to-End Protocols 2

28CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks Protocols

• Delayed dupacks released after interval D, if missing packet not received.

• Link layer maintains state to allow retransmission.

Page 29: CMPE 257 Spring 2006 End-to-End Protocols 2

29CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Example

40 39 3738

3634

Example assumes delayed ack - every other packet ack’dLink layer acks are not shown

36

37

38

35

Link layer state

Page 30: CMPE 257 Spring 2006 End-to-End Protocols 2

30CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Example

BS

41 40 3839

3634

36

37

38

39

35 Removed from BS link layer buffer on receipt of alink layer ack (LL acks not shown in figure)

Page 31: CMPE 257 Spring 2006 End-to-End Protocols 2

31CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Example

42 41 3940

36

Duplicate acks are not delayed

36

dupack

37

38

39

40

Page 32: CMPE 257 Spring 2006 End-to-End Protocols 2

32CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Example

40

363636

Duplicate acks

4143 42

37

38

39

40

41

Original ack

Page 33: CMPE 257 Spring 2006 End-to-End Protocols 2

33CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Example

41

3636

3744 43

36

37

39

40

41

42

Base station forwards dupacks

dupack dupacksDelayeddupack

Page 34: CMPE 257 Spring 2006 End-to-End Protocols 2

34CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Example

37

3636

4245 44

36

37

40

41

42

36dupacks

Delayed dupacks

43

Page 35: CMPE 257 Spring 2006 End-to-End Protocols 2

35CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks : Example

424346 45

36

37

41

42

43

41

TCP sender does notfast retransmit

44

Delayed dupacks arediscarded if lost

packet received beforedelay D expires

Page 36: CMPE 257 Spring 2006 End-to-End Protocols 2

36CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks [Vaidya99]

0

400000

800000

1200000

1600000

2000000

16384

32768

65536

1E+

05

1/error rate (in bytes)

base TCP

dupack delay80ms + LLRetransmit

Only LLretransmit

2 Mbps wireless duplex link with 20 ms delayNo congestion losses

20 ms 20 ms

10 Mbps 2 Mbps

Page 37: CMPE 257 Spring 2006 End-to-End Protocols 2

37CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks [Vaidya99]

020000400006000080000

100000120000140000160000

16384

32768

65536

1E+

05

1/error rate (in bytes)

base TCP

dupack delay80ms + LLRetransmit

Only LLretransmit

5% packet loss due to congestion

20 ms 20 ms

10 Mbps 2 Mbps

Page 38: CMPE 257 Spring 2006 End-to-End Protocols 2

38CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Advantages

• Link layer need not be TCP-aware.• Can be used even if TCP headers are

encrypted.• Works well for relatively small wireless RTT

(compared to end-to-end RTT).– Relatively small D sufficient in such cases.

Page 39: CMPE 257 Spring 2006 End-to-End Protocols 2

39CMPE 257 - Wireless and Mobile Networking

Delayed Dupacks: Disadvantages

• Right value of dupack delay D dependent on wireless link properties.

• Mechanisms to determine D needed.• Delays dupacks for congestion losses too,

delaying congestion loss recovery.

Page 40: CMPE 257 Spring 2006 End-to-End Protocols 2

40CMPE 257 - Wireless and Mobile Networking

Cross-Layer Approaches

• Link layer error recovery.• Link layer retransmission.

– TCP-awareness.

– TCP-unawareness.

• Split connection.

Page 41: CMPE 257 Spring 2006 End-to-End Protocols 2

41CMPE 257 - Wireless and Mobile Networking

Split Connection Approach

Page 42: CMPE 257 Spring 2006 End-to-End Protocols 2

42CMPE 257 - Wireless and Mobile Networking

Split Connection Approach

• End-to-end TCP connection is broken into one connection on the wired part of route and one over wireless part.

Page 43: CMPE 257 Spring 2006 End-to-End Protocols 2

43CMPE 257 - Wireless and Mobile Networking

Split Connection Approach

• Connection between wireless host MH and fixed host FH goes through base station BS.

• FH-MH = FH-BS + BS-MH

FH MHBS

Base Station Mobile HostFixed Host

Page 44: CMPE 257 Spring 2006 End-to-End Protocols 2

44CMPE 257 - Wireless and Mobile Networking

Split Connection Approach

• Split connection results in independent control for the two parts.– Congestion/error control protocols, packet

size, time-outs, may be different for each part.

FH MHBS

Base Station Mobile HostFixed Host

Page 45: CMPE 257 Spring 2006 End-to-End Protocols 2

45CMPE 257 - Wireless and Mobile Networking

Split Connection Approach

wireless

physical

link

network

transport

application

physical

link

network

transport

application

physical

link

network

transport

application rxmt

Per-TCP connection state

TCP connection TCP connection

Page 46: CMPE 257 Spring 2006 End-to-End Protocols 2

46CMPE 257 - Wireless and Mobile Networking

Split Connection Approach : Classification

• Hides transmission errors from sender• Primary responsibility at base station• If specialized transport protocol used on

wireless, then wireless host also needs modification

Page 47: CMPE 257 Spring 2006 End-to-End Protocols 2

47CMPE 257 - Wireless and Mobile Networking

Split Connection Approach: Example

• Indirect TCP [Bakre94] – FH - BS connection : Standard TCP.

– BS - MH connection : Standard TCP.

Page 48: CMPE 257 Spring 2006 End-to-End Protocols 2

48CMPE 257 - Wireless and Mobile Networking

Split Connection: Advantages

• BS-MH connection can be optimized independent of FH-BS connection.– Different congestion/error control.

• Local recovery of errors.– Faster recovery due to relatively shorter RTT on

wireless link. • Good performance achievable using appropriate BS-

MH protocol.– Standard TCP on BS-MH performs poorly when

multiple packet losses per window.– Selective ACKs improve performance.

Page 49: CMPE 257 Spring 2006 End-to-End Protocols 2

49CMPE 257 - Wireless and Mobile Networking

Split Connection: Disadvantages

• End-to-end semantics violated.– ACK may be delivered to sender before data

delivered to receiver.

FH MHBS

40

39

3738

3640

Page 50: CMPE 257 Spring 2006 End-to-End Protocols 2

50CMPE 257 - Wireless and Mobile Networking

Split Connection: Disadvantages

• BS retains hard state.– BS failure can result in loss of data.

• If BS fails, packets 39 and 40 will be lost. • Both ack’d to sender;sender does not buffer.

FH MHBS

40

39

3738

3640

Page 51: CMPE 257 Spring 2006 End-to-End Protocols 2

51CMPE 257 - Wireless and Mobile Networking

Split Connection: Disadvantages

• BS retains hard state.

Hand-off latency increases due to state transfer– Data that has been ack’d to sender must be

moved to new base station.

Page 52: CMPE 257 Spring 2006 End-to-End Protocols 2

52CMPE 257 - Wireless and Mobile Networking

Handoff

FH MHBS

40

39

3738

3640

MH

New base station

Hand-off

40

39

Page 53: CMPE 257 Spring 2006 End-to-End Protocols 2

53CMPE 257 - Wireless and Mobile Networking

Split Connection: Disadvantages

• Buffer space needed at BS for each TCP connection.– BS 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).

• Extra copying of data at BS– Copying from FH-BS socket buffer to BS-MH socket

buffer.– Increases end-to-end latency.

Page 54: CMPE 257 Spring 2006 End-to-End Protocols 2

54CMPE 257 - Wireless and Mobile Networking

Split Connection:Disadvantages

• May not be useful if data and acks traverse different paths.– Example: data on a satellite wireless hop,

acks on a dial-up channel.

FH MH

data

ack

BS

Page 55: CMPE 257 Spring 2006 End-to-End Protocols 2

55CMPE 257 - Wireless and Mobile Networking

E2E Approaches

• Strict E2E versus E2E with intermediate node involvement.

• E2E with intermediate node involvement:– Explicit notifications.

Page 56: CMPE 257 Spring 2006 End-to-End Protocols 2

56CMPE 257 - Wireless and Mobile Networking

Explicit Notification SchemesGeneral Philosophy

• Approximate ideal TCP behavior.– Ideally, TCP sender should simply retransmit a packet

lost due to transmission errors without taking any congestion control actions.

• A node determines whether packets are lost due to errors and informs sender using an “explicit notification”.

• Sender, on receiving the notification, does not reduce congestion window, but retransmits lost packet.

Page 57: CMPE 257 Spring 2006 End-to-End Protocols 2

57CMPE 257 - Wireless and Mobile Networking

Explicit Notification Schemes

• Motivated by Explicit Congestion Notification (ECN) proposals [Floyd94].

Variations proposed in literature differ in:• Who sends explicit notification.• How they decide to send explicit notification.• What sender does on receiving notification.

Page 58: CMPE 257 Spring 2006 End-to-End Protocols 2

58CMPE 257 - Wireless and Mobile Networking

Explicit Loss Notification [Balakrishnan98]

• MH is the TCP sender.• Wireless link first on path from sender to receiver.• Base station keeps track of holes in packet

sequence.• When a dupack is received from the receiver, BS

compares the dupack sequence number with recorded holes.– If there is a match, an ELN bit is set in dupack.

Page 59: CMPE 257 Spring 2006 End-to-End Protocols 2

59CMPE 257 - Wireless and Mobile Networking

ELN

• When sender receives dupack with ELN set, it retransmits packet, but does not reduce congestion window.

MH FHBS4 3 2 1 134

wireless

Recordhole at 2

111 1TCPsender

TCPreceiverDupack with

ELN bit set

Page 60: CMPE 257 Spring 2006 End-to-End Protocols 2

60CMPE 257 - Wireless and Mobile Networking

Explicit Loss Notification [Biaz99thesis]

• Adapts ELN proposed in [Balakrishnan98] for the case when MH is receiver.

• Caches TCP sequence numbers at base station, similar to Snoop. But does not cache data packets, unlike Snoop.

• Duplicate acks are tagged with ELN bit before being forwarded to sender if sequence number for the lost packet is cached at BS.

• Sender takes appropriate action on receiving ELN.

Page 61: CMPE 257 Spring 2006 End-to-End Protocols 2

61CMPE 257 - Wireless and Mobile Networking

ELN [Biaz99thesis]

37

36

37

3839

39

38

Sequence numberscached at base station

37 37

Dupack with ELN

TCPsender

TCPreceiver

Page 62: CMPE 257 Spring 2006 End-to-End Protocols 2

62CMPE 257 - Wireless and Mobile Networking

Explicit Bad State Notification [Bakshi97]

• MH is TCP receiver.• BS attempts to deliver packets to MH using link layer

retransmission scheme.• If packet cannot be delivered using small number of

retransmissions, BS sends a Explicit Bad State Notification (EBSN) message to TCP sender.

• When TCP sender receives EBSN, it resets RTO.– Timeout delayed when wireless channel in bad state.

Page 63: CMPE 257 Spring 2006 End-to-End Protocols 2

63CMPE 257 - Wireless and Mobile Networking

Partial Ack Protocols [Cobb95][Biaz97]

• Send two types of acknowledgements.• Partial ACK informs sender that a packet was

received by an intermediate host (typically, base station).

• Normal TCP cumulative ACK needed by sender for reliability purposes.

Page 64: CMPE 257 Spring 2006 End-to-End Protocols 2

64CMPE 257 - Wireless and Mobile Networking

Partial Ack Protocols

• When packet for which partial ack is received detected to be lost, sender does not reduce its congestion window– Loss assumed to be due to wireless errors.

37

36

Partial ack

37

Cumulative ack

Page 65: CMPE 257 Spring 2006 End-to-End Protocols 2

65CMPE 257 - Wireless and Mobile Networking

Variations

• Base station may or may not locally buffer and retransmit lost packets.

Page 66: CMPE 257 Spring 2006 End-to-End Protocols 2

66CMPE 257 - Wireless and Mobile Networking

Announcements• Today:

– Finish E2E protocols (including multicast).

– Course evaluations.

• Exam on Wed. 06.07.– Topics: everything up to

E2E protocols.– Includes:

• Models and Architectures.

• MAC.• Routing (unicast and

multicast).• Wireless

Internetworking.• Bluetooth.• DTR.• E2E Protocols Project:

06.12– Project reports.– Project presentations.

Page 67: CMPE 257 Spring 2006 End-to-End Protocols 2

67CMPE 257 - Wireless and Mobile Networking

Recap’ing: Transport Protocols

• Reliable point-to-point transport.– TCP on single-hop infrastructure-based

wireless networks.Cross-layer schemes.• Strict E2E schemes.

– TCP on MANETs.

• Reliable multipoint transport.

Page 68: CMPE 257 Spring 2006 End-to-End Protocols 2

68CMPE 257 - Wireless and Mobile Networking

Strict E2E Schemes

Page 69: CMPE 257 Spring 2006 End-to-End Protocols 2

69CMPE 257 - Wireless and Mobile Networking

Receiver-Based Scheme [Biaz98Asset]

• MH is TCP receiver.• Receiver uses heuristics to “guess” cause of packet

loss.• When receiver believes that packet loss is due to

errors, it sends notification to sender.• TCP sender, on receiving notification, retransmits lost

packet, without reducing congestion window.

Page 70: CMPE 257 Spring 2006 End-to-End Protocols 2

70CMPE 257 - Wireless and Mobile Networking

Heuristics

• Receiver uses inter-arrival time between consecutively received packets to guess cause of packet loss.

• On determining a packet loss as being due to errors, the receiver may: – Tag corresponding dupacks with an ELN bit, or

– Send an explicit notification to sender.

Page 71: CMPE 257 Spring 2006 End-to-End Protocols 2

71CMPE 257 - Wireless and Mobile Networking

Receiver-Based Scheme

• Packet loss due to congestion:

FH MHBS

1012 11

FH MHBS

11

1012

T

Congestion loss

Page 72: CMPE 257 Spring 2006 End-to-End Protocols 2

72CMPE 257 - Wireless and Mobile Networking

Receiver-Based Scheme

• Packet loss due to transmission error:

FH MHBS

1012 11

FH MHBS

101112Error loss

2 T

Page 73: CMPE 257 Spring 2006 End-to-End Protocols 2

73CMPE 257 - Wireless and Mobile Networking

Sender-Based Discrimination Scheme

Page 74: CMPE 257 Spring 2006 End-to-End Protocols 2

74CMPE 257 - Wireless and Mobile Networking

Sender-Based Discrimination [Biaz98ic3n,Biaz99techrep]

• Sender can attempt to determine cause of a packet loss.

• If packet loss determined to be due to errors, do not reduce congestion window.

• Sender can only use statistics based on round-trip times, window sizes, and loss pattern.– Unless network provides more information (example:

explicit loss notification)

Page 75: CMPE 257 Spring 2006 End-to-End Protocols 2

75CMPE 257 - Wireless and Mobile Networking

Heuristics for Congestion Avoidance

• Define condition C as a function of congestion window size and observed RTTs.

• Condition C evaluated for new RTT.• If (C == True), reduce congestion window.

Page 76: CMPE 257 Spring 2006 End-to-End Protocols 2

76CMPE 257 - Wireless and Mobile Networking

Heuristics for Congestion Avoidance: Some proposals

• TCP Vegas [Brakmo94]

expected throughput ET = W(i) / RTTmin

actual throughput AT = W(i) / RTT(i)

Condition C = ( ET-AT > beta)

Page 77: CMPE 257 Spring 2006 End-to-End Protocols 2

77CMPE 257 - Wireless and Mobile Networking

Sender-Based Heuristics

• Record latest value evaluated for condition C.• When a packet loss is detected:

– If last evaluation of C is TRUE, assume packet loss due to congestion.

– Else assume packet loss due to transmission errors.

• If packet loss determined to be due to errors, do not reduce congestion window

Page 78: CMPE 257 Spring 2006 End-to-End Protocols 2

78CMPE 257 - Wireless and Mobile Networking

Sender-Based Heuristics: Disadvantage

• Does not work quite well enough!!

Reason

• Not much correlation between observed short-term statistics, and onset of congestion.

Page 79: CMPE 257 Spring 2006 End-to-End Protocols 2

79CMPE 257 - Wireless and Mobile Networking

Sender-Based Heuristics: Advantages

• Only sender needs to be modified.

Needs further investigation to develop better heuristics.– Investigate longer-term heuristics.

Page 80: CMPE 257 Spring 2006 End-to-End Protocols 2

80CMPE 257 - Wireless and Mobile Networking

TCP in Multi-Hop Ad Hoc Networks (MANETs)

Page 81: CMPE 257 Spring 2006 End-to-End Protocols 2

81CMPE 257 - Wireless and Mobile Networking

Issues

• Route changes due to mobility.– Frequent route changes may cause OOO

delivery.

• Wireless transmission errors.– Problem compounded due to multiple hops.

• MAC– MAC protocol can impact TCP performance.

Page 82: CMPE 257 Spring 2006 End-to-End Protocols 2

82CMPE 257 - Wireless and Mobile Networking

Throughput over Multi-Hop Wireless Paths [Gerla99]

• When contention-based MAC protocol is used, connections over multiple hops are at a disadvantage compared to shorter connections.– They have to contend for wireless access at

each hop.

– Delay or drop probability increases with number of hops.

Page 83: CMPE 257 Spring 2006 End-to-End Protocols 2

83CMPE 257 - Wireless and Mobile Networking

Improving TCP Performance in MANETs

• Classification:– Cross-layer.

– Strictly end-to-end.

• First, we’ll look at cross-layer approaches…

Page 84: CMPE 257 Spring 2006 End-to-End Protocols 2

84CMPE 257 - Wireless and Mobile Networking

Analysis of TCP Performance over MANETs [Holland99]

• Impact of mobility.• Simulation study.• Performance metric: throughput.

– Baseline: ideal (expected) throughput.• Upper bound.• Static network.

Page 85: CMPE 257 Spring 2006 End-to-End Protocols 2

85CMPE 257 - Wireless and Mobile Networking

Throughput versus Hops

0

200400

600800

1000

12001400

1600

1 2 3 4 5 6 7 8 9 1

Number of hops

TCPThroughtput(Kbps)

TCP throughput over 2 Mbps 802.11 MAC, fixed, linear MANET.

Page 86: CMPE 257 Spring 2006 End-to-End Protocols 2

86CMPE 257 - Wireless and Mobile Networking

Expected Throughput

• Ti is measured throughput for i hops using static linear chain topology.

• ti time duration of TCP connection containing i hops.

1

1*

_expi

i

ti

Titithroughputected

Page 87: CMPE 257 Spring 2006 End-to-End Protocols 2

87CMPE 257 - Wireless and Mobile Networking

Throughput versus speed

Speed (m/s)

AverageThroughput(Over 50 runs)

Expected

Actual

Throughput decreases with speed…

Page 88: CMPE 257 Spring 2006 End-to-End Protocols 2

88CMPE 257 - Wireless and Mobile Networking

Throughput versus Speed

Mobility pattern #

Actualthroughput

20 m/s

30 m/sBut not always…

Page 89: CMPE 257 Spring 2006 End-to-End Protocols 2

89CMPE 257 - Wireless and Mobile Networking

Impact of MobilityTCP Throughput

Ideal throughput (Kbps)

Act

ual t

hrou

ghpu

t

2 m/s 10 m/s

Page 90: CMPE 257 Spring 2006 End-to-End Protocols 2

90CMPE 257 - Wireless and Mobile Networking

Impact of Mobility

Ideal throughput

Act

ual t

hrou

ghpu

t

20 m/s 30 m/s

Page 91: CMPE 257 Spring 2006 End-to-End Protocols 2

91CMPE 257 - Wireless and Mobile Networking

mobility causeslink breakage,resulting in routefailure

TCP data and acksen route discarded

Why Throughput Degrades

TCP senderstarts sending packets again

Route isrepaired

No throughput

No throughputdespite route repair

Page 92: CMPE 257 Spring 2006 End-to-End Protocols 2

92CMPE 257 - Wireless and Mobile Networking

mobility causeslink breakage,resulting in routefailure

TCP data and acksen route discarded

Why Throughput Degrades?

TCP sendertimes out.Backs off timer.

Route isrepaired

TCP senderresumessending

Larger route repair delaysespecially harmful

No throughput

No throughput

despite route repair

Page 93: CMPE 257 Spring 2006 End-to-End Protocols 2

93CMPE 257 - Wireless and Mobile Networking

Why Throughput Improves?Low Speed Scenario

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.

Page 94: CMPE 257 Spring 2006 End-to-End Protocols 2

94CMPE 257 - Wireless and Mobile Networking

Why Throughput Improves?Higher Speed Scenario

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.

Before TCP sender times (after 1 second), route is repaired.

Page 95: CMPE 257 Spring 2006 End-to-End Protocols 2

95CMPE 257 - Wireless and Mobile Networking

Why Throughput Improves?General Principle

• TCP timeout interval somewhat independent of speed.

• Network state at higher speed, when timeout occurs, may be more favorable than at lower speed.

• Network state:– Link/route status.– Route caches.– Congestion.

Page 96: CMPE 257 Spring 2006 End-to-End Protocols 2

96CMPE 257 - Wireless and Mobile Networking

How to Improve Throughput• Network feedback.• Inform TCP of route failure explicitly.• Let TCP know when route is repaired.

– Probing.– Explicit notification.

• Reduce repeated TCP timeouts and backoff.

Page 97: CMPE 257 Spring 2006 End-to-End Protocols 2

97CMPE 257 - Wireless and Mobile Networking

ELFN

• Explicit Link Failure Notification.• Piggyback notification onto DSR’s route

failure message to sender.• TCP sender responds by disabling

congestion control until route is fixed.– Disable retransmission timers.– When ACK is received, TCP restores state

and resumes normal operation.• TCP sender probes the network until it gets

an ACK, which indicates it can resume normal operation.

Page 98: CMPE 257 Spring 2006 End-to-End Protocols 2

98CMPE 257 - Wireless and Mobile Networking

Performance Improvement

Without networkfeedback

Ideal throughput 2 m/s speed

With feedback

Act

ua

l thr

oug

hpu

t

Page 99: CMPE 257 Spring 2006 End-to-End Protocols 2

99CMPE 257 - Wireless and Mobile Networking

Performance Improvement

Without networkfeedback

With feedback

Ideal throughput 30 m/s speed

Act

ua

l thr

oug

hpu

t

Page 100: CMPE 257 Spring 2006 End-to-End Protocols 2

100CMPE 257 - Wireless and Mobile Networking

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

Withexplicitnotification

Page 101: CMPE 257 Spring 2006 End-to-End Protocols 2

101CMPE 257 - Wireless and Mobile Networking

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.

Page 102: CMPE 257 Spring 2006 End-to-End Protocols 2

102CMPE 257 - Wireless and Mobile Networking

Impact of Caching

• Route caching has been suggested as a mechanism to reduce route discovery overhead (e.g., DSR).

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

• When route from S to D 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 103: CMPE 257 Spring 2006 End-to-End Protocols 2

103CMPE 257 - Wireless and Mobile Networking

To Cache or Not to Cache

Average speed (m/s)

Ac t

ual t

hrou

ghpu

t (a s

fra

ctio

n of

ex

pec t

ed th

roug

hput

)

Page 104: CMPE 257 Spring 2006 End-to-End Protocols 2

104CMPE 257 - Wireless and Mobile Networking

Why Performance Degrades With Caching

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

• Cached routes may also be broken.

timeout dueto route failure

timeout, cachedroute is broken

timeout, second cachedroute also broken

Page 105: CMPE 257 Spring 2006 End-to-End Protocols 2

105CMPE 257 - Wireless and Mobile Networking

To Cache or Not to Cache

• Caching can result in faster route “repair”.• But, 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 106: CMPE 257 Spring 2006 End-to-End Protocols 2

106CMPE 257 - Wireless and Mobile Networking

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 timeouts.

Page 107: CMPE 257 Spring 2006 End-to-End Protocols 2

107CMPE 257 - Wireless and Mobile Networking

Window Size After Route Repair

• When route breaks: may be too optimistic or may be too conservative.

• Better be conservative than overly optimistic– Reset window to small value after route repair.– TCP needs to be aware of route repair (Route Failure

and Route Re-establishment Notifications).– Impact low on paths with small delay-bw product.

Page 108: CMPE 257 Spring 2006 End-to-End Protocols 2

108CMPE 257 - Wireless and Mobile Networking

RTO After Route Repair• If new route longer, RTO may be too small, leading to

timeouts.• New RTO = function of old RTO, old route length,

and new route length.– Example: new RTO = old RTO * new route length / old

route length– Not evaluated yet.

Page 109: CMPE 257 Spring 2006 End-to-End Protocols 2

109CMPE 257 - Wireless and Mobile Networking

TCP-Feedback [Chandran01]

• TCP-F.• Similar to ELFN.• Relies on notification from routing layer.

– When route breakage is detected, a Route Failure Notification (RFN) sent to TCP sender.

• TCP sender goes to “Snooze” state when RFN received.– Freezes all timers and congestion control.– Stops sending data.

• TCP sender resumes normal operation when it gets a Route Re-establishment Notification (RRN).– If it does not get RRN within a certain time interval,

leaves snooze state.– It invokes congestion control before transmitting data.

Page 110: CMPE 257 Spring 2006 End-to-End Protocols 2

110CMPE 257 - Wireless and Mobile Networking

Ad Hoc TCP[Liu01]

• ATCP also uses network-layer feedback.

• Implemented as a layer between TCP and network layer.– Listens to ECNs and ICMP (e.g., destination

unreachable) messages.

TCP

ATCP

Network Layer

Page 111: CMPE 257 Spring 2006 End-to-End Protocols 2

111CMPE 257 - Wireless and Mobile Networking

ATCP (Cont’d)

• Depending on network notification, TCP sender switches to different states.

• E.g., “destination unreachable” causes TCP sender to enter “persist” state, during which no packets are sent until route is mended.

• ECNs invoke TCP congestion control.• 3 Dupacks are used as indication of

transmission errors.– New ACK resumes TCP’s normal operation.

Page 112: CMPE 257 Spring 2006 End-to-End Protocols 2

112CMPE 257 - Wireless and Mobile Networking

Improving TCP Performance in MANETs

• Classification:– Cross-layer.

– Strictly end-to-end.

Page 113: CMPE 257 Spring 2006 End-to-End Protocols 2

113CMPE 257 - Wireless and Mobile Networking

TCP Over Different Routing Protocols [Dyer2001]

• Impact of routing algorithm on TCP performance.– Metrics: connect time, throughput and overhead.

• On-demand routing.– AODV and DSR.

– ADV: adaptive on-demand with proactive updates.

• Sender-based heuristic to improve TCP’s performance.

Page 114: CMPE 257 Spring 2006 End-to-End Protocols 2

114CMPE 257 - Wireless and Mobile Networking

Fixed-RTO

• TCP does not exponentially backoff the RTO.• Uses sender-based heuristic to distinguish between

congestion and “route failure” losses.– Route failure assumed if 2 consecutive timeouts.

– Unack’d packet retransmitted.

– No RTO backoff in the second (and +) timeout.

– RTO remains fixed until retransmission is ack’d.

Page 115: CMPE 257 Spring 2006 End-to-End Protocols 2

115CMPE 257 - Wireless and Mobile Networking

Improving TCP under OOO Delivery [Wang02]

Page 116: CMPE 257 Spring 2006 End-to-End Protocols 2

116CMPE 257 - Wireless and Mobile Networking

Out-of-Order Packet Delivery

• Route changes may result in out-of-order (OOO) delivery.

• Significantly OOO delivery confuses TCP, triggering congestion control.

• Potential solutions:– Avoid OOO delivery by ordering packets before

delivering to IP layer

– Turn off fast retransmit.• Can result in poor performance in presence of

congestion

Page 117: CMPE 257 Spring 2006 End-to-End Protocols 2

117CMPE 257 - Wireless and Mobile Networking

TCP DOOR

• Detect and respond to out-of-order (OOO) packets.– Differentiate between OOO and congestion

losses.

• OOO delivery caused by:– Retransmissions.

– Route changes.

Page 118: CMPE 257 Spring 2006 End-to-End Protocols 2

118CMPE 257 - Wireless and Mobile Networking

Detecting OOO

• OOO delivery can happen in either direction.• Sender detects OOO (duplicate) ACKs.• Receiver detects OOO data packets.

Page 119: CMPE 257 Spring 2006 End-to-End Protocols 2

119CMPE 257 - Wireless and Mobile Networking

OOO ACKs

• Sequence number of packet being ACKed: monotonically increasing.– Why? ACKs are not re-transmitted.

• For DUPACKs, add 1-byte to count DUPACKs.

• ADSN: ACK duplication sequence number.• TCP header option.• Each DUPACK carries different ADSN.

Page 120: CMPE 257 Spring 2006 End-to-End Protocols 2

120CMPE 257 - Wireless and Mobile Networking

OOO Data Packets

• At receiver.• Why comparing sequence numbers doesn’t work?

– Retransmissions: higher sequence #’s can arrive earlier.

– Out-of-sequence event.• Use extra sequence number: incremented with every data

packet, including retransmissions.– 2-byte TCP packet sequence number (TPSN) as TCP

option.– Or timestamp.

• Sender needs to be notified.

Page 121: CMPE 257 Spring 2006 End-to-End Protocols 2

121CMPE 257 - Wireless and Mobile Networking

OOO Response

• At sender.• 2 types of response:

– Temporarily disable congestion control for fixed time interval T1.

– If in congestion avoidance mode in the last T2 time interval, go back to prior state.

Page 122: CMPE 257 Spring 2006 End-to-End Protocols 2

122CMPE 257 - Wireless and Mobile Networking

Evaluation

• Simulation environment:– ns-2 + CMU extensions.

– Mobility: random way-point.

– Workload: single TCP between fixed S and R with and without congestion.

Page 123: CMPE 257 Spring 2006 End-to-End Protocols 2

123CMPE 257 - Wireless and Mobile Networking

Results

• Significant goodput improvement (~50%) when 2 response mechanisms used.

• Sender versus receiver detection.– Seem to perform the same.– Correlation between OOO ACKs and data.

• Response mechanisms.– Both in place show better performance.