Basics of Wi-Fi

Wi-Fi stands for Wireless Fidelity and is used to define any of the IEEE 802.11 wireless standards.It is primarily a local area networking (LAN) technology designed to provide in-building broadband coverage.Current Wi-Fi systems support a peak physical-layer data rate of 54 Mbps and typically provide indoor coverage over a distance of 100 feet.

Wi-Fi – IEEE Standards: The 802.11 standard is defined through several specifications of WLANs. It defines an over-the-air interface between a wireless client and a base station or between two wireless clients.

  • 802.11 − This pertains to wireless LANs and provides 1 – or 2-Mbps transmission in the 2.4-GHz band using either frequency-hopping spread spectrum (FHSS) or direct-sequence spread spectrum (DSSS).
  • 802.11a − This is an extension to 802.11 that pertains to wireless LANs and goes as fast as 54 Mbps in the 5-GHz band. 802.11a employs the orthogonal frequency division multiplexing (OFDM) encoding scheme as opposed to either FHSS or DSSS.
  • 802.11b − The 802.11 high rate WiFi is an extension to 802.11 that pertains to wireless LANs and yields a connection as fast as 11 Mbps transmission (with a fallback to 5.5, 2, and 1 Mbps depending on strength of signal) in the 2.4-GHz band. The 802.11b specification uses only DSSS. Note that 802.11b was actually an amendment to the original 802.11 standard added in 1999 to permit wireless functionality to be analogous to hard-wired Ethernet connections.
  • 802.11g − This pertains to wireless LANs and provides 20+ Mbps in the 2.4-GHz band.

802.11 MAC Frame
The 802.11 MAC frame, as shown in the following figure, consists of a MAC header, the frame body, and a frame check sequence (FCS). The numbers in the following figure represent the number of bytes for each field.

802.11 MAC Frame Format

( )
a). Frame Control Field
:-The Frame Control field, shown in the following figure, contains control information used for defining the type of 802.11 MAC frame and providing information necessary for the following fields to understand how to process the MAC frame. The numbers in the following figure represent the number of bits for each field.

( )
A description of each Frame Control field subfield are as follows:

Protocol Version:- This provides the current version of the 802.11 protocol used.
Type and Subtype:- This determines the function of the frame. There are three different frame type fields: control, data, and management. There are multiple subtype fields for each frame type . Each subtype determines the specific function to perform for its associated frame type.
To DS and From DS:- This indicates whether the frame is going to or exiting from the DS (distributed system), and is only used in data type frames of STAs associated with an AP.
More Fragments:- This indicates whether more fragments of the frame, either data or management type, are to follow.
Retry:- indicates whether or not the frame, for either data or management frame types, is being retransmitted.
Power Management:- This indicates whether the sending STA is in active mode or power-save mode.
More Data:- This indicates to a STA in power-save mode that the AP has more frames to send. It is also used for APs to indicate that additional broadcast/multicast frames are to follow.
WEP:- This indicates whether or not encryption and authentication are used in the frame. It can be set for all data frames and management frames, which have the subtype set to authentication.
Order:- This indicates that all received data frames must be processed in order.

b). Duration/ID Field:- This field is used for all control type frames, except with the subtype of Power Save (PS) Poll, to indicate the remaining duration needed to receive the next frame transmission. When the sub-type is PS Poll, the field contains the association identity (AID) of the transmitting STA.

c). Address Fields:-Depending upon the frame type, the four address fields will contain a combination of the following address types:

  • BSS Identifier (BSSID)
  • Destination Address (DA) 
  • Source Address (SA)
  • Receiver Address (RA)
  • Transmitter Address (TA)

d). Sequence Control:- The Sequence Control field contains two subfields, Fragment Number field(4 bits) and Sequence Number field(12 bits).
e). Frame Body:- The frame body contains the data or information included in either management type or data type frames.
f). Frame Check Sequence:- The transmitting STA uses a cyclic redundancy check (CRC) over all the fields of the MAC header and the frame body field to generate the FCS value. The receiving STA then uses the same CRC calculation to determine its own value of the FCS field to verify whether or not any errors occurred in the frame during the transmission.

Note-  Wi-Fi uses CSMA-CA, not CSMA-CD because Wi-Fi devices have no way of detecting collisions, they can't send and receive at the same time (a wireless network operates at half-duplex).