Medium Access Control Protocols Local Area Networks and

  • Slides: 31
Download presentation
Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Lecture Note

Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Lecture Note 11 ECEN 489, Prof. Xi Zhang

Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Part III:

Medium Access Control Protocols, Local Area Networks, and Wireless Local Area Networks Part III: 802. 11 Wireless LAN ECEN 489, Prof. Xi Zhang

Wireless Data Communications Ø Wireless communications compelling Easy, low-cost deployment ü Mobility & roaming:

Wireless Data Communications Ø Wireless communications compelling Easy, low-cost deployment ü Mobility & roaming: Access information anywhere ü Supports personal devices ü ü ü PDAs, laptops, data-cell-phones Supports communicating devices ü Cameras, location devices, wireless identification Signal strength varies in space & time û Signal can be captured by snoopers û Spectrum is limited & usually regulated û ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Ad Hoc Communications C A B Ø D Temporary association of group of stations

Ad Hoc Communications C A B Ø D Temporary association of group of stations Ø Ø Ø Within range of each other Need to exchange information E. g. Presentation in meeting, or distributed computer game, or both ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Infrastructure Network Portal Distribution System Server Gateway to Portal the Internet AP 1 AP

Infrastructure Network Portal Distribution System Server Gateway to Portal the Internet AP 1 AP 2 A 1 BSS A B 1 B 2 A 2 BSS B ECEN 489, Computer & Comm. Wireless Networks Ø Prof. Xi Zhang Permanent Access Points provide access to

Hidden Terminal Problem (a) A C Data Frame A transmits data frame B (b)

Hidden Terminal Problem (a) A C Data Frame A transmits data frame B (b) Data Frame A Ø B C senses medium, station A is hidden from C C Data Frame C transmits data frame & collides with A at B New MAC: CSMA with Collision Avoidance ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

CSMA with Collision Avoidance (a) B RTS C A requests to send (b) CTS

CSMA with Collision Avoidance (a) B RTS C A requests to send (b) CTS B CTS A C B announces A ok to send (c) Data Frame A sends B C remains quiet ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

IEEE 802. 11 Wireless LAN Ø Stimulated by availability of unlicensed spectrum Ø U.

IEEE 802. 11 Wireless LAN Ø Stimulated by availability of unlicensed spectrum Ø U. S. Industrial, Scientific, Medical (ISM) bands Ø 902 -928 MHz, 2. 400 -2. 4835 GHz, 5. 7255. 850 GHz Ø Targeted wireless LANs @ 20 Mbps Ø MAC for high speed wireless LAN Ø Ad Hoc & Infrastructure networks Ø Variety of physical layers ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

802. 11 Definitions Ø Ø Basic Service Set (BSS) Ø Group of stations that

802. 11 Definitions Ø Ø Basic Service Set (BSS) Ø Group of stations that coordinate their access using a given instance of MAC Ø Located in a Basic Service Area (BSA) Ø Stations in BSS can communicate with each other Ø Distinct collocated BSS’s can coexist Extended Service Set (ESS) Ø Multiple BSSs interconnected by Distribution System (DS) Ø Each BSS is like a cell and stations in BSS communicate with an Access Point (AP) Ø Portals attached to DS provide access to Internet ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Infrastructure Network Portal Distribution System Server Gateway to Portal the Internet AP 1 AP

Infrastructure Network Portal Distribution System Server Gateway to Portal the Internet AP 1 AP 2 A 1 BSS A B 2 A 2 BSS B ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Distribution Services Ø Stations within BSS can communicate directly with each other Ø DS

Distribution Services Ø Stations within BSS can communicate directly with each other Ø DS provides distribution services: Ø Transfer MAC SDUs between APs in ESS Ø Transfer MSDUs between portals & BSSs in ESS Ø Transfer MSDUs between stations in same BSS Ø Ø Multicast, broadcast, or stations’s preference ESS looks like single BSS to LLC layer ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Infrastructure Services Ø Select AP and establish association with AP Ø Then can send/receive

Infrastructure Services Ø Select AP and establish association with AP Ø Then can send/receive frames via AP & DS Ø Reassociation service to move from one AP to another AP Ø Dissociation service to terminate association Ø Authentication service to establish identity of other stations Ø Privacy service to keep contents secret ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

IEEE 802. 11 MAC Ø Ø MAC sublayer responsibilities Ø Channel access Ø PDU

IEEE 802. 11 MAC Ø Ø MAC sublayer responsibilities Ø Channel access Ø PDU addressing, formatting, error checking Ø Fragmentation & reassembly of MAC SDUs MAC security service options Ø Ø Authentication & privacy MAC management services Ø Roaming within ESS Ø Power management ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

MAC Services Ø Ø Ø Contention Service: Best effort Contention-Free Service: time-bounded transfer MAC

MAC Services Ø Ø Ø Contention Service: Best effort Contention-Free Service: time-bounded transfer MAC can alternate between Contention Periods (CPs) & Contention-Free Periods (CFPs) MSDUs Contentionfree service Point coordination function Contention service MAC Distribution coordination function (CSMA-CA) Physical ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Distributed Coordination Function (DCF) DIFS Contention window PIFS DIFS SIFS Busy medium Defer access

Distributed Coordination Function (DCF) DIFS Contention window PIFS DIFS SIFS Busy medium Defer access Ø Ø Next frame Time Wait for reattempt time DCF provides basic access service Ø Asynchronous best-effort data transfer Ø All stations contend for access to medium CSMA-CA Ø Ready stations wait for completion of transmission Ø All stations must wait Interframe Space (IFS) ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Priorities through Interframe Spacing DIFS Contention window PIFS DIFS SIFS Busy medium Defer access

Priorities through Interframe Spacing DIFS Contention window PIFS DIFS SIFS Busy medium Defer access Ø Next frame Wait for reattempt time Time High-Priority frames wait Short IFS (SIFS) Ø Typically to complete exchange in progress Ø ACKs, CTS, data frames of segmented MSDU, etc. Ø PCF IFS (PIFS) to initiate Contention-Free Periods Ø DCF IFS (DIFS) to transmit data & MPDUs ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Contention & Backoff Behavior Ø If channel is still idle after DIFS period, ready

Contention & Backoff Behavior Ø If channel is still idle after DIFS period, ready station can transmit an initial MPDU Ø If channel becomes busy before DIFS, then station must schedule backoff time for reattempt Ø Ø Backoff period is integer # of idle contention time slots Ø Waiting station monitors medium & decrements backoff timer each time an idle contention slot transpires Ø Station can contend when backoff timer expires A station that completes a frame transmission is not allowed to transmit immediately Ø Must first perform a backoff procedure ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

(a) B RTS A requests to send (b) C CTS B CTS A C

(a) B RTS A requests to send (b) C CTS B CTS A C B announces A ok to send (c) Data Frame B A sends (d) C remains quiet ACK B sends ACK ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Carrier Sensing in 802. 11 Ø Physical Carrier Sensing Analyze all detected frames Ø

Carrier Sensing in 802. 11 Ø Physical Carrier Sensing Analyze all detected frames Ø Monitor relative signal strength from other sources Ø Ø Virtual Carrier Sensing at MAC sublayer Source stations informs other stations of transmission time (in msec) for an MPDU Ø Carried in Duration field of RTS & CTS Ø Stations adjust Network Allocation Vector to indicate when channel will become idle Ø Ø Channel busy if either sensing is busy ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Transmission of MPDU without RTS/CTS DIFS Data Source SIFS ACK Destination DIFS Other NAV

Transmission of MPDU without RTS/CTS DIFS Data Source SIFS ACK Destination DIFS Other NAV Defer Access Wait for Reattempt Time ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Transmission of MPDU with RTS/CTS DIFS RTS Data Source SIFS CTS SIFS Ack Destination

Transmission of MPDU with RTS/CTS DIFS RTS Data Source SIFS CTS SIFS Ack Destination NAV (RTS) Other DIFS NAV (CTS) NAV (Data) Defer access ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Collisions, Losses & Errors Ø Collision Avoidance Ø Ø When station senses channel busy,

Collisions, Losses & Errors Ø Collision Avoidance Ø Ø When station senses channel busy, it waits until channel becomes idle for DIFS period & then begins random backoff time (in units of idle slots) Station transmits frame when backoff timer expires If collision occurs, recompute backoff over interval that is twice as long Receiving stations of error-free frames send ACK Ø Ø Ø Sending station interprets non-arrival of ACK as loss Executes backoff and then retransmits Receiving stations use sequence numbers to identify duplicate frames ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Point Coordination Function Ø Ø PCF provides connection-oriented, contention-free service through polling Point coordinator

Point Coordination Function Ø Ø PCF provides connection-oriented, contention-free service through polling Point coordinator (PC) in AP performs PCF Polling table up to implementor CFP repetition interval Ø Determines frequency with which CFP occurs Ø Initiated by beacon frame transmitted by PC in AP Ø Contains CFP and CP Ø During CFP stations may only transmit to respond to a poll from PC or to send ACK ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

PCF Frame Transfer TBTT Contention-free repetition interval SIFS B PIFS SIFS CF End D

PCF Frame Transfer TBTT Contention-free repetition interval SIFS B PIFS SIFS CF End D 2+Ack+ Poll D 1 + Poll Contention period U 2+ ACK U 1+ ACK Reset NAV CF_Max_duration D 1, D 2 = frame sent by point coordinator U 1, U 2 = frame sent by polled station TBTT = target beacon transmission time B = beacon frame ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Frame Types Ø Ø Ø Management frames Ø Station association & disassociation with AP

Frame Types Ø Ø Ø Management frames Ø Station association & disassociation with AP Ø Timing & synchronization Ø Authentication & deauthentication Control frames Ø Handshaking Ø ACKs during data transfer Data frames Ø Data transfer ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Frame Structure MAC header (bytes) 6 6 2 2 Frame Control Duration/ ID Address

Frame Structure MAC header (bytes) 6 6 2 2 Frame Control Duration/ ID Address 1 Address 2 6 0 -2312 4 Address 3 Sequence control Address 4 Frame body CRC Ø MAC Header: 30 bytes Ø Frame Body: 0 -2312 bytes Ø CRC: CCITT-32 4 bytes CRC over MAC header & frame body ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Frame Control (1) MAC header (bytes) 6 6 2 2 Frame Control Duration/ ID

Frame Control (1) MAC header (bytes) 6 6 2 2 Frame Control Duration/ ID Address 1 Address 2 2 2 4 Protocol version Type Subtype 1 6 2 6 0 -2312 4 Address 3 Sequence control Address 4 Frame body CRC 1 1 1 1 To From More Pwr More Retry WEP Rsvd DS DS frag mgt data Protocol version = 0 Type: Management (00), Control (01), Data (10) Subtype within frame type Type=00, subtype=association; Type=01, subtype=ACK Ø More Frag=1 if another fragment of MSDU to follow Ø Ø ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Frame Control (2) 2 Frame Control 2 Duration/ ID 6 Address 1 2 Protocol

Frame Control (2) 2 Frame Control 2 Duration/ ID 6 Address 1 2 Protocol version To From DS DS 6 Address 2 2 4 Type Subtype Address 1 Destination address 0 0 0 1 1 0 BSSID 1 1 Receiver address Address 2 Source address 6 Address 3 1 1 1 6 Address 4 0 -2312 Frame body 1 1 1 4 CRC To From More Pwr More Retry WEP Rsvd DS DS frag mgt data Address 3 Address 4 BSSID N/A Data frame from station to station within a BSS N/A Data frame exiting the DS N/A Data frame destined for the DS Source address WDS frame being distributed from AP to AP Source address Source Destination address Transmitter Destination address BSSID 2 Sequence control Meaning To DS = 1 if frame goes to DS; From DS = 1 if frame exiting DS ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Frame Control (3) MAC header (bytes) 6 6 2 2 Frame Control Duration/ ID

Frame Control (3) MAC header (bytes) 6 6 2 2 Frame Control Duration/ ID Ø Ø Address 1 Address 2 2 2 4 Protocol version Type Subtype 1 6 2 6 0 -2312 4 Address 3 Sequence control Address 4 Frame body CRC 1 1 1 1 To From More Pwr More Retry WEP Rsvd DS DS frag mgt data Retry=1 if mgmt/control frame is a retransmission Power Management used to put station in/out of sleep mode More Data =1 to tell station in power-save mode more data buffered for it at AP WEP=1 if frame body encrypted ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

Physical Layers LLC PDU LLC MAC header MAC SDU MAC layer CRC Physical layer

Physical Layers LLC PDU LLC MAC header MAC SDU MAC layer CRC Physical layer convergence procedure PLCP preamble header Ø PLCP PDU Physical medium dependent Physica layer 802. 11 designed to Ø Support LLC Ø Operate over many physical layers ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang

IEEE 802. 11 Physical Layer Options Frequenc Bit Rate y Band Modulation Scheme 802.

IEEE 802. 11 Physical Layer Options Frequenc Bit Rate y Band Modulation Scheme 802. 11 2. 4 GHz 1 -2 Mbps Frequency-Hopping Spread Spectrum, Direct Sequence Spread Spectrum 802. 11 b 2. 4 GHz 11 Mbps Complementary Code Keying & QPSK 802. 11 g 2. 4 GHz 54 Mbps Orthogonal Frequency Division Multiplexing & CCK for backward compatibility with 802. 11 b 802. 11 a 5 -6 GHz 54 Mbps Orthogonal Frequency Division Multiplexing ECEN 489, Computer & Comm. Wireless Networks Prof. Xi Zhang