MAC in 802.11 2/20/06
MAC Multiple users share common medium. Important issues: Collision detection Delay Fairness Hidden terminals Synchronization Power management Roaming Use 802.11 as an example to see how these issues are handled.
802.11 - MAC layer I - DFWMAC Traffic services Asynchronous Data Service (mandatory) exchange of data packets based on best-effort support of broadcast and multicast Time-Bounded Service (optional) implemented using PCF (Point Coordination Function) Access methods DFWMAC-DCF CSMA/CA (mandatory) collision avoidance via randomized back-off mechanism minimum distance between consecutive packets ACK packet for acknowledgements (not for broadcasts) DFWMAC-DCF w/ RTS/CTS (optional) Distributed Foundation Wireless MAC avoids hidden terminal problem DFWMAC- PCF (optional) access point polls terminals according to a list
Priorities 802.11 - MAC layer II defined through different inter frame spaces no guaranteed, hard priorities (Short Inter Frame Spacing) highest priority, for ACK, CTS, polling response PIFS (PCF IFS) medium priority, for time-bounded service using PCF (DCF, Distributed Coordination Function IFS) lowest priority, for asynchronous data service medium busy PIFS contention next frame direct access if medium is free t
802.11 - CSMA/CA access method I contention window (randomized back-off mechanism) medium busy direct access if medium is free slot time next frame t station ready to send starts sensing the medium (Carrier Sense based on CCA, Clear Channel Assessment) if the medium is free for the duration of an Inter-Frame Space (IFS), the station can start sending (IFS depends on service type) if the medium is busy, the station has to wait for a free IFS, then the station must additionally wait a random back-off time (collision avoidance, multiple of slot-time) if another station occupies the medium during the back-off time of the station, the back-off timer stops (fairness)
802.11 - competing stations - simple version bo e bo r bo e bo r bo e busy station 1 bo e busy station 2 station 3 busy bo e busy bo e bo r station 4 bo e bo r bo e busy bo e bo r station 5 t busy medium not idle (frame, ack etc.) bo e elapsed backoff time packet arrival at MAC bo r residual backoff time
802.11 - CSMA/CA access method II Sending unicast packets station has to wait for before sending data receivers acknowledge at once (after waiting for ) if the packet was received correctly (CRC) automatic retransmission of data packets in case of transmission errors sender data receiver ACK other stations waiting time contention data t
Hidden terminals MACA avoids the problem of hidden terminals A and C want to send to B A sends RTS first C waits after receiving CTS from B RTS CTS CTS A B C
Sending unicast packets 802.11 - DFWMAC station can send RTS with reservation parameter after waiting for (reservation determines amount of time the data packet needs the medium) acknowledgement via CTS after by receiver (if ready to receive) sender can now send data at once, acknowledgement via ACK other stations store medium reservations distributed via RTS and CTS sender RTS data receiver CTS ACK other stations NAV (RTS) NAV (CTS) defer access contention data t
Fragmentation sender receiver RTS CTS frag 1 ACK 1 frag 2 ACK2 other stations NAV (RTS) NAV (CTS) NAV (frag 1 ) NAV (ACK 1 ) contention data t Why segmentation? Better error correction.
DFWMAC-PCF I t 0 t 1 SuperFrame medium busy point coordinator PIFS D 1 D 2 wireless stations U 1 U 2 stations NAV NAV
DFWMAC-PCF II t 2 t 3 t 4 point coordinator D 3 PIFS D 4 CFend wireless stations U 4 stations NAV NAV contention free period contention period t
802.11 - MAC management Synchronization try to find a LAN, try to stay within a LAN timer etc. Power management sleep-mode without missing a message periodic sleep, frame buffering, traffic measurements Association/Reassociation integration into a LAN roaming, i.e. change networks by changing access points scanning, i.e. active search for a network MIB - Management Information Base managing, read, write
Synchronization Each node maintains an internal clock. Timing synchronization function (TSF) Power management Hopping sequence in FHSS system How to implement synchronization Beacon Infrastructure-based network Ad hoc network (harder).
Synchronization using a Beacon (infrastructure) beacon interval access point medium B B B B busy busy busy busy value of the timestamp B beacon frame t Access point send out beacons to synchronize with stations. Try to respect to the beacon interval The timestamp refers to the transmit time.
Synchronization using a Beacon (ad-hoc) beacon interval station 1 B 1 B 1 station 2 B 2 B 2 medium busy busy busy busy t value of the timestamp B beacon frame random delay This assumes that all the nodes hear each other. What if we have a multi-hop network? Does the system converge?
Power management Idea: switch the transceiver off if not needed States of a station: sleep and awake Timing Synchronization Function (TSF) stations wake up at the same time Infrastructure Traffic Indication Map (TIM) list of unicast receivers transmitted by AP Delivery Traffic Indication Map (DTIM) Ad-hoc list of broadcast/multicast receivers transmitted by AP Ad-hoc Traffic Indication Map (ATIM) announcement of receivers by stations buffering frames more complicated - no central AP collision of ATIMs possible (scalability?)
Power saving with wake-up patterns (infrastructure) TIM interval DTIM interval access point medium D B busy T T d D busy busy busy B station T TIM D DTIM p awake d t B broadcast/multicast p PS poll d data transmission to/from the station
Power saving with wake-up patterns (ad-hoc) ATIM window beacon interval B station 1 A D B 1 1 station 2 B 2 B 2 a d B beacon frame random delay A transmit ATIM D transmit data t awake a acknowledge ATIM d acknowledge data Synchronization makes power management easy. But increases the chance of collision!
802.11 - Roaming No or bad connection? Then perform: Scanning scan the environment, i.e., listen into the medium for beacon signals or send probes into the medium and wait for an answer Reassociation Request station sends a request to one or several AP(s) Reassociation Response success: AP has answered, station can now participate failure: continue scanning AP accepts Reassociation Request signal the new station to the distribution system the distribution system updates its data base (i.e., location information) typically, the distribution system now informs the old AP so it can release resources
One project idea Power management for sensor networks
One project idea Find schedules of sensors so that each point in the region is covered by at least one sensor at a time. Synchronize all the sensors. Design global schedule for the sensors. Synchronization & localization are necessary. In a distributed environment how to compute the global schedule efficient? Random access. Each sensor wakes up, check how many neighbors alive, decide on how long it will stay awake. How to guarantee good coverage (with high prob)?
One project idea Design a power management algorithm. Implement it with ns-2. Analyze its performance. Write a report. You are welcome to discuss with me about your idea.