Subject: Re: TCP sequence numbers

From: der Mouse <[email-masked]>
Date: Tue, 19 Sep 2000 10:37:22 -0400 (EDT)

> Question 1:

> Recently, there has been talk on the tcp-impl mailing list that ISN
> can be random. If so, how can it be guaranteed that an old duplicate
> will be rejected during a reincarnation?

It can't; this is one of the problems with making the whole ISN random.
A better approach might be to (say) make the high 16 bits count and the
low 16 bits random - there are details, such as dealing with multiple
transient connections in a small interval of time, but something like
this could probably be made to work.

> Question 2:

> Can circumstances arise such that TCP pumps the connection's data
> into the network at such a high rate, that subsequent sequence
> numbers increase at the same rate as ISNs?

...or faster.  Yes.  If the ISN comes from a counter that ticks every 4
microseconds, that corresponds to 250000 bytes/sec; I routinely see
transfer rates over twice that even on 10Mbps Ethernet - and I've seen
over 32 times it, over eight MB/sec, when running at 100Mbps.

Also, at 4 us per tick, the counter will wrap every 4.77+ hours.  I
routinely have connections which stay up for days, transferring on the
order of kilobytes, which means that the ISN counter wraps around and
catches up to the connection's sequence numbers over and over again.

These are (among the reasons) why TIME-WAIT is so important.

					der Mouse

			       [email-masked]
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

---

From: Harald Koch <[email-masked]>
Date: Tue, 19 Sep 2000 14:39:12 -0400

Of all the gin joints in all the towns in all the world, der Mouse
> It can't; this is one of the problems with making the whole ISN random.

I apparently haven't been following the discussion closely.

Why is there *any* requirement that the ISN be random? It needs to be
*unpredictable*, which is most decidedly not the same thing. RFC1948
handles unpredictable just fine...

-- 
Harald Koch     <[email-masked]>

"It takes a child to raze a village."
		-Michael T. Fry

---

From: Andi Kleen <[email-masked]>
Date: Wed, 20 Sep 2000 02:31:44 +0200

> handles unpredictable just fine...

[cool, discussion starts to loop]

RFC1948 works...

assuming you have a non predictable secret, which most implementations 
I know have not. I've also never seen a TCP yet that asked for a 
passphrase from the administrator before first use. Have you ?

-Andi