TCP的Welcome端口vs连接端口以及三向握手的目的 [英] TCP's Welcome port vs connection port and the purpose of three way handshake

查看:51
本文介绍了TCP的Welcome端口vs连接端口以及三向握手的目的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是来自教科书 James F. Kurose、Keith W. Ross 的图片:计算机网络:自上而下的方法, ISBN-13:978-0-13-285620-1.ISBN-10:0-13-285620-4.

This is the picture from the textbook James F. Kurose, Keith W. Ross: Computer networking: a top-down approach, ISBN-13: 978-0-13-285620-1. ISBN-10: 0-13-285620-4.

根据图片,欢迎端口与实际连接端口不同.(因为不同的socket被分配了不同的端口号.那么假设Client正在初始化一个HTTP请求,那么web服务器上的欢迎端口是80,那么实际连接的端口就和80不一样了?

According to the picture, the welcoming port is different to actual connection port.(since different socket is assigned a different port number. So let's say Client is initializing a HTTP request, so the welcoming port is 80 on the web server, and then the actual connection port is different than 80?

第二个问题是,TCP握手的目的是什么?我只是被教导为什么 TCP 的握手是,但实际上并不知道为什么握手是必不可少的.如果我们摆脱 TCP 的握手,我们仍然可以使 TCP 成为可靠的数据传输协议,不是吗?

The second question is, what's the purpose of handshaking for TCP? I was only taught that why TCP's handshaking is but don't actually know why handshaking is essential. If we get rid of handshaking from TCP, we can still make TCP a reliable data transfer protocol, can't we?

推荐答案

如图所示,欢迎端口与实际连接端口不同.

According to the picture, the welcoming port is different to actual connection port.

不,不是.图片中没有任何内容表明这一点.它表明侦听和连接的套接字是不同的.不是一回事.

No it isn't. There is nothing in the picture that indicates that. It indicates that the listening and connected sockets are different. Not the same thing.

(因为不同的套接字被分配了不同的端口号).

(since different socket is assigned a different port number).

不,不是.接受的套接字与从其接受的侦听套接字具有相同的本地端口号.我不知道你从哪里得到欢迎端口"这个词,或者作者从哪里得到欢迎套接字"这个词.正确的术语是监听端口".

No it isn't. An accepted socket has the same local port number as the listening socket it was accepted from. I don't know where you got the term 'welcoming port' from, or the author got the term 'welcoming socket' from. The correct terminology is 'listening port'.

那么假设Client正在初始化一个HTTP请求,那么Web服务器上的欢迎端口是80,那么实际连接端口与80不同?

So let's say Client is initializing a HTTP request, so the welcoming port is 80 on the web server, and then the actual connection port is different than 80?

没有.是 80.

第二个问题是,TCP握手的目的是什么?我只是被教导为什么 TCP 的握手是,但实际上并不知道为什么握手是必不可少的.如果我们摆脱 TCP 的握手,我们仍然可以使 TCP 成为可靠的数据传输协议,不是吗?

The second question is, what's the purpose of handshaking for TCP? I was only taught that why TCP's handshaking is but don't actually know why handshaking is essential. If we get rid of handshaking from TCP, we can still make TCP a reliable data transfer protocol, can't we?

没有.它有几个目的,一个是建立双方都知道连接存在,另一个是在每个方向上建立一个初始序列号,这使得攻击者更难注入数据.

No. It has several purposes, one of which is to establish that both sides know that the connection exists, and another of which is to establish an initial sequence number in each direction, which makes it harder for an attacker to inject data.

这篇关于TCP的Welcome端口vs连接端口以及三向握手的目的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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