Why do we say the IP protocol in TCP/IP suite is connectionless?

前端 未结 7 1504
無奈伤痛
無奈伤痛 2021-01-31 00:22

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 b

7条回答
  •  一整个雨季
    2021-01-31 00:58

    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.

提交回复
热议问题