当前位置:网站首页>我们是如何连上WiFi的?
我们是如何连上WiFi的?
2022-06-11 09:14:00 【小老虎_IOT】
0、我们是如何连上WiFi的——没毛病的回答
- 打开WiFi开关;
- 选择要加入的WiFi,输入密码;
- 点击连接;
1、我们是如何连上WiFi的
- 扫描SSID;
- 认证;
- 关联;
1.1、扫描SSID
SSID就是WiFi的名称,扫描SSID就是发现WiFi的过程,分为主动扫描和被动扫描;
- 主动扫描:STA在全部信道上发送Probe Request 帧,收到Probe Request 帧的AP会响应Probe Response,从而发现SSID;
- 被动扫描:AP以大约100ms的间隔发送Beacon帧,其中就包含SSID的信息,STA监听每个信道的Beacon帧从而得到SSID;
被动扫描是依靠AP发送Beacon帧,Beacon帧是有间隔的,甚至可以设置比100ms还长;
主动扫描,收到Probe Request 帧的AP就会响应Probe Response,所以主动扫描比较快;
实际上,主动扫描和被动扫描是混合着用的,比如在1信道上发送 Probe Request 帧的时候,也可以接收1信道上的Beacon帧,1信道探测完毕之后再切换2信道,循环直到测完全部信道;
1.1.1、信道
WiFi有2.4G和5G等频段,2.4G频段的范围是2.400GHz-2.497GHz;
每20MHz划分为一个信道,一共14个信道,中国只用1~13信道;
从图中可以看出,各信道之间可能有重叠,但如果间隔使用比如1、6、11是相互独立的;

1.1.2、Beacon帧(信标帧)
【Wi-Fi 802.11协议】管理帧 之 Beacon帧详解_小海贼~的博客-CSDN博客_beacon帧
这篇把Beacon帧说的很详细了,我只截取一张图说明Beacon帧中包含的信息;

1.1.3、Probe Request帧(探测帧)
SSID字段
- 如果SSID为空,则信道上所有AP收到探测帧后都会响应;
- 如果SSID是特定的WiFi名称,则只有这个AP才响应;

1.1.4、Probe Responset帧(探测响应帧)
返回的信息有SSID、Rates、Channel等;
与上图Beacon帧发送的信息比较,发现很多字段都有;

1.2、认证
认证就相当于输入WiFi密码,不是知道SSID的STA都可以接入你的WiFi,分为:
- 共享密钥认证(已淘汰);
- 开放系统认证:WPA/WPA2/WPA3,又分为家庭版和企业版Personal、Enterprise,我们常用的就是WPA/WPA2-Personal加密方式;
认证阶段,需要STA向AP发送Authentication(身份认证)帧,AP如果验证成功返回一个Authentication帧;
1.3、关联
在认证之后,并不等于加入了WiFi网络,是有权限加入这个AP;
因为一个AP往往要被多个STA接入,要区分各STA,才知道进入AP的数据要知道传给哪个STA,比如利用MAC地址关联;
- Association Request 帧:在链路认证之后使用的帧,请求加入到Wi-Fi网络;
- Association Response帧:关联成功后发送,包含Association ID(关联标识符);
1.4、解除认证
Deauthentication帧:在STA退出或者切换WiFi的时候使用,用来终结一段认证关系,包含了退出的原因代码。
边栏推荐
- Talk about reading the source code
- Openstack explanation (24) -- registration of neutron service
- 报错Output image is bigger(1228800B) than maximum frame size specified in properties(1048576B)
- Typescript -- preliminary study of variable declaration
- 【芯片方案】红外人体测温仪方案设计
- OpenSSL usage
- 剑指 Offer II 041. 滑动窗口的平均值
- PCBA方案定制,开发腕式血压计方案
- [ERP system] how much do you know about the professional and technical evaluation?
- Use of MSF evaluation module
猜你喜欢

报错RuntimeError: BlobReader error: The version of imported blob doesn‘t match graph_transformer
![[image processing] spatial domain image enhancement](/img/d9/6afee1006570651ccf93ed8da95dd3.png)
[image processing] spatial domain image enhancement

Exclusive interview - dialogue on open source Zhai Jia: excellent open source projects should be seen by more people. I am honored to participate in them

Shandong University project training (IV) -- wechat applet scans web QR code to realize web login

Openstack explanation (XXIII) -- other configurations, database initialization and service startup of neutron

Don't use redis list to implement message queue. Stream is designed for queues

Use of MSF evaluation module

The difference and relation between machine learning and statistics

Type-C扩展坞自适应供电专利维权案例

OpenCV CEO教你用OAK(五):基于OAK-D和DepthAI的反欺骗人脸识别系统
随机推荐
市场上的服装ERP体系到底是哪些类型?
The mobile terminal page uses REM for adaptation
服装ERP:企业如何进行施行规划?
Method (common method), method execution memory analysis, method overloading mechanism, method recursion
Detailed explanation of the difference between construction method and method
OpenCV CEO教你用OAK(五):基于OAK-D和DepthAI的反欺骗人脸识别系统
PD chip ga670-10 for OTG while charging
制作业信息化为什么难施行?
Flask (VI) - template
A summary of the problem type and method for proving the limit of sequence in postgraduate entrance examination
Fabric.js 動態設置字號大小
Ecological co construction | 2021 streamnational excellent partner of the year comes out!
[software] ERP model selection method for large enterprises
Flask (VII) - static file
Day44 database
Where is it safer to open an account for soda ash futures? How much do you need to buy at least?
Day45 storage engine data type integer floating point character type date type enumeration and set type constraints table to table relationships
Résumé de la méthode d'examen des mathématiques
Development of PCBA circuit board for small oxygen generator
PCBA方案定制,开发腕式血压计方案