Download Ad-Hoc Networks - PDOS-MIT

Document related concepts

Peering wikipedia , lookup

Distributed firewall wikipedia , lookup

Multiprotocol Label Switching wikipedia , lookup

Computer network wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Wake-on-LAN wikipedia , lookup

RapidIO wikipedia , lookup

Distributed operating system wikipedia , lookup

Net bias wikipedia , lookup

Deep packet inspection wikipedia , lookup

CAN bus wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

IEEE 1355 wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Airborne Networking wikipedia , lookup

Routing wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Transcript
Grid: Scalable Ad Hoc
Wireless Networking
Douglas De Couto
http://pdos.lcs.mit.edu/grid
What is “Ad Hoc”?
• 802.11 “Ad hoc mode”
• Single-hop communications
• Bluetooth: master/slave
• All communication goes through master device
• We will mean multihop wireless networks
without infrastructure, possibly mobile.
Talk Outline
• Motivation
• Research Results
•
•
•
•
Geographic forwarding
Grid location service (GLS)
Capacity of ad hoc networks
802.11 performance
• Testbed Implementations
• In-building net
• Rooftop net
Application: Smart Devices
Remote
Control
Print
Share
E-Mail
Access
Point
Internet
Application: Rooftop Nets
Game server
School/Homework
Server
Internet
Access
Application: Community Nets
• Cheap
• Incremental
• Automatic
Application: Disaster Services
• Disaster may have damaged phone system etc.
• Want to avoid N2 plans for N services to communicate
Goal: Networks out of chaos
B
C
A
I
D
F
E
G
H
J
Direct Contact Scales Badly
B
A
C
“Hello J!”
I
D
F
E
G
H
J
Solution: Multi-hop Forwarding
B
A
C
“A to J: Hello!”
I
D
F
E
G
H
J
Design Challenges
•
•
•
•
•
Finding routes
Cope with mobile nodes
Conserving battery power
Coping with malicious/faulty nodes
Scaling to large networks
Completed Research
• Scalable routing:
• Geographic forwarding
• Distributed P2P location database
•
•
•
•
Low-power forwarding
Understanding capacity limits
Avoiding malicious nodes
Current research: 802.11 link selection
Geographic forwarding (GF)
N3’s radio range
N1
N3
N2
N4
N5
N6
N7
• Packets addressed to id, location
• Next hop is chosen from neighbors to move packet
geographically closer to destination location
• Per-node routing overhead constant as network size (nodes,
area) grows
• Requires location service, which adds overhead
Grid Location Service (GLS)
overview
E
B
H
L
D
J
G
A
F
“D?”
I
K
C
Each node has a few servers that know its location.
1. Node D sends location updates to its servers (B, H, K).
2. Node J sends a query for D to one of D’s close servers.
GLS’s Spatial Hierarchy
level-0
level-1
level-2
level-3
All nodes agree on the global origin of the grid hierarchy
3 servers per node per level
sibling level-0
squares
sibling level-1
squares
sibling level-2
squares
s
n s
s
s
s
s
s
s
s
Node updates servers with GLS protocol
Queries search for
destination’s servers
s
n s
s
s
Queries search with
same protocol as
updates.
Guaranteed to find
closest location server.
s
s
s
s1
s2
s
s3
location query path
x
GF + GLS performs well
Grid
DSR
Biggest network simulated:
600 nodes, 2900x2900m
(4-level grid hierarchy)
Number of nodes
• Geographic forwarding is less fragile than source routing.
• DSR queries use too much b/w with > 300 nodes.
GLS properties
•
•
•
•
Spreads load evenly over all nodes
Degrades gracefully as nodes fail
Queries for nearby nodes stay local
Per-node storage and communication
costs grow slowly as the network size
grows: O(log n), n nodes
• More details: Li et al., Mobicom 2000
802.11 Capacity
• Enlarge network by adding nodes, area
• Constant density
• Ideally, there is more “packet-hop” capacity,
due to spatial reuse of spectrum
• But: more nodes producing traffic to be
forwarded across network
802.11 packet-hops can scale
Per-node capacity depends on
traffic patterns
• “Random” traffic patterns won’t scale
• Per-node capacity decreases like O(1/sqrt(n))
• “Local” traffic patterns scale, capacity
remains constant if number of hops follows
a power law distribution (e.g. GLS)
• More details: Li et al., Mobicom 2001
Implementation and Testbeds
• Software distributions for
• Linux, BSD
• PC, iPAQ
• Works with unmodified Internet software
• Two Grid nets deployed
LCS Grid Net
5
6
5
5
6
5
5
6 5
6
6
• 17 static nodes on 5th/6th floors
• A dozen iPaq hand-helds
5
6
5
5
5 5
wired
gateway
Roof-Top Grid Net
6
5
4
3
2
1
LCS
Distance Vector Protocol
D
C
A
A’s nbrs:
B, 1 hop (nh: B)
C, 2 hops (nh: B)
D, 3 hops (nh: B)
…
B
E
B’s nbrs:
A, 1 hop (nh: A)
C, 1 hop (nh: C)
D, 2 hops (nh: C)
…
F
*Nodes periodically
broadcast route tables
*Nodes choose route
with fewest hops
Implementation
• Click modular software router (userlevel)
• Portable: userlevel or kernel
• Rich APIs, e.g. Vector, HashMap, etc.
• Any 802.11 card with std. “ad hoc mode”
• Aironet 340/350 cards on Linux/BSD
• Lucent-based cards on Linux
• Best performance with driver support for signal
statistics (minor patches)
Grid Protocol
• All packets have Grid header
• Own Ethernet type code (not IP packets)
• Transmitter information: ID, location
• Control packets
• Route advertisements (broadcasts)
• Location queries and replies
• Data packets
• Encapsulated IP
• Link information is included
Packet Handling
Grid routing process
Route table
Control packets (broadcast)
demux
Encapsulated data packets
Route lookup
Applications
Add/remove
encapsulation
Grid packets
(via pcap)
IP packets
(via tun/tap)
Userlevel
Kernel
eth0
IP
Stack
Packet Handling: Control
Grid routing process
Route table
Control packets (broadcast)
demux
Encapsulated data packets
Route lookup
Applications
Add/remove
encapsulation
Grid packets
(via pcap)
IP packets
(via tun/tap)
Userlevel
Kernel
eth0
IP
Stack
Packet Handling: Data
Grid routing process
Route table
Control packets (broadcast)
demux
Encapsulated data packets
Route lookup
Applications
Add/remove
encapsulation
Grid packets
(via pcap)
IP packets
(via tun/tap)
Userlevel
Kernel
eth0
IP
Stack
Does Grid Find Useful Paths?
B
C
A
I
D
F
E
G
H
J
Mistake: Shortest-Path Routes
B
C
A
I
D
F
E
G
A’s max
range
H
J
Link Quality Isn’t Bi-modal
Obstacles to Better Routing
•
•
•
•
Use low-loss paths, but…
Loss rate masked by 802.11 re-sends
Changes quickly with time, motion
What’s the best metric to minimize?
• Expected total packet transmissions
• Fight strong bias towards shortest paths
How to choose links?
• Signal strength?
Should we use “quality”?
Aironet “quality”
Current Approach:
Measure loss rates
• Receiver measures loss rate of sender
• Receiver ping-pongs loss rate to sender
• Meaured with broadcast
• But: each node broadcasts every ~1.3s
• What period to measure over?
• How to smooth?
• Trying exponentially time-weighted avg.
Installing Grid
•
•
•
ipkg install grid
Follow prompts, be sure to set IPADDR
Is it working?
Grid Summary
• Grid routing protocols are
• Self-configuring
• Easy to deploy
• Scalable
Software etc. at:
http://www.pdos.lcs.mit.edu/grid
References
• GLS: Li et al., “A Scalable Location Service
for Geographic Ad Hoc Routing”. Proc.
ACM MobiCom, August 2000. pp. 120--130
• Capacity: Li et al., “Capacity of Ad Hoc
Wireless Networks”. Proc. ACM MobiCom,
July 2001. pp. 61--69
• Link quality: De Couto et al., “Effects of
Loss Rate on Ad Hoc Wireless Routing”.
MIT LCS TR #836
End Of Talk
Demo…
Links Aren’t Symmetric
Application: Smart Devices
Remote
Control
Print
Share
E-Mail
Access
Point
Internet
Application: Rooftop Nets
Game server
School/Homework
Server
Internet
Access
Application: Disaster Services
• Disaster may have damaged phone system &c
• Want to avoid N2 plans for N services to communicate
Direct Contact Scales Badly
B
A
C
“Hello J!”
I
D
F
E
G
H
J
Design Challenges
•
•
•
•
•
Cope with mobile nodes
Finding routes
Conserving battery power
Coping with malicious/faulty nodes
Scaling to large networks
Topology Distribution Scales Badly
B
A
C
1. “C can reach A and B.”
3. Data from F to B.
D
2. “D can reach A, B, and C.”
F
G
Geographic Forwarding Scales Well
B
Latitude
A
C
“Send towards latG / lonG.”
D
F
E
G
Longitude
Location Database
Latitude
B
A 2. “Where is G?”
DB
C
1. “G is at latG / lonG”
D
F
E
G
Longitude
Distributed Location Database
•
•
•
•
Each node is DB for a few other nodes
How to find a node’s location server(s)?
Every node has an unchanging ID
hash(ID) maps ID to position in unit square
G’s Location Server is a Point
H
I
x
hash(G) = 0.1,0.9
G
(0,0)
Spatial Grid Hierarchy
All nodes agree on the global origin of the Grid hierarchy
Multiple Servers per Node
c
b
a
G
Lookups Expand in Scope
c
b
a
?
A
G
Grid Protocol Overhead Grows
Slowly
Number of nodes
• Protocol packets include: Grid update, Grid query/reply.