关闭

UNP-基本TCP编程-3 (tcpdump)

标签: 编程tcp
162人阅读 评论(0) 收藏 举报
分类:

三次握手

22:22:46.510758 IP (tos 0x0, ttl 64, id 29789, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [S], cksum 0x8425 (incorrect -> 0xdf97), seq 4036226398, win 29200, options [mss 1460,sackOK,TS val 10656003 ecr 0,nop,wscale 7], length 0
22:22:46.511781 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 60)
    192.168.1.80.8068 > 192.168.1.86.56132: Flags [S.], cksum 0x1ac4 (correct), seq 519747379, ack 4036226399, win 14480, options [mss 1460,sackOK,TS val 3745757 ecr 10656003,nop,wscale 6], length 0
22:22:46.511843 IP (tos 0x0, ttl 64, id 29790, offset 0, flags [DF], proto TCP (6), length 52)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [.], cksum 0x841d (incorrect -> 0x8139), seq 1, ack 1, win 229, options [nop,nop,TS val 10656004 ecr 3745757], length 0

数据交互报

22:23:15.428891 IP (tos 0x0, ttl 64, id 29791, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0x7e57), seq 1:13, ack 1, win 229, options [nop,nop,TS val 10684921 ecr 3745757], length 12
22:23:15.430415 IP (tos 0x0, ttl 64, id 37098, offset 0, flags [DF], proto TCP (6), length 52)
    192.168.1.80.8068 > 192.168.1.86.56132: Flags [.], cksum 0x9f43 (correct), seq 1, ack 13, win 227, options [nop,nop,TS val 3774675 ecr 10684921], length 0
22:23:22.888129 IP (tos 0x0, ttl 64, id 37099, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.80.8068 > 192.168.1.86.56132: Flags [P.], cksum 0xf034 (correct), seq 1:13, ack 13, win 227, options [nop,nop,TS val 3782133 ecr 10684921], length 12
22:23:22.888246 IP (tos 0x0, ttl 64, id 29792, offset 0, flags [DF], proto TCP (6), length 52)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [.], cksum 0x841d (incorrect -> 0x64ef), seq 13, ack 13, win 229, options [nop,nop,TS val 10692381 ecr 3782133], length 0 

线路断开/重传数据包

22:24:15.404879 IP (tos 0x0, ttl 64, id 29793, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0x05de), seq 13:25, ack 13, win 229, options [nop,nop,TS val 10744897 ecr 3782133], length 12
22:24:15.606196 IP (tos 0x0, ttl 64, id 29794, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0x0514), seq 13:25, ack 13, win 229, options [nop,nop,TS val 10745099 ecr 3782133], length 12
22:24:15.808192 IP (tos 0x0, ttl 64, id 29795, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0x044a), seq 13:25, ack 13, win 229, options [nop,nop,TS val 10745301 ecr 3782133], length 12
22:24:16.213205 IP (tos 0x0, ttl 64, id 29796, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0x02b5), seq 13:25, ack 13, win 229, options [nop,nop,TS val 10745706 ecr 3782133], length 12
22:24:17.023229 IP (tos 0x0, ttl 64, id 29797, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0xff8a), seq 13:25, ack 13, win 229, options [nop,nop,TS val 10746516 ecr 3782133], length 12
22:24:18.643146 IP (tos 0x0, ttl 64, id 29798, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0xf936), seq 13:25, ack 13, win 229, options [nop,nop,TS val 10748136 ecr 3782133], length 12
22:24:21.883213 IP (tos 0x0, ttl 64, id 29799, offset 0, flags [DF], proto TCP (6), length 64)
    192.168.1.86.56132 > 192.168.1.80.8068: Flags [P.], cksum 0x8429 (incorrect -> 0xec8e), seq 13:25, ack 13, win 229, options [nop,nop,TS val 10751376 ecr 3782133], length 12

线路链接重新测量(对端已经关闭)

22:50:33.899904 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.80 is-at 08:00:27:35:3b:d3 (oui Unknown), length 46
22:50:29.268707 IP (tos 0x0, ttl 64, id 58246, offset 0, flags [DF], proto TCP (6), length 52)
    192.168.1.80.8068 > 192.168.1.86.56137: Flags [F.], cksum 0x454d (correct), seq 1, ack 1, win 227, options [nop,nop,TS val 5408482 ecr 12185106], length 0
22:50:29.268918 IP (tos 0x0, ttl 64, id 44825, offset 0, flags [DF], proto TCP (6), length 52)
    192.168.1.86.56137 > 192.168.1.80.8068: Flags [F.], cksum 0x841d (incorrect -> 0x3b2a), seq 8, ack 2, win 229, options [nop,nop,TS val 12318761 ecr 5408482], length 0
22:50:29.269903 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 40)
    192.168.1.80.8068 > 192.168.1.86.56137: Flags [R], cksum 0xc201 (correct), seq 3479674802, win 0, length 0
0
0
查看评论
发表评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场

UNPv1第四章:基本TCP套接口编程

1 socket函数为了执行网络I/O,一个进程必须做的第一件事就是调用socket函数,指定期望的通信协议类型#include int socket (int family, int type, ...
  • lxj1137800599
  • lxj1137800599
  • 2016-04-26 09:21
  • 1204

<网络编程培训之三> 实现TCP/UDP的简单Echo服务器

题目分别采用面向连接的和无连接的方式实现网络上Echo服务器。Echo服务器即,客户端向Server发送一段字符串,Server收到之后返回给客户端同样的字符串。题目解读 熟悉TCP和UDP基本的So...
  • zy416548283
  • zy416548283
  • 2015-12-08 22:44
  • 1269

tcpdump交叉编译和一些简单命令

下面介绍一下具体过程。 1.在http://www.tcpdump.org下载libpcap-1.0.0.tar.gz和tcpdump-4.0.0.tar.gz两个文件。 2.将这两个文件放在/h...
  • petershina
  • petershina
  • 2013-05-25 14:20
  • 3206

UNP-基本TCP编程-1

套接字地址结构:-> 通用套接字地址结构: #include struct sockaddr{ sa_family_t sa_family...
  • gg782112163
  • gg782112163
  • 2016-08-30 12:20
  • 156

UNP-基本TCP编程-2(复用技术)

tcp 协议基本信息:选项子段:(tcp/ip : p192) 选项表结束: 无操作: 最大报文长度 窗口扩大因子: TCP连接的建立与中止:– – 连接的建立:22:22:46.510758 IP ...
  • gg782112163
  • gg782112163
  • 2016-08-30 12:42
  • 169

UNP卷1:第四章(基本TCP套接字编程)

1. socket函数     为了执行网络I/O,一个
  • fzyz_sb
  • fzyz_sb
  • 2014-09-15 22:31
  • 1078

UNP函数笔记二: 基本TCP套接字编程

第四章  基本TCP套接字编程: #include int socket(int family, int type, int protocol); family: AF...
  • ken_scott
  • ken_scott
  • 2012-04-10 17:33
  • 371

UNP——Chapter 4:基本TCP套接字编程

socket
  • u010129119
  • u010129119
  • 2016-09-21 17:11
  • 115

UNP总结 Chapter 4 基本TCP套接字编程

转自:http://www.cnblogs.com/biyeymyhjob/archive/2012/08/05/2623889.html   东西太好了 1.socket函数 为了执行网络I/O...
  • qq920020796
  • qq920020796
  • 2015-10-22 18:23
  • 191

UNP-UNIX网络编程 第四章:基本TCP套接字编程

1. #include int socket(int family, int type, int protocol); //返回:若成功则返回非负描述符,出错则为-1,family是协议族,t...
  • qiangzhenyi1207
  • qiangzhenyi1207
  • 前天 20:02
  • 5
    我的微信
    个人资料
    • 访问:16013次
    • 积分:854
    • 等级:
    • 排名:千里之外
    • 原创:72篇
    • 转载:4篇
    • 译文:0篇
    • 评论:2条
    我的 QQ
    QQ 邮箱