|
TCP Connection Management and Problem Handling, the Connection Reset Function, and TCP "Keepalives"
(Page 2 of 3)
Handling Reset Segments
When a device receives a segment
with the RST bit sent, it tells the device to reset the connection
so it can be re-established. Like all segments, the reset itself must
be checked to ensure that it is valid (by looking at the value of its
Sequence Number field). This prevents a spurious reset from shutting
down a connection. Assuming the reset is valid, the handling of the
message depends on the state of the device that receives it:
- If the device is in the LISTEN state,
the reset is ignored and it remains in that state.
- If the device is in the SYN-RECEIVED state
but was previously in the LISTEN state (which is the normal course
of events for a server setting up a new connection), it returns to the
LISTEN state.
- In any other situation, the reset causes the
connection to be aborted and the device returns to the CLOSED
state for that connection. The device will advise the higher-layer process
using TCP that the connection has been closed.
Key Concept: TCP includes a special connection reset feature to allow devices to deal with problem situations, such as half-open connections or the receipt of unexpected message types. To use the feature, the device detecting the problem sends a TCP segment with the RST (reset) flag set to 1. The receiving device either returns to the LISTEN state, if it was in the process of connection establishment, or closes the connection and returns to the CLOSED state pending a new session negotiation. |
| If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support! |
|
|
Home -
Table Of Contents - Contact Us
The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005
© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.
|