220 likes | 394 Views
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
E N D
Using Commodity Hardware Platform to Developand 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 • Fully programmable • Considerable flexibility • Steep learning curve • Usually expensive SDRs Host-based MAC Simulators Realism Flexibility • Alternative: Host-based MAC • Use commodity hardware • Sufficient for certain experiments
User- defined RTS/CTS User-defined re-xmissions User-defined Random backoff User-define Inter-frame spacing User-defined ACK Inter data packet operations Control transactions RTS/CTS exchange Re- xmission Random backoff Inter-frame spacing ACK response Host-based MAC Administrative tasks • Chips reveal flexibility to do so • Computing technologies advance Host Driver HW Card
Outline • Design of FlexMAC • Challenges and Solutions • Precision of FlexMAC • Two Case Studies • Conclusion
1. generate data packets and retransmissions 2. suppress ACK 4. modify backoff distribution 5. create transactions of control messages (flexible mode) 3. change inter-frame spacing Capability of FlexMAC channel busy SIFS RTS DATA DIFS DIFS CTS ACK
Challenges • Supporting Precise Scheduling • Handling Delay between Dependent Transmissions • Determining the Current State of Use of the Channel
Supporting Precise Scheduling Host posts packets to the HW • bus delay ≈ 20μs HOST t6 t0 Packet arrived at HW Interrupt of TX status HW t4 t2 t3 t1 transmission time ACK arrived at HW AIR HW sends packets out bus delay histogram
histogram Handling Delay between Dependent Transmissions Host posts packets to the HW • bus delay + interrupt latency ≈ 52μs ≈ 1x 802.11b DIFS • can afford dept. 802.11b data packet transmissions HOST t6 t0 Interrupt of TX status Packet arrived at HW HW t4 t2 t3 t1 transmission time ACK arrived at HW AIR HW sends packets out Interrupt latency ≈ 30μs interrupt latency bus delay
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
System Diagram Network Interface (socket) self data packets packet pool 2. Dependent transmissions (e.g. re-TXs) other packets Host Frame Dispatcher Frame Scheduler TX Controller • Precise scheduling NAV frame rcvd frame sent ISR Madwifi HW • Current channel status WNIC • Run in the promiscuous mode • Disable retransmission and backoff ISR: Interrupt Service Routing
Precision of FlexMAC Comparing a FlexMAC-based 802.11b implementation (SW MAC) with the hardware-based implementation (HW MAC)
Throughput Comparison sources destinations clear channel 5.91 Mbps 6.29 Mbps Total: Total: 5.88 Mbps 6.30 Mbps
sources destinations Collision Ratios clear channel
Coexistence with HW MAC and FlexMAC FlexMAC FlexMAC sources destinations HW MAC HW MAC clear channel HW MAC HW MAC
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 • …
freespace R R R R w/oOR freespace w/OR freespace w/OR w/oOR w/oOR w/OR w/oOR under fading Case Study I: Opportunistic Relaying Source Destination S D • 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
Temporal fairness (equal share of transmission time) rate = 4 Ratio of TX rate = Case Study II: Fairness • Temporal fairness: We can manipulate backoff distributions to grant the green sender 4 consecutive transmissions rate Throughput fairness (equal share of throughput) time
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
802.11b Inter data packet operations Control transactions RTS/CTS exchange Re- xmission Random backoff Inter-frame spacing ACK response Interoperable Mode Administrative tasks • Chips reveal flexibility to do so • Computing technologies advance Host Driver HW Card
802.11b/g Inter data packet operations Control transactions RTS/CTS exchange Re- xmission Random backoff Inter-frame spacing ACK response Flexible Mode Administrative tasks • Chips reveal flexibility to do so • Computing technologies advance Host Driver HW Card