TCP for Mobile and Wireless Hosts
Download
Report
Transcript TCP for Mobile and Wireless Hosts
Distributed Fair Scheduling
Nitin Vaidya
Department of Computer Science
Texas A&M University
[email protected]
www.cs.tamu.edu/faculty/vaidya/mobile.html
Texas A&M University
90 miles north-west of Houston
40,000+ students
CS department
1000+ undergraduate , 200+ graduate students in CS
department
28 faculty
Wireless Networking and Mobile Computing
Group
Mobile ad hoc networking
TCP over Wireless
Data dissemination
Prevention of traffic analysis
Current/Past Supporters
Defense Advanced Research Projects Agency
(DARPA)
National Science Foundation (NSF)
Texas Advanced Technology Program
Microsoft Research
Sun Microsystems
Raytheon Systems
MCI Telecommunications Corporation
Motorola
Wireless Ad Hoc Networks
Network formed by wireless hosts without using
pre-existing network infrastructure
Rapidly deployable
C
B
A
D
E
F
Wireless Ad Hoc Networks: Our Research
Distributed
Algorithms
Network
Link
Physical
UDP / TCP
Routing
(unicast/anycast/geocast)
Fair Access
Auto-rate
Algorithm
Cross-Layer Interactions
Transport
Wireless NetCamo
Upper layers
Medium Access Control
Directional antennas
Adaptive modulation
Fair scheduling
Adaptive Multi-Rate Protocols
for
Wireless Ad Hoc Networks
Gavin Holland, Texas A&M
Nitin Vaidya, Texas A&M
Victor Bahl, Microsoft Research
Medium Access Control (MAC)
MAC protocol is responsible for coordinating access to the
shared wireless channel
A
B
C
D
Data Modulation
Modulation scheme defines rate at which data is encoded into
the transmitted signal
Conventional hardware uses multiple modulation schemes
Modulation schemes have different error characteristics
End-to-End Throughput for IEEE 802.11
Modulation Schemes
Simulated
Measured
Adaptive Modulation
and
Medium Access Control
Question: How to choose the best modulation
scheme for any packet?
Answer: Adaptive modulation.
Dynamically switch to the best modulation technique for
given channel conditions
Our work: How to integrate adaptive modulation with
802.11 medium access control ?
802.11 Medium Access Control (MAC)
Sender sends Request-to-Send (RTS) requesting channel reservation
Receiver responds with Clear-to-Send (CTS) if reservation is acceptable
RTS and CTS announce the duration of the transfer
All nodes overhearing RTS and CTS keep quiet for that duration
C
ACK
A
DATA
RTS
D
CTS
RTS
ACK
DATA
B
CTS
Lucent WaveLan
Sender-Based Autorate Fallback (ARF) Protocol
Decrease rate after N consecutive ACKS not received
Increase rate after Y consecutive ACKS are received or
after an interval of time T has passed since last attempted
rate increase
A
DATA’1Mbps DATA2Mbps
CTS CTS’
C
CTS
CTS’
B
RTS’ RTS
RTS’
RTS
D
2Mbps
1Mbps
+
+
–
–
Consistent with current 802.11 standard
Exists today
Does not consider multiple receivers
Choice of N, Y, T may not be best for all situations
Simulated ARF Performance
Expected
ARF
Our Objectives
Proposed approach should be similar to existing
standard to make it acceptable to industry
Should be easy to implement
Should yield sufficient improvements to warrant
revising existing standard
Receiver-Based Autorate MAC Protocol
Let the receiver determine the best rate
When sending CTS, the receiver specifies the modulation
scheme to be used for the DATA
Channel reservation information in the DATA packet header
implicitly updates reservation
Receiver-Based Autorate MAC Protocol
(Rate Increase Example)
Sender sends RTS with estimated duration
Receiver chooses the best rate and replies with a CTS with
the new duration
Sender transmits DATA packet at new rate
C
CTS(2)
DATA(2)
A
RTS(1)
B
CTS(2)
DATA(2)
RTS(1)
D
A
B
C
D
2Mbps
1Mbps
Network Allocation Vectors
Receiver-Based Autorate MAC Protocol
(Rate Decrease Example)
C
CTS(1)
DATA(1)
A
RTS(2)
B
CTS(1)
DATA(1)
RTS(2)
D
2Mbps
1Mbps
A
B
C
D
Network Allocation Vectors
Receiver-Based Scheme: Summary
Modulation schemes have different error
characterstics
Conventional hardware uses multiple modulation
schemes
Significant performance in ad hoc networks may be
obtained by integrating medium access control with
adaptive modulation
Receiver-based schemes may perform the best
Distributed Fair Scheduling
in a Wireless LAN
Nitin Vaidya, Texas A&M University
Victor Bahl, Microsoft Research
Seema Gupta, now with Cisco
(MobiCom 2000 Paper)
Distributed Scheduling :
What & Why
Medium Access Control
Wireless medium is a broadcast medium
Transmissions by multiple nodes can interfere
Need medium access control (MAC)
Many proposals
Centralized
Distributed
Centralized Protocols
Base station coordinates access to the wireless
channel
Node
1
Node
2
Base
Station
Node
3
Node
n
Distributed Protocols
All nodes have identical responsibilities
Node
1
Node
2
Wireless LAN
Node
3
Node
n
Disadvantages of Centralized Approach
If a node cannot talk to the base station, it cannot
transmit to any other nodes
Base station needs to keep track of state of other
nodes
Hard to use failure-prone nodes as coordinators in
centralized protocols
Fairness
Fairness
Packets to be transmitted belong to several flows
Each flow is assigned a weight
Bandwidth assigned to each backlogged flow is
proportional to its weight
Fairness
Three flows with weights 2,
1, 1
Allocated
bandwidth
Backlogged
flows:
Fair Queueing
Many centralized fair queueing protocols exist
WFQ, WF2Q, SCFQ, SFQ, …
Scheduler needs to know state of all flows
Flow 1
Flow 2
Flow n
Output link
Distributed Fair Scheduling
Our Objectives
Fully distributed fair scheduling protocol
All nodes have identical responsibilities
Nodes do not need to be aware of each other’s state
Maintain compatibility / resemblance with an existing
standard
specifically, IEEE 802.11 Distributed Coordination Function
Proposed Approach
Combination of
IEEE 802.11 Distributed Coordination Function (DCF)
Carrier sense / collision avoidance
A centralized fair queueing protocol
Basic Carrier Sense Approach
A node wishing to transmit waits until channel is
sensed as idle, and then transmits
If two nodes are waiting to transmit, they will collide
Collision avoidance mechanism needed to avoid this
IEEE 802.11
Distributed Coordination Function
Collision avoidance mechanism: When transmitting a
packet, choose a backoff interval in the range [0,cw]
– cw is contention window
0 down the backoff
cwinterval when medium is idle
Count
When backoff interval reaches 0, transmit
802.11 DCF Example
B1 = 25
B1 = 5
wait
data
data
B2 = 20
cw = 31
wait
B2 = 15
B2 = 10
B1 and B2 are backoff intervals
at nodes 1 and 2
Self-Clocked Fair Queueing (SCFQ)
[Golestani]
A centralized fair scheduling protocol
But more amenable for a distributed implementation
than many others
The steps involved in deriving proposed distributed
protocol starting from SCFQ are given in the paper
virtual time, start/finish tags
implementation does not need virtual time or tags
Distributed Fair Scheduling (DFS)
Node with smallest “length/weight” should transmit
first
Caveat: This is a somewhat imprecise statement. DFS
(implicitly) compares so-called virtual finish tags, which are a
function of length/weight
See paper for details on the finish tags
Backoff intervals used as a way to distributedly
determine whose “length/weight” is smaller
Distributed Fair Scheduling (DFS)
Choose backoff interval
= packet length / weight
packet length = 5
weight = 1/3
backoff interval = 5 / (1/3) = 15 slots
Distributed Fair Scheduling (DFS)
B1 = 10
B1 = 15
wait
B1 = 5
wait
Collision !
data
B2 = 5
data
B2 = 5
B2 = 5
Packet length = 15
Weight of node 1 = 1 ====> B1 = 15 / 1 = 15
Weight of node 2 = 3 ====> B2 = 15 / 3 = 5
Collisions
Collisions occur when two nodes count down to 0
simultaneously
In centralized fair queueing, ties can be broken without causing
“collisions”
To reduce the possibility of collisions:
Backoff interval =
Scaling_Factor * length / weight * random number with
mean 1
Backoff Interval
Initial formula: Length / weight = 15 / 1 = 15
0
15
Scaling_factor * length / weight * random number
=
=
4
* 15 /
[54,66]
1
* [0.9,1.1]
Backoff Interval
802.11
0
Proposed DFS
0
Collisions Resolution
Collision occurs when two nodes count down to 0
simultaneously
Counting to 0 implies that it is a given node’s “turn” to
transmit
To reduce “priority” reversals, a small backoff interval
is chosen after the first collision
Backoff interval increased exponentially on further
collisions
Impact of Small Weights
Backoff interval:
Scaling_factor * length / weight * random number
Backoff intervals can become large when weights are
small
Large backoff intervals may degrade performance
(time wasted in counting down)
Impact of Small Weights
Recall: Backoff intervals are being used to compare
“length/weight”
Intuition: Any non-decreasing function of
lenghth/weight may be used to obtain backoff
intervals
Alternative Mappings
Chosen
backoff
interval
Linear mapping
SQRT
EXP
Scaling_factor * length / weight * random number
Alternative Mappings
Advantage
smaller backoff intervals
less time wasted in counting down when weights of all
backlogged flows are small
Disadvantage
backoff intervals that are different on a linear scale may
become identical on the compressed scale
possibility for greater number of collisions
Performance Evaluation
Using modified ns-2 simulator: 2 Mbps channel
Number of nodes = N
Number of flows = N/2
Odd-numbered nodes are destinations,
even-numbered nodes are sources
Unless otherwise specified:
flow weight = 1 / number of flows
backlogged flows with packet size 584 bytes (including UDP/IP headers)
Scaling_Factor = 0.02
Fairness Index
Fairness measured as a function of
(throughput T / weight f) for each flow f over an
interval of time
Unless specified, the interval is 6 seconds
Throughput / Weight
Variation Across Flows (with 16 Flows)
802.11
Throughput /
Weight
Flatter
curve
is fairer
DFS
is fairer
Flow destination identifier
Throughput - Fairness Trade-Off
802.11
Aggregate
throughput
(all flows
combined)
Number of flows
Throughput - Fairness Trade-Off
Fairness
index
802.11
Number of flows
Scaled 802.11
Fairness of 802.11 can be improved by using larger
backoff intervals
Is DFS fairer simply because it uses large backoff
intervals ?
Scaled 802.11 = 802.11 which uses backoff
interval range comparable with DFS
Short-Term Fairness
Narrow
distribution
is fairer
Frequency
DFS
Scaled 802.11
802.11
Number of packets transmitted by a flow
(over 0.04 second windows)
DFS is
fairer
Fairness versus Sampling Interval Size
(24 flows)
DFS
Fairness
index
Scaled
802.11
802.11
Interval Size
Alternative Mappings for Backoff Intervals
See additional data in the paper
EXP and SQRT improve throughput compared to
LINEAR mapping when all backlogged flows have
low weights
but not too impressively
If at least one backlogged flow has a high weight, not
much benefit
Conclusions
(supporting arguments for some conclusions not
presented in the talk: please see the paper)
DFS improves fairness compared to 802.11 and
Scaled 802.11
Alternative mappings somewhat beneficial
No distributed fair scheduling protocol may accurately
emulate work-conserving centralized protocols
(unless clocks are synchronized)
Conclusions
Possible to augment DFS with other techniques to
improve fairness in presence of transmission errors
see Seema Gupta’s M.S. thesis
No performance cost even if weight assigned to a
flow is changed on a per-packet basis
Execution complexity of centralized protocols would
increase
Possible to handle multiple flows per node
Other Potential Applications of DFS
Wired LANs
Wireless multi-hop networks
see our 1999 Microsoft Research technical report for some
initial ideas
Issues for Further Work
DFS is only the first step towards practical fairness:
How to choose parameters such as Scaling_Factor ?
Failure to choose reasonable values can degrade throughput or
short-term fairness
How to choose flow weights ?
Let upper layer specify dynamically, or
Static assignment based on static criteria
Ad hoc network-related issues
Thank you!
www.cs.tamu.edu/faculty/vaidya
Thank you!
www.cs.tamu.edu/faculty/vaidya
Flow
throughput
Impact of Packet Size
Three flows
with different
packet sizes
802.11
584
328
Packet size (bytes)
200
Impact of Scaling Factor
(six flows with weights 1/2,1/4,1/8,1/16,1/32,1/32)
Fairness
index
DFS
Scaling Factor
Impact of Scaling Factor
(six flows with weights 1/2,1/4,1/8,1/16,1/32,1/32)
Aggregate
throughput
DFS
Scaling factor
Related Past Work
Centralized fair queueing on wired links
[Bennett,Demers,Parekh]
Centralized fair queueing in wireless environments,
taking location-dependent errors into account
[Bharghavan,Ramanathan,Zhang]
Distributed Real-time scheduling [Sobrinho]
Distributed Priority-based scheduling
Backoff Interval
Scaling factor
Small number : May result in more collisions
Large number: Larger overhead
Random number range
Small range will cause more collisions between
synchronized nodes
How to choose these adaptively ?
This paper punts the issue
But heuristic solutions are easy to define
Heuristics yet to be evaluated
Preventing Traffic Analysis
in
Wireless Ad Hoc Networks
Background
Traffic analysis threat
“By the act of communicating, even if perfect confidentiality
of the actual information is achieved, one can give
indications to observing parties of impending
actions,capabilities,chains of command, and level of
readiness.”
What can an eavesdropper learn?
Contents of packets : Use encryption
Traffic pattern : Our research
Wireless Networks
What is different ?
Shared medium
Transmission errors
Mobility
Ease of eavesdropping on transmissions
Time-varying channel conditions
This project explores
New issues that arise in wireless networks
Old issues that need to be re-considered taking
wireless constraints into account
This presentation
Focuses mostly on new issues
Wired Network
Receiver
Sender
End-to-End Encryption in Wired Networks
frame header
packet header
message
packet trailer
packet
frame
denotes encryption
A router may be compromised, particularly when
traversing insecure subnets
Flow traffic pattern needs to be camouflaged
frame trailer
Wireless Ad Hoc Network
Sender
Receiver
Link-Level Encryption (IEEE 802.11)
frame header
packet header
message
packet trailer
frame trailer
packet
frame
Eavesdropper can observe link traffic, even if a node
is not compromised
Link traffic pattern must be camouflaged
Problem Definition
Several modes of operation
An eavesdropper should not be able to identify the
operational mode or change of mode
Our Approach
Insert dummy traffic (stuffing) such that
Link traffic pattern observed by an eavesdropper
remains the same independent of the mode of
operation
Need to better characterize what same means
Operational Mode
An operational mode is identified by the set of
end-to-end flows and their bandwidth requirements
Example:
A
B
D
C
source
destination
rate
A
D
1 Mbps
A
B
1 Mbps
Routing 1
A
B
D
C
flow
route
A D
A B D
A B
A B
Link Traffic Pattern
link
rate
A B
2 Mbps
B D
1 Mbps
Routing 2
A
B
D
C
flow
route
A D
A B D
A B
A C B
Link Traffic Pattern
link
rate
link
rate
A B
1 Mbps
A C
1 Mbps
B D
1 Mbps
C B
1 Mbps
Simple but Useful Observation
For a given flow traffic pattern and network topology,
routing determines the link traffic pattern
Link Traffic
Pattern 1
Flow Traffic
Pattern
Link Traffic
Pattern 2
Link Traffic
Pattern 3
Only feasible link traffic patterns may be used
Wired Network
A
B
C
D
Link capacity =
1 Mbps
For each link,
link traffic rate <= link capacity
link
rate
A B
2 Mbps
B D
1 Mbps
Wired Network
link
A
B
D
C
Link capacity =
1 Mbps
For each link,
link traffic rate <= link capacity
rate
A B
1 Mbps
A C
1 Mbps
C B
1 Mbps
B D
1 Mbps
Wireless Network
link
A
B
D
C
Link capacity =
1 Mbps
Link transmission conflicts
should be taken into account
rate
A B
1 Mbps
A C
1 Mbps
C B
1 Mbps
B D
1 Mbps
Wireless Transmission Conflicts
A
B
D
B
D
C
A
C
Routing
for
Preventing Traffic Analysis
Objective
Given a set of operational modes,
Determine suitable routes for various flows, and
Amount of padding traffic on each link, such that
A minimal cover mode is obtained
Example
A
B
D
C
source
destination
A
D
A
B
rate
source
destination
0.5 Mbps
A
D
1 Mbps
1 Mbps
A
B
0.5 Mbps
Operational Mode 1
rate
Operational Mode 2
Example: Link Cover Mode
A
1.5 Mbps
B
1 Mbps
D
C
source
destination
A
D
A
B
rate
source
destination
0.5 Mbps
A
D
1 Mbps
1 Mbps
A
B
0.5 Mbps
Operational Mode 1
rate
Operational Mode 2
Link Cover Mode
Mode 1
Link Traffic
Pattern
Flow Traffic
Pattern
Link Traffic
Pattern
Mode 2
Flow Traffic
Pattern
Link Traffic
Pattern
Link Traffic
Pattern
Minimal Cover Mode
Several metrics may be used to characterize a
minimal cover mode
Our initial choice: Cover mode C1 <= C2 if, for each
link, the traffic demand in C1 <= that in C2.
A cover mode C is a minimal cover mode if no cover
mode exists which is smaller than C.
Routing Problem
Given the network topology and the operational
modes, find a minimal cover mode and routes for all
flows under the cover mode.
Naïve Algorithm: Global Search
1. Find all feasible link traffic patterns
RM1 {(rLMi 1 )}in M1 mode;
2. Find all feasible link traffic patterns
R M 2 {(rLMi 2 )}in M2 mode;
3. For each link traffic pattern (rLi 1 ) R 1
For each link traffic pattern (r M 2 ) R M 2
M
M
Li
M1
M2
)
(max(
r
,
r
)) is feasible
if (rLCover
L
L
i
i
i
then
(rLCover ) is a candidate cover mode;
i
4. Sort all candidate cover modes and return one of the minimal cover
modes .
Heuristic Solutions
Global search can be expensive
Heuristic schemes are more efficient
Presently, we are evaluating an iterative approach
Other possibilities also to be investigated
Iterative Method
Initially, choose shortest path routing for all flows in
all modes
Randomly choose a flow
If possible, find a better route for that flow, keeping all
other routes unmodified
A better route should result in a smaller cover mode
Repeat sufficient number of times
Iterative Method
1. Find the shortest path for each flow in M1 mode and the corresponding
link traffic pattern (r M1 ) .
Li
2. Find the shortest path for each flow in M2 mode and the corresponding
M
link traffic pattern (rLi 2 ) .
M1
M2
Cover
(
r
)
(max(
r
,
r
Li
Li ))is a cover mode, but may be neither feasible
3. Li
nor minimal;
4. Randomly select a flow from M1 mode or M2 mode ;
5. Fix the routes for other flows and find a new route for the selected
flow.
6. If the current cover mode is not feasible and rerouting improves the
feasibility of the cover mode, then reroute the flow; otherwise, keep the
old route;
7. If the current cover mode is already feasible and if rerouting results in
a smaller cover mode, then reroute the flow; otherwise, keep the old
route.
8. Repeat steps 4-7 until the number of failed rerouting exceeds a
predefined threshold.
Iterative Method
We estimate the required link capacity:
1. Identify link groups in each of which the total link traffic demand
should not exceed the link capacity
2. The required link capacity is estimated by the maximum link group
traffic demand.
Two ways of defining link groups:
1. All links that are incident to a common node comprise a link group
2. All links that interfere with a specific link comprise a link group
Iterative Method
1. Before selecting a flow
(rg1 , rg2 ,, rgk )
Mode 1
Link Demands
Cover Mode
Link Demands
Cover Mode
Link Group Demands
rmax
Maximum
Link Group Demand
Mode 2
Link Demands
'
rmax
rmax
2. Selecting a flow and remove it
(rg'1 , rg' 2 ,, rg' k )
Mode 1
Link Demands
Cover Mode
Link Demands
Cover Mode
Link Group Demands
'
rmax
Maximum
Link Group Demand
Mode 2
Link Demands
'
''
rmax
rmax
rmax
3. Reroute the flow with new path
(rg''1 , rg''2 ,, rg''k )
Mode 1
Link Demands
Cover Mode
Link Demands
Mode 2
Link Demands
Cover Mode
Link Group Demands
''
rmax
Maximum
Link Group Demand
Iterative Method
Link weight assignment heuristic (for each link l )
1. compute the increase of cover mode link demand, rl , if the link
were to be on the new path for the selected flow;
2. compute the link weight using the following formula:
max(
lg i
rl
)
'
rmax rg i
Find the weighted shortest path for the selected flow
Simulations
Simulations have been performed to compare the
iterative approach with the shortest path algorithm
Preliminary results show up to 27% bandwidth
savings using the proposed method
Other Issues
Other Issues
Hiding Link-Level Destinations
Can help reduce cost of a cover mode
Hiding Link-Level Destinations
frame header
sender
receiver
packet header
message
packet trailer
packet
frame
Encrypt frame header (including intended receiver)
Problem: Can an eavesdropper determine intended
receiver of a frame?
frame trailer
Hiding Link-Level Destinations
Difficulties:
Frame destinations can be determined by tracking senders
of acknowledgements
Possible Solutions:
Dummy acknowledgements
Reroute acknowledgements
Delayed acknowledgements
Other Issues
Hiding Topology Changes
Hide link activation and deactivation
X
Hiding Topology Changes
Topology may be derived from link traffic pattern
Problem: How to present a “never changing” topology
to the eavesdropper?
Possible solutions:
Agents
Frame-in-frame
Other Issues
Medium Access Control Protocols
Wireless channel is a shared medium : must
somehow share bandwidth appropriately
30%
A
60%
B
C
IEEE 802.11 standard is inadequate for this
No mechanism to specify what fraction of bandwidth each
node may use
Medium Access Control Protocols
We have developed a modified version of
IEEE 802.11
Allows controlled sharing of the wireless channel
Work in cooperation with Microsoft Research
Makes it easier to present a constant traffic pattern
on wireless channel
Paper to appear at ACM MobiCom, Boston, August
2000
Other Issues
Impact of transmission errors
How to exploit directional antennas
Adaptive modulation schemes to improve link-level
performance
presentation by Gavin Holland
Wireless Testbed
Wireless mobile ad hoc network using 802.11
compliant wireless cards
Lucent Wavelan
Basic ad hoc routing to be deployed by July 2000
Various components of wireless NetCamo to be
deployed over the next year
Initial demo should be ready by September 2000
Node Architecture
Transport Layer
Network Layer (Routing Table)
Dummy Traffic Filter
Dummy Traffic Generator
Queue
input link
output link
Related Presentations and Meetings
Paper to be presented at IEEE Information
Assurance and Security Workshop, June 6-7, West
Point, New York
Tutorial on mobile ad hoc networks at
ACM MobiCom, Boston, August 6 or 7, 2000
Workshop on Mobile Ad Hoc Networking and
Computing, Boston, August 11, 2000
For information on above two events, follow pointers from
http://www.research.telcordia.com/mobicom2000
Summary
Routing for preventing traffic analysis
algorithm developed and simulated
alternative algorithms to be studied
Several other issues are under investigation
Fair medium access control protocol to be evaluated in
conjuction with the routing protocol
Hiding link-level destinations
Hiding topology changes
Impact of transmission errors
Impact of directional antennas
Adaptive modulation and MAC
Summary
Wireless testbed
Work performed in other DARPA projects to be used to
speed up testbed deployment
Work performed in other projects at Texas A&M to be
utilized in the DARPA project
fair medium access control
adaptive modulation and MAC