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

前端 未结 5 1571
小蘑菇
小蘑菇 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:41

    The TCP protocal is implemented by the sending/receiving machines, once the packets leave the sending machine, the routers they travel along know nothing about TCP, they just use IP to get the packets from the source the to destination. Then, it is the destination machines job to, using TCP, make sure that all the packets arrive and that they arrive in the correct order. The internet itself doesn't know anything about TCP, it's just a layer (often software) that gives connection to a connectionless medium (the internet).

    So onces a packet leaves a destination, it can go along any path (mostly) as long as it gets to the desintation, regardless of the higher level protocol (such as TCP or UDP).

    I mean, it's a bit more complicated then that, but as far as I can remember that's the general Idea.

提交回复
热议问题