Download - 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
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.
3CMPE 257 - Wireless and Mobile Networking
Today
• E2E protocols continued.
4CMPE 257 - Wireless and Mobile Networking
E2E Protocols
• Reliable point-to-point.• Reliable multipoint.
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.
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.
7CMPE 257 - Wireless and Mobile Networking
Cross-Layer Approaches
Link layer error recovery.Link layer retransmission.
TCP-awareness: Snoop [Balakrishnan95]
– TCP-unawareness.
• Split connection.
8CMPE 257 - Wireless and Mobile Networking
TCP-Aware Link Layer Retransmission
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.
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
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.
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
13CMPE 257 - Wireless and Mobile Networking
Snoop : Example
41 40 3839
3634
36
37
38
35 39
14CMPE 257 - Wireless and Mobile Networking
Snoop : Example
42 41 3940
36
Duplicate acks are not delayed
36
dupack
37
38
39
40
15CMPE 257 - Wireless and Mobile Networking
Snoop : Example
40
363636
Duplicate acks
4143 42
37
38
39
40
41
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
17CMPE 257 - Wireless and Mobile Networking
Snoop : Example
37
36
36
4245 44
36
37
38
39
40
41
42
43
36
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
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
20CMPE 257 - Wireless and Mobile Networking
Snoop : Example
FH MHBS
44
3636
4548 47
36
42
43
41
36
44
45
43
46
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
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.
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.
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.
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).
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).
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.
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.
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
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)
31CMPE 257 - Wireless and Mobile Networking
Delayed Dupacks: Example
42 41 3940
36
Duplicate acks are not delayed
36
dupack
37
38
39
40
32CMPE 257 - Wireless and Mobile Networking
Delayed Dupacks: Example
40
363636
Duplicate acks
4143 42
37
38
39
40
41
Original ack
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
34CMPE 257 - Wireless and Mobile Networking
Delayed Dupacks: Example
37
3636
4245 44
36
37
40
41
42
36dupacks
Delayed dupacks
43
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
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
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
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.
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.
40CMPE 257 - Wireless and Mobile Networking
Cross-Layer Approaches
• Link layer error recovery.• Link layer retransmission.
– TCP-awareness.
– TCP-unawareness.
• Split connection.
41CMPE 257 - Wireless and Mobile Networking
Split Connection Approach
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.
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
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
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
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
47CMPE 257 - Wireless and Mobile Networking
Split Connection Approach: Example
• Indirect TCP [Bakre94] – FH - BS connection : Standard TCP.
– BS - MH connection : Standard TCP.
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.
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
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
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.
52CMPE 257 - Wireless and Mobile Networking
Handoff
FH MHBS
40
39
3738
3640
MH
New base station
Hand-off
40
39
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.
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
55CMPE 257 - Wireless and Mobile Networking
E2E Approaches
• Strict E2E versus E2E with intermediate node involvement.
• E2E with intermediate node involvement:– Explicit notifications.
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.
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.
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.
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
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.
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
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.
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.
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
65CMPE 257 - Wireless and Mobile Networking
Variations
• Base station may or may not locally buffer and retransmit lost packets.
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.
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.
68CMPE 257 - Wireless and Mobile Networking
Strict E2E Schemes
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.
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.
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
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
73CMPE 257 - Wireless and Mobile Networking
Sender-Based Discrimination Scheme
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)
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.
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)
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
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.
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.
80CMPE 257 - Wireless and Mobile Networking
TCP in Multi-Hop Ad Hoc Networks (MANETs)
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.
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.
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…
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.
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.
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
87CMPE 257 - Wireless and Mobile Networking
Throughput versus speed
Speed (m/s)
AverageThroughput(Over 50 runs)
Expected
Actual
Throughput decreases with speed…
88CMPE 257 - Wireless and Mobile Networking
Throughput versus Speed
Mobility pattern #
Actualthroughput
20 m/s
30 m/sBut not always…
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
90CMPE 257 - Wireless and Mobile Networking
Impact of Mobility
Ideal throughput
Act
ual t
hrou
ghpu
t
20 m/s 30 m/s
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
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
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.
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.
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.
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.
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.
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
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
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
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.
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.
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
)
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
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.
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.
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.
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.
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.
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
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.
112CMPE 257 - Wireless and Mobile Networking
Improving TCP Performance in MANETs
• Classification:– Cross-layer.
– Strictly end-to-end.
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.
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.
115CMPE 257 - Wireless and Mobile Networking
Improving TCP under OOO Delivery [Wang02]
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
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.
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.
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.
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.
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.
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.
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.