If TCP is connection oriented why do packets follow different paths?

前端 未结 5 1544
小蘑菇
小蘑菇 2020-12-23 11:52

According to my knowledge if an internet application has to be designed, we should use either a connection-oriented service or connection-less service, but not both.

5条回答
  •  隐瞒了意图╮
    2020-12-23 12:33

    This link answers your question pretty well http://www.tcpipguide.com/free/t_ConnectionOrientedandConnectionlessProtocols-3.htm

    Some people consider this (TCP) to be like a “simulation” of circuit-switching at higher network layers; this is perhaps a bit of a dubious analogy. Even though a TCP connection can be used to send data back and forth between devices, all that data is indeed still being sent as packets; there is no real circuit between the devices. This means that TCP must deal with all the potential pitfalls of packet-switched communication, such as the potential for data loss or receipt of data pieces in the incorrect order.

    The TCP protocol deals with the problem of IP packets arriving out of order or being lost, to give you the feeling they arrive through a single FIFO channel. Yes, TCP is smart enough to do that, there's no need for a dedicated underlying channel.

提交回复
热议问题