First, WiFi-related basic concepts
1. What is WiFi
Let's take a look at how Baidu Encyclopedia is defined:
Wi-Fi is a technology that can connect computers, handheld devices (such as pads, mobile phones) wirelessly to each other, in fact a high-frequency wireless signal . [1] Wireless is really a wireless network communication technology brand, held by the Wi-Fi Alliance. The aim is to improve interoperability among wireless network products based on the IEEE 802.11 standard. a local area network using the IEEE 802.11 series protocol is referred to as wireless Fidelity . Even the wireless fidelity is equivalent to the wireless internet (Wi-fi is an important part of the WLAN ).
WiFi English full name is wireless-fidelity, translated into Chinese is wireless Fidelity , English abbreviation for wifi.
2. What is WLAN
Full name of Wireless LAN:Wireless Local area Networks: WLAN. It is a very convenient data transmission system that uses radio frequency (Radio Frequency; rf) technology, using electromagnetic waves to replace the local network of old-fashioned twisted-pair copper wire (Coaxial), which communicates in the air , the emergence of this technology is not to replace the cable LAN, but to make up for the shortcomings of the LAN network, in order to achieve the purpose of network extension, so that the wireless local area network can use a simple access architecture to enable users through it, without network cable, no distance restriction of unobstructed network.
In fact, many times, people will mix the two, in fact, WiFi is a technology to achieve WLAN (Bluetooth, WiMAX, etc.);
3, wireless network vs wired Network
There are a number of drawbacks to wireless networks compared to wired networks:
* Communication between the two parties because of communication through the wireless, so the communication needs to establish a connection, and the cable network directly connected with a cable, not the process.
* Communication between the two sides is half-duplex communication mode, while the wired network can be full-duplex.
* Communication in the network layer below the probability of error is very high, so the retransmission probability of the frame is very large, need to be under the network layer of Protocol to add retransmission mechanism (not only rely on the TCP/IP delay wait for retransmission and other costs to ensure), and wired network error probability is very small, do not need to have such a complex network layer mechanism
* Data is carried out in a wireless environment, so it is very easy to grab packets, there is a security risk.
* Because of the wireless signal, so the power consumption is a test for the battery.
* Relatively low throughput compared to wired network, this is gradually improving, the 802.11N protocol can reach 600Mbps throughput.
Ii. IEEE 802.11 protocol
The IEEE802 protocol is a bit large, and here are just some of the concepts:
The protocols used by Ethenet and WiFi are part of the IEEE 802 protocol set . Among them,Ethenet is the protocol below the network layer with the 802.3 protocol , while WiFi 802.11 is the protocol below its network layer . Whether it is a wired network, or a wireless network, its network layer above the section, basically the same.
1, 802.11 introduction
The IEEE802 family is comprised of a range of local area network (NETWORK,LAN) technical specifications, 802.11 of which belong to one of the members. Although Wi-Fi uses 802.11 of the media access Control layer (MAC) and Physical layer (PHY), the two are not exactly the same.
The members of the IEEE802.11 protocol family are as follows:
802.11 basic specifications cover the 802.11 MAC and two physical layers (physical layer): One is frequency hopping (frequency-hopping spread-spectrum, FHSS) Physical layer, the other is the direct sequence of the exhibition frequency (Direct-sequence Spread-spectrum, referred to as DSSS) physical layer. The physical layer of 802.11a is mainly based on orthogonal crossover and multi-work (orthogonal frequency Division multiplexing, OFDM) technology. 802.11 further divides PHY into two constituent components: one is the physical layer convergence Program (physical layer convergenceprocedure, referred to as PLCP), is responsible for the MAC frame mapping to the transmission medium The other is the actual collocation medium physical Medium Dependent, referred to as PMD), is responsible for transmitting these frames.
2, 802.11b
IEEE802.11B is a standard for wireless LANs. Its carrier frequency is 2.4GHz and the transmission speed is 11mbit/s. IEEE802.11B is the most famous and popular standard in all Wireless LAN standards. It is also sometimes mistakenly marked as Wi-Fi. In fact , Wi-Fi is a trademark of the Wireless LAN Consortium (Wlana), which only guarantees that the products that use the trade mark can co-operate with each other, and that the standard itself does not actually matter . A total of 14 channels with a bandwidth of 22MHz are available in the 2.4-ghz-ism band. The successor standard of IEEE802.11B is ieee802.11g and its transmission speed is 54mbit/s.
3.802.11 network contains four main entity originals
A-workstation (station)
Electronic devices with wireless network access (notebooks, handheld devices, etc.).
B--base station (Access Point)
802.11 the frames used by the network must be converted to be transmitted to other different types of networks, and devices with wireless-to-cable bridging capabilities are called base stations (Access Point,ap). In addition, the base station has other functions.
C--Wireless media (Wireless Medium)
The 802.11 standard transmits frames between workstations with wireless media (Wireless medium). There is more than one physical layer defined.
D--Transmission system (distribution systems)
A transmission system is a backbone network of transfer frames between base stations, often referred to as backbone networks (backbone network) when several base stations are concatenated to cover large areas, they must communicate with each other before they can master the mobile workstations
Whereabouts. The transmission system (distribution system) is a logical component of 802.11 and is responsible for forwarding frames to the destination. Most commercial products consist of a bridge engine (bridging) and a transmission system medium (distribution system medium) to form a transmission system.
4, 802.11 mode of Operation
802.11 defines two types of devices, one wireless station, usually a PC machine plus a wireless network interface card, and another called a wireless access point (AP), Its role is to provide bridging between wireless and wired networks. A wireless access point is usually composed of a wireless outlet and a wired network interface (802.3 interface), bridging software conforms to the 802.1D bridging protocol. An access point is like a wireless base station in a wireless network that aggregates multiple wireless access points into a wired network. A wireless terminal can be a 802.11PCMCIA card, a PCI interface, an Isa interface, or an embedded device (such as a 802.11 mobile phone) on a non-computer terminal.
The 802.11 data link layer is comprised of two layers, the Logical Link Layer LLC ( Logic Link Control), and the media controls layer Mac (medium Access Control). 802.11 uses the same LLC layer as 802.2 and the 48-bit MAC address in the 802 protocol, which makes bridging between wireless and wired very convenient. But the MAC address is unique to the wireless LAN only .
The 802.11 mac is very similar to the 802.3 protocol Mac, which supports multiple users sharing resources on top of a shared media, where the sender makes network availability before sending the data. In the 802.3 protocol, the adjustment is done by a protocol called CSMA/CD (Carrier sense multiple Access with collision Detection) . This protocol solves the problem of how the various workstations on the Ethernet are transmitted over the wire, using it to detect and avoid collisions on the network when two or more network devices require data transfer. In the 802.11 Wireless LAN protocol, there are some problems in the detection of the conflict, which is called "Near/far" phenomenon, because the device must be able to transmit the data signal while accepting the data signal, which cannot be done in the wireless system.
Third, WiFi related knowledge advanced
1. Spectrum Division
WiFi has a total of 14 channels, as shown in:
1) IEEE 802.11B/G Standard operates in the 2.4G band with a frequency range of 2.400-2.4835ghz and a total of 83.5M bandwidth
2) divided into 14 sub-channels
3) 22MHz per sub-channel width
4) Center frequency interval of adjacent channel 5MHz
5) Multiple adjacent channels exist frequency overlap (such as 1 channels with 2, 3, 4, 5 channels have frequency overlap)
6) only 3 (1, 6, 11) channels are not interfering with each other in the entire frequency band
2. SSID and BSSID
1) Basic Service Set (BSS)
The basic service set is the basic component of the 802.11 LAN. The STA that can communicate with each other wirelessly can form a BSS (Basic Service Set). If a station moves out of the BSS coverage, it will no longer be able to communicate with other members of the BSS.
2) Extended Service Set (ESS)
Multiple BSS can form an extended network, called an extended Service set (ESS) network, where the STA within an ESS network can communicate with each other, and is a larger virtual BSS formed with multiple BSS with the same SSID. The components that connect BSS are called Distributed Systems (distribution System,ds).
3) SSID
The identity of the service set, all STA and APS within the same SS must have the same SSID, otherwise they cannot communicate
The SSID is an ESS network identifier (for example: tp_link_1201),Bssid is a BSS identity, BSSID is actually the MAC address of the AP, used to identify the BSS managed by the AP, BSSID and SSID one by one mappings within the same AP . The SSID is the same within an ESS, but it is not the same for each AP within the ESS as it corresponds to the bssid. If an AP can support multiple SSIDs at the same time, the AP assigns different bssid to correspond to these SSIDs.
BSSID (MAC) <---->SSID
3. Three stages of the wireless access process
STA (workstation) initiates initialization, starts to formally use the AP to transmit the data frame, has to pass through three stages to be able to access (the 802.11MAC layer is responsible for the communication between the client and the AP, features including scanning, access, authentication, encryption, roaming and synchronization, etc.):
1) scanning phase (scan)
2) certification phase (authentication)
3) Association (Association)
4. WiFi-Composition structure
Generally set up wireless network is the basic equipment is a wireless card and an AP, so that it can be wireless mode, with the existing wired architecture to share network resources, the cost and complexity is much lower than the traditional cable network. If it is just a few computers peer network, but also do not have the AP, only need each computer equipped with a wireless card. APs are referred to as access point abbreviations and are generally translated as "wireless access points," or "Bridges." It is mainly in the media access control layer Mac plays the wireless workstation and the cable local area Network Bridge. With APS, like the hub of a wired network in general, wireless workstations can be quickly and easily connected to the network. Especially for the use of broadband, wireless fidelity more advantages, Wired broadband network (ADSL, cell LAN, etc.) to the user, connect to an AP, and then install a wireless network card in the computer. The average family has an AP that is enough, and even after the user's neighborhood is authorized, there is no need to add ports and can also surf the internet in a shared way.
WiFi Drive Development under Linux (i)--wifi basic knowledge analysis