Download presentation
Presentation is loading. Please wait.
1
Spring 2006UCSC CMPE2571 CMPE 257: Wireless Networking SET MAC-1: Medium Access Control Protocols
2
Spring 2006UCSC CMPE2572 Topics n Contention-based channel access p IEEE 802.11 as the main example, plus others p Basics and focus on algorithms in class; readings for more details on protocol and mechanisms n Scheduled channel access n Directional antennas p Contention-based and scheduled MACs n Multiple channels n Modeling and performance analysis
3
Spring 2006UCSC CMPE2573 Channel Access Schemes n Contention based schemes p ALOHA, CSMA/CA (FAMA, MACA, MACAW, IEEE 802.11) : with/without RTS/CTS handshakes. p Difficulties: Throughput, fairness, multipoint communication support, QoS, synchronization. n Scheduled schemes p FDMA/TDMA/CDMA in multi-hop networks: graph coloring problem — UxDMA. p Topology independent scheduling p Topology-dependent scheduling p Difficulties: Efficiency vs consistent state information for scheduling; synchronization
4
Spring 2006UCSC CMPE2574 IEEE 802.11 Standard n PHY/MAC standard for wireless LANs p First standardized in 1997 p Meet great success starting in 1999 n Several working groups p IEEE 802.11a: Operates in the 5GHz band; provides up to 54 Mbps; uses OFDM p 802.11b: Operates in 2.4 GHz band; provides 1,2, 5.5 and (nearly always) 11 Mbps; uses high rate DSSS p 802.11g: Operates in 2.4GHz band; provides up to 54 Mbps; uses OFDM p 802.11e: Quality of service (QoS) enhancement (still active) p 802.11i: Security enhancement p 802.11s: Mesh-networking support
5
Spring 2006UCSC CMPE2575 Requirements n Single MAC to support multiple PHYs p Handle ``hidden terminal’’ problem p Provisions time-bounded service n PHYs: p Direct sequence p Frequency hopping p Infrared (never implemented)
6
Spring 2006UCSC CMPE2576 Architecture n Infrastructure mode p Basic Service Set (BSS) p Access Point (AP) and stations (STA) take different roles p Distribution system (DS) interconnect multiple BSSs to form a single network (not specified in the standard). n Ad hoc mode p Independent Basic Service Set (IBSS) p Single-hop (the standard makes this assumption either explicitly or implicitly)
7
Spring 2006UCSC CMPE2577 Access Points n Stations select an AP and “associate” with it n Support roaming (not part of the standard) n Provide other functions p time synchronization (beaconing) p power management support p point coordination function (PCF) n Traffic typically (but not always) flows through AP p direct communication possible (in IEEE 802.11e)
8
Spring 2006UCSC CMPE2578 802.11 Protocol Entities MAC Sublayer PLCP Sublayer PMD Sublayer MAC Layer Management PHY Layer Management Station Management LLC MAC PHY
9
Spring 2006UCSC CMPE2579 802.11 Protocol Architecture n MAC Entity p basic access mechanism p fragmentation p encryption n MAC Layer Management Entity p synchronization p power management p roaming p MAC MIB n Physical Layer Convergence Protocol (PLCP) p PHY-specific, supports common PHY SAP p provides Clear Channel Assessment (CCA) signal (carrier sense)
10
Spring 2006UCSC CMPE25710 802.11MAC in Detail n Channel access mechanism r Distributed Coordination Function (DCF) Carrier sense multiple access (CSMA) with immediate MAC-level ACK RTS/CTS exchange (optional) r Point Coordination Function (PCF) Polled access through AP and distributed access Contention-free period (CFP) and contention period (CP) Seldom implemented in practice n Synchronization and power management
11
Spring 2006UCSC CMPE25711 CSMA/CA in 802.11 DIFS Contention Window Slot time Defer Access Backoff-Window Next Frame Select Slot and Decrement Backoff as long as medium is idle. SIFS PIFS DIFS Free access when medium is free longer than DIFS Busy Medium n Channel priorities based on “free channel intervals”: 1. SIFS (Short InterFrame Spacing): Used to give nodes in an ongoing dialogue the chance to transmit. Example is RTS-CTS handshake, ACK to data, or consecutive data packets. 2. DIFS (DCF InterFrame Spacing ): Any station may attempt to transmit after DIFS elapses. 3. PIFS (PCF InterFrame Spacing): Base station can send poll or beacon if no station accesses channel after PIFS interval. 4. EIFS (Extended InterFrame Spacing): Longer than DIFS and used for base station to report a bad frame
12
Spring 2006UCSC CMPE25712 CSMA/CA in 802.11 DIFS Contention Window Slot time Defer Access Backoff-Window Next Frame Select Slot and Decrement Backoff as long as medium is idle. SIFS PIFS DIFS Free access when medium is free longer than DIFS Busy Medium n Reduce collision probability where mostly needed. p Stations are waiting for medium to become free. p Select Random Backoff after a Defer, resolving contention to avoid collisions. n Backoff algorithm stable at high loads. p Exponential Backoff window increases for retransmissions. p Backoff timer elapses only when medium is idle. n Implement different fixed priority levels. p To allow immediate responses and PCF coexistence.
13
Spring 2006UCSC CMPE25713 CSMA/CA + ACK Defer access based on Carrier Sense. –CCA from PHY and Virtual Carrier Sense state. Direct access when medium is sensed free longer than DIFS, otherwise defer and backoff. Receiver of directed frames to return an ACK immediately when CRC correct. –When no ACK received then retransmit frame after a random backoff (up to maximum limit). Ack Data Next MPDU Src Dest Other Contention Window Defer Access Backoff after Defer DIFS SIFS DIFS
14
Spring 2006UCSC CMPE25714 RTS/CTS Based Access Net Allocation Vector (NAV)Duration field in RTS and CTS frames distribute Medium Reservation information which is stored in a Net Allocation Vector (NAV). Medium BusyDefer on either NAV or "CCA" indicating Medium Busy. Use of RTS / CTS is optional but must be implemented. RTS_ThresholdUse is controlled by a RTS_Threshold parameter per station. –To limit overhead for short frames. RTS CTS Ack Data NAV Next MPDU Src Dest Other CW Defer AccessBackoff after Defer NAV (RTS) (CTS) DIFS
15
Spring 2006UCSC CMPE25715 Frame Format n MAC Header format differs per type (control, management, or data frames). n The subtype indicates RTS, CTS, ACK, etc. n To/From DS bits indicate that frame comes from/goes to intercell distribution system n More Frag bit indicates that more fragments for frame follow n Retry bit states that frame is a retransmission n Pwr Mgt bit is used by station to put nodes in/out of sleep state n More data bit states that sender has more frames for receiver n WEP states if wired equivalent privacy algorithm was used to encrypt frame n O bit states that frames with bit set must be processed in order. Frame Control Duration ID Addr 1Addr 2Addr 3Addr 4 Sequence Control CRC Frame Body 22666620-23124 802.11 MAC Header Bytes: Protocol Version TypeSubType To DS Retry Pwr Mgt More Data WEP O Frame Control Field Bits: 2411111111 DS FromMore Frag 2
16
Spring 2006UCSC CMPE25716 Frame Format n Duration states how long frame and ack will occupy channel. Present in control frames and used for NAV n Four addresses are in standard IEEE 802 format n Sequence control is used to number frames; 16 bits identify frame, and 4 the fragment in a frame. n Control frames have only 1 or 2 addresses, no data and no sequence control fields. Frame Control Duration Addr 1Addr 2Addr 3Addr 4 Sequence Control CRC Payload 22666620-23124 802.11 MAC Header Bytes:
17
Spring 2006UCSC CMPE25717 Address Field Description n Addr 1 = All stations filter on this address. n Addr 2 = Transmitter Address (TA) p Identifies transmitter to address the ACK frame to. n Addr 3 = Dependent on To and From DS bits. (Wireless Distribution System) n Addr 4 = Only needed to identify the original source of WDS (Wireless Distribution System) frames.
18
Spring 2006UCSC CMPE25718 Comments on CSMA/CA n IEEE 802.11 cannot avoid collisions of data packets (see [FAMA97]). n CSMA/CA works fine when hidden terminals are very few. n For most single-hop wireless LANs, RTS/CTS is not useful (turned off by default in practice) n Spatial reuse is reduced in multi-hop networks n Why ACK each frame? n Why “sender initiated”? n Where does the use of “free channel” intervals come from? n Is RTS-CTS inherently good or bad? n Is synchronization in MANETs important?
19
Spring 2006UCSC CMPE25719 Synchronization in 802.11 n Timing Synchronization Function (TSF) n Used for Power Management p Beacons sent around well known intervals p All station timers in BSS are synchronized n Used for Point Coordination Timing p TSF Timer used to predict start of Contention Free burst n Used for hop timing for frequency hoping (FH) PHY p TSF timer used to time dwell interval p All Stations are synchronized, so they hop at same time.
20
Spring 2006UCSC CMPE25720 n All stations maintain a local timer. n TSF goals: p Keep timers from all stations in synch p AP to control timing in infrastructure networks p Distributed function for Independent BSS n Timing conveyed by periodic beacon transmissions p Beacons contain timestamp for the entire BSS p Timestamp from beacons used to calibrate local clocks p Not required to hear every beacon to stay in synch p Beacons contain other management information r also used for Power Management and roaming Synchronization Approach
21
Spring 2006UCSC CMPE25721 Infrastructure Beacon Generation Simple for infrastructure networks, because AP is the only one sending beacons. Beacons scheduled at beacon intervals. Transmission may be delayed by CSMA deferral. –subsequent transmissions at expected beacon interval, not relative to last beacon transmission –next beacon sent at Target Beacon Transmission Time (TBTT) Timestamp contains timer value at transmit time. Time Axis Beacon Interval XXXX "Actual time" stamp in Beacon Beacon Busy Medium
22
Spring 2006UCSC CMPE25722 TSF in Ad Hoc Networks Beacon generation in IBSS is distributed and peer-to-peer process aimed at beacon avoidance first, and adopting the most current time second 1) Each TBTT, node computes a random delay uniformly distributed in [0, (2aCWmin)(aSlotTime)], e.g., 31x20us for DSSS 2) Node waits for random delay period 3) Node cancels its pending beacon and remaining random delay if a beacon arrives before timer expires 4) If random delay timer expires, node transmits beacon with a timestamp equal to its TSF timer value 5) When receiving a beacon, node sets its TSF equal to the time stamp of the beacon if the value of the timestamp is more recent than the TSF value.
23
Spring 2006UCSC CMPE25723 Problems, Issues? 1) There is no need to adopt the “latest” time in order to synchronize nodes for the purpose of channel access activities. 2) Beacon avoidance in the presence of many nodes may lead to network being out of synchronization (TSF timer values at nodes differ by more than a threshold delta) a) Fastest-station asynchronism: Clock of fastest node is ahead of clocks of rest of nodes by more than delta b) Global asynchronism: A percentage of the n(n-1)/2 pairs of nodes are out of synchronization. TSF in Ad Hoc Networks time asynchronism L H H E(H)/[E(H)+E(L)] = (1-p)^tau p = prob. that node sends beacon successfully tau = delta/(diff. clock accuracy x beacon interval length)
24
Spring 2006UCSC CMPE25724 Solutions? n Do not require clocks to always move forward n Have larger windows for beacon contention n Give priority of beacon transmission to nodes with most recent clock value. n …others? [HW]
25
Spring 2006UCSC CMPE25725 Scheduled Access n Problem description: p Given a set of contenders M i of an entity i in contention context t, how does i determine whether itself is the winner during t ? n Topology dependence: p In unit disc graph model, two-hop neighbor information required to resolve contentions. p In ad hoc networks, two-hop neighbors are acquired by each node broadcasting its one-hop neighbor set.
26
Spring 2006UCSC CMPE25726 Goals n Safety: In our case, this amounts to collision avoidance (avoid the hidden terminal problem) under a given set of assumptions. n Liveness: No node is precluded from accessing the channel for an indefinite period of time n Fairness: The channel is assigned to competing entities in proportion to their needs n Timeliness: Through additional mechanisms, a node can be granted guarantees on how long it needs to wait between consecutive channel access times. n Efficiency: Attain the highest possible maximum throughput n Locality and distributed operation: No need for global network information. n Simplicity: The algorithm(s) used for scheduling are simple enough to verify
27
Spring 2006UCSC CMPE25727 Neighbor-Aware Contention Resolution (NCR) n In each contention context (time slot t ): p Compute priorities p i is the winner for channel access if: a b c d e Contention Floor 6 9 5 4 2
28
Spring 2006UCSC CMPE25728 Channel Access Probability: n Dependent on the number of contenders in the neighborhood. n Channel access probability: p Bandwidth allocation general formula to i
29
Spring 2006UCSC CMPE25729 NAMA: Node Activation Multiple Access (Broadcast) n Channel is time-slotted. n Transmissions are broadcasts via omni- directional antenna: all one-hop neighbors can receive the packet from a node. n The contenders of a node for channel access are neighbors within two hops because of direct and hidden terminal contentions.
30
Spring 2006UCSC CMPE25730 Algorithm
31
Spring 2006UCSC CMPE25731 Illustration of NAMA A B C D E F H G 8 6 5 3 4 1 2 9
32
Spring 2006UCSC CMPE25732 How Do We Share Context? n Scheduling requires all nodes in two-hop neighborhood of each receiver to have consistent state. n Neighbor protocol must disseminate such state n How fast can it be done? n How should it be integrated with time sync and the frame structure of the protocol? p Each time slot has part of it dedicated to context? p Part of the frame dedicated to context sharing?
33
Spring 2006UCSC CMPE25733 Other Channel Access Protocols n Other protocols using omni-directional antennas: p LAMA: Link Activation Multiple Access p PAMA: Pair-wise Activation Multiple Access n Protocols that work when uni-directional links exist. p Node A can receive node B’ s transmission but B cannot receive A’ s. n Protocols using directional antenna systems.
34
Spring 2006UCSC CMPE25734 Channel Access Probability Analysis of NAMA n The channel access probability for a single node i is given by n We are interested in average probability of channel access in multi-hop ad hoc networks.
35
Spring 2006UCSC CMPE25735 Ad Hoc Network Settings n Equal transmission range; n Each node knows its one- and two-hop neighbors — M i. n Nodes are uniformly distributed on an infinite plane with density . n A node may have different numbers of neighbors in one-hop and two-hop.
36
Spring 2006UCSC CMPE25736 Counting One-Hop Neighbors n The prob of having k nodes in an area of size S is a Poisson distribution: n Average one-hop neighbors is: p Note: the mean of r.v. with Poisson dist is
37
Spring 2006UCSC CMPE25737 Counting Two-hop Neighbors n Two nodes become two-hop neighbors if they share at least one one-hop neighbor. p Average number in B(t):
38
Spring 2006UCSC CMPE25738 Counting Two-hop Neighbors n Probability of becoming two-hop: n Prob of a node staying at tr is 2t. n Summation of nodes in ring (r,2r) times the corresponding prob of becoming two- hop --- number of two-hop neighbors:
39
Spring 2006UCSC CMPE25739 Total One- and Two-hop Neighbors n Sum: n This is average number of one-hop and two-hop neighbors.
40
Spring 2006UCSC CMPE25740 Average Probability of Channel Access n Apply Poisson distribution with the mean (number of one- and two-hop neighbors)
41
Spring 2006UCSC CMPE25741 Plotting Channel Access Probability
42
Spring 2006UCSC CMPE25742 Delay per Node n Delay is related with the probability of channel access and the load at each node. n Channel access probability can be different at each node. n Delay is considered per node.
43
Spring 2006UCSC CMPE25743 Packet Arrival and Serving: n M/G/1 with server vacation: Poisson arrival (exponential arrival interval), service time distribution (any), single server. n FIFO service strategy: head-of-line packet waits for geometric distributed period Y i with parameter 1-q i ̶ q i is the channel access probability of node i.
44
Spring 2006UCSC CMPE25744 Service Time: n Service time: X i = Y i + 1. n The mean and second moment of service time: n Server vacation: V=1,
45
Spring 2006UCSC CMPE25745 Delay in The System n Pollaczek-Kinchin formula: n Take in X i and V i : n Delay in the system: (q> )
46
Spring 2006UCSC CMPE25746 Plotting System Delay
47
Spring 2006UCSC CMPE25747 System Throughput n Multi-hop networks have concurrent transmissions >1. n The system can carry as many packets at a time as all nodes can be activate. p Simple!
48
Spring 2006UCSC CMPE25748 Comparisons with CSMA CSMA/CA by Analysis n Different slotting: p NAMA long slots p CSMA CSMA/CA short slots n CSMA(CA) assumptions: p Heavy load (always have packets waiting) p Channel access regulated by back-off probability p’ in each slot. n Convert the load to comparable one in NAMA.
49
Spring 2006UCSC CMPE25749 Convert Load in CSMA(CA) to the Load in NAMA n Each attempt to access channel is a packet arrival p’. n Packet duration is geometric with average 1/q. n Two state Markov chain to compute the load.
50
Spring 2006UCSC CMPE25750 NAMA Load n Relation: n i = b is the load for each node. n q m is the channel access probability of each node.
51
Spring 2006UCSC CMPE25751 Protocol Throughput Comparison
52
Spring 2006UCSC CMPE25752 Simulations n Two scenarios: p Fully connected: 2, 5, 10, 20 nodes. p Multi-hop network: r 100 nodes randomly placed in 1000x1000 area. r Transmission range: 100, 200, 300, 400. n Compare with UxDMA:
53
Spring 2006UCSC CMPE25753 Fully Connected Network (Throughput)
54
Spring 2006UCSC CMPE25754 Fully Connected Network (Delay)
55
Spring 2006UCSC CMPE25755 Multi-hop Network (Throughput)
56
Spring 2006UCSC CMPE25756 Multi-hop Network (Delay)
57
Spring 2006UCSC CMPE25757 Conclusions n NCR ensures collision-free transmissions. n Only two-hop topology information is needed. n HAMA performs better than static scheduling algorithms (UxDMA). n HAMA performs better than contention- based protocols. n The use of directional antennas can improve performance further. (Next topic)
58
Spring 2006UCSC CMPE25758 Comments n Scheduled-access protocols are evaluated in static environments and what about their performance in mobile networks? n Neighbor protocol will also have impact on the performance of these protocols n Need comprehensive comparison of contention-based and scheduled access protocols.
59
Spring 2006UCSC CMPE25759 Beyond Elections and Graph Coloring… n Elections and graph coloring are not enough to support all traffic or be efficient (example is a string of nodes). n How do we support traffic with deadlines? p Reservations n How do we combine reservations & elections? p CATA as a “pre-example” n What if we can do more than transmit or receive one packet at a time? p Network coding p Channel division p Multi-user detection
60
Spring 2006UCSC CMPE25760 Synchronization and Power Management n Synchronization p Finding and staying with a WLAN p Synchronization functions r TSF Timer, Beacon Generation n Power Management p Goal is sleeping without missing messages p Power Management functions r periodic sleep, frame buffering, Traffic Indication Map
61
Spring 2006UCSC CMPE25761 Power Management n Mobile devices are battery powered. p Power management is important for mobility. n Current LAN protocols assume stations are always ready to receive. p Idle receive state dominates LAN adapter power consumption over time. n How can we power off during idle periods, yet maintain an active session? n 802.11 Power Management Protocol goals: p Allow transceiver to be off as much as possible p Transparent to existing protocols p Flexible to support different applications r possible to trade off throughput for battery life
62
Spring 2006UCSC CMPE25762 Power Management in 802.11 n Two power modes: active and power saving (PS). n Protocols for p Infrastructure, i.e., network with an access point (AP) p Ad hoc networks.
63
Spring 2006UCSC CMPE25763 Power Management in 802.11 Infrastructure network n Node in active mode behaves “normally” and node in PS wakes up periodically to check for packets from AP. n Node notifies AP when it changes modes. n AP transmits beacons every beacon interval and nodes must monitor those frames. n AP sends a traffic indication map (TIM) in each beacon, which states PS nodes with buffered frames in the AP. n When PS node hears its ID, it remains active for the remaining of the beacon interval.
64
Spring 2006UCSC CMPE25764 Power Management Approach n Allow idle stations to go to sleep p station’s power save mode stored in AP n APs buffer packets for sleeping stations. p AP announces which stations have frames buffered p Traffic Indication Map (TIM) sent with every Beacon n Power Saving stations wake up periodically p listen for Beacons n TSF assures AP and Power Save stations are synchronized p stations will wake up to hear a Beacon p TSF timer keeps running when stations are sleeping p synchronization allows extreme low power operation n Independent BSS also have Power Management p similar in concept, distributed approach
65
Spring 2006UCSC CMPE25765 Infrastructure Power Management n Broadcast frames are also buffered in AP. p all broadcasts/multicasts are buffered p broadcasts/multicasts are only sent after DTIM p DTIM interval is a multiple of TIM interval TIM TIM-Interval Time-axis Busy Medium AP activity TIM DTIM DTIM interval Broadcast
66
Spring 2006UCSC CMPE25766 Infrastructure Power Management n Broadcast frames are also buffered in AP. p all broadcasts/multicasts are buffered p broadcasts/multicasts are only sent after DTIM p DTIM interval is a multiple of TIM interval n Stations wake up prior to an expected (D)TIM. TIM TIM-Interval Time-axis Busy Medium AP activity TIM DTIM DTIM interval PS Station Broadcast
67
Spring 2006UCSC CMPE25767 Infrastructure Power Management n Broadcast frames are also buffered in AP. p all broadcasts/multicasts are buffered p broadcasts/multicasts are only sent after DTIM p DTIM interval is a multiple of TIM interval n Stations wake up prior to an expected (D)TIM. n If TIM indicates frame buffered p station sends PS-Poll and stays awake to receive data p else station sleeps again TIM TIM-Interval Time-axis Busy Medium Tx operation AP activity TIM DTIM DTIM interval PS Station Broadcast PS-Poll Broadcast
68
Spring 2006UCSC CMPE25768 References n [R01] S. Ramanathan, A unified framework and algorithm for channel assignment in wireless networks, ACM Wireless Networks, Vol. 5, No. 2, March 1999. n [BG01] Lichun Bao and JJ, A New Approach to Channel Access Scheduling for Ad Hoc Networks, Proc. of The Seventh ACM Annual International Conference on Mobile Computing and networking (MOBICOM), July 16-21, 2001, Rome, Italy. n [BG02] Lichun Bao and JJ, Hybrid Channel Access Scheduling in Ad Hoc Networks, IEEE Tenth International Conference on Network Protocols (ICNP), Paris, France, November 12-15, 2002.
69
Spring 2006UCSC CMPE25769 References n [IEEE99] IEEE Standard for Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, IEEE Std 802.11-1999. n [TK84] H. Takagi and L. Kleinrock, Optimal Transmission Range for Randomly Distributed Packet Radio Terminals, IEEE Trans. on Comm., vol. 32, no. 3, pp. 246-57, 1984. n [WV99] L. Wu and P. Varshney, Performance Analysis of CSMA and BTMA Protocols in Multihop Networks (I). Single Channel Case, Information Sciences, Elsevier Sciences Inc., vol. 120, pp. 159-77, 1999. n [WG02] Yu Wang and JJ, Performance of Collision Avoidance Protocols in Single-Channel Ad Hoc Networks, IEEE Intl. Conf. on Network Protocols (ICNP ’02), Paris, France, Nov. 2002.
70
Spring 2006UCSC CMPE25770 Acknowledgments n Parts of the presentation are adapted from the following sources: p Mustafa Ergen, UC Berkeley, http://www.eecs.berkeley.edu/~ergen/docs/IEEE- 802.11overview.ppt http://www.eecs.berkeley.edu/~ergen/docs/IEEE- 802.11overview.ppt p Greg Ennis, Symbol Technologies, http://grouper.ieee.org/groups/802/11/Tutorial/archit.pdf http://grouper.ieee.org/groups/802/11/Tutorial/archit.pdf p Phil Belanger, Aironet and Wim Diepstraten, Lucent Technologies, http://grouper.ieee.org/groups/802/11/Tutorial/MAC.pdf http://grouper.ieee.org/groups/802/11/Tutorial/MAC.pdf p Abhishek Karnik, Dr. Ratan Guha, University Of Central Florida, http://www.cs.ucf.edu/courses/cda4527/WLAN/80211.ppt http://www.cs.ucf.edu/courses/cda4527/WLAN/80211.ppt
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.