240 likes | 408 Views
An Overlay MAC Layer for 802.11 Networks. Ananth Rao, Ion Stoica OASIS Retreat, Jun 2004. Motivation. 802.11 hardware provides initial ease of deployability for many applications Mesh networks Long haul links Large Infrastructure Networks
E N D
An Overlay MAC Layer for 802.11 Networks Ananth Rao, Ion Stoica OASIS Retreat, Jun 2004
Motivation • 802.11 hardware provides initial ease of deployability for many applications • Mesh networks • Long haul links • Large Infrastructure Networks • Are these apps stretching 802.11 beyond its design goals (Wireless LANs)? Internet Gateway
Problem 2: Unpredictability 1 2 3 4 5
Problem 3: Forwarding on Behalf of Others Ethernet 1/3 1/2 1/6 1/9 1/6 1/6 1/9 1/9 This problem cannot be solved by local scheduling or queue management algorithms like WFQ
Case for an Overlay MAC (OML) • Several new MACs have been proposed to solve these problems • We try and leverage some of these techniques in OML • Hardware vs. Software MACs • Huge cost advantage over building a new MAC • Flexible and easy to implement application specific policies • Facilitates experimental research on MAC layer issues • Accurate timing not possible at the software level • Devices don’t expose all information (eg. cannot carrier-sense and obtain result) • Cannot change the physical layer (eg. spread spectrum techniques)
Constraints • Do not want to modify the MAC protocol • We have no control over a packet once it is in the card’s buffer • It may be queued behind another packet • Solution: Disable buffering in the lower layers • There may be some back-off and retransmission • Solution: Ensure that with high probability, there will be no back off or retransmissions Use reservation-based time slots to schedule transmissions
Time Slots • Assume local synchronization of clocks • Use coarse-grained (compared to packet transmission times) time slots • 20ms slots, 2ms to transmit an MTU sized packet • Clocks are synchronized by estimating the 1-way delay of packets • Assume back-off is negligible and there are no retransmissions at the MAC layer • Use the minimum delay from the previous 20 packets to reduce errors
Weighted Slot Allocation • Algorithm to allocate time-slots to competing nodes • Only requires knowledge of the IDs of other competing nodes – no additional signaling • Uses a pseudo-random hash function • For ease of explanation • Stage 1: Assume the diameter of the network is one • Stage 2: Multi-hop networks of larger diameter
WSA – Diameter One Network • Each node keeps track of an active_list, the set of nodes with active flows • Each packet includes the current queue length in the OML header • Use a pseudorandom hash function to decide the winner • The node with the highest Hi is allowed to transmit
WSA – Multi-hop Network • Use the same hash-based mechanism • active_list only contains other nodes that compete with a given node • Consider only the hash values of competing nodes in deciding the winner • Assume that nodes interfere only up to k-hops • k is a tradeoff between losing possible channel reuse opportunities, and using the underlying MAC to resolve contention
Partially Overlapping Contention Regions Contention region of j Hi > Hj > Hk • 1-hop neighbors of the winner initiate an “inactivity timer” to detect when this happens • If i is more than 1-hop away from j, it is notified using a control message k j i Contention region of k
Persistent Allocation of Slots Time • Slots maybe • Available for contention • Assigned to a particular node • If the nodes queue goes empty, the rest of the slot is used by the node with the next highest hash 1 2 3 4 5 6 7 8 0 ms 24 ms 48 ms 72 ms Groups of 8 slots each of length 3ms
C C C C C C C C C C C Amortize the Cost of Contention Resolution • Nodes that transmitted successfully in the previous slot with index “i” own the slot with probability (1-p) • Cost is amortized because • A time-slot is much longer than a packet transmission • Nodes compete for an average of 1/p slots at a time • Orthogonal to method used to resolve contention for a slot Time 1 2 3 4 5 6 7 8 C C C 0 ms C C 24 ms 48 ms 72 ms
More Details • The protocol is “optimistic” in assigning a slot to a node • If a slot is assigned to more than 1 node, 802.11 will still do its best to resolve contention • If this happens very often, resource allocation goals may not be met • Queues vs. Flows • Because of TCP congestion control, queues become empty and full very often • If the queue is empty, a node will signal that other nodes may send in that slot
Simulation Results • Qualnet Network Simulator • Commercial software from www.scalable-networks.com • Packet level simulator similar to ns2, but faster and more scalable • Models collisions, interference and contention • Use 802.11a at 54 Mbps • 20 slots of 20 ms each, p=0.05
The disparity between 1-hop and 4-hop flows is reduced from 8 to 2 when using OML Nearly 40% of the flows receive less that 100 kbps, while others receive up to 3 Mbps without OML Fairness in a Multi-hop network
Flexibility in resource allocation Different allocation policies can result in very different outcomes – hence the MAC layer must be flexible Qualitative differentiation is possible by assigning different weights to flows
Test-bed • Hardware • ASUS Pundit barebones system • Celeron 2.4 Ghz, 256 MB • Netgear WAG511, 802.11a • Software • RH 9.0, Kernel 2.4.22 • Madwifi driver for Atheros • Click modular router
Mixed Queue FIFO SetTimeOffset LIFO SetOKSlots Click Architecture Push 1 Pull FromDevice DecapTimestamp ToDevice ContentionResolver TimeslotEnforcer EncapTimestamp Rest of the Router 1
Results (Test-bed – Data Rates) Equal throughput – default 802.11 Equal channel access time - OML OML can achieve fairness in terms of transmission time, or in terms of throughput
Results (Testbed – Fairness, Flexibility) • In 26% of the experiments, one flow was completely shut out by the other • k=2 leads to underutilization of the channel in some cases When all nodes can hear each other, WSA guarantees weighted fairness
Results (Test-bed) C A B
Conclusions and Future Work • Coarse-grained scheduling on top of 802.11 is a very powerful technique to • alleviate inefficiencies of the MAC protocol in resolving contention • overcome the lack of flexibility of assigning priorities to senders • Future work • Understand performance problems better though more measurements on the test-bed • More benchmarks of OML