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

前端 未结 7 1500
無奈伤痛
無奈伤痛 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:46

    When two hosts want to communicate using connection oriented protocol, one of them must first initiate a connection and the other must accept it. Logically a connection is made between a port in one host and other port in the other host. Software in one host must perform a connect socket operation, and the other must perform an accept socket operation. Physically the initiator host sends a SYN packet, which contains all four connection identifying numbers (source IP, source port, destination IP, destination port). The other receives it and sends SYN-ACK, the initiator sends an ACK, then the connection are established. After the connection established, then the data could be transferred, in both directions. In the other hand, connectionless protocol means that we don't need to establish connection to send data. It means the first packet being sent from one host to another could contain data payloads. Of course for upper layer protocols such as UDP, the recipient must be ready first, (e.g.) it must perform a listen udp socket operation.

    • The connectionless IP became foundation for TCP in the layer above
    • In TCP, at minimal 2x round trip times are required to send just one packet of data. That is : a->b for SYN, b->a for SYN-ACK, a->b for ACK with DATA, b->a for ACK. For flow rate control, Nagle's algorithm is applied here.
    • In UDP, only 0.5 round trip times are required : a->b with DATA. But be prepared that some packets could be silently lost and there is no flow control being done. Packets could be sent in the rate that are larger than the capability of the receiving system.

提交回复
热议问题