64
1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana- Champaign

1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

Embed Size (px)

Citation preview

Page 1: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

1

Wireless Networking Primer

(few topics that

may help in understanding other lectures)

Nitin VaidyaUniversity of Illinois at Urbana-Champaign

Page 2: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

2

What Makes Wireless Interesting?

Absence of wires facilitate mobility Signal attenuation Spatial reuse Diversity

•Multi-user diversity

•Antenna diversity

•Time diversity

•Frequency diversity

Wireless devices often battery-powered

Broadcast medium makes it easier to snoop on, or tamper with, wireless transmissions

Page 3: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

3

Transmission “Range”

Whether a transmission is received reliably or notdepends on

Transmit power level Channel conditions (time-varying) Interference (time-varying) Noise (not deterministic) Packet size Modulation scheme (bit rate) Error control coding Transmission rate

Transmission not received by all “neighbors” reliably Not all nodes can “hear” each other Time-varying outcome of transmissions

Page 4: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

4

Medium Access Protocol (MAC)

Wireless channel is a shared medium, requiring suitable MAC

protocol.

Performance of the MAC protocol depends on

Channel properties

Physical capabilities Single interface? One packet at a time? One channel at a time? Antenna diversity?

Assume single interface, single channel, single antenna, one packet at a time, small propagation delay

Page 5: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

5

“Basic” Protocol

Simple rule (a distributed protocol):

Transmit packet immediately(if not transmitting already)

Shortcomings

No provision for reliability

No detection of “collisions”

Page 6: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

6

Reliability: A Retransmission Protocol

Stop-and-wait

Page 7: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

7

A Mechanism to Reduce Collision Cost

Packet loss may occur due to collisions. To reduce cost:

“Reserve” the wireless channel before transmitting data

Send short control packets for reservation

Collision may occur for control packets, but they are short lower collision cost

Once channel reserved, data transmission (hopefully) reliable

Page 8: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

8

RTS-CTS Exchange

Node A sends RTS to BDuration of proposed transmission specified in

RTS

B responds with CTS

Host A sends data

Other hosts overhearing RTS keep quiet for duration of proposed transmission

Works alright if all nodes within “range” of each other

Page 9: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

9

RTS-CTS

RTS-CTS reduce collision cost

If data packets too small, sending RTS-CTS not beneficial

A possible implementation:

Send RTS-CTS only for data packets withsize > RTS-threshold

Page 10: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

10

Carrier Sense Multiple Access (CSMA)(to reduce collisions)

Listen-before-you-talk

A host may transmit only if the channel issensed as idle

Page 11: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

11

Carrier Sensing (Approximation)

Implementation using Carrier Sense (CS) threshold Pcs

If received signal power < CS threshold Channel idle

Else channel busy

In reality, efficacy of carrier sensing affected bynoise & interference.

Page 12: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

12

Carrier Sense Multiple Access (CSMA)

D perceives idle channel although A is transmitting

AB C

D

distance

po

we

r

D’s CS Threshold

Page 13: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

13

Carrier Sense Multiple Access (CSMA)

D perceives busy channel when A transmits

AB C

D

distance

po

we

r D’s CS Threshold

Page 14: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

14

Trade-Off

Large carrier sense threshold

More transmitters

Greater spatial reuse & more interference

Trade-off between spatial reuse and interference

Page 15: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

15

Impact of CS Threshold on Interference

Suppose C transmits even though A is already transmitting

AB C

D

Path gain g = received power / transmit power

Page 16: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

16

Hidden Terminals

Page 17: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

17

Hidden & Exposed Terminals

Collisions may occur despite carrier sensing

Smaller carrier sensing threshold can help

But increases the incidence of exposed terminals

?

Page 18: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

18

Hidden & Exposed Terminals

Cannot eliminate all collisions using carrier sensing

Trade-off between hidden and exposed terminals

Optimal carrier sense threshold function of network “topology” and traffic characteristics

Page 19: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

19

Collision Detection

Ethernet uses carrier sensing & collision detection (CSMA/CD)

Transmitter also listens to the channel

Mismatch between transmitted & received signal indicates mismatch

Stop transmitting immediately once collision is detected

Reduces time lost on a collision

Page 20: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

20

Collision Detection in Wireless Networks

Receiving while transmitting: Received signal dominated by transmitted signal

Collision occurs at receiver, not the transmitter

Collision detection difficult at the transmitterwithout feedback from the receiver

Page 21: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

21

Solutions for Hidden Terminals

Busy-tone

Virtual carrier sensing

Carrier sensing mechanism discussed earlier will be referred to as physical carrier sensing, to differentiate with virtual carrier sensing

Page 22: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

22

Virtual Carrier Sensing

RTS specifies duration of transmission CTS also includes the duration Any host hearing RTS or CTS stay silent as

shown

CTS

RTS

Page 23: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

23

Virtual Carrier Sensing

Host C may not receive RTS and still cause collision at host B

SINR = Signal-to-interference-and-noise ratio = S / (I + N)

Assume “SINR-threshold model”

assume that SINR necessary/sufficient forreliable delivery (approximation of

reality)

Page 24: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

24

SINR for RTS reception at C is upper bounded as

If C transmits while A is receiving an Ack from B, SINR for Ack reception at A is upper bounded as

CTS

RTS

Page 25: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

25

It is possible to find path gains for which we have

and

Page 26: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

26

Virtual Carrier Sensing

C’s silent interval below is not adequate to ensure reliable Ack reception at A

Similarly, D’s silent interval not adequate to ensure reliable data reception at B

CTS

RTS

Page 27: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

27

Virtual Carrier Sensing - Modification

Greater protection from interference Reduce book-keeping with multiple nearby

transmitters

Page 28: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

28

“Space Reserved” by Virtual CS

RTS

RTS

Reminder: “Range” not necessarily circular in practice

Page 29: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

29

Physical & Virtual CS

Physical carrier sensing (PCS) &virtual carrier sensing (VCS)may be used simultaneously

Channel assumed idle only if both PCS and VCS indicate that the channel is idle

Page 30: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

30

Backoff Intervals

Channel sensing not enough to prevent multiple nodes to start transmitting “at nearly the same time”

Reduce such collisions by controlling access probability

Implementation using backoff intervals:

Choose backoff interval uniformly in range [0, cw-1] Initialize a counter by this value Decrement counter after each slot if channel detected

idle Transmit when counter reaches 0

Page 31: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

31

Responding to Packet Loss

To reduce collisions due to excessive load on the channel, access probability should be reduced

May be achieved by increasing the window over which backoff interval is chosen

Exponential backoff : [0,c-1] [0,2c-1]

Page 32: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

32

IEEE 802.11Distributed Coordination Function (DCF)

Physical & virtual carrier sensing (RTS-CTS)

Contention window (cw) :Backoff chosen uniformly in [0,cw]

Exponential backoff after a packet loss

Contention window reset to CWmin on a success

Page 33: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

33

Infrastructure-Based Networks

Page 34: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

34

Hybrid Networks

Ad Hoc Networks

Page 35: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

35

Routing Protocols forMobile Ad Hoc Networks (MANET)

Proactive protocols Determine routes independent of traffic pattern Traditional link-state and distance-vector routing

protocols are proactive (and could be extended for MANET)

Reactive protocols Maintain routes only if needed

Hybrid protocols

Similar solutions may be used in “mesh” networks

Page 36: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

36

Example of Reactive Routing:Dynamic Source Routing (DSR)

[Johnson96]

When node S wants to send a packet to node D, but does not know a route to D, node S initiates a route discovery

Source node S floods Route Request (RREQ)

Each node appends own identifier when forwarding RREQ

Page 37: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

37

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

Represents a node that has received RREQ for D from S

M

N

L

Page 38: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

38

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

Represents transmission of RREQ

Z

YBroadcast transmission

M

N

L

[S]

[X,Y] Represents list of identifiers appended to RREQ

Page 39: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

39

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

• Node H receives packet RREQ from two neighbors: potential for collision

Z

Y

M

N

L

[S,E]

[S,C]

Page 40: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

40

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

• Node C receives RREQ from G and H, but does not forward it again, because node C has already forwarded RREQ once

Z

Y

M

N

L

[S,C,G]

[S,E,F]

Page 41: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

41

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

• Nodes J and K both broadcast RREQ to node D• Since nodes J and K are hidden from each other, their transmissions may collide

N

L

[S,C,G,K]

[S,E,F,J]

Page 42: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

42

Route Discovery in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

• Node D does not forward RREQ, because node D is the intended target of the route discovery

M

N

L

[S,E,F,J,M]

Page 43: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

43

Route Discovery in DSR

Destination D on receiving the first RREQ, sends a Route Reply (RREP)

RREP is sent on a route obtained by reversing the route appended to received RREQ

RREP includes the route from S to D on which RREQ was received by node D

Page 44: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

44

Route Reply in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

RREP [S,E,F,J,D]

Represents RREP control message

Page 45: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

45

Dynamic Source Routing (DSR)

Node S on receiving RREP, caches the route included in the RREP

When node S sends a data packet to D, the entire route is included in the packet header hence the name source routing

Intermediate nodes use the source route included in a packet to determine to whom a packet should be forwarded

Page 46: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

46

Data Delivery in DSR

B

A

S E

F

H

J

D

C

G

IK

Z

Y

M

N

L

DATA [S,E,F,J,D]

Packet header size grows with route length

Page 47: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

47

DSR Optimization: Route Caching

Each node caches a new route it learns by any means

When node S finds route [S,E,F,J,D] to node D, node S also learns route [S,E,F] to node F

When node K receives Route Request [S,C,G] destined for node, node K learns route [K,G,C,S] to node S

When node F forwards Route Reply RREP [S,E,F,J,D], node F learns route [F,J,D] to node D

When node E forwards Data [S,E,F,J,D] it learns route [E,F,J,D] to node D

A node may also learn a route when it overhears Data packets

Page 48: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

48

Use of Route Caching

When node S learns that a route to node D is broken, it uses another route from its local cache, if such a route to D exists in its cache. Otherwise, node S initiates route discovery by sending a route request

Node X on receiving a Route Request for some node D can send a Route Reply if node X knows a route to node D

Use of route cache can speed up route discovery can reduce propagation of route requests

Page 49: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

49

Use of Route Caching

B

A

S E

F

H

J

D

C

G

IK

[P,Q,R] Represents cached route at a node (DSR maintains the cached routes in a tree format)

M

N

L

[S,E,F,J,D][E,F,J,D]

[C,S]

[G,C,S]

[F,J,D],[F,E,S]

[J,F,E,S]

Z

Page 50: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

50

Use of Route Caching:Can Speed up Route Discovery

B

A

S E

F

H

J

D

C

G

IK

Z

M

N

L

[S,E,F,J,D][E,F,J,D]

[C,S]

[G,C,S]

[F,J,D],[F,E,S]

[J,F,E,S]

RREQ

When node Z sends a route requestfor node C, node K sends back a routereply [Z,K,G,C] to node Z using a locallycached route

[K,G,C,S]RREP

Page 51: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

51

Route Caching: Beware!

Stale caches can adversely affect performance

With passage of time and host mobility, cached routes may become invalid

A sender host may try several stale routes (obtained from local cache, or replied from cache by other nodes), before finding a good route

Can affect higher layer performance adversely (e.g., TCP) [Holland99]

Page 52: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

52

Rate Region

Rate region characterizes rates that can be supported simultaneously on various links

Useful in determining a transmission “schedule”

1Feasible

Rate vector

l1

Page 53: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

53

Rate Region

Rate region = all feasible rate vectors

Determined by

Channel state

Power constraints

Physical capabilities & constraints:

Examples:•Use multiple channels simultaneously?

•Number of interfaces

Page 54: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

54

Rate Region

Simple example scenarios

Downlink scenario (common transmitter)

Uplink scenario (common receiver)

B

21

B

21

Page 55: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

55

Downlink Scenario

Treating interference as noise

B

21

Page 56: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

56

Downlink Scenario:Treating Interference as Noise

W = 10 MHzP = 1 mW

Page 57: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

57

Downlink Scenario:Treating Interference as Noise

Power-sharing

Page 58: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

58

Downlink Scenario

Power-sharing & Time-sharing

Page 59: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

59

Downlink Scenario:Power-sharing & Bandwidth sharing

Page 60: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

60

Downlink Scenario:Successive Interference Cancellation

B

21At node 1, treat otherSignal as interference

Page 61: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

61

Downlink Scenario:Successive Interference Cancellation

B

21

At node 2, “cancel”the interference

Page 62: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

62

Downlink Scenario:Successive Interference Cancellation

B

21

Decode signal for 1, and “cancel” it Decode signal for 2

Page 63: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

63

Downlink Scenario:Successive Interference Cancellation

Page 64: 1 Wireless Networking Primer (few topics that may help in understanding other lectures) Nitin Vaidya University of Illinois at Urbana-Champaign

64

For more information …

See tutorials at

http://www.crhc.illinois.edu/wireless/tutorials.html

UIUC course ECE/CS 439 Wireless Networksslides at

http://users.crhc.illinois.edu/nhv/09spring.439/