710 likes | 931 Views
19: Wireless. Last Modified: 8/31/2014 2:47:30 PM. IEEE 802.11 Wireless LAN. wireless LANs: untethered/mobile networking IEEE 802.11 standard: MAC protocol unlicensed frequency spectrum governed by pre-defined rules vs. restricted allocation
E N D
19: Wireless Last Modified: 8/31/2014 2:47:30 PM 5: DataLink Layer
IEEE 802.11 Wireless LAN • wireless LANs: untethered/mobile networking • IEEE 802.11 standard: • MAC protocol • unlicensed frequency spectrum governed by pre-defined rules vs. restricted allocation • Basic Service Set (BSS) (a.k.a. “cell”) contains: • wireless hosts/stations (STA) • access point (AP): base station • BSS’s combined to form distribution system (DS) and extended service set (ESS) 5: DataLink Layer
IEEE 802.11 Architecture • Distribution system (DS) – backbone network • Access point (AP) – bridge and relay point • Basic service set (BSS) • Stations competing for access to shared wireless medium • Isolated or connected to backbone DS through AP • Extended service set (ESS) • Two or more basic service sets interconnected by DS 5: DataLink Layer
Interesting aspects to 802.11 protocols relative to what we’ve seen already • Both a polling (contention-free) mode and CSMA/CA mode for dealing with contention • CSMA/CA – collision avoidance rather than CD collision detection • Some reliable data transfer aspects including ACKS (unlike Ethernet) 5: DataLink Layer
Distributed vs Centralized • 802.11 working group considered 2 proposals for a MAC algorithm – distributed access and centralized access • Distributed access like CSMA in Ethernet • Decision to transmit distributed across nodes • Makes sense especially for ad hoc network of peer workstations • Centralized access • Decision when to transit controlled by centralized decision maker, like base station/AP • Good when network busy or when some data is higher priority 5: DataLink Layer
Distributed Foundation Wireless MAC • Compromise was Distributed Foundation Wireless MAC (DFWMAC) • Distributed Access control mechanism with an optional centralized control layer on top of that • Distributed Coordination Function (DCF) on top of physical layer • On top of that is optional Point Coordination Function (PCF) that provides contention free service 5: DataLink Layer
Contention Periods/ Contention-Free Periods • The DCF and PCF respectively operate in Contention Periods (CPs) and Contention Free Periods (CFPs) • In CPs, stations compete with each other to win channel access (CSMA( • In CFPs, an Access Point (AP) grants the opportunity of transmission to stations by polling 5: DataLink Layer
Superframes • CPs and CFPs alternate in a superframe • A superframe is an interval between two beacon frame transmissions. • A beacon frame is broadcasted by APs in BSSs or random stations in IBSSs. • It carries management information to the stations. 5: DataLink Layer
IEEE 802.11 MAC TimingPCF Superframe Construction 5: DataLink Layer
Superframe • Point coordinator would lock out asynchronous traffic by issuing polls • Superframe interval defined • During first part of superframe interval, point coordinator polls round-robin to all stations configured for polling • Point coordinator then idles for remainder ofsuperframe • Allowing contention period for asynchronous access • At beginning of superframe, point coordinator may seize control and issue polls for given period • Time varies because of variable frame size issued by responding stations • Rest of superframe available for contention-based access • At end of superframe interval, point coordinator contends for access using PIFS • If idle, point coordinator gains immediate access • Full superframe period follows • If busy, point coordinator must wait for idle to gain access • Results in foreshortened superframe period for next cycle 5: DataLink Layer
Medium Access Control Logic IFS = interframe space Each time fail increase time to wait before send
Interframe Space (IFS) Values • Actually three different IFS values • Short IFS (SIFS) • Shortest IFS • Used for immediate response actions • Point coordination function IFS (PIFS) • Midlength IFS • Used by centralized controller in PCF scheme when using polls • Distributed coordination function IFS (DIFS) • Longest IFS • Used as minimum delay of asynchronous frames contending for access 5: DataLink Layer
Priority • Stations using SIFS have “priority” over others because they will test for idle faster find and then start transmitting • Others that wait longer will find the channel busy when they listen after PIFS or DIFSs 5: DataLink Layer
IFS Usage • SIFS • Acknowledgment (ACK) • Clear to send (CTS) • Poll response( for PCF) • PIFS • Used by centralized controller in issuing polls (for PCF) • Takes precedence over normal contention traffic • DIFS • Used for all ordinary asynchronous traffic 5: DataLink Layer
Polling • Since PIFS smaller than DIFS, coordinator can seize coordinator and lock all traffic ( at least traffic that obeys the rules) while it polls and receives responses • When polling coordinator sends a poll to a station, it can respond using SIFS ( beating the next PIFS and any DIFS) 5: DataLink Layer
Polling • In a CFP, a PC polls the first station in its polling list, and it may also piggyback some data to the polling frame. • The polled station responds either with an ACK or a data frame piggybacked to the ACK frame. • An SIFS separates the polling and responding frames. • Once the frame exchange sequence with the first station is done, the PC waits for a PIFS and then polls another station in its polling list. 5: DataLink Layer
Reliable Data Delivery • More efficient to deal with errors at the MAC level than higher layer (such as TCP) • Transport layer timeouts can take seconds • Two Frame exchange protocol • Source station transmits data • Destination responds with acknowledgment (ACK) • If source doesn’t receive ACK, it retransmits frame • Four frame exchange • Source issues request to send (RTS) • Destination responds with clear to send (CTS) • Source transmits data • Destination responds with ACK 5: DataLink Layer
Clear To Send (CTS) • Station can make it more likely its frame will get though by first sending a small Request to Sent (RTS frame) • The recipient will then reply CTS • Avoids the hidden terminal problem 5: DataLink Layer
Hidden Terminal effect • hidden terminals: A, C cannot hear each other • obstacles, signal attenuation • collisions at B • goal: avoid collisions at B • CSMA/CA: CSMA with Collision Avoidance 5: DataLink Layer
CSMA/CA • DCF uses Carrier Sense Multiple Access (CSMA) • CSMA means listen before you send to make sure the medium is idle • Collision Avoidance (CA) vs Collision Detection (CD) • CD based on listening while you send to make sure you hear only your signal • Wireless HW not made to send and listen at same time • Large dynamic range of possible signals – cannot effectively distinguish incoming weak signals from noise and the effects of its own transmission 5: DataLink Layer
Collision Avoidance: RTS-CTS exchange • CSMA/CA: explicit channel reservation • sender: send short RTS: request to send • receiver: reply with short CTS: clear to send • CTS reserves channel for sender, notifying (possibly hidden) stations 5: DataLink Layer
RTS/CTS optional in a Contention Period • RTS/CTS mechanism is activated when the MAC frame length exceeds an RTS threshold value. • The range of the RTS threshold is from 0 to 2347 bytes. • However, it is usually set for the higher values to avoid the RTS/CTS mechanism being used for small frames, owing to the overhead of the RTS and CTS frames. 5: DataLink Layer
IEEE 802.11 MAC Protocol 802.11 CSMA Protocol: others • NAV: Network Allocation Vector • 802.11 frame has transmission time field • others (hearing data) defer access for NAV time units 5: DataLink Layer
IEEE 802.11 MAC Protocol: CSMA/CA 802.11 CSMA: sender - if sense channel idle for DIFS sec. then transmit entire frame (no collision detection) -ifsense channel busy then binary backoff 802.11 CSMA receiver: if received OK return ACK after SIFS 5: DataLink Layer
Acknowledgements • When station received frame addressed directly to it ( not broadcast or multicast) it replies with an ACK after waiting SIFS • ACKs allow for recovery from collision since no collision detection • Use of SIFS allows for efficient delivery of an LLC data unit that requires multiple MAC frames • Just get SIFS between ACK and then next frame • No one else will gain control of the channel until the entire LLC if over 5: DataLink Layer
802.11 MAC Frame Format All 802.11 when no security features enabled
MAC Frame Fields (1) • Frame Control ( 2 octets): • Type of frame • Control, management, or data • Provides control information • Includes whether frame is to or from DS, fragmentation information, and privacy information • Duration/Connection ID (2 octets): • If used as duration field, indicates time (in s) channel will be allocated for successful transmission of MAC frame • In some control frames, contains association or connection identifier 5: DataLink Layer
MAC Addresses • Addresses: • 48-bit fields • Number and meaning of each address field depend on context • Types include source, destination, transmitting station, and receiving station 5: DataLink Layer
MAC Address format DA: Destination Address, ultimate destination of frame SA: Source Address, original source of frame RA: Receiver Address, current receiver for this hop in a Distribution System (DS) TA: Transmitter Address, current transmitter for this hop in a Distribution System (DS) BSSID: Basic Service Set Identifier for IBSS this is random number generated when LAN is formed 5: DataLink Layer
MAC Frame Fields (2) • Sequence Control ( 2 octets): • 4-bit fragment number subfield • For fragmentation and reassembly • 12-bit sequence number • Number frames between given transmitter and receiver • Frame Body (0-2312 octets): • MSDU (or a fragment of) • LLC PDU or MAC control information • Frame Check Sequence ( 4 octets): • 32-bit cyclic redundancy check 5: DataLink Layer
Frame Control Fields • Protocol version – 802.11 version • Type – control, management, or data • Subtype – identifies function of frame • To DS – 1 if destined for DS • From DS – 1 if leaving DS • More fragments – 1 if fragments follow • Retry – 1 if retransmission of previous frame 5: DataLink Layer
Frame Control Fields • Power management – 1 if transmitting station is in sleep mode • APs know the power management state for connected clients, save frames for them and then periodically announce that have frames waiting • More data – Indicates that station has more data to send • WEP – 1 if wired equivalent protocol is implemented • Order – 1 if any data frame is sent using the Strictly Ordered service 5: DataLink Layer
Management Frames • Used to manage communications between stations and APs • E.g. management of associations • Association requests, association response • Reassociation request and response • Disassociation, authentication, deauthentication • Probe request/probe response • Beacon frame • Timestamp, beacon interval, SSID, TIM… • Announcement traffic indication 5: DataLink Layer
Association • Association Request • sent by a station to an AP to request an association with this BSS • Includes information on capability information such as whether encryption is to be used and whether this station is pollable • Association Response • Returned by the AP to the station to indicate whether it is accepting this association request • Disassociation • Used by station to terminate an association 5: DataLink Layer
Reassociation • Reassociation Request • Sent by a station when it moves from one BSS to another and needs to make an association with the AP in the new BSS • Uses reassociation rather than association so that the new AP knows to negotiate with the old AP for the forwarding of data frames • Reassociation Response • Returned by the AP to the station to indicate whether it is accepting this reassociation request 5: DataLink Layer
Authentication • Authentication • Used to authenticate one station to another in order to set up secure communications • In wired, physical connection implies authority to connect • Various authentication schemes in 802.11 • Deauthentication • Sent by station to another station or AP to indicate that it is terminating secure communications • Invoked when existing authentication is terminated • Privacy • Prevents message contents from being read by unintended recipient 5: DataLink Layer
Other • Probe request /response • Used by station to obtain information from another station or AP • Beacon • Transmitted periodically to allow mobile stations to locate and identify a BSS • Announcement Traffic Indication Message • Sent by mobile station to alert other stations that may have been in low power mode that this station has frames buffered and waiting to be delivered to the station addressed in the frame 5: DataLink Layer
Control Frames Sub Types • Assist in reliable data delivery • Power Save-Poll (PS-Poll) • Sent by any station to station that includes AP • Request AP transmit frame buffered for this station while station in power-saving mode • Request to Send (RTS) • First frame in four-way frame exchange • Clear to Send (CTS) • Second frame in four-way exchange • Acknowledgment (ACK) • Contention-free (CF)-end • Announce the end of a contention free period • CF-end + CF-ack • This frame ends the CFP and releases stations associated with that period 5: DataLink Layer
Data Frame Subtypes • Data-carrying frames • Data – can be sent during Contention Free Period (CFP) or Contention Period (CP) • Only in CFP • Data + CF-Ack ( data plus ack of previously received data) • Data + CF-Poll ( sent by point coordinator deliver data plus request buffered data from station) • Data + CF-Ack + CF-Poll (BOTH) • Other subtypes (don’t carry user data even though they are data type) • Null Function, CF-Ack, CF-Poll, CF-Ack + CF-Poll • Null used only to carry the power management bit in the frame control field to the AP to indicate station is changing to lower power mode 5: DataLink Layer
802.11 Physical Layer Standards 5: DataLink Layer
802.11b was the first, followed by 802.11a ( higher BW, less popular) • 802.11g higher BW, directly compatible with b • 802.11n – even higher BW, backwards compatible with b and g • Others • 802.11ad (Using 2.4 GHz, 5 GHz and 60 GHz, theoretical max throughput of up to 7Gbit/s; 2014?) • 802.11ac (high throughput in the 5 GHz band, 2014?) 5: DataLink Layer
Outtakes 5: DataLink Layer
Original Wired Equivalent Privacy • Included in the security and privacy features of the original 802.11 specification • Unfortunately quite weak in several ways • Does not provide protection from other legitimate users ( equivalent of a wired hub) • Easy to break the encryption even if not a legitimate user 5: DataLink Layer
Progression • Original WEP in 1999 • Longer key WEP • Superseded by WiFi Protected Access (WPA) in 2003 • Then by the full 802.11i security standard (also known as WPA2) in 2004 5: DataLink Layer