一、获取追踪
因为我们不具备捕获802.11帧的能力,所以直接下载官方提供的包
数据包下载链接如下: http://gaia.cs.umass.edu/wireshark-labs/wireshark-traces.zip
解压缩后,直接双击打开Wireshark_802_11.pcap,如下图
二、分析追踪
查看帧的格式。如上图,有许多不同种类的802.11帧被捕获,例如Beacon、Data、Acknowledgement。选择一个数据包进行分析,这里选择了Beacon帧。
Beacon帧,信标帧,由AP以一定的时间间隔周期性发出,以此来告诉外界自己无线网络的存在。
1、Frame:
由wireshark添加的记录,包含有关帧的时间和长度的信息
2、Radiotap header:
也是由 Wireshark 创建的记录,用于捕获物理层参数,如信号强度和调制。
3、802.11 radio information:
应该是通过header(物理层信息)解析出来的信息。显示的与信号强度相关的信息。例如信噪比、信道、速率等。
4、IEEE 802.11:
是 802.11 数据帧的位,包含24个字节。包含以下内容:
①帧控制字段:编码帧的类型和子类型,例如,数据,以及各种标志。
展开帧控制字段:所有 802.11 帧都以帧控制字段开始,子字段和标志的详细信息决定了消息其余部分的格式。
•Version,当前版本的值为 0。
•类型和子类型指定帧的类型,例如,Data 或 Ack。
•到 DS。如果帧通过 AP 从计算机发送到有线网络,则设置此标志。
•从 DS 发送。如果帧通过 AP 从有线网络发送到计算机,则设置此标志。
•更多的片段。设置此消息中是否有更多帧。
•重试。设置帧是否为重传。
•电源管理。设置发送方是否在传输后进入省电休眠状态。
•更多数据。设置发送方是否有更多帧要发送。
•保护。设置帧是否使用 WEP/WPA2 加密
•秩序。设置接收者是否必须保持帧的顺序。
②持续时间:告诉计算机在无线介质上需要多少时间来处理作为交换一部分的附加数据包。
③BSS标识符、源地址和目的地址:其顺序取决于数据帧的具体内容 。这些地址字段标识谁发送了数据包,谁应该接收它。BSS 标识符是无线接入点的地址。
④片段和序列号:如果需要,这些 字段为重新组装和重新传输的帧编号 。序列号 随着每次新的传输而增加。
⑤帧校验序列:出现在最后。
三、802.11物理层
问题1: What is the channel frequency? To find the frequency, expand the Radiotap header of any frame and look for the Channel frequency.
如图所示,信道频率为2437。可以用信道频率区分不同信道。
观察调制和SNR,需要分别观察数据速率值和SSI信号值(RSSI),通过进入编辑——首选项——外观——列,以添加RSSI和Rate并来观察他们。
我们可以看到各种不同的速率,也就是说,无线速率与有线以太网不同,有线以太网的帧以固定速率发送(经过以太网类型的协商),而无线速率根据计算机的条件和能力而变化。
问题2: What rates are used? Give an ordered list of rates from lowest to highest. Hint: you can click the Rate column to sort by that value.
排序后可清楚看到有0、1、5、6、9、11、12、18、24、36、48、54这些速率被使用。802.11a 标准规定 6、12 与 24 Mbps 是必要的(required)数据率。
还可以看到各种RSSI值。RSSI值可以用来表示接收到的信号强度的级别。通常情况下,RSSI值以负数形式表示,通常以dbm(分贝毫瓦)为单位,数值越大表示信号强度越弱。在dBm的尺度上,每增加3dBm,信号强度大约翻倍。例如,-70 dBm的信号强度比-73 dBm的信号强度大约要高一倍,而-67 dBm的信号强度则比-70 dBm的信号强度大约要高一倍。
问题3: What is the range of RSSI and hence variation in SNRs in the trace? Give this as the strongest and weakest RSSI and the dB difference between them.
RSSI变化范围为-94~-21dBm,差值为73
SNR变化范围为6~79dB,差值为73
四、802.11链路层
统计——会话,在协议中勾选IEEE 802.11,即可看到下图。其中列出了每对通信计算机。可以通过点击“数据包”或“字节”列标题,按大小排列顺序。
问题1: What is the BSS ID used by the most active wireless conversations? A BSS ID value identifies an AP, so this BSS ID identifies the most active AP, presumably the AP we are monitoring. To help find it, you can sort on the source or destination address by clicking on the column heading. We can also look to see the amounts we have of different types of traffic. 802.11 frames are either Data, Control, or Management frames. These frames are distinguished by the value in the Type subfield of the Frame Control field. You can inspect different packets to see the values for different types of frames.
根据packets列进行排序,可得到最活跃的无线会话,如下图所示。其BSS ID为00:16:b6:f7:1d:51。
问题2: How many Data frames are in the trace, and what is the most common subtype of Data frame?
在filter框中输入"wlan.fc.type==2"筛选数据帧,结果如下图所示,数据帧的数量为777。最常见的子类型为2
问题3: How many Control frames are in the trace, and what is the most common subtype?
如图所示,控制帧的数量为616,最常见的子类型为13
问题4: How many Management frames are in the trace, and what is the most common subtype?
如图所示,管理帧的数量为960,最常见的子类型为8
问题5: List in the order they are sent the IEEE 802.11 fields in an Acknowledgement frame and their lengths in bytes. Do not break down the Frame Control field into subfields, as we have already looked at these details.
帧控制 | 持续时间 | 接收器地址 | 帧检验序列 |
---|---|---|---|
2 | 2 | 6 | 4 |
问题6: Give an estimate of the retransmission rate as the number of retransmissions over the number of original transmissions. Show your calculation.
如下图所示,原始数据帧数量527,重传数据帧250,重传率250/527=0.474
问题7: What fraction of the frames sent to the AP signal that the client is powering down?
wlan.fc.tods==1表示筛选从目标(客户端)发送给发送方(AP)的帧
wlan.fc.pwrmgt==1表示找到所有表示睡眠的帧
因此有119个客户端关机
五、802.11管理
除了数据和确认帧之外,我们还将查看几种类型的管理帧,这些帧用于将计算机连接到 AP,以便它可以发送和接收消息。
1、信标帧
在跟踪中选择一个信标帧,其 BSSID是步骤 4中的主 AP的信标帧。信标帧由 AP 定期发送,向附近的计算机通告它的存在和能力。该帧的 IEEE 802.11 记录将类似于我们上面回顾的数据帧的记录,使用不同的类型和子类型代码来指示它是信标帧。然而,该帧的有效载荷将有所不同:它是 IEEE 802.11 无线局域网管理帧记录。您将看到,在一些固定参数之后,它有一系列标记的参数,列出了 AP 的功能,其中包括 AP 的 SSID 名称(与 BSS ID 一起使用的文本字符串)、它支持的数据速率以及它运行的信道。
问题1: What is the SSID of the main AP? This is one of the tagged parameters in the Beacon frame.
主AP的BSSID为Cisco-Li_f7:1d:51,SSID如图
问题2: How often are Beacon frames sent for the main AP? You may find the Beacon interval given in the Beacon frame itself, or change the Time display to be show the interval since the last frame. (Under View, select Time Display Format, and “Seconds Since Previous Displayed Packet”.)
如下图所示,时间间隔为0.102400s
问题3: What data rates does the main AP support? The rates are listed under tagged parameters.
支持数据速率6,9,12,18,24,36,48,54
问题4: What rate is the Beacon frame transmission? The answer to this question will be found on the Radiotap header, or more conveniently displayed in the column you added in an earlier step.
如图所示,信标帧传输速率为1Mb/s
2、协会
问题5: What are the Type and Subtype values of Association Request / Association Response frames?
类型均为0,子类型Association request为0, Association response为1
3、调查请求/响应
问题6: What are the Type and Subtype values for the Probe Request / Probe Response frames?
类型均为0,子类型Probe request为4, Probe response为5