Hello!
Today we're going to take a look at the basic basics of wireless networking. First of all, I would like to note that wireless networks are not limited to Wi-Fi. Any method of transmitting information without using "wires" is wireless. These are a smart watch with Bluetooth, a remote temperature sensor from a weather station, and even a TV remote control. All these devices have in common that they do not need wires to transmit information. On the one hand, this makes them more convenient to use because you don’t need to drill holes in the walls and lay wires everywhere. On the other hand, the use of electromagnetic signals "in the air" (infrared light in the TV remote control is also an electromagnetic wave in some way) brings additional problems.
Benefits of wireless networks
Mobility. If you use a radio, there is no need to sit near the wall with an outlet. Workstations can be located where it is convenient for workers. At the same time, system administrators do not need to connect patch cords to each computer when they are rearranging and moving.
Ability to connect a relatively large number of devices in a room without installing additional switches in it. This is especially true if you have rooms with several doors that need to be “bypassed” when laying a twisted pair cable. And adding a new workplace will not lead to the fact that all network outlets are already occupied and you need to install an additional switch in the room.
Ability to connect devices that do not have wired network interfaces, such as small laptops, tablets and smartphones.
Disadvantages of wireless networks
Slower connection speed. Actually, this is a relative term, because Wi-Fi 6 can provide speeds up to 9.6 Gbps at 5 GHz and up to 1.15 Gbps at 2.4 GHz. But to achive this you need the appropriate terminals with powerful wireless networking capabilities. Also keep in mind that this maximum speed will be shared among all clients of the access point.
High cost of equipment. This is especially true for high-speed solutions. On the one hand, ordinary office "stationary" computers do not have wireless interfaces, on the other hand, most of the laptops, tablets and smartphones already have built-in Wi-Fi adapters.
As we use the entire environment for the transmission of information, security is reduced. Transmitted signals can be easily intercepted and distorted, and in some cases even faked.
The need for complex radio planning when deploying a wireless network with several wireless access points. If you put one access point in the same room, then it will most likely be able to work, but if you need to use several access points close to each other, for example, to organize seamless wireless coverage of the entire office, then you have to take care of so that they do not interfere with each other. Along the way, you will have to take into account other sources of radio interference, the degree of weakening of the radio signal from passing through obstacles and other points (for example, you still have to take into account "foreign" wireless networks).
Wi-Fi
Next, we will talk about Wi-Fi networks. These are wireless networks based on the IEEE 802.11 standards. Technologies are evolves and new knowledge and skills are constantly emerging to improve networking. In "wired" Ethernet, we see this by the growth of the connection speed from 10 Mbps to 100 Gbps. Wireless networks are also evolving, increasing their speed and security. Traditionally, the versions of the standards on which a wireless network operates were designated by letters after its number: 802.11a, 802.11b, 802.11g, 802.11ac, and so on. But with the arrival of 802.11ax, the Wi-Fi Alliance, which is responsible for equipment standardization, decided to change the names of generations of Wi-Fi standards to more understandable ones. This is how we got Wi-Fi 4 instead of 802.11n, Wi-Fi 5 instead of 802.11ac and Wi-Fi 6 instead of 802.11ax. In my opinion, it has become much better.
A bit of physics
There are two main bands available for Wi-Fi networks, which can be called "2.4 GHz" and "5 GHz". In the first, in most cases there are 13 channels of 5 MHz, in the second, different options are possible depending on the country, but there are much more channels available for use in this range. Devices operating in the "2.4 GHz" band are cheaper and work stably at a greater distance than "5 GHz" ones. But the latter can work at a higher speed. Both 2.4 GHz and 5 GHz are the frequencies of radio waves, that is, wave-like oscillations of the electromagnetic field. They are usually depicted as sinusoids.

Sinusoidal representation of an electromagnetic wave
An electromagnetic wave has an amplitude (A) - how much it rises up and down from zero level. The second important characteristic of a wave is its length (L). Wavelength is the distance that the wave travels in one beat, that is, in one full rise and fall.
Lets take a close look at this graph. On the one hand, this is a graph of the change in the strength of the electric field (its density) depending on the distance from a certain point, for example, on the left we will have a transmitting antenna, then if we simultaneously fix the strength of the electric field (like to take a picture of it), then it will increase and then fall depending on the distance to the antenna. The electromagnetic field will behave like waves from a stone thrown into the water - the height of the water level changes with the distance to the place where the stone falls. In this case, we can easily determine the wavelength by simply measuring it.
On the other hand, we can think of this graph as a graph of the change in the electric field strength at the same point (for example, in the receiving antenna) with changing of the time. Imagine a stick stuck in the bottom of a pond where waves are traveling. The water rises, covering most of the stick, then descends, exposing it. It takes some time, if we calculate how much time passes between the stick closes with water as much as possible, then we find out the "wave period", that is, the time during which the wave goes through a full cycle of its change. Usually we operate with another parameter, which is calculated from the period of the wave - its frequency. The frequency of a wave is the number of times a wave oscillates in one second. It is very easy to calculate it knowing the wave period - you need to divide “1” by it.
Let's go back to our electromagnetic wave. It "takes off" from the antenna at a speed of about 300,000 km/s. Knowing this speed, we can calculate its frequency by knowing the wavelength, and, conversely, the wavelength, if we know its frequency.
Wavelength = Wave speed / Wave frequency Wave frequency = Wave speed / Wavelength
2.4 GHz means that the electric field strength changes 2.4 * 109 times per second. And 5 GHz - 5 * 109 times per second. In this case, the wavelength will be 300,000,000 / (2.4 * 109) = 0.125 m, that is, 12.5 cm (for 2.4 GHz), and 0.06 m, that is, 6 cm (for 5 GHz).
A very important property of electromagnetic fields is the principle of superposition of fields. It determines that at any point in space there can be a multitude of electromagnetic fields at the same time, in contrast to "solid" matter. This means that an electromagnetic wave can pass in the same place where there are already other electromagnetic waves and they will not displace each other. But when we measure the strength of the electric field, we will measure the sum of the strengths of all electric fields at this point. Moreover, when summing up, the negative tension will be subtracted from the total amount (algebraic amount).
To encode information, a change in the amplitude, a phase shift of the transmitted signal and a change in its frequency can be used. This means that it matters how high the sinusoid rises at its maximum, how much its "origin" is displaced from "zero" and how often the wave comes thru zero value. In the picture above, it starts at the very origin, but no one forbids it to start not from zero. Take a look at the next two sinusoids. One of them "starts" later than the other - this is the phase shift.

Phase shift between two sinusoids
I will not go into details of how the data is encoded at the physical layer. Let's better consider several aspects of superimposing waves on top of each other. Take a look at the image below. Blue and green waves are signals from two antennas, which are transmitted on the same frequency. When they reach the receiver together, the values of their amplitudes that the antenna can pick up are summarized - this is shown in the red graph.

Addition of radio waves with different phase shifts
The left part shows waves whose phases are shifted by a quarter of a period. This case is called orthogonal and is used when encoding information in Wi-Fi. Its peculiarity lies in the fact that when one of the waves reaches its maximum or minimum, the second is always at zero. This allows you to calculate the amplitudes of the two waves if they are different.
A very bad case is shown in the middle - the waves arrive "in antiphase" - when one is at a maximum, the second is at a minimum. Thus, they "absorb" each other. When our antenna receives such a weak signal, it will be much more difficult for it to amplify it and retain its original shape (in order to decode the transmitted data).
On the right - signals shifted by almost half the wavelength. It can be seen that their sum turns out to be less amplitude than the original signals, but much better than the middle example.
To improve the quality of the wireless network, it is better to transmit signals so that they come from different antennas to the client in the same phase - in this case, they will amplify each other and improve reception. If the access point transmits signals so that they come to the client in antiphase, it will not be able to decrypt anything even if it is located in the zone of ideal communication quality.
Influence of external factors
In the real world, our wireless network is likely to operate in the midst of other wireless connections. It's your neighbors' Wi-Fi, your smart speaker's Bluetooth, and poor microwave shielding. They all emit radio waves in approximately the same range. This is due to legal restrictions. There are several bands of radio waves in which you can broadcast radio without obtaining additional permits, which is what manufacturers of wireless equipment use. Since these ranges are not endless, and everyone needs their own "piece" to transfer data, situations arise when "foreign" wireless networks interfere with ours.

An abundance of wireless networks
The higher the signal level of a foreign network, the more its signals will distort the signals of your network. If the "foreing sinusoid" "dangles" around zero, then it can be ignored, but if it is close in amplitude to yours (or even more), then "foreign" (or even "alien") signals will have a significant impact on the quality of your network. To make the wireless network work better, one should try to choose a less congested part of the spectrum (channel) for it. It is not only the one with fewer visible wireless networks, but also the one in which wireless networks are used less extensively.
Let's say our wireless network uses the same frequencies as our neighbors' wireless network. In this case, when we need to transmit something, we will have to wait until all our devices finish their transmissions, and the all neighboring ones, because several simultaneous data transmissions on the same frequency in the same place will distort the transmitted data. That is, if two devices simultaneously transmit data on the same frequency, then their receiver will not be able to understand what data is intended for it. The radio waves will stack with each other (remember the superposition of fields?), And the resulting waveform cannot be correctly recognized. In order to prevent several devices from transmitting data at the same time, Wi-Fi has special mechanisms for determining who can transmit data and when. Let me remind you again that there is much more room in the 5 GHz band than in the 2.4 GHz band, so it is easier to find free frequencies in it.

Changing the received signal
The green wave is a transmission in our network that we need to receive. Blue is the transmission in a foreign network. Red is what happened in the end. As you can see, the amplitude has changed and the phase of the wave has shifted. As a result, the data will not be decrypted and will have to be transferred again.
Logical organization of Wi-Fi networks
When connecting to a Wi-Fi network, we open the list of wireless networks, and then select the network we need in it. In this list, we see the service set identifier (SSID) values that the access points transmit. At the same time, the access point is not obliged to "publish" its SSID, that is, SSID can be "hidden". In this case, you will not see it in the list of networks.

List of wireless networks with signal strength
The SSID is the symbolic "network name" for the user. Without it, it would not be convenient for us, because completely different identifiers for networks are used a little deeper. These are Basic Service Set Identifier (BSSID). We don't usually see them, but every Wi-Fi network has them. They are needed to identify the access point. The SSID identifies the network, and the BSSID is the access point within that network. Basically, the BSSID is the low-level MAC address of an access point inside a specific wireless network. If an access point supports multiple wireless networks, then each network will have its own BSSID. If the device is connected to a wireless access point, then data transmission will occur through this access point, that is, all packets will first be sent to the BSSID addressee, and then, if necessary, the access point will send them to another wireless client.
Frame types in Wi-Fi networks
Wi-Fi wireless networks use three types of frames that are exchanged between clients and the access point:
Management. These frames are used to connect and disconnect wireless clients.
Control. These frames are used to control wireless data transmission, carry commands for orchestrating wireless clients - who, when and how long will transmit data, requests for transmission and acknowledgment of receipt.
Data. These frames are used for data transfer. (surprise!)
When a wireless client connects to a network, it uses management frames to get a list of available networks and communicate with the access point to join it. The client then "gets the right" to access the control frames. If it is necessary to transfer data, it transmits such a frame to the access point and waits for a confirmation of the permission to transfer from it. When the permission comes, it says how long we can transfer data. All other wireless clients read this information as well. And they do this in order to know how much longer they themselves should not transmit anything. Because as soon as they start the transfer themselves, they "spoil" the data of the client who is currently transferring it.
How multiple wireless networks work next to each other
Let's go back to the channels again. When we set up a wireless network, we choose a channel for it on which it will work. The selected channel becomes the center of the radio spectrum occupied by your wireless network. In fact, it occupies radio frequencies two channels earlier and two channels later (I'm now talking about the narrowest networks with a width of 20 MHz, for 40, 80 and 160 MHz, the logic changes slightly - additional channels of 20 MHz are added to them).

Example of using all 2.4 GHz channels by three networks
Here is an example of using three networks that will interfere with each other as little as it possible. They start at channels 1, 6 and 11. An additional space is also left between them, one more channel wide (on the graph, intersections of areas are visible in these places). This channel scheme (1, 6, 11) began its existence at the time of the first Wi-Fi standard for 2.4 GHz – IEEE 802.11b. In it, the minimum bandwidth for the network was not 20 MHz, but 22 MHz, so these "pauses" were necessary. In the case of more modern standards, you can try using a different non-overlapping channel scheme: 1, 5, 9, 13. This scheme will only work if you can use channel 13 (it is not available in the US and on some devices). Don't forget that you can still interfere with each other with your neighbors if you use different channel patterns.
As we can see, there is very little room in the 2.4 GHz band. Therefore, most likely your network will share channels with another (s) network. When we get to the phase of resigning ourselves to this fact, then we have to figure out which channels are better to choose for our network. In doing so, we need to take into account the following factors:
The stronger the signal of someone else's network, the more it can interfere with us. If the signal of someone else's network is weak, then it may be possible to filter it out.
The more networks are in the same frequency range, the more they interfere with each other, because each access point transmits service signals from time to time. In addition, the likelihood that at least someone device in any network will transmit data increases, and therefore will take the radio air.
Some networks are actively used, some are not. It is possible that some networks will be used mainly at certain times, for example, home networks in the evening, and office networks during working hours.
For the transmission of small portions of traffic, narrower parts of the spectrum can be used, and the more data is transmitted, the greater the channel width will be occupied by them.
For analysis, we can find out the utilization of channels using a radio scanner, for example, the inSSIDer program.

An example of utilisation of the Wi-Fi channels
Channel utilization is the fraction of radio channel resources that are currently occupied. If it is not very large, then new devices have a chance of comfortable operation in this channel, if the utilization is high, then it is better to avoid this channel. Let's not forget that utilisation will be different at different times.
Seamless wireless networks
When building a wireless network over a large area, there are problems with the fact that one access point is not able to provide access to the network wherever it is needed. Then additional access points are added to the network. Together they provide the required signal level wherever it is required.
In order for us to walk throughout the office and not lose connection, access points are positioned in such a way that their coverage areas intersect with each other. This allows wireless clients to change the access point they are connected to while remaining on the same wireless network. That is, the client changes the BSSID, but does not change the SSID.

Crossing the coverage areas of three access points
Wi-Fi network security
Security is an area of expertise that developers of new technologies do not immediately pay attention to. Therefore, the old ways of protecting wireless networks can now be compared to glass walls in a bath - what they are, what they are not, it still turns out to be sheer pornography.
As we recall, Wi-Fi uses radio waves to transmit information. These radio waves have a wonderful ability to travel in space in different directions and pass through walls. This allows us to use fewer access points to connect wireless terminals over a larger area. At the same time, it allows attackers to penetrate our network, being at some distance from it. Moreover, the attacker has the opportunity to do the following dirty tricks:
Intercept the transmitted information, read it.
Connect to a wireless network and start working in it as a legal client. That is, to gain access to someone else's network.
Arrange sabotage. For example, disconnect all wireless clients from the network or block its operation.
Standard Wi-Fi Security
Consider how the Wi-Fi developers offer us to protect our networks. Let's start with the simplest - a completely open network. No passwords, no encryption. Anyone can connect to the network (if their MAC address is not blacklisted and the access point is not overloaded), anyone can receive all traffic unencrypted. In the modern world, such networks are still used in public places, but authorization through a web portal is added to them. But this does not add any protection to the transmitted information. Authorization in this case is only needed to attach the traffic with you.
The second method of protection is optimistically called Wire Equivalent Privacy (WEP). Basically, if you plug your cable into a hub somewhere where anyone can connect to it, then the security level of your network will be equivalent to WEP. You don't need to use it, but you need to pay tribute to it.
After WEP came Wi-Fi Protected Access (WPA). It was marked by an increase in protection. But if you have a choice - stop it on a newer protection protocol.
Since 2004, we have been able to use WPA2 to secure our networks. This is quite a long time ago and I assume that all of your devices have WPA2 support. Until Wi-Fi 6 takes the lead, WPA2 should be your security advisor.
If you are lucky enough to have access to WPA3 that works for you, use it.
The newer the protection technology, the more reliable it is. Each time when developing a new protection standard, developers take into account the reasonableness of its complication. If it takes 10 years to crack it, then it is already reliable enough for home use. But computer technology is developing very rapidly, and it is not always possible to predict what can be hacked using an ordinary computer in 10 years.
Home networks, as a rule, are protected by passwords - entered it and connected to the network. In a corporate wireless network, we have the ability to use certificate files and RADIUS servers for this purpose. On top of that, in this case we can use stronger encryption.



