how to remember ip/tcp/udp header
0.0.1. IP HEADER
以前找工作时,常被问到IP头都有哪些字段?
现在觉得真的理解了记起来没那么难。
上路时总要记得终点和起点(src/dst ip),
要倒几次车,大体也知道(ttl).
路有大路有小路,有高速路和土路。
大路到小路要分片,小路到大路可能重组。
上高速路需要通行证(qos/tos).
路上有警察,查你是不是非法(csum, header len, ip option),
查你装的什么货(protocol)?
- 路由:要做路由,IP地址是必须的, 如何防止循环链路?
源/目的IP地址,ttl - 分片与重组:ID, 总长度,片的偏移,标志位,
ID, total length, offset, E/D/M flags - QOS: TOS
- 校验:checksum
- 上层协议:proto

0.0.2. TCP HEADER

0.0.3. UDP HEADER

0.0.4. ICMP HEADER

NOTE: all the pictures are ‘stolen’ fromhttp://nmap.org/book/tcpip-ref.html
how to remember ip/tcp/udp header
https://martinbj2008.github.io/2014/01/27/2014-01-27-how-to-remember-ip-slash-tcp-slash-udp-header/