using commodity hardware platform to develop and evaluate csma protocols

21
1 Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols Amy (Mei-Hsuan) Lu Peter Steenkiste and Tsuhan Chen Carnegie Mellon University

Upload: reuel

Post on 14-Jan-2016

43 views

Category:

Documents


0 download

DESCRIPTION

Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols. Amy (Mei-Hsuan) Lu Peter Steenkiste and Tsuhan Chen Carnegie Mellon University. Wireless Experiment is Hard. Simulators Provide full control and flexibility Can suffer from lack of realism. Software Defined Radio - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

1

Using Commodity Hardware Platform to Developand Evaluate CSMA Protocols

Amy (Mei-Hsuan) Lu

Peter Steenkiste and Tsuhan Chen

Carnegie Mellon University

Page 2: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

2

Software Defined Radio Fully programmable Considerable flexibility Steep learning curve Usually expensive

Simulators Provide full control and

flexibility Can suffer from lack of

realism

Flexibility Realism

Simulators SDRsHost-based MAC

Alternative: Host-based MAC Use commodity hardware Sufficient for certain experiments

Wireless Experiment is Hard

Page 3: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

3

Host-based MACH

ost

HW

Driver

Card

Administrative tasks

Chips reveal flexibility to do so Computing technologies advance

Randombackoff

Re-xmission

Inter-framespacing

Inter data packet operations

ACKresponse

RTS/CTSexchange

Control transactions

User-defined Randombackoff

User-defined re-xmis

sions User-defined ACK

User- defined

RTS/CTSUser-define Inter-frame

spacing

Page 4: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

4

Outline

Design of FlexMAC

Challenges and Solutions

Precision of FlexMAC

Two Case Studies

Conclusion

Page 5: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

5

Capability of FlexMAC

RTS

CTS

DATA

ACK

1. generate data packets and retransmissions

DIFS

channel busy

DIFS

5. create transactions of control messages(flexible mode)

3. change inter-frame spacing

4. modify backoff distribution

SIFS

2. suppress ACK

Page 6: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

6

Challenges

Supporting Precise Scheduling Handling Delay between Dependent Transmissions Determining the Current State of Use of the Channel

Page 7: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

7

transmission time

Supporting Precise Scheduling

AIR

HW

HOSTHost posts packets to the HW

Packet arrived at HW

HW sends packets out

Interrupt of TX status

t0

t1

t2

t6

ACK arrived at HW

t4t3

bus delay

0 20 40 60 80 100 1200

100

200

300

400

500

600

700

bus delay (usec)

bus delay ≈ 20μs hist

ogra

m

Page 8: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

8

transmission time

Handling Delay between Dependent Transmissions

AIR

HW

HOSTHost posts packets to the HW

Packet arrived at HW

HW sends packets out

Interrupt of TX statust0

t1

t2

t6

ACK arrived at HW

t4t3

interrupt latency

bus delay + interrupt latency

≈ 52μs ≈ 1x 802.11b DIFS can afford dept. 802.11b data p

acket transmissions

bus delay

0 20 40 60 80 100 1200

500

1000

1500

interrupt latency (TX) (usec)

hist

ogra

m

Interrupt latency

≈ 30μs

Page 9: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

9

Determining the Current State of Use of the Channel

Most CSMA protocols require backoff freezing when the channel is in use

Virtual carrier sense NAV is obtainable from headers of overhearing packets

Physical carrier sense Leverage on-chip registers to obtain the current status of

the channel

Page 10: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

10

Network Interface (socket)

Frame Dispatcher

TXController

Frame Scheduler

ISR

WNIC

Ho

st

pa

cket

po

ol

HW

frame sent

self data packets

NAV

other packets

Madwifi

System Diagram

frame rcvd

Run in the promiscuous mode Disable retransmission and backoff

2. Dependent transmissions (e.g. re-TXs)

1. Precise scheduling

ISR: Interrupt Service Routing

3. Current channel status

Page 11: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

11

Precision of FlexMAC

Comparing a FlexMAC-based 802.11b implementation (SW MAC) with the hardware-based implementation (HW MAC)

Page 12: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

12

UDP

0

0.5

1

1.5

2

2.5

1 2 3

Session ID

Th

rou

gh

pu

t (M

bp

s)

SW MAC HW MAC

TCP

0

0.5

1

1.5

2

2.5

1 2 3

Session ID

Th

rou

gh

pu

t (M

bp

s)

SW MAC HW MAC

Total:6.29 Mbps

6.30 MbpsTotal:

5.91 Mbps

5.88 Mbps

clear channel

Throughput Comparison

sources destinations

Page 13: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

13

Collision Ratios

clear channel

sources destinations

Page 14: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

14

Coexistence with HW MAC and FlexMAC

clear channel

sources destinationsFlexMAC FlexMAC

HW MAC HW MAC

HW MACHW MAC

Page 15: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

15

Possible Use of FlexMAC

Link-layer multi-hop relaying Fairness provision Performance improvement Differentiated services Rate adaption Network security (e.g. address spoofing) Selfish nodes detection and isolation Unequal error protection for streaming video Adaptive FEC codes to deal with channel dynamics …

Page 16: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

16

Idle nodes (relays) coexist in the network

Relay(s) overhear xmissions from S to D

Relay(s) retransmit on behalf of S upon failed xmissions The closest relay that overheard the packet has a higher chance to transmit

R

R

R R

Case Study I: Opportunistic Relaying

Destination

DS

Source

freespace

w/oOR

freespace

w/ORw/oOR

under fading

freespace

w/ORw/oOR

w/ORw/oOR

Page 17: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

17

Case Study II: Fairness

Temporal fairness: We can manipulate backoff distributions to grant the green sender 4 consecutive transmissions

Throughput fairness (equal share of

throughput)time

rate

Temporal fairness (equal share of transmission

time)

rate

= 4Ratio of TX rate =

Page 18: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

18

Conclusion

FlexMAC provides a flexible platform for research in CSMA wireless protocols

FlexMAC performs closely to HW implementations

Two case studies are given to demonstrate the usefulness of FlexMAC

Page 19: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

19

Thank You!

Page 20: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

20

Interoperable ModeH

ost

HW

Driver

Card

Administrative tasks

Chips reveal flexibility to do so Computing technologies advance

Randombackoff

Re-xmission

Inter-framespacing

802.11b Inter data packet operations

ACKresponse

RTS/CTSexchange

Control transactions

Page 21: Using Commodity Hardware Platform to Develop and Evaluate CSMA Protocols

21

Flexible ModeH

ost

HW

Driver

Card

Administrative tasks

Chips reveal flexibility to do so Computing technologies advance

Randombackoff

Re-xmission

Inter-framespacing

802.11b/g Inter data packet operations

ACKresponse

RTS/CTSexchange

Control transactions