Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

Wi-Fi Protocol: Networking, Frame Formats, Security, Attributes

Submitted By: 

Abhimanyu Mathur



Wireless Fidelity, more known by its short form Wi-Fi, is a digital communications protocol, through which gadgets can communicate with each other in a unicast or a broadcasting manner without using any wires. The idea of fast speed wireless LAN originated when the United States Federal Communications Council, a communication agency of the US government, decided in the year 1985 to utilize a few bands of wireless spectrum without subjecting them to a license fee.  Following this, the IEEE committee for 802 standards which manages networking protocols among electronic devices, formed an extension 802.11 which would work on the wireless mode. This committee was founded in the year 1990 and was headed by Victor Hayes, Father of Wi-Fi. Taking on the license free bands (now being termed as ISM bands) and collaborating with networking giants such as Nokia, Motorola etc, the committee introduced WLAN legacy of Wi-Fi in the year 1997. The hype created by the standard was so high that many manufacturers had already started shipping gadgets with the standard before the standard became official.


In order to maintain the QoS, services with the electronic gadgets being produced, Wireless Ethernet Compatibility Association (WECA) was set up in the year 1999 and in the year 2002, its name got changed to Wi-Fi alliance. This trade organization is responsible for testing the gadgets that claims to fulfill the criteria of Wi-Fi based networking.  Started by a few communication based companies like Nokia, Motorola, Alcatel, the association now has more than 500 networking giants that are involved in testing, sponsoring and working of the alliance. The alliance owns the Wi-Fi trademark and only those devices that comply with Wi-Fi standards, can get the trademark printed or engraved on their gadget.  It is now regarded as a high speed wireless transmission of Ethernet services that is enabling smart communicate gadgets connect to each other and the internet.

Being a wireless protocol, Wi-Fi standard uses the ISM (Industrial, Scientific and Medical) band of frequency which are free to use and require no licensing. Launched in 2.4GHz with transmission rates of 1-2mbps, Wi-Fi now works at 5GHz frequency also with astounding data transmission rates reaching upto 54mbps at both frequencies.

Wi-Fi is a marketing term applied to 802.11b IEEE standard, but it now ubiquitously used for all the standards that fall under 802.11 category of Wireless LAN. So, Wi-Fi defines 802.11 x standards where x is the respective Wi-Fi version.  Popular Wi-Fi version are a, b, g and n.

The term “Wi-Fi” was added only to make the standard more common and rhyming with “hifi”, it was later that “wireless fidelity” took the full form of this term.

A basic necessity in almost every type of computer, Wi-Fi, has now been ventured into various consumer appliances making them “smart” enough to connect to the internet or stream media wirelessly. Hence, from being a need for smart computing gadgets like smartphone or gaming consoles, Wi-Fi now being implemented in automobiles and industries.

Wi-Fi is based on OSI protocol and uses the physical layer and MAC sub0-layer of the Data Link Layer. The other layers have been left undefined so that the manufacturer is able to customize it as per the requirements of the gadget.


Why 802.11 WLAN?

Idea of establishing wireless networking systems was not originated with the 802.11 standards. There have been previous partially successful attempts through ALOHA, slotted ALOHA, ARDIS, Ricochet etc. wireless networking systems. However, all of them lacked throughput efficiency (output per unit time)when compared to Ethernet and fast Ethernet systems. Moreover, security was also a major concern that restricted these systems to go at higher levels where large co-operations or defense forces would adopt them. 802.11 was launched with data transmission speeds of 1-2mbps with the QoS factor being maintained. Hence, it was widely accepted for home as well as industrial networking purposes all over the world.


Bluetooth v/s Wi-Fi

Bluetooth and Wi-Fi both stand as wireless communication protocols and even share some frequencies under the ISM band. However, significant numbers of differences are there between these two technologies in terms of range, power consumption, applications etc. Maximum operating range for Bluetooth is 10m while that for Wi-Fi is around 100m.Bluetooth provides easy pairing up between devices and consume less power but tradeoffs are made in terms of security and data exchange speeds. On the other hand, Wi-Fi set-ups are complicated and consumer higher amount of power but are secure and provide higher data exchange speeds.


Communication in Wi-Fi

Data exchange in Wi-Fi can be summarized into three phases:

Communication in Wi-Fi

Fig. 1: Block Diagram Explaining Data Commnication in Wi-Fii Network

Phase I: Where data is prepared for transmission; it is encoded; changed into frames (digital signals are sent in frames for better QoS). The frequency for data transmission is also chosen depending upon the technique used to send the signals wirelessly.

Phase II: Where data is transmitted with air as the medium of wave transmission

Phase III: Where data is received, decoded, acknowledged and then used.

All of these phases apply some of the popular digital communications spread spectrum techniques for signal multiplexing (FHSS, Infrared, OFDM etc.), make use of security methods (WEP, WPA). Let’s find out the technical insides of the Wi-Fi legacy.


OSI Model for Wi-Fi

Technical Intricacies

For a user, Wi-Fi appears to be a wireless form of Ethernet, but it is a fairly different technology. Deriving its working strategy from the OSI model, Wi-Fi uses various data exchange techniques, security measures, network topologies that make it a well strategized wireless network.  Since its inception, there have been numerous changes in the 802.11 standard. Let’s start with the features that were there when the legacy had just begun. OSI Model and WLAN

Wireless LAN uses physical layer and MAC sub-layer (of data link layer) of the OSI model. The physical layer takes care of the wireless data exchange and the MAC layer synchronizes the transmission of data.

Wi-Fi OSI Layers

Fig. 2: Block Image Showing Various Layers and Sub-Layers of Wi-Fi Network

PHYSICAL Layer in 802.11

Defined in the 2.4 and 5GHz spectrum, Wi-Fi standard has been designed to be enough robust against the interfering frequencies by other electronic gadgets such as microwave ovens, cordless telephones etc. Also, the data transmission speeds were to be maintained high along with maintaining the data safety features. Fulfilling these conditions were three wireless data exchange schemes adopted by physical layer in 802.11: Infrared, Frequency Hopping Spread Spectrum Technique and Direct Sequence Spread Spectrum Technique. Out of these techniques, infrared was soon eliminated due to range limitations. Information about how other techniques work can be fetched here. DSSS technique works well in low to high interferences while FHSS can take care of high interference signals. DSSS technique uses a Barker code (pre-determined sequence made by +1 and -1 only) sequence in order to encode the data to be transmitted. The new code generated is decoded using the same barker sequence.

In 802.11, Physical Layer can be divided into two sub-layers: Physical Layer Convergence Procedure(PLCP) and Physical Medium Dependent (PMD) Protocol.  PLCP layer either analyzes the data packets received or prepares them to be sent across the radio channel. PMD layer’s task is to demodulate the packets received or modulate the data packets before they are sent over the channel.

Additions to the Physical Layer

Initial spread spectrum techniques of FHSS and DSSS sufficed for transmission speeds up-to 1-2mbps but were incapable at higher ones. IEEE then further provided more modulation techniques that were able to provide higher data rates. Complementary Code Keying (CCK) data modulation technique is been included in the IEEE standard update for a, b and above versions. CCK technique uses 64 code words of 8bit which are mathematically unique and are easily distinguishable at receiver end. Using CCK technique increased the data transmission rates to 5.5 and 11mbps, respectively. Further, inclusions of techniques such as OFDM and MIMO-OFDM have increased the speed to 54mbps and more.

It has been the modifications in the physical layers that have been responsible for various versions of Wi-Fi as shown in the graphic below:

Wi-Fi Frequency

 Fig. 3: Graphic Image of Various Versions of Wi-Fi

MAC Layer

Medium Access Layer’s task is to ensure reliability in data transmission which it can manage using two utilities: Distributed Coordinated Function and Point Coordinated Function.

Distributed Coordinated Function

This is a mandatory method used in 802.11standard and utilizes Carrier Sense Multiple Sense with Collision Avoidance (CSMA-CA) technique. CSMA technique is deployed to make the source confirm first that whether channel is free to transmit data or not. It is a contingent (subject to chance) technique which ideally lets only one source transmit over a channel at a particular period of time, thus avoiding signal collision and its consequent re-transmission.  After a frame is sent, the transmission in channel ceases for certain time called inter-frame space (IFS). During this period, sources can whether channel is occupied or not. In case, multiple channels are to transmit at the same time, a priority algorithm is applied so that transmission conflict gets avoided. To aid the stations in determining the time for which channel would be occupied, a network allocation vector (NAV) is used. This vector suggests the time for which current data transmission is taking place and when a source can check the channel again to send data.

Handshaking Process: Whenever a source has to transmit data, it sends a Request-to –send (RTS) frame to the receiver which is followed by a clear-to-send (CTS) frame by receiver. The CTS frame is broadcasted and other sources ready to transmit data start running a back off algorithm so as to suspend their signal transmission on the channel for random amount of time. The receiver sends an ACK (acknowledge) frame to the transmitter after the whole signal is received.

Carrier Sensing: When 802.11 standard applies the CSMA-CA technique, it senses the carrier at two levels: the MAC sub0layer and the air interface. Carrier sensing at latter is termed as physical carrier sensing while for the former, it is known as virtual carrier sensing. Physical carrier sensing analyzes the total number of 802.11 based stations present while virtual carrier sensing is applied by source to convey how long it would be utilized the channel when it has to transmit.

Point Coordination Function (PCF)

It is a contingent-free optional technique that uses a polling method through round robin or priority based algorithms. This function requires a point coordinator, whose function is to divide time in such a manner that all the information sources are able to transmit information at different time intervals. Working in a synchronous manner, PCF divides time into super frame, using which the sources can transmit. PCF mandatorily requires presence of a point coordinator unit along with providing a time-bound distributed data service.

On the other hand, DCF doesn’t require a point coordinator, thus sources can connect to each other without needing a mediator.


Wi-Fi  Architecture and Network Topology

Fig. 4: Overview of How MAC Layer uses Distributed and Point Coordinated Function

Architecture and Network Topology

Wi-Fi Architecture and Network Topology      

Wi-Fi Network

Fig. 5: Wi-Fi Architecture and Network Topology

When two or more gadgets (stations or STA) are connected to each other through Wi-Fi, they form a basic service set (BSS) and the area that devices connected in a BSS are covering is termed as Basic Service Area (BSA). A BSA can extend up-to tens of meters inside with BSS units can communicate in a fully fledged manner. Interestingly, two or more BSS can be collocated with the same BSA and will still not interfere into each other’s working. This is possible through ad-hoc networking. Under ad-hoc networking, the stations are specifically connected to the one they want to communicate with. Ad-hoc mode of networking is temporary and stations connected under it can be disbanded whenever the user wants.

When one BSS has to communicate with the other, a service called Access Point is added to the BSS. Through Access Point, a wireless distribution system (WDS) gets created which connects two or more BSS. Interconnection of multiple BSS’s is termed as Extended Service Set (ESS). It is through an ESS that users of the wireless system can connect to a wired system like internet or an Ethernet network. Aiding ESS in this connection is portal which is placed on the borders of the distribution system.

Wi-Fi Framing

In Wi-Fi technology, three types of frame have been protocoled: management frames, control frames and data frames.

Type of Frame

Prime Responsibility


Management Frame (MAC protocol Data Unit)

       1. Connection and disconnection of  STA with AP,


Assosiation Request
    Assosiation Response
    Reassosiation Request
    Reassosiation Response
    Probe request
    Probe Response
    Announcement Traffic Indication Message(ATIM)

Control Frame

           1Assist with delivery of data frame.

 2 Provide unicast frame acknowledgements.


 Power Save(PS) Poll
    Request to Send (RTS)
    Clear to send (CTS)
    Contention-Free(CF)-End (PCF only)
    CF-End+CF-ACK (PCF only)
    Black Ack Request(HCF)

Data Frame

1.  Carry actual data that is passed from higher layer protocols.

Data+CF-Ack (PCF only)
Data+CF-Poll (PCF only)
Data+CF-Ack+CF-Poll (PCF only)
Null data (no data transmitted)
CF-Ack (no data transmitted) (PCF only)
CF-Poll (no data transmitted) (PCF only)
Data+CF-Ack+CF-Poll (PCF only)
Qos Data (HCF)
Qos Null (No Data) (HCF)
QosData+CF-Ack (HCF)
 QosData+CF-Poll (HCF)
 QosData+CF-Ack+CF-Poll (HCF)
Qos CF-ACK+CF-Poll (HCF)

Frame format in MAC

WLAN Frame Format

Fig. 6: MAC Frame Format in Wi-Fi Network

Preamble: It is first part of the PLCP header and It indicates to the receiver that it is about to receive data. This aids in receiver identifying beginning of signal reception and synchronize frame transmission. A preamble is of two types:

Long Preamble: Compatible with the 802.11 legacy, long preamble takes 192micro seconds for transmission. Hence, majority of the Wi-Fi routers and adapters are pre-configured for long preamble reception.

Short Preamble: Not compatible with the 802.11 legacy yet, short preamble takes 96 micro seconds for transmission. It is incorporated in the new standards which are at developmental stages.

Preamble is dependent on the physical layer and consists of two parts:

Synch: this is 80 bit long sequence implemented by physical layer to choose the destination and synchronize data transmission and reception frequency.

Start Frame Delimiter: It is 16 bit digital code which aids the receiver in deciding frame timing.

PLCP Header: Aforementioned, PLCP layer consists of functions to code or decode the logical information (data packets) transmitted or received. The PLCP header consists of three parts:

PLCP_PDU Length Word: Contains information about totally bytes contained in data packet, hence helping the receiver to determine end of the frame.

PLCP Signaling Field: Details with the data rate i.e. rate at which message is transmitted.

Header Error Check: This is a 16bit field which applies CRC check as an error detection technique.

MAC Header: MAC header details about frame control, duration, addressing, sequence control etc. Let’s understand all the fields in a standard MAC header.

{C1.      Frame Control: It is 16 bit field under which following are specified:

·       The version of the protocol (a, b, g, n etc.)

·         Type of frame: management (00), data(10) or control(01).

·         Sub-type of the frame sent.

·         To DS and From DS indicate signal transmission from BSS to DS and DS to BSS, respectively. 

·        More Frag: In cases of large message transmission, packet fragmentation takes place. This fragmentation is indicated by more frag field.

·        Retry: Some frames might require re-transmission from time to time and through retry field, the receiver is able to filter off duplicate frames from those which are sent on purpose.

·       Power Management:  This field indicates whether the transmitter would be in active state or power saving state after transmission of message.

·         More Data: When a station is in power save mode, a high bit on this field indicates it that more frames are ready to be transmitted to it from AP.

·         WEP Field: This field indicates the security measures on the frame, and goes high when data is encrypted or encoded.

{C}2.      Frame Duration: A 16 bit long field, field duration is used in multiple ways: (a) to indicate the duration of the frame sent using network allocation vector; (b)carrying the ID of the station that has transmitted the data (used when control frames are transmitted)

}3.     Address fields: The quadruple of address fields  along with To DS and From DS field of frame control, form the following combination of data transmission:



From DS



Address 3

Address 4




Destination Address

Source Address



Data Frame from station to station within a BSS



Destination Address


Source address


Data Frame Exiting the DSS




Source address

Destination Address


Data frame designed for DS



Receiver Address

Transmitter address

Destination Address

Source Address

WDS frame being distributed from AP to AP

DS: Distributed System

AP: Access point

WDS: Wireless Distribution system






4. Sequence Control Mode: as the name suggests, this field is responsible for managing the sequence with which frames are transmitted and received. It makes sure that there are no disturbances in the frame sequence by providing number to each sequence of information. 

Post MAC header fields

Following the MAC header are the frame body and CRC field. Frame body contains the information as indicated by the frame type and sub-type field and CRC field gives a cycling redundancy check to the MAC header and the frame body, thus minimizing errors in the transmission of the frames.


Security, Services and Applications

Security in Wi-Fi

Upon its inception and earlier days, Wi-Fi was rendered to be insecure in terms of data privacy and allegations were made that data transmitted over Wi-Fi can be easily compromised while in transmission. Since then, next to perfect security measures have been applied in securing a Wi-Fi network.  Two major Wi-Fi security standards are widely popular: Wireless Equivalent Privacy (WEP) and Wi-Fi Protected Access (WPA).

1.      WEP: WEP was introduced as the default security protocol when the Wi-Fi legacy was introduced. It uses a secret key of 40 or 104 bits to encrypt and decrypt the data. WEP is based on a symmetric cipher pattern known as RC4. After the Wi-Fi legacy was released, researchers found that more than 50% of the secret keys were similar in the pattern. Various security analysis tools invaded the WEP based systems to deocde the information before it could reach the destinations. Hence, invariance weakness factor discouraged the use of Wi-Fi systems and for almost 7 years after WEP adoption, several privacy attacks on Wi-Fi attacks headlined out.

2.     WPA: Failure of WEP based security led to development of Wi-Fi Protected Access (WPA) which added authentication to WEP encryption techniques. WPA was launched in two modes: pre-shared version which was suitable for household tasks and an enterprise version which was suited for enterprises. WPA provides different encryption key to all the packets transmitted in a Wi-Fi network.

WPA was, however, not safe to denial of service attacks and required a complicated set-up for both the modes.

3.  WPA-2: Currently, WPA2 handles the security in Wi-Fi networks. Based on a 128-bit Advanced Encryption Standard, WPA-2 introduces CCMP encryption technique, thus eliminating RC4 encryption. CCMP stands for Counter Cipher Mode with Block Chaining Message Authentication Code Protocol which protects the confidentiality of data field as well few header fields.  An upgrade to the WPA security, WPA-2 uses same 128 bit encryption key size and applies a separate encryption code for each frame which is sent across.


The graphic below shows various Wi-Fi versions as an accumulative result in changes in physical, security, MAC etc crucial fields.

Various Wi-Fi Versions

Fig. 7: Graphic Figure Showing Modified Wi-Fi Versions due to Changes in Various FIelds

Services and Attributes of Wi-Fi

The 802.11 protocol of Wi-Fi defines 5 services:

{C}1.      Association: A BSS is able to establish connection with an access point. The access point can then further associate with other access points, thus forming an extended service set.

{C2.     Re-association: Here, a BSS which is already communicating through an access point can get associated with other access point when in movement without disruption in service.

3.      Disassociation: A message indicating an already established connection between a BSS and access point to be terminated.

{C4.    Authentication: Avoiding insecure connection to any access point by applying identification techniques or handshaking methods.

{C5.      Privacy: The contents of a message sent by a transmitter are only decoded by the respective receiver, thus assuring privacy of the network.

Wi-Fi was designed with keeping an eye upon the Ethernet based LAN, hence a lot of features in terms of connectivity, message broadcasting, capacity were same. Being a wireless connectivity solution, Wi-Fi has a unique set of attributes to fulfill:

1.      High Throughput: With a limited bandwidth wireless signals are transmitted over the channel. Hence, it becomes utterly necessary for the network to give high throughput.

2.      Backbone Connectivity: Generally, Wireless Networks connect to a wired network (for instance Ethernet), making it necessary for Wi-Fi to have strong backbone connectivity.

3.     Power Considerations: A controlled usage of power would enable battery operated wireless stations such as laptops or mobiles phones to be operated over the Wi-Fi for a significantly longer duration.

4.      Roaming: Wireless Station should be easily able to retain service within the prescribed area.

5.     Dynamic:  A Wi-Fi system, be it ad hoc or infrastructure based, should work with constant good service when new stations are added or removed from it.

6.      Licensing: Any gadget working in the ISM band for data communication needs to get verified by the Wi-Fi alliance.


Wi-Fi Applications:

There has never been a limit to the extent at which Wi-Fi has been utilized at household, enterprise and industrial levels. Starting connecting with computers for connected over Wireless LAN; Wi-Fi is now being used for streaming multimedia over devices. Extra sized HD movies now be streamed from a computer to Wi-Fi enabled television. Gaming consoles now connect to the Wi-Fi router giving a real-time gaming environment to the user where he can group play with users all over the world that are connected through the network.


Wireless connectivity through this 802.11 standard is making computers in a large enterprise connect to each other with a fair radius of mobility. The worker can now move in all over the campus or sit in Campus Park with his portable station, doing the same task which he does at his desk.