WireShark网络分析就这么简单 读后感
![](https://images2015.cnblogs.com/blog/1065229/201706/1065229-20170607095644747-1863281156.png)
下面将详细介绍每一层展开的内容。
1.物理层的数据帧概况
Frame 17357: 1394 bytes on wire (11152 bits), 1394 bytes captured (11152 bits) on interface 0
//5号帧,线路1394字节,实际捕获1394字节
Interface id: 0 (\Device\NPF_{80A557A7-2C2C-4948-B785-5F2EF0F059C8}) //接口id
Encapsulation type: Ethernet (1) //封装类型
Arrival Time: Oct 15, 2015 13:36:19.637281000 中国标准时间 //捕获时期和时间
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1444887379.637281000 seconds
[Time delta from previous captured frame: 0.000125000 seconds] //此包与前一包的时间间隔
[Time delta from previous displayed frame: 0.000125000 seconds] //此包与第一帧的时间间隔
[Time since reference or first frame: 161.257111000 seconds]
Frame Number: 17357 //帧序号,第17357帧
Frame Length: 1394 bytes (11152 bits) //帧长度
Capture Length: 1394 bytes (11152 bits) //捕获的帧长度
[Frame is marked: False] //此帧是否做了标记:否
[Frame is ignored: False] //此帧是否被忽略:否
[Protocols in frame: eth:ethertype:ip:tcp:http] //此帧内封装的协议层次结构
[Number of per-protocol-data: 1]
[Hypertext Transfer Protocol, key 0]
[Coloring Rule Name: HTTP] //着色标记的协议名称
[Coloring Rule String: http || tcp.port == 80 || http2] //着色规则显示的字符串
2.数据链路层以太网帧头部信息
Ethernet II, Src: HuaweiTe_a1:89:63 (4c:1f:cc:a1:89:63), Dst: CompalIn_22:31:d0 (f0:76:1c:22:31:d0)
Destination: CompalIn_22:31:d0 (f0:76:1c:22:31:d0) //目标MAC地址
Source: HuaweiTe_a1:89:63 (4c:1f:cc:a1:89:63) //源MAC地址
Type: IP (0x0800)
3.互联网层IP包头部信息
Internet Protocol Version 4, Src: 183.61.51.166 (183.61.51.166), Dst: 10.7.132.246 (10.7.132.246)
Version: 4 //互联网协议IPv4
Header Length: 20 bytes //IP包头部长度
Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00: Not-ECT (Not ECN-Capable Transport))
//差分服务字段
Total Length: 754 //IP包的总长度
Identification: 0xa18e (41358) //标志字段
Flags: 0x02 (Don't Fragment) //标记字段
Fragment offset: 0 //分的偏移量
Time to live: 56 //生存期TTL
Protocol: TCP (6) //此包内封装的上层协议为TCP
Header checksum: 0x2497 [validation disabled] //头部数据的校验和
Source: 183.61.51.166 (183.61.51.166) //来源IP地址
Destination: 10.7.132.246 (10.7.132.246) //目标IP地址
4.传输层的数据段头部信息
Transmission Control Protocol, Src Port: 80 (80), Dst Port: 50362 (50362), Seq: 1025, Ack: 447, Len: 714
Source Port: 80 (80) //源端口号
Destination Port: 50362 (50362) //目标端口号
Sequence number: 1025 (relative sequence number) //序列号(相对序列号)
[Next sequence number: 1739 (relative sequence number)] //下一个序列
Acknowledgment number: 447 (relative ack number) //确认序列
Header Length: 20 bytes //头部长度
.... 0000 0001 1000 = Flags: 0x018 (PSH, ACK) //TCP标记长度
Window size value: 5896 //流量控制的窗口大小
Checksum: 0x915b [validation disabled] //TCP数据段的校验和
wireshark还自带了常用的一些着色规则,由此可以反推学习一些经典的情景: