为什么我们说TCP/IP套件中的IP协议是无连接的? [英] Why do we say the IP protocol in TCP/IP suite is connectionless?

查看:390
本文介绍了为什么我们说TCP/IP套件中的IP协议是无连接的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么IP被称为无连接协议?如果是这样,那么面向连接的协议是什么?

谢谢.

更新-1/12/20:21 2010/12/26

我认为,为了更好地回答我的问题,最好从物理和逻辑上解释连接"的实际含义.

更新-2013年2月1日,上午2-9:59

基于以下所有答案,我感到这里提到的联系"应被视为一系列行动/安排/纪律.因此,它更是一个抽象的概念,而不是一个具体的对象.

更新-2015年6月18日,上午3-11:35

这是更实际的解释:

  • IP协议是无连接的,因为IP网络中的所有数据包都是独立路由的,它们不一定必须通过同一路由,而在面向连接的虚拟电路网络中,所有数据包都通过相同的路由.这就是虚电路"的意思.

  • 通过连接,由于只有一条路由,因此所有数据包的发送顺序都与发送出去的顺序相同.

  • 如果没有连接,则不能保证所有数据包都会到达

更新-2016/1/20/星期三4-9:55

connection-oriented的特征之一是保留了数据包顺序. TCP使用序列号来实现这一点,但是IP没有这种功能.因此,TCP是面向连接的,而IP是无连接的.

解决方案

基本思想非常简单:使用IP(本身没有TCP,UDP等),您只是发送数据包.您只需将一些数据发送到带有目标地址的网络上即可,仅此而已. IP本身提供:

  1. 不能保证会交付
  2. 无法确定是否存在
  3. 什么也不想让目的地知道会收到一个数据包
  4. 其他任何事情

它所做的只是指定一个最小的数据包格式,这样您就可以从一个点到另一点获取一些数据(例如,路由器知道该数据包格式,因此他们可以查看目标并在下一跳上发送该数据包). /p>

TCP是面向连接的.建立连接意味着在TCP对话开始时,它会进行三向握手",因此(尤其是)目的地知道已经建立了与源的连接.它在内部跟踪该地址,因此它可以/希望/确实希望有更多的数据包,并且能够发送答复以(例如)确认接收到的每个数据包.源和目标也协作以对所有数据包进行序列号确认,因此每一端都知道它发送的数据包是否在另一端收到.这在物理上并没有涉及太多,但从逻辑上讲,它涉及在两端分配一些内存.其中包括用于元数据的存储器,例如要使用的下一个数据包序列号,以及有效载荷数据,以便可能的重传,直到另一方确认收到该数据包为止.

Why is the IP called a connectionless protocol? If so, what is the connection-oriented protocol then?

Thanks.

Update - 1 - 20:21 2010/12/26

I think, to better answer my question, it would be better to explain what "connection" actually means, both physically and logically.

Update - 2 - 9:59 AM 2/1/2013

Based on all the answers below, I come to the feeling that the 'connection' mentioned here should be considered as a set of actions/arrangements/disciplines. Thus it's more an abstract concept rather than a concrete object.

Update - 3 - 11:35 AM 6/18/2015

Here's a more physical explanation:

  • IP protocol is connectionless in that all packets in IP network are routed independently, they may not necessarily go through the same route, while in a virtual circuit network which is connection oriented, all packets go through the same route. This single route is what 'virtual circuit' means.

  • With connection, because there's only 1 route, all data packets will arrive in the same order as they are sent out.

  • Without connection, it is not guaranteed all data packets will arrive in the same order as they are sent out.

Update - 4 - 9:55 AM 2016/1/20/Wed

One of the characteristics of connection-oriented is that the packet order is preserved. TCP use a sequence number to achieve that but IP has no such facility. Thus TCP is connection-oriented while IP is connection-less.

解决方案

The basic idea is pretty simple: with IP (on its own -- no TCP, UDP, etc.) you're just sending a packet of data. You simply send some data onto the net with a destination address, but that's it. By itself, IP gives:

  1. no assurance that it'll be delivered
  2. no way to find out if it was
  3. nothing to let the destination know to expect a packet
  4. much of anything else

All it does is specify a minimal packet format so you can get some data from one point to another (e.g., routers know the packet format, so they can look at the destination and send the packet on its next hop).

TCP is connection oriented. Establishing a connection means that at the beginning of a TCP conversation, it does a "three way handshake" so (in particular) the destination knows that a connection with the source has been established. It keeps track of that address internally, so it can/will/does expect more packets from it, and be able to send replies to (for example) acknowledge each packet it receives. The source and destination also cooperate to serial number all the packets for the acknowledgment scheme, so each end knows whether packets it sent were received at the other end. This doesn't involve much physically, but logically it involves allocating some memory on both ends. That includes memory for metadata like the next packet serial number to use, as well as payload data for possible re-transmission until the other side acknowledges receipt of that packet.

这篇关于为什么我们说TCP/IP套件中的IP协议是无连接的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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