44

TCP与UDP协议分析-颜逸的博客-51CTO博客

 6 years ago
source link: http://blog.51cto.com/13585598/2066529
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

TCP与UDP协议分析

下面是TCP的封装格式图我就不详细说了,下面我会通过一个抓包软件去分析

TCP与UDP协议分析

大家知道TCP有三次握手和四次断开,这里我就只说三次握手

第一次握手,只会发出请求,大家看同步位也就是我们的syn,他是表示请求,所以只有他会为1,其他都为0

TCP与UDP协议分析

大家再看第二次,我们看到ACK(确认位)也为1,当接受方接受到请求他会发送一个确认或拒绝,当回复看到ACR为1,就说明接受确认了,并且也发了syn(请求)所以syn也为1TCP与UDP协议分析
第三次看到ACK为1,也就是我们发送方给接受方回的一个确认

TCP与UDP协议分析

三次握手大概通过抓包软件分析看到的过程就这样

TCP与UDP协议分析

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK