Half Open Connection and other anamalies

It is our suggestion before going into details of connection related issues, it would be better we just spent 2 minutes to scroll thought the usage and functioning of RESET flag. Because RESET shall be used to resolve some of the tricky situations in TCP.

Issue Statement

Half-Open situation is that where on an established connection between two TCP node, one of the node goes down/closed or aborted without the knowledge of other. As we know that there is no connection health check mechanism in TCP. Issue comes that now both node reached to un-synchronized state because restarted(Down node would come up) node would now have new sequence number (Fresh Sequence Number) while other node is maintaining the previous one.

Here we are going to explain how to detect and resolve above mentioned situation, Below given Diagram is self explanatory.
Half-Open Connection Situation

1) Connection is in establish state, with successful data exchange and both end have maintained their expected sequence numbers.

2) Now Host-A crashes out and went in CLOSED state. Host-A comes up again try to make connection again with Host-B using SYN segment with fresh sequence number and goes in SYN-SENT state.

3) Host-B is still in ESTABLISHED state, maintaining its own expected sequence number from HOST-A. After Host-B receives SYN from Host-A, Host-B replies with own sequence number and expected sequence number.

4)On receiving unexpected ACK from Host-B, Host-A triggers RESET segment towards Host-B
that shall take Host-B to CLOSED state.

5)Now to establish connection again, A fresh 3-way handshake is required so that synchronized state can be achieved.



Similarly with the help of RESET segment, connection shall come out if active site causes Half-Open Connection i.e A TCP segment is received when considered TCP NODE was down or in CLOSED state. We all know a RESET segment shall be triggered if a TCP segment is received in CLOSED state in order to achieve synchronized state of connection.


Your Comments /Suggestions and Questions are always welcome. We would try to clarify doubts with best of our knowledge. So feel free to put Questions.

No comments:

Post a Comment