Lav
Lav

Reputation: 43

procedures in opening and closing a TCP connection

Can anyone please let me know the procedures that happens in closing a tcp connection.

suppose there is A(Client) and B(Server) that A establish a TCP connection

A is creating a TCP connection with B

  1. In opening a connection what happens if SYN packet from A drops in reaching the B, even if u do some retransmissions.

  2. What happens if SYN+ACK drops in the network if B sending the packet to A.

  3. What happens if ACK drops in the network from A to B.

A is closing the connection with B.

  1. In closing a connection what happens if FIN packet from A drops in reaching the B, even if u do some retransmissions.
  2. What happens if FIN+ACK drops in the network if B sending the packet to A.
  3. What happens if ACK drops in the network from A to B.

Upvotes: 2

Views: 478

Answers (1)

Brian White
Brian White

Reputation: 8756

Initial SYN packets are re-transmitted with an exponential backoff, usually starting at 2 seconds. I.e. 2s, 4s, 8s, 16s, etc.

The same goes for re-transmitted SYN-ACK packets (though there are some odd implementations that you really don't want to know about).

No ACK is ever re-transmitted blindly. If the other side re-transmits a packet, then another ACK will be sent.

The above is true for FIN as well, just substitute FIN where you see SYN. Of course, the starting re-transmit time is not 2s but whatever has been calculated to be the round-trip-time over the course of the session.

A SYN/FIN packet is treated the same as a data packet with regard to re-transmissions and reliability. Those flags even take up a sequence number so they can be properly tracked.

Upvotes: 3

Related Questions