Subject: Re: Question on initial sequence numbers

From: David Borman <[email-masked]>
Date: Mon, 4 Jan 1999 16:50:39 -0600 (CST)

Vernon,

> From [email-masked] Mon Jan  4 16:07:45 1999
> X-Authentication-Warning: assateague-fi.lerc.nasa.gov: listserv set sender to [email-masked] using -f
> Date: Mon, 4 Jan 1999 14:43:22 -0700 (MST)
> From: Vernon Schryver <[email-masked]>
> To: [email-masked]
> Subject: Re: Question on initial sequence numbers
> Cc: [email-masked]
> ...
> As far as I can see, there would be no problem (other than cost) with what
> Microsoft is alledged to be doing if they guarantee that all initial
> sequence numbers are "sufficently far apart."   "Smaller" is as good as
> "larger", provided the delta is large enough so the probability of
> collision is small enough.  Incrementing with a clock is one way to get
> "far apart," but there are plenty of other permutations of the natural
> order of the most significant ~16 bits that would work just as well. 

Well, I wouldn't say "no problem".  What I see at issue is that many
TCP implementations (such as BSD) will allow a connection in TIME-WAIT to
be reused before the TIME-WAIT has expired, if the incoming SYN has an ISS
that is greater than the FIN from the previous instance of the connection.
Otherwise, since there is no ACK bit, the SYN and any retranmissions of the
SYN will be silently dropped until the TIME-WAIT state expires.

So, for a TCP that generates random ISS values, when quickly re-using a
TCP connection, they are going to have a 50/50 chance of the connection
either being quickly established, or hung up doing SYN retransmissions until
the TIME-WAIT connection on the server goes away or the client gives up on
its SYN retransmissions.

Of course, one problem is that since most TCPs destroy the PCB after
getting the FIN in LAST-ACK state, if they immediatly reuse the
connection they have no idea what the last sequence number used was.
So the new ISS is just the standard ISS increment, and if the previous
connection transfered more data than the delta between the ISSs, the
ISS on the new SYN won't pass the TIME-WAIT check...

			-David Borman, [email-masked]

PS: by "standard ISS increment", I don't mean just a fixed value.

---

From: "David S. Miller" <[email-masked]>
Date: Mon, 4 Jan 1999 15:17:05 -0800

Date: Mon, 4 Jan 1999 16:50:39 -0600 (CST)
   From: David Borman <[email-masked]>

And there are some implementations which destroy the PCB yet still
keep around enough state to compute the ISS properly if the TIME_WAIT
is awoken back into a new connection.

Later,
David S. Miller
[email-masked]