How is reliability ensured in tcp




















Improve this answer. Gilles 'SO- stop being evil' Gilles 'SO- stop being evil' 41k 7 7 gold badges silver badges bronze badges. To summarize in some points, we can say that: TCP ensures that data is not damaged , lost, duplicated, or delivered out of order to a receiving process, otherwise, it has to recover it.

TCP is connection-oriented and enables two-way communication between two endpoints after the three-way handshake. TCP is reliable because the protocol ensures that all data is fully transmitted and can be assembled by the receiver in the correct order. TCP achieves this reliability by assigning a sequence number to each octet it transmits and requiring a positive acknowledgment ACK from the receiving TCP.

If the ACK is not received within the time-out interval, the data is retransmitted. The TCP retransmission time-out value is dynamically determined for each connection, based on round-trip time. At the receiver , the sequence numbers are used to correctly order segments that may be received out of order and to eliminate duplicates.

Damage is handled by adding a checksum to each segment transmitted, checking it at the receiver, and discarding damaged segments. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.

Featured on Meta. Now live: A fully responsive profile. Version labels for answers. I conclude with a discussion of TCP's mechanisms for handling and avoiding congestion. Background Information: This section assumes that you are already familiar with TCP sequence numbers and segments , and the basics of the TCP sliding window mechanism.

It also assumes you have already read the section on TCP message formatting and data transfer. If not, you may want to review at least the topic describing TCP data transfer mechanics ; several of the topics in this section extend that simplified discussion of TCP data transfer to show what happens in non-ideal conditions. Quick navigation to subsections and regular topics in this section. Please Whitelist This Site? Thanks for your understanding!

NOTE: Using software to mass-download the site degrades the server and is prohibited. TCP introduced a new mechanism to solve this problem, called the timeout retransmission mechanism. The simple understanding is that the sender waits for a period of time after sending the data, and the time is up and does not receive the ACK message, then the data just sent is retransmitted. If it is the first reason just now, the receiver will respond with ACK after receiving the second retransmitted data.

If it is the second reason, the receiver finds that the received data already exists the basis for judging the existence is the serial number, so the serial number also has the function of removing duplicate data , then directly discard it and still send an ACK response. How long does the sender wait after sending it? If this waiting time is too long, it will affect the overall efficiency of TCP transmission.

If the waiting time is too short, it will cause frequent repeated packets to be sent. How to weigh? Because the TCP transmission guarantees a high-performance communication in any environment, the maximum timeout period that is, the waiting time is dynamically calculated.

This process has been described in detail before, so I won't repeat it here. Ensuring a reliable connection is a prerequisite for ensuring reliability. If the sending speed of the sending end is too fast, the end buffer of the receiving end will fill up quickly.

At this time, if the sender is still sending data, then the data sent next will lose packets, which will lead to a series of chain reactions of packet loss, such as retransmission over time. The TCP determines the sending speed of the sending end according to the data processing ability of the receiving end.

This mechanism is flow control. In the header information of the TCP protocol, there is a window size of a bit field. When introducing this window size, we know that the content of the window size is actually the remaining size of the receiving data buffer at the receiving end. The larger the number, the greater the remaining space of the receiving buffer at the receiving end, and the greater the throughput of the network. The receiving end will fill in its own instant window size when confirming the response to send the ACK message, and send it along with the ACK message.

The sender changes its own sending speed according to the change of the value of the window size in the ACK message. If the value of the received window size is 0, the sender will stop sending data.

And periodically send the window detection data segment to the receiving end, and let the receiving end tell the sending end of the window size.

The byte option in the TCP header also contains a window expansion factor M. The actual window size is 16 as the value of the window field shifted by M bits. Every time one bit is moved, it is doubled. In the persist mode the sender doesn't drop the congestion window even if packets that are intended to the mobile hosts are lost.

This achieves a tremendous improvement over the standard TCP because the loss of packets are not misinterpreted as congestion in the network. This implementation requires only the client's TCP code to be changed. This is an end-to-end protocol which doesn't involve any intermediary as the base station. If the receiver can sense an impending disconnection, it should try to send out a few at least one acknowledgements, wherein it's window size is advertised as zero let an ACK with a zero receiver window size be abbreviated "ZWA", i.

The period after a ZWA is sent and the receiver actually disconnects and reconnects is called warning period. Ideally, the warning period should be long enough to ensure that exactly one ZWA gets across to the sender. If the warning period is not chose correctly the sender gets affected. If the warning period is small, there might not be enough time for the receiver to send out a ZWA which will cause the sender's congestion window to drop due to packets lost during the disconnection which, in turn leads to some A reasonable warning period is the round-trip-time RTT.

During periods of continuous data transfer, this allows the sender to transmit a packet and then receive its acknowledgment. Note that Freeze-TCP is only useful if a disconnection occurs while data is being transferred as opposed to when the receiver is idle for some time and then gets disconnected.

There could also be a substantial delay before a ZWP is sent after a reconnection. This would leave the receiver idle for that amount of time even after reconnection. As soon as the connection is re-established the receiver or the mobile host will send the acknowledgement thrice. When the sender looks at the triplicate acknowledgement it starts sends a WZP and gets a non-zero acknowledgement.

From here on it starts sending data with the same window size that was used before handoff or temporary disconnection. So both the congestion and slow start algorithms can be avoided by using the Freeze-TCP protocol. Figure 5. Increased throughput due to Freeze-TCP [4].

Comparison of Different implementations of TCP top The table below gives an extensive view of all the protocols and there relative advantages and disadvantages. The original comparison was given in [4]. The table above is more extensive and has more comparison parameters than the original one. The comparison of various TCP's is based on major factors that should be considered in assessing any TCP enhancements. Conclusion top This paper presents simple protocol to improve the performance of TCP on networks with wireless links and mobile hosts.

Some of these protocols work by modifying the network-layer software at the base station and some of them only needs modification at ends of TCP connection.

Each proposed variant has its own relative advantage and disadvantage over the other. In spite of all this extensive work done on mobile and wireless networks, there appears to be no effective solution that is robust and less complex. Complexity plays a major role for building mobile compliant applications. Can TCP be made compatible to handle mobile applications?

References top. Relevant Links: top. Research Groups: top Mobile computing and networking group. Scope of the Paper top The scope of this paper is to present an overview of the research going on in the field of TCP for mobile environments. This paper doesn't provide a complete study of any particular implementation.



0コメント

  • 1000 / 1000