当前位置:网站首页>IP报文头解析
IP报文头解析
2022-08-04 15:07:00 【ljbcharles】
#tcpdump -x -c 1 -nnne -i bond port 12345
09:28:27.753122 6c:ab:ff:ff:ff:cc > 6c:ff:ff:ff:ff:ee, ethertype IPv4 (0x0800), length 139: 172.17.6.209.12345 > 172.17.6.207.54321: Flags [P.], seq 47:120, ack 1, win 24576,
options [nop,nop,TS val 3615381410 ecr 232154787], length 73
0x0000: 4500 007d 6e29 4000 4006 668f ac11 06d1
#4500:
0-3 4个bit 代表ip协议(version),4就代表ipv4;
4-7 4个bit 代表4位首部长度 ,5代表的是20个字节。(5*4字节,首部长度从IP数据报开头,每32bit(4字节)算一个首部长度);
8-15 8个bit 代表服务类型,其中3bit的优先权字段,4bit的TOS子字段,1bit未用字段但必须置为0,4bit的TOS分别代表最小时延、最大吞吐量、最高可靠性和最小费用;
#007d:
16-31 16个bit 代表总长度(字节):125字节 (139 = 125 + 14 (mac帧头 14字节))
#6e29:
32-47 16个bit 代表标识位:分组标识
#4000:
48-63 16bit,其中前3bit为标志位,后13位为分片偏移(如存在分片)
#4006:
64-79 16bit 其中前8bit为TTL生存时间,TTL为64,后面8bit为传输协议,06代表TCP
#668f:
80-95 16bit 16位首部校验和(把首部中每个16bit进行二进制反码求和。结果存在检验和字段)
#ac 11 06 d1
源IP地址:172 17 6 209
0x0010: ac11 06cf ****d04f 6448 e469 eecc 62b5 b395*****
# ac 11 06 cf
目的地址: 172 17 6 207 (截止总计20字节,头部结束)
边栏推荐
猜你喜欢

Google plug-in. Download contents file is automatically deleted after solution

leetcode:212. 单词搜索 II

郑轻新生校赛和中工选拔赛题解
![[The Art of Hardware Architecture] Study Notes (1) The World of Metastability](/img/ac/54e4e13d9df90e96933c69623b770e.png)
[The Art of Hardware Architecture] Study Notes (1) The World of Metastability

Bluetooth Technology|In the first half of the year, 1.3 million charging piles were added nationwide, and Bluetooth charging piles will become the mainstream of the market

李沐的深度学习笔记来了!

365天挑战LeetCode1000题——Day 049 非递增顺序的最小子序列 贪心

Hangzhou Electric School Competition (Counter Attack Index)

分布式链路追踪Jaeger + 微服务Pig在Rainbond上的实践分享

Leetcode: 215 disorderly to find the first big k element in the array
随机推荐
Notes for xpath getting node with namespace
我爱七夕哈哈哈
基本介绍PLSQL
属于程序猿的浪漫
Redis-哨兵模式
C# SolidWorks二次开发---工程图简单版标注孔信息
如何优雅的消除系统重复代码?
华为云 & 达达,帮有情人“一键送达”
AOSP built-in APP franchise rights white list
代码随想录笔记_动态规划_1049最后一块石头的重量II
聊聊与苹果审核员的爱恨情仇
How to automatically renew the token after it expires?
实际工作中的高级技术(训练加速、推理加速、深度学习自适应、对抗神经网络)
C# 将dll打包到程序中
Codeforces Round #811 A~F
Find My技术|防止你的宠物跑丢,苹果Find My技术可以帮到你
你以为在做的是微服务?不!你做的只是分布式单体!
Roslyn 通过 nuget 统一管理信息
leetcode: 255 Verify preorder traversal sequence binary search tree
基于 Next.js实现在线Excel