编程辅导 IEEE 802.11

Chapter 4 WiFi Basics
WiFi, which stands for “Wireless Fidelity”, is one of the most widely used wireless networking technology today with millions of them deployed in our homes and workplaces. WiFi is also increasingly available in many indoor and outdoor public places such as airports, shopping malls, parks and university campuses. All personal mobile devices, such as smartphones, tablets, and laptops are fitted with WiFi interfaces, making them very easy to be connected to such networks wherever they are available. In most cases, WiFi is available for free to use or at least there is no limit imposed on the volume of data for paid subscriptions, making it the most desired option to get connected to the Internet. WiFi has gone through many years of developments and upgrades over the last decade, resulting in increased level of complexity adopted in its recent standards. This chapter will explain the basic features and functions of the WiFi technology, while the more advanced versions will be examined at later chapters.
4.1 WiFi vs. IEEE 802.11
Both IEEE 802.11 and WiFi basically refer to wireless LANs. There is however a subtle difference between them. 802.11 is an IEEE standard for wireless LANs. Unfortunately, to satisfy a large number of different vendors contributing to the standardization process, 802.11 specification comes with many different options to implement. This raises a practical interoperability issue if different vendors choose to implement different options of the same 802.11 standard.

Copyright By PowCoder代写 加微信 powcoder

To overcome the potential interoperability problem of 802.11, an industry alliance was formed, called Wireless Fidelity or WiFi Alliance. This alliance commits to a selected set of options that all members will implement, essentially guaranteeing the ultimate interoperability that was envisaged by IEEE 802.11. Now, any product displaying the WiFi logo is guaranteed to work with any other product displaying the same, irrespective of who manufactures them. With WiFi, wireless LAN now has its “fidelity”, i.e., its ability to work with others. Note that the display of the WiFi icon, i.e., a small radar symbol, when trying to connect a device to a WiFi network is not about certifying the WiFi product, but to basically indicate that the device is connected to WiFi. Figure 4.1 shows the difference between WiFi logo and WiFi icon. Details of WiFi can be found from wi-fi.org, while IEEE 802.11 details are available from ieee.org.
© , Wireless and Mobile Networking, 2022, CRC Press

Figure 4.1 WiFi Logo (left) vs. WiFi Icon (right)
4.2 IEEE Standards Numbering System
IEEE has a peculiar numbering system for all its standards. Anyone trying to follow the IEEE standards for wireless LANs must be familiar with this numbering system.
In early 1980s, a group was formed called 802, which defined logical link control (802.2), bridging and management (802.1) and security (802.10) functionalities for communication networks. Later, many different types of wired and wireless networks were formed and numbered starting from 802.3, such as Ethernet (802.3), WiFi (802.11), and so on. All these networks starting from 802.3 onwards, are defined by the same link control, bridging, management, and security standards. Consequently, IEEE 802.11 follows 802.1 and 802.2. The hierarchy of the numbering system is shown in Figure 4.2
Figure 4.2: Hierarchy of IEEE 802 numbering system
Standards with letters appended after an 802 standard applies only to that particular 802 networks, but not others. For example, 802.11i will apply to WiFi devices, but not Ethernet (802.3) devices.
When letters are appended, they can be either lower case or upper case. Lower case letters represent temporary or interim revisions (also called “amendments”), which will eventually disappear before merging with a standard with an uppercase letter. Standards with upper case letters are permanent and are called “base standards”. For example, IEEE 802.1w-2001 was merged with IEEE 802.1D-2004. Standards were originally numbered sequentially, such as 802.1a, …, 802.1z, 802.1aa, 802.1ab, and so on. Now
© , Wireless and Mobile Networking, 2022, CRC Press

base standard letters are being shown during the amendments, such as IEEE 802.1Qau- 2010, where Q is the base standard and au is the amendment.
It is interesting to note that while IEEE uses letters to refer to different versions of the technology, WiFi Alliance has recently opted to use numbers to name the WiFi versions. For example, WiFi 4 refers to IEEE 802.11n, 5 refers to 802.11ac and so on. Table 4.1 shows the WiFi Alliance numbers and their corresponding IEEE standards.
Table 4.1 Wi numbers and their corresponding IEEE Standards
WiFi Alliance Number WiFi 4
4.3 IEEE 802.11 Features
IEEE Standard 802.11n 802.11ac 802.11ax 802.11be
The original 802.11 standard in 1997 specified only 1 and 2 Mbps. Newer versions offered successively higher speeds at 11 Mbps, 54 Mbps, 108 Mbps, 200 Mbps, and so on. All these versions were specified for “license-exempt” or “license-free” spectrum, i.e., spectrum which we are not required to license by law.
When the spectrum is license-exempt, a technology is required to prevent spectrum hogging. 802.11 employs spread spectrum techniques at the physical layer to solve the hogging problem. More specifically, for the Industrial, Scientific, and Medical (ISM) bands, it uses either Direct Sequence (DS) spread spectrum or Frequency Hopping spread spectrum. 802.11 specifies a third physical layer called Diffused Infrared to be used with the infrared band in 850-900nm.
802.11 supports multiple priorities to deliver both time-critical, such as voice, and data traffic over the same LAN infrastructure. It also supports power management, which enables nodes to go to sleep mode when there is no traffic to conserve power.
4.4 ISM Bands
The license-exempt spectrum to be used by wireless LANs is called the Industrial, Scientific, and Medical (ISM) band. As shown in Table 4.2, there are many different available ISM bands of varying bandwidth [ITU2018]. The bands available in the lower frequency has understandably smaller bandwidth whereas increasing bandwidth is available at higher frequency ISM bands. For example, the 6.765 MHz band has only 30 kHz bandwidth whereas a massive 150 MHz bandwidth is available at 5.725 GHz.
The original WiFi started with the 2.4 GHz band. However, 2.4 GHz was already in use by a large variety of products such as medical equipment, microwave, garage door openers and so on. When the WiFi usage started to grow, 2.4 GHz became saturated, prompting the opening of a new WiFi band at 5.725 GHz, which is simply referred to as 5 GHz band. Most recent WiFi routers can operate over both bands, hence they are marketed as “dual band” routers. In recent years, many more bands have been released to support new types of WiFi, which are listed in Table 4.3.
© , Wireless and Mobile Networking, 2022, CRC Press

Table 4.2 ISM Bands Bandwidth
30kHz 14kHz 326kHz 40kHz 1.74MHz 26MHz 100MHz 150MHz 250MHz 500MHz 1GHz 2GHz
Table 4.3 WiFi bands
Frequency Range 6.765MHz – 6.795MHz 13.553MHz -13.567MHz 26.957MHz – 27.283MHz 40.660MHz – 40.700MHz 433.050MHz – 434.790MHz 902MHz – 928MHz
2.4GHz – 2.5GHz
5.725GHz – 5.875GHz 24.000GHz – 24.250GHz 61GHz – 61.5GHz
122GHz – 123GHz
244GHz – 246GHz
WiFi Standard
802.11b/g/n
802.11a/n/ac/ax
802.11p (car-to-car)
802.11ah (IoT)
802.11af (Rural)
802.11ad/ay (Multi Gbps wireless applications: e.g., cable replacement, VR, …)
4.5 IEEE 802.11 Channels
Frequency Band
6 GHz (not confirmed yet) 5.9 GHz (licensed band) 900 MHz
700 MHz (unused TV channels)
The WiFi bands are divided into separate channels to facilitate better management of congestion when multiple wireless LANs operate in close proximity. Two different LANs then can simply choose to operate in two different channels of the same band and yet avoid collisions and interference from each other. It should be noted that an AP and any WiFi devices connected to it operate over a single channel, the channel that is selected by the AP at any given time.
Each channel is usually 20 or 22 MHz wide. WiFi operating in the 2.4 GHz band uses 22 MHz channels, while 5 GHz band uses 20 MHz channels. With newer WiFi versions, it is possible to combine two or more channels to get a wider channel for higher data rates.
2.4 GHz WiFi has a total of 14 channels although not all channels are available in all countries. Table 4.4 lists the lower, center, and upper frequencies for these 14 channels. As can be seen, each channel is 22 MHz wide while their center frequencies are 5 MHz apart from each other with the exception of channel 14. Table 4.4 also shows that with 20-MHz, only a small number of non-overlapping channels are possible. Specifically,
© , Wireless and Mobile Networking, 2022, CRC Press

for 2.4 GHz WiFi, we can choose from 3 available non overlapping channels numbered as 1, 6, and 11. Most WiFi routers select channel 6 as default.
In contrast to 2.4 GHz, 5 GHz WiFi has 20 MHz non-overlapping channels. 5 GHz uses two types of channels. One type of channels is always available, while the others are actually shared with radars using a Dynamic Frequency Selection (DFS) algorithm. With DFS, 5 GHz WiFi APs monitor radar channels and immediately vacate them, i.e., switch to another channel, if radar is detected in the operating channel. User devices connected to such radar channels then will also need to switch to the new channel, which may cause momentary connection drop.
Table 4.4 Channel frequencies for 2.4 GHz WiFi
Channel Number
Lower Frequency (MHz)
Center Frequency (MHz)
Upper Frequency (MHz)
4.6 Physical Layers
The physical layer technology directly affects the data rate achievable with WiFi. In the first version defined in 1997, spread spectrum was used to achieve only 1 and 2 Mbps, which was soon proved to be too slow for the emerging LAN applications. Two years later, in 1999, an advanced version of spread spectrum was introduced for 2.4 GHz, while OFDM was introduced for the 5-GHz band to increase the data rate to 54 Mbps. In 2003, OFDM was also successfully used in 2.4 GHz to achieve 54 Mbps channels, which was named 802.11g. OFDM has proved so successful that it still defines the physical layer standard for today’s WiFi.
4.7 Hidden Node Problem
Unlike wired LAN (Ethernet), Wireless LAN suffers from a specific collision detection problem called hidden node problem. Let’s consider the three wireless nodes, A, B, and C, as shown in Figure 4.3. Let us assume that A can hear B, B can hear C, but C cannot
© , Wireless and Mobile Networking, 2022, CRC Press

hear A. Now, C may start transmitting to B while A is also transmitting to B. Clearly, collisions will be experienced at B, making it difficult for B to understand either of the communications. Unfortunately, the transmitters A and C cannot detect the collision. Only the receiver, B, can detect it. Therefore, unlike Ethernet, where transmitters can detect collision and back off, wireless LAN must implement some other techniques that can avoid such collisions in the first place. Wireless LANs therefore use collision avoidance (CA) in contrast to collision detection (CD) used in Ethernet.
Figure 4.3 Hidden node problem in 802.11.
4.8 Collision Avoidance with 4-way Handshake
In wireless LAN, CA is achieved by a 4-way handshake process as shown in Figure 4.4. Essentially, four packets are transmitted for each data packet, i.e., three control packets are needed to avoid collision for each data packet transmitted.
The 4-way handshake begins with the transmitter first transmitting a ready-to-send (RTS) packet. If the receiver receives it and wishes to allow the transmitter to go ahead, then it will transmit a clear-to-send (CTS) packet. The transmitter sends the data packet only if and when it receives the CTS, which avoids collision with other potential transmitters as they defer their transmissions upon hearing the CTS. Finally, the receiver transmits an acknowledgment to confirm the correct reception of the data packet from the transmitter. This procedure needs to be repeated for each data packet.
Although it may sound like too much overhead to avoid collision, the actual overhead of the 4-way handshake has to be analyzed more carefully. The RTS and CTS packets are very short lasting only a few microseconds. The data packets, on the other hand, are long lasting, tens to hundreds of milliseconds depending on the speed of the network. Thus, avoiding collision of a long data packet with tiny RTS/CTS packets is worth the effort.
© , Wireless and Mobile Networking, 2022, CRC Press

Access Point
Mobile Node
Figure 4.4 4-way handshake using RTS/CTS to avoid collision in 802.11
4.9 IEEE 802.11 Medium Access Control (MAC)
To completely realize the medium access control (MAC), the 4-way handshake must work in conjunction with the carrier sense multiple access (CSMA) function. CSMA basically says that a wireless node must first listen the channel before even attempting the 4-way handshake and backoff for a random period if it finds the channel busy. The 4-way handshake is launched only if the channel was found idle.
The RTS and CTS packets contain the duration of the data packet, which allows other nodes who hear the CTS to stay away from attempting channel sensing. Finally, to achieve reliability, the transmitter must retransmit the data packet if it does not receive the ACK from the receiver.
4.9.1 IEEE 802.11 Priorities
Wireless LAN has different priorities for control and data packets. These priorities are achieved by enforcing different amounts of interframe space (IFS) as shown in Figure 4.5. After the channel busy period ends, the RTS, CTS, and ACK packets can be transmitted by waiting only a short IFS (SIFS), but medium priority time-critical frames, such as those used for periodic channel reservation in Point Coordination Function (PCF) mode, will have to wait slightly longer than SIFS. Finally, the data frames, which use Distributed Coordination Function (DCF), will wait a bit more before attempting transmission.
© , Wireless and Mobile Networking, 2022, CRC Press
Ready to send (RTS)
Clear to send (CTS)

Carrier Sensed
Random Slots
Figure 4.5 Inter-frame spacing and priorities in 802.11
4.9.2 Time Critical Services
The wireless LAN base station uses the PCF to achieve a contention-free period (CFP) to allow transmission of data from time-critical services. The base station periodically transmits a beacon and then using a polling frame grants one node to access the channel without any contention. During the CFP, no other nodes will attempt access to the channel. The duration of CFP will vary with the load of the time critical data. The channel will be opened for contention as soon as the PCF ends. Thus, the channel access alternates between PCF and DCF, which is shown in Figure 4.6.
PCF Access
Super Frame
Contention-Free Period
Contention Period
DCF Access
Figure 4.6 Time critical services using the PCF function. DCF follows PCF.
4.9.3 IEEE 802.11 DCF Backoff
For effective sharing of the channel with many users, DCF uses a sophisticated backoff mechanism to prevent a node from hogging the channel. Each node maintains a FIFO (first in first out) queue to store the data packets to be transmitted. For transmitting the head of the queue, the node implements the DCF backoff mechanism, which requires three variables, Contention Window (CW), Backoff Count (BO), and Network Allocation Vector (NAV), to be maintained.
If a frame (RTS, CTS, Data, Ack) is heard, NAV is set to the duration in that frame. Nodes are allowed to sense the media only after NAV expires. NAV therefore is basically a timer that prevents a node from even sensing the channel if the node has explicit knowledge about the future busy time of the channel.
If the medium is idle for DIFS, and backoff (BO) is not already active, the node draws a random BO in [0, CW] and sets the backoff timer. The node can only start transmission if the channel continues to be idle during this backoff time. If the medium becomes busy during backoff, the timer is paused, and a new NAV is set. After NAV,
© , Wireless and Mobile Networking, 2022, CRC Press

i.e., when the channel becomes idle again, the back off continues from the previous BO value.
Because collisions can still occur after transmission, each transmitted packet is acknowledged by the receiver. DCF backoff time increases exponentially with successive failed (unsuccessful) transmission attempts, i.e., when no ACK is received, to make it more effective during heavy load. Initially and after each successful transmission (ACK is received), it sets CW = CWmin. Then after each unsuccessful attempt: CW = min{2CW + 1, CWmax}. It should be noted that CW is in units of slot time, which varies with 802.11 standards as shown in Table 4.5. We also have PIFS = SIFS+1 slot time and DIFS = SIFS + 2 slot time.
Table 4.5 Slot time and MAC parameters for WiFi standards
11n (2.4 GHz) 11n (5 GHz) 11ac
Example 4.1
Slot-time (μs)
9 or 20 9 or 20 9
CWmin CWmax
15 1023 31 1023 15 or 31 1023
Assume that we have CWmin=3 and CWmax=127 configured for a given WLAN. What would be the values of CW if there were 8 successive unsuccessful attempts after initalizing the network?
After initialization, CW = CWmin = 3
After 1st unsuccessful attempt, CW = min(7,127) = 7 After 2nd unsuccessful attempt, CW = min(15,127) = 15 Then on, 31, 63, 127, 127, 127, …
© , Wireless and Mobile Networking, 2022, CRC Press

Example 4.2
What is the duration of PIFS and DIFS for IEEE 802.11b?
Slot time = 20 μs
SIFS = 10 μs
PIFS = SIFS + slot time = 10+20 = 30 μs DIFS = SIFS + 2 x slot time = 10 + 40 = 50 μs
4.9.5 Virtual Carrier Sense
Continuous carrier sensing for a prolonged period of time can drain the batteries of wireless nodes. To avoid unnecessary carrier sensing, WiFi uses virtual carrier sensing using the NAV parameter. This is possible because every frame has a Duration ID field which indicates how long the medium will be busy for transmitting this frame. Table 4.6 shows how this duration is calculated for different types of frames.
Frame Type RTS
CTS Frame Ack
Table 4.6 Durations for different types of frames Duration
RTS + SIF + CTS + SIF + Frame + SIF + Ack
CTS + SIF + Frame + SIF + Ack Frame + SIF +
Once a node hears a frame, it sets a NAV timer for the Duration ID of the frame and can go to sleep for conserving its battery. No physical carrier sensing is done during this period. The node wakes up after the NAV period to start sensing again.
Example 4.3:
Consider an 802.11b WLAN. A station estimates the transmission times of RTS, CTS, and ACK as 10 μs, 10 μs, and 25 μs, respectively. What would be the value of the Duration field in the RTS header if the station wants to send a 250 μs long data frame?
802.11b has a SIFS duration of 10 μs.
Duration field in RTS = RTS_time + CTS_time + ACK_time + data_time

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com