1.37k likes | 1.64k Views
Special Topics on Wireless Ad-hoc Networks. Lecture 7: Wireless MAC Protocols. University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani. Covered topic. How to share wireless links? Media access issues References Chapter 3 of the book
E N D
Special Topicson Wireless Ad-hoc Networks Lecture 7: Wireless MAC Protocols University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani Computer Network
Covered topic • How to share wireless links? • Media access issues • References • Chapter 3 of the book • “Wireless Medium Access control protocols” a survey • “MACAW: A Media Access Protocol for Wireless LAN’s” • SSCH: Slotted Seeded Channel Hopping for Capacity … • ECHOS: Enhanced Capacity 802.11 Hotspots • Idle Sense: An Optimal Access Method for High Throughput and Fairness in Rate Diverse Wireless LANS • A wireless MAC protocol Using Implicit Pipelining Computer Network
Outlines • Issues • Mac protocols. • Reserved based protocols • MACAW • Channel capacity Computer Network
MAC: A Simple Classification Wireless MAC Centralized Distributed On Demand MACs, Polling Guaranteed or controlled access Random access Our focus SDMA, FDMA, TDMA, Polling Computer Network
Wireless MAC issues • Half duplex operations: difficult to receive data while sending • Time varying channel: Multipath propagation, fading • Burst Channel error: BER is as high as 10-3. We need a better strategy to overcome noises. • Location dependant carrier sensing: signal decays with path length. • Hidden nodes • Exposed nodes • Capture: when a receiver can cleanly receive data from two sources simultaneously, the farther one sounds a noise. Computer Network
Performance Metrics • Delay: ave time on the MAC queue • Throughput: fraction used for data transmission. • Fairness: Not preference any node • Stability: handle instantaneous loads greater than its max. capacity. • Robust against channel fading • Power consumption: or power saving • Support for multimedia Computer Network
Multi-Channel MAC: A simple approach • Divide bandwidth into multiple channels • Choose any one of the idle channels • Use a single-channel protocol on the chosen channel • ALOHA • MACA Computer Network
Multiple Channels • Multiple channels in ad hoc networks: typically defined by a particular code (CDMA) or frequency band (FDMA) • TDMA requires time synchronization among hosts in ad hoc network • Difficult • Many MAC protocols have been proposed Computer Network
MAC & Network Topology • CDMA: Not beneficial under current regulations - difficult to get good spreading codes • FDMA: Inefficient spectrum utilization for bursty traffic • CSMA: Suitable for Peer-to Peer architecture • TDMA: favors Base-Station/Remote-Station architecture Computer Network
CSMA versus TDMA • CSMA Advantages • Can be implemented on an Ethernet chipset • TDMA advantages • simple remote stations • isochronous traffic supported (low-latency, consistent throughput for such things as voice) • high power saving potential (only need to listen at certain times) Computer Network
Integrated CSMA/TDMA MAC Protocol • Supports guaranteed bandwidth traffic and random access traffic • The bandwidth is divided into a random part and a reserved part. • Random part is LBT, reserved part • During high traffic all bandwidth can be used for reserved traffic (like wireless telephony) Reserved-1 H2 LBT H1 Reserved-2 H3 Computer Network
Reservation/Polling MAC Protocol • Works only with AP • Fair and slow. First-in-First-Out • Wireless station send a request. • All requests are queued. • Wireless stations are polled in the same order that the requests have arrive. • All data reception is acknowledged. Computer Network
IEEE 802.11 Wireless MAC • Distributed and centralized MAC components • Distributed Coordination Function (DCF) • Point Coordination Function (PCF) • DCF suitable for multi-hop and ad hoc networking • DCF is a Carrier Sense Multiple Access/Collision Avoidance (CSMA/CA) protocol Computer Network
A B C IEEE 802.11 DCF • Uses RTS-CTS exchange to avoid hidden terminal problem • Any node overhearing a CTS cannot transmit for the duration of the transfer • Uses ACK to achieve reliability • Any node receiving the RTS cannot transmit for the duration of the transfer • To prevent collision with ACK when it arrives at the sender • When B is sending data to C, node A will keep quite Computer Network
A B C Hidden Terminal Problem [Tobagi75] • Node B can communicate with A and C both • A and C cannot hear each other • When A transmits to B, C cannot detect the transmission using the carrier sense mechanism • If C transmits, collision will occur at node B Computer Network
A B C MACA Solution for Hidden Terminal Problem [Karn90] • When node A wants to send a packet to node B, node A first sends a Request-to-Send (RTS) to A • On receiving RTS, node A responds by sending Clear-to-Send (CTS), provided node A is able to receive the packet • When a node (such as C) overhears a CTS, it keeps quiet for the duration of the transfer • Transfer duration is included in RTS and CTS both Computer Network
IEEE 802.11 RTS = Request-to-Send RTS A B C D E F Computer Network
IEEE 802.11 RTS = Request-to-Send RTS A B C D E F NAV = 10 NAV = remaining duration to keep quiet Computer Network
IEEE 802.11 CTS = Clear-to-Send CTS A B C D E F Computer Network
IEEE 802.11 • DATA packet follows CTS. Successful data reception acknowledged using ACK. CTS = Clear-to-Send CTS A B C D E F NAV = 8 Computer Network
IEEE 802.11 DATA A B C D E F Computer Network
IEEE 802.11 Reserved area ACK A B C D E F Computer Network
Interference range Carrier sense range A F Transmit range IEEE 802.11 DATA A B C D E F Computer Network
IEEE 802.11 ACK A B C D E F Computer Network
CSMA/CA • Carrier sense in 802.11 • Physical carrier sense • Virtual carrier sense using Network Allocation Vector (NAV) • NAV is updated based on overheard RTS/CTS/DATA/ACK packets, each of which specified duration of a pending transmission • Collision avoidance • Nodes stay silent when carrier sensed (physical/virtual) • Backoff intervals used to reduce collision probability Computer Network
Backoff Interval • When transmitting a packet, choose a backoff interval in the range [0,cw] • cw is contention window • Count down the backoff interval when medium is idle • Count-down is suspended if medium becomes busy • When backoff interval reaches 0, transmit RTS Computer Network
B1 = 25 B1 = 5 wait data data wait B2 = 10 B2 = 20 B2 = 15 DCF Example B1 and B2 are backoff intervals at nodes 1 and 2 cw = 31 Computer Network
Backoff Interval • The time spent counting down backoff intervals is a part of MAC overhead • Choosing a large cwleads to large backoff intervals and can result in larger overhead • Choosing a small cw leads to a larger number of collisions (when two nodes count down to 0 simultaneously) Computer Network
Backoff Interval (cont) • Since the number of nodes attempting to transmit simultaneously may change with time, some mechanism to manage contention is needed • IEEE 802.11 DCF: contention window cw is chosen dynamically depending on collision occurrence Computer Network
Binary Exponential Backoff in DCF • When a node fails to receive CTS in response to its RTS, it increases the contention window • cw is doubled (up to an upper bound) • When a node successfully completes a data transfer, it restores cw to Cwmin • cw follows a sawtooth curve • 802.11 has large room for improvement Random backoff RTS/CTS Data Transmission/ACK Computer Network
Inter Frame Spacing • SIFS = Short inter frame space = dependent on PHY • PIFS = point coordination function (PCF) inter frame space = SIFS + slot time • DIFS = distributed coordination function (DCF) inter frame space = PIFS + slot time • The back-off timer is expressed in terms of number of time slots. Computer Network
MACAW • Based on MACA, Any node hearing RTS, not CTS, only need to differ the RTS • Design based on 4 key observations: • Contention is at receiver, not the sender • Congestion is location dependent • To allocate media fairly, learning about congestion levels should be a collective enterprise • Media access protocol should propagate synchronization information about contention periods, so that all devices can contend effectively Computer Network
MILD Algorithm in MACAW • When a node successfully completes a transfer, reduces cw by 1 • In 802.11 cw is restored to cwmin • In 802.11, cw reduces much faster than it increases • MACAW: cw reduces slower than it increases Exponential Increase Linear Decrease • MACAW can avoid wild oscillations of cw when large number of nodes contend for the channel Computer Network
Receive-Initiated Mechanism • In most protocols, sender initiates a transfer • Alternatively, a receiver may send a Ready-To-Receive (RTR) message to a sender requesting it to being a packet transfer • Sender node on receiving the RTR transmits data • How does a receiver determine when to poll a sender with RTR? • Based on history, and prediction of traffic from the sender Computer Network
A B C Reliability • Wireless links are prone to errors. High packet loss rate detrimental to transport-layer performance. • Mechanisms needed to reduce packet loss rate experienced by upper layers • When node B receives a data packet from node A, node B sends an Acknowledgement (Ack). This approach adopted in many protocols • If node A fails to receive an Ack, it will retransmit the packet Computer Network
Fairness Issue • Assume that initially, A and B both choose a backoff interval in range [0,31] but their RTSs collide • Nodes A and B then choose from range [0,63] • Node A chooses 4 slots and B choose 60 slots • After A transmits a packet, it next chooses from range [0,31] • It is possible that A may transmit several packets before B transmits its first packet A B Two flows C D Computer Network
MACAW Solution for Fairness • When a node transmits a packet, it appends the cw value to the packet, all nodes hearing that cw value use it for their future transmission attempts • Since cw is an indication of the level of congestion in the vicinity of a specific receiver node, MACAW proposes maintaining cw independently for each receiver • Using per-receiver cw is particularly useful in multi-hop environments, since congestion level at different receivers can be very different Computer Network
Another MACAW Proposal • For the scenario below, when node A sends an RTS to B, while node C is receiving from D, node B cannot reply with a CTS, since B knows that D is sending to C • When the transfer from C to D is complete, node B can send a Request-to-send-RTS to node A. • Node A may then immediately send RTS to node B • This approach, however, does not work in the scenario below • Node B may not receive the RTS from A at all, due to interference with transmission from C D C B A Computer Network
Wireless Capacity • Wireless channel is inefficient due to • MAC backoff procedure • RTS/CTS mechanism • Frequency interference. • Possible solutions: • Use better backoff mechanisms. • Exploit more physical resources: more spectrum Cell mechanism • Exploit diversity, use different frequencies. • Parallel control with data Computer Network
A B C D Improve Spatial ReusePower/Rate Control TransmitSpatial PowerRatereuse High High Low Low Low High A B C D Computer Network
Exploit Infrastructure • Infrastructure provides a tunnel to forward packets infrastructure BS1 BS2 B C D E A Z Ad hoc connectivity X Computer Network
B C A D Exploit Antennas • Diversity antenna • Steered beam directional antenna B C A D Computer Network
Directional Antennas Not possible using Omni B D S C A
Path Diversity • Multiple paths to a destination Multiple next-hops to a destination Computer Network
Inefficiency of IEEE 802.11 • Backoff interval should be chosen appropriately for efficiency • Backoff interval with 802.11 far from optimum • Ms. Khalaj thesis Computer Network
Proposed Method • The current method used in DCF seems to lead to high jitter and wasted bandwidth • When CW is reset to its minimum after a large value, the next packet delays will be too low in compare with delays before CW size reduction • Collision => Network busy • Transmission => low load. • These rapid changes in CW size cause high variations in delay or jitter • In real conditions these assumptions are not always true. A packet being transmitted successfully does not necessarily mean the network is not congested • Unfair access to the medium. • Hence resetting CW to CWmin may cause more collisions and lead to wasting bandwidth Computer Network
Proposed Method (Cont.) • We attempt to know how much reduction in CW will give better performance • Scheme 1 is the method used in DCF, resetting CW to its minimum size • After a successful transmission: • In scheme 2, CW will be set to CWmin + (CWcurrent - CWmin) / 4 • In scheme 3, CW will be set to CWmin + (CWcurrent - CWmin) / 2 • In scheme 4, CW will be set to CWmin + 3(CWcurrent - CWmin) / 4 • By comparing the results of these schemes we can see how reduction of CW size will influence the performance Computer Network
Simulation Model • We used NS-2 (Network Simulator-2) for simulation • Three types of traffics were generated in our simulation: audio, video and data • Audio traffics have the highest priority and data traffics the lowest • All of the stations are in direct access range of each other • All stations send their flows to a common receiver • We have considered throughput, delay, and jitter to evaluate the performance of different schemes Computer Network
The parameters of our simulation Computer Network