为什么我的计算机与服务器通过不同端口3次进行3次握手-Wireshark? [英] Why my computer doing 3 way handshake with a server 3 times with different ports - Wireshark?

查看:77
本文介绍了为什么我的计算机与服务器通过不同端口3次进行3次握手-Wireshark?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我的计算机连接到随机网站以进行TCP分配时,我使用Wireshark捕获了数据包.通常,在数据传输开始之前,应该有3个初始数据包(SYN,SYN-ACK,ACK)用于3次握手.

I captured packets using Wireshark while my computer is connecting to random web site for my assignment using TCP. Normally, there should be 3 initial packets (SYN, SYN-ACK, ACK) for 3-way handshake before the data transfer starts.

在我的情况下,有9个连接,3个不同的3向握手;每种操作都是通过计算机的其他端口完成的.接受每个端口后,仅使用其中一个端口继续进行数据传输.

In my case, there are 9 connections, 3 different 3-way handshake; each was done with a different port of my computer. After each of them are accepted, the data transfer continues with only one of the ports.

我不明白其背后的原因.谢谢!

I couldn't understand the reason behind this. Thanks!

推荐答案

浏览器通常会打开一个站点的多个连接.原因是使用HTTP/1时,单个TCP连接一次只能处理一个请求-响应,即,多个请求彼此接替,而不能并行处理.要并行处理多个请求,浏览器需要打开多个TCP连接.由于建立连接需要一些时间,因此浏览器可能会打开与服务器的多个连接,以便在需要发送新请求的情况下建立一些连接.

It is common that browsers open multiple connections to a site. Reason for this is that with HTTP/1 a single TCP connection can only handle a single request-response at a time, i.e. multiple requests after each other and not in parallel. To handle multiple requests in parallel a browser needs to have multiple TCP connections open. Since connection setup takes some time browsers might open multiple connections to the server just to have some already established if new requests need to be send.

这篇关于为什么我的计算机与服务器通过不同端口3次进行3次握手-Wireshark?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆