Top Banner
Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU CS 15-744: Computer Networks Brad Karp [email protected] 12th November, 2004
55

Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Jul 28, 2018

Download

Documents

lyhuong
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Wireless Networks:MAC Protocols, Routing Protocols, and Capacity

CMU CS 15-744: Computer Networks

Brad Karp

[email protected]

12th November, 2004

Page 2: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Why are we here?

Learn fundamental problems in wireless networking

• How to share wireless medium efficiently and fairly?

• What is the capacity of a multi-hop wireless network?

Learn about designs of systems that are widely used today

Learn to think critically about quality of research papers, so youcan do good research yourself; acquire taste

Ground rules:

• Feel free to criticize or defend a paper, or my take on it!

• Any comment can lead to discussion!(But I reserve right to keep us moving; lots to cover.)

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 1

Page 3: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Things to Ask When Evaluating a Paper

Does the paper consider an important, relevant problem?

Does it make reasonable assumptions and use reasonablemodels?

The longer ago the paper published, the more you should judge ifthe paper made an impact on the field:

• Does everyone now use systems derived from it, or did they?

• If the paper argued for the importance of trends, did they occur,and did they matter?

Recent papers: judge more on cleverness of ideas, future promise

Old papers: judge on lasting contribution

Other contributions possible: thorough investigation of complexphenomena; comprehensive comparison that brings sense to anarea

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 2

Page 4: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Wireless Systems: Classes of Network

Cellular Systems [not a topic we’ll cover directly]:

• One wireless hop, centralized (mobile to base station)

• Session mobility: call survives changing of base station

• User mobility: user reachable by fixed address (phone number)

• Voice, data

• Many requirements similar to those of Mobile IP

Wireless LANs [most of what we’ll talk about today]

• Base stations

• Peer-to-peer, sometimes multi-hop

Satellite data networks [not a topic we’ll cover directly]

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 3

Page 5: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Fundamentals: Spectrum and Capacity

A particular radio transmits over some range of frequencies; itsbandwidth, in the physical sense

When we’ve many senders near one another, how do we allocatespectrum among senders? Goals:

• Support for arbitrary communication patterns

• Simplicity of hardware

• Robustness to interference

Shannon’s Theorem: there’s a fundamental limit to channelcapacity over a given spectrum range: C = B log2 (1+S/N)

C = capacity (bits/s), B = bandwidth (Hz), S/N = signal/noise powerratio (dB)

Multiple simultaneous senders OK, but no free lunch!

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 4

Page 6: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Single-Channel vs. Multi-Channel

Suppose we’ve 100 MHz of spectrum to use for a wireless LAN

Multi-channel wireless:

• Subdivide into 50 channels of 2 MHz each: FDMA,narrow-band transmission

• Radio hardware simple, channels don’t mutually interfere

• Multi-path fading (mutual cancellation of out-of-phasereflections)

• Base station can allocate channels to users. How do yousupport arbitrary communication patterns?

• Other possibilities: FHSS

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 5

Page 7: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Single-Channel vs. Multi-Channel, cont’d

Single-channel simplex wireless:

• Spread transmission across whole 100 MHz of spectrum

• Robust to multi-path fading (some frequencies arrive intact)

• Simple: symmetric radio behavior

• Supports peer-to-peer communication

• Collisions: a receiver must only hear one strong transmissionat a time

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 6

Page 8: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Review: Ethernet’s CSMA/CD

“Ethernet is straight from God.” - H.T. Kung, networks courselecture

CS (Carrier Sense): listen for others’ transmissions beforetransmitting; defer to others you hear

CD (Collision Detection): as you transmit, listen and verify you hearexactly what you send; if not, back off random interval, withinexponentially longer range each time you transmit unsuccessfully

S1

S1 S2

S2

What does CSMA/CD require to work correctly (catch all collisions)on a link? Is CD possible on a wireless link? Why or why not?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 7

Page 9: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

MACAW Context

Published in SIGCOMM 1994, work 93-94

802.11 standardization proceeded in parallel (IEEE standard in1997)

MACAW and 802.11 similar; both draw heavily from Karn’s MACA

No real research paper on 802.11 design; MACAW covers samearea well

Assumptions: uniform, circular radio propagation; fixed transmitpower

What are authors’ stated goals?

• Fairness in sharing of medium

• Efficiency (total bandwidth achieved)

• Reliability of data transfer at MAC layer

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 8

Page 10: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Hidden Terminal Problem

CBA

Nodes placed a little less than one radio range apart

CSMA: nodes listen to determine channel idle before transmitting

C can’t hear A, so will transmit while A transmits; result: collision atB

Carrier Sense insufficient to detect all transmissions on wirelessnetworks!

Key insight: collisions are spatially located at receiver

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 9

Page 11: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Exposed Terminal Problem

CBA

Two flows, this time B sends to A; C sends to a node other than B

If C transmits, does it cause a collision at A?

Yet C will refuse to transmit while B transmits to A!

Same insight: collisions are spatially located at receiver

Thinking ahead: implications for multi-hop forwarding?

One possibility: directional antennas (see Mobicom 2002) ratherthan omnidirectional antennas. Why does this help? Why is ithard?

Simpler solution: use receiver’s medium state to determinetransmitter behavior

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 10

Page 12: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

RTS / CTS in MACA and MACAW

(defers)CBA

1. "RTS, k bits"

2. "CTS, k bits"

3. "Data"

Sender sends short, fixed-size RTS packet to receiver

Receiver responds with CTS packet

RTS and CTS both contain length of data packet to follow fromsender

Solves hidden terminal problem!

Absent CTS, sender backs off exponentially (BEB) before retrying

RTS and CTS can still themselves collide at their receivers; lesschance as they’re short; any help on short data packets?

What’s the effect on exposed terminal problem?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 11

Page 13: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

BEB in MACA

Current backoff constant: B

Maximum backoff constant: BM

Minimum backoff constant: B0

MACA sender:

• B0 = 2 and BM = 64

• Upon successful RTS/CTS, B← B0

• Upon failed RTS/CTS, B←min [2B,BM]

Before retransmission, wait a uniform random number of RTSlengths (30 bytes) in [0,B]

No carrier sense! (Karn concluded useless because of hiddenterminals)

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 12

Page 14: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

BEB in MACAW

BEB can lead to unfairness: backed-off sender has decreasingchance to acquire medium (“the poor get poorer”)

Simple example: two senders sending to the same receiver, eachsending at a rate that can alone saturate the network

MACAW proposal: senders write their B into packets; upon hearinga packet, adopt its B

Result: dissemination of congestion level of “winning” transmitter toits competitors

Is this a good idea?

RTS failure rate at one node propagates far and wide

Ambient noise? Regions with different loads?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 13

Page 15: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Reliability: ACK

MACAW introduces an ACK after DATA packets; not in MACA

Sender retransmits if RTS/CTS succeeds but no ACK returns;doesn’t back off

Rapid loss recovery, as compared with TCP (compare RTT on LANto WAN)

Useful when there’s ambient noise (microwave ovens . . . )

Why are sequence numbers in DATA packets now important (notmentioned directly in paper!)

Are ACKs useful for multicast packets? Consequences for, e.g.,ARP?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 14

Page 16: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Details: DS and RRTS

2. "CTS, k" CBA D

4. "DATA"

3. "DS, k"

1. "RTS, k"

In exposed terminal problem, how does C know not to sendRTSes, and grow its backoff?

Carrier sense actually takes care of what DS does . . ."RRTS"

CBA D

Once A wins in contention, its large data packets don’t give C achance to send a CTS to D!

MACAW fix: C “proxy contends” for D, by sending an RRTS packet

Now reverse A-B flow to B-A. RRTS no help. C can’t hear D’s RTSpackets!

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 15

Page 17: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

MACAW and 802.11 Differences

802.11 uses physical CS before transmissions: defers a uniformrandom period, in [0,B]

802.11 combines physical CS with virtual CS from RTS/CTSpackets in the Network Allocation Vector (NAV)

802.11 uses RTS-CTS-DATA-ACK

802.11 uses BEB when an ACK doesn’t return

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 16

Page 18: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

802.11: A Dose of Reality

The canonical wireless link in the research community. Why?

• Hardware commoditized, cheap

• First robust (DSSS) wireless network with LAN-like bitrate

Many, many wireless system papers based on ns simulations of802.11 networks

Caveat simulator: simulating a real link layer doesn’t mean realisticsimulations. Interference models? Traffic patterns? Mobilitypatterns?

Have I been wasting your time? In practice no one uses RTS/CTS!!

Why? Are MACAW and the hidden terminal problem irrelevant?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 17

Page 19: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Traffic Workloads and Hidden Terminals

To first order, everyone uses base stations, not peer-to-peer802.11 networks

When base station transmits, there can be no hidden terminals.Why?

Clients can be hidden from one another. But what’s the averagepacket output stream of a wireless client? Packet sizes?

What’s the cost of RTS/CTS? How big are RTS and CTS packets?

802.11 end-user documentation recommends disabling RTS/CTS“unless you are experiencing unusually poor performance”

Drivers leave it off by default

What about peer-to-peer workloads?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 18

Page 20: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Overview: Large-Scale Wireless Systems

Small-Scale: How to build single-hop wireless LAN

Large-Scale: How to build multi-hop wireless systems (MANs?WANs?); how to support mobile nodes and users

• Mobile IP: How can a mobile user keep connections open andbe reachable at a fixed address when roaming around theInternet?

• Multi-hop (“ad hoc”) wireless routing: How do we find routeswhen the topology is highly dynamic, and when the networkdiameter is great?

• Multi-hop wireless capacity: How much user traffic can wecarry on a large-scale, multi-hop wireless network?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 19

Page 21: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Multi-Hop Motivation: Rooftop Networks

Metropolitan-area network comprised of customer-owned and-operated radios: Rooftop Networks

An alternative architecture to single-hop cellular systems:Self-organizing, rapidly deployable, potentially lower cost

Great demand already! Hardware ubiquitous; scalable algorithmsfor routing sorely needed

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 20

Page 22: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

The Routing Problem

R

S

D

Packet-switched networks

End-to-end path: route

Each router chooses neighbor to which to forward received packetonward toward destination, D

Topology may be dynamic: routes change

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 21

Page 23: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Another Motivating Example

Vast wireless network of mobile temperature sensors, floating onthe ocean’s surface: Sensor Networks

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 22

Page 24: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Motivation (cont’d)

Enable three new classes of networks:

• Ad-hoc networks: mobile, infrastructureless, small-scale[Broch et al., ’98]

• Sensor networks: mobile, large-scale

• “Rooftop” networks: fixed, large-scale, no commonadministrative authority [Shepard, ’96]

A mix of these characteristics:

• Mobility

• Scale (number of nodes)

• Lack of static hierarchical structure

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 23

Page 25: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Scalability Goals for Mobile, Wireless Routing

As number of nodes increases, and mobility rate increases:

• Routing protocol message cost: MINIMIZE

• Application packet delivery success rate: MAXIMIZE

• Route length: MINIMIZE

• Per-node state: MINIMIZE

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 24

Page 26: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Prior Work

Wired, Intra-Domain Internet Routing:

• Link-State (Dijkstra) and Distance-Vector (Bellman-Ford)routing on flat addresses to find shortest (in hops) paths

• Describe entire topology to all routers (LS) or push distancesacross network diameter (DV), for O(N) state per router

• Each link change must be communicated to all routers to avoidloops and disconnection [Zaumen, Garcia-Luna Aceves, ’91]

Ad Hoc Routing:

• Algorithms target low-bandwidth, high-mobility networks

• Many proposals (DSDV, DSR, TORA, AODV, GPSR, ZRP, . . . )

• Diverse approaches: DV, source routing, geographic,proactive, on-demand . . .

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 25

Page 27: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Ad Hoc Routing: DSDV

Destination-Sequenced Distance-Vector Routing:

• Send increasing sequence number with route advertisements

• Greater seqno takes precedence over lesser metric

• On detecting disconnection to D, router advertises route withinfinity metric and incremented seqno

• D increments seqno on hearing advertisement with infinitymetric

• Use triggered updates to propagate seqno increases rapidlyand eliminate potentially looping routes

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 26

Page 28: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Ad Hoc Routing: DSR

Dynamic Source Routing:

• On-demand routing: only generate routing protocol traffic whenforwarding requires it

• Flood queries to learn source routes

• Cache replies

• Source routes break more frequently as mobility and networkdiameter increase; caching steadily less effective

• Which metrics are Broch et al. interested in?Which do they omit?Exploration of limits of DSR?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 27

Page 29: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Prior Work: Scaling

Dominant factors in scaling of DV, LS, DSR algorithms:

• Rate of change of topology

• Number of routers in the routing domain

Scaling strategies:

• Hierarchy: at AS boundaries (BGP) or on a finer scale (OSPF)

Goal: Reduce number of nodes in a routing domain

Assumptions: Level boundaries relatively fixed; administrativeauthority can choose level boundaries

• Caching: Store source routes overheard (DSR)

Goal: Limit propagation of future source route queries

Assumption: Source route remains fixed while cached

Assumptions invalid for highly mobile or unstructured networks!

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 28

Page 30: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Geography

Central Idea: Machines can know their geographic locations.Route using GEOGRAPHY.

Established positioning methods:

• GPS outdoors (single chip, low-cost)

• Surveying (stationary routers)

• Inertial sensors (vehicles)

• Acoustic and radio range-finding (indoors, [AT&T Cambridge,1997], [Priyantha et al., 2000])

Efficient node location lookup/registration system [Li et al., 2000]

All nodes know own position; packet source marks packet withdestination’s location

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 29

Page 31: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Assumptions

Bi-directional radio links (e.g., IEEE 802.11 with link-levelacknowledgements)

Network nodes placed roughly in a plane

Radio propagation in free space; distance from transmitterdetermines signal strength at receiver (two-ray ground reflectionmodel)

Fixed, uniform radio transmitter power

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 30

Page 32: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Greedy Forwarding

Nodes learn immediate neighbors’ positions throughbeacons/piggybacking on data packets

Locally optimal, greedy forwarding choice at a node:

Forward to the neighbor geographically closest to thedestination

y

x

D

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 31

Page 33: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

In Praise of Geography

Self-describing

As node density increases, shortest paths through wirelessnetworks correspond increasingly to Euclidean straight linebetween source and destination

Each node’s state concerns only immediate neighbors:

• Tiny per-node state

• Routing protocol pushes state only one hop—tiny routingprotocol overhead

• Local forwarding decisions—robust to topology changes

Compare with lookup in O(N) table under DV, LS

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 32

Page 34: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Greedy Forwarding Failure

Greedy forwarding not always possible! Consider:

w

v z

x

y

D

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 33

Page 35: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Voids

When the intersection of a node’s circular radio range and thecircle about the destination on which the node sits is empty ofnodes, greedy forwarding is impossible

Such a region is a void:

D

v z

w

x

y

void

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 34

Page 36: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Node Density and Voids

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

0 50 100 150 200 250 300

Fra

ctio

n of

pat

hs

Number of nodes

Existing and Found Paths, 1340 m x 1340 m Region

Fraction existing pathsFraction paths found by greedy

The probability that a void region is empty of nodes increases asnodes become more sparse

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 35

Page 37: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Void Traversal: The Right-Hand Rule

Well-known graph traversal: right-hand rule:

When arriving at x from y, move to the next vertexcounterclockwise about x from y

y

3.1.

2.x z

Traverses interior faces in clockwise edge order; exterior faces incounterclockwise edge order

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 36

Page 38: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Planar vs. Non-Planar Graphs

The right-hand rule may not tour enclosed faces on graphs withedges that cross (non-planar graphs)

x

u

vw

z

5. 1.

2.3.

4.

3.4.

Seek a distributed algorithm that removes crossing edges withoutpartitioning the network, using only neighbors’ positions as input

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 37

Page 39: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Planarized Graphs

Relative Neighborhood Graph (RNG) [Toussaint, ’80] and GabrielGraph (GG) [Gabriel, ’69] are long-known planar graphs

Assume an edge exists between any pair of nodes separated byless than a threshold distance (i.e., the nominal radio range)

RNG and GG can be constructed using only neighbors’ positions,and can be shown not to partition the network!

u v

w

RNG

u v

w

GG

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 38

Page 40: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Planarized Graphs: Example

200 nodes, placed uniformly at random on a 2000-by-2000-meterregion; radio range 250 meters

Full Network GG Subset RNG Subset

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 39

Page 41: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Full Greedy Perimeter Stateless Routing

All packets begin in greedy mode

Upon greedy failure, node marks its current location in packet, andmarks packet in perimeter mode

Perimeter mode packets follow simple planar graph traversal:

Forward along successively closer faces by right-handrule, until reaching destination, or node closer to it thanperimeter mode entry point

Return packets to greedy mode when they reach a node closerthan their perimeter mode entry point

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 40

Page 42: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Perimeter Mode Forwarding Example

D

xTraverse face closer to D along xD by right-hand rule, until reachingthe edge that crosses xD

Repeat with the next closer face along xD, &c.

Record first edge on face to detect disconnection

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 41

Page 43: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

GPSR: Protocol Techniques for Dynamic Networks

Use of MAC-layer failure feedback: As in DSR [Broch, Johnson,’98], interpret retransmit failure reports from the 802.11 MAC asindication a neighbor has gone out-of-range

Interface queue traversal and packet purging: Upon MACretransmit failure for a neighbor, walk the interface queue andremove packets to that neighbor to avoid head-of-line blocking of802.11 transmitter during retries on those packets

Promiscuous network interface: Reduce beacon load and keeppositions stored in neighbor tables current by tagging all packetswith the forwarding node’s position

Planarization triggers: Re-planarize upon acquisition of a newneighbor and every loss of a former neighbor, to keep planarizationup-to-date as topology changes

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 42

Page 44: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Simulation Environment

ns-2 with wireless extensions [Broch et al., 1998]: full 802.11 MAC,physical propagation; allows comparison of results

Topologies and Workloads:

Nodes Region Density CBR Flows

50 1500 m × 300 m 1 node / 9000 m2 30

200 3000 m × 600 m 1 node / 9000 m2 30

50 1340 m × 1340 m 1 node / 35912 m2 30

Simulation Parameters:

Pause Time: 0, 30, 60, 120 s Motion Rate: [1, 20] m/s

GPSR Beacon Interval: 1.5 s Data Packet Size: 64 bytes

CBR Flow Rate: 2 Kbps Simulation Length: 900 s

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 43

Page 45: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Packet Delivery Success Rate (50, 200; Dense)

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 20 40 60 80 100 120

Fra

ctio

n da

ta p

kts

deliv

ered

Pause time (s)

DSR (200 nodes)GPSR (200 nodes), B = 1.5

DSR (50 nodes)GPSR (50 nodes), B = 1.5

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 44

Page 46: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Routing Protocol Overhead (50, 200; Dense)

1000

10000

100000

1e+06

1e+07

0 20 40 60 80 100 120

Rou

ting

prot

ocol

ove

rhea

d (p

kts)

Pause time (s)

DSR (200 nodes)GPSR (200 nodes), B = 1.5

DSR (50 nodes)DSR-Broch (50 nodes)

GPSR (50 nodes), B = 1.5

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 45

Page 47: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Path Length (200; Dense)

0.0 0.2 0.4 0.6 0.8 1.0Fraction of delivered pkts

GPSR

DSR

GPSR

DSR

GPSR

DSR

GPSR

DSR

0.0 0.2 0.4 0.6 0.8 1.0Fraction of delivered pkts

0

30

60

120

Pause T

ime

0.0 0.2 0.4 0.6 0.8 1.0Fraction of delivered pkts

Rou

ting

Alg

orith

m

Hops Longer than Optimal

Rou

ting

Alg

orith

m

0 1 2 3 4 >= 5

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 46

Page 48: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

State Size (200; Dense)

DSR GPSRRouting algorithm

0

100

200

300P

er-n

ode

stat

e (n

odes

)

DSR GPSRRouting algorithm

0

200

400

600

800

1000

Per

-nod

e st

ate

(byt

es)

GPSR requires state proportional to node density; DSR storesstate at each router proportional to the sums of the lengths ofsource routes

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 47

Page 49: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Shepard: Rooftop Wireless MAN Scaling

MACAW contention model: propagation to a fixed distance only;focus on floor acquisition among mutually near stations

Shepard’s contention model: propagation to “radio horizon”, fargreater than successful communication distance; focus on S/Nratio, effects of distant transmitters

Fundamental observation: there are many more distant stationsthan near ones; interference from them is greater concern thannearby collisions

Feasibility of minimum-energy routing?

Feasibility of hundreds of hops, or more?

Very useful concept: bisection bandwidth

Shepard’s conclusion: scaling to millions of nodes possible wherenodes can still communicate with nearby neighbors at a high rate

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 48

Page 50: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Capacity of Ad Hoc Wireless Networks

Context: Mobicom 2001, on the heels of years of ad hoc routingresearch, nearly exclusively in simulation

Goals:

• Explain details of 802.11 MAC when used for forwarding, asregards network capacity

• Provide simple model for capacity of ad hoc networks, asrelated to traffic matrix

Fundamental phenomenon: nodes use their own one-hoptransmission capacity not only for data they originate, but also fordata they forward

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 49

Page 51: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Ad Hoc Capacity: Intuition

Some depressing intuition:

• Spatial reuse lets distant radios transmit simultaneously, asthey don’t interfere

• For constant node density, one-hop capacity, sum of allsingle-hop transfer rates possible in the network, grows as O(n)

• As network diameter grows, for random source/destinationpairs, average path length grows as O(

√n)

• Total end-to-end capacity: O(n/√

n), and so per-node capacityis O(1/

√n).

Throughput per node approaches zero as number of nodesincreases!

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 50

Page 52: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Forwarding and 802.11

The energy required to garble another’s transmission is far lessthan that required to be received properly

Interfering range is 550 m, while transmission range is 250 m

What’s the best throughput we can expect in a chainA→ B→C→ D, if ranges were equal?

• A and B can’t transmit simultaneously; nor can B and C; norcan A and C

• Best throughput: 1/3 link rate

With 550 m interference range, best throughput drops to 1/4; nowD interferes with A’s transmissions to B

In simulations of greedy 802.11 senders arranged in a chain,throughput is closer to 1/7 than 1/4; boundary effect

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 51

Page 53: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Forwarding and 802.11 Backoff

FA B C D E

D→ E will clobber A→ B

Yet A doesn’t know of D’s transmission

Result: repeated exponential backoff by A

Note similarity with MACAW four-hop, left-to-right example

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 52

Page 54: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Traffic Matrix and Multi-Hop Wireless Capacity

Capacity available to each node inversely related to expected flowphysical path length

Traffic matrix typically studied in ad hoc routing: uniformlyrandomly selected flow endpoints

Expected path length for a uniform random traffic pattern on anetwork of area A: 2

√A/3

For n nodes and fixed node density, A ∝ n

So the capacity available to each node is O(1/√

n)

Perhaps this is why published ad hoc routing studies use ca. 60Kbps total application traffic workloads!

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 53

Page 55: Wireless Networks: MAC Protocols, Routing Protocols, …srini/15-744/F04/lectures/15-744-MAC-multihop.pdf · Wireless Networks: MAC Protocols, Routing Protocols, and Capacity CMU

Power-Law Traffic Patterns and Capacity

Power-law traffic patterns, where probability of communication withnode x distance away is given by x−α, offer constant per-nodecapacity

For α = 2, expected communication distance scales as O(log2 A)

A useful design rule for systems for multi-hop wireless networks,e.g., GLS location database [Li et al., ’00]

Power-law construct makes analysis tractable; meaning isintuitively useful

Evidence of power-law communication patterns in the wild?

CMU CS 15-744: Computer Networks Brad Karp Wireless Network s: MACs, Routing, and Capacity 54