**Subject:** Re: random ip_id must be configurable

**To:** David Laight *<david@l8s.co.uk>*

**From:** Niels Provos *<provos@citi.umich.edu>*

**List:** tech-net

**Date:** 09/12/2003 17:29:58
On Fri, Sep 12, 2003 at 11:13:50AM +0100, David Laight wrote:
> You need to:
> a) read the code
> b) understand what it it doing
That is a good suggestion. So, please let me provide you with my
own understanding of this source code:
Out of every 15-bit block you select 30,000 non-repeating numbers.
Afterwards, we switch to a new number space out of which we select
another 30,000 non-repeating numbers.
So, the minimal distance is at least 30,000 IDs before you can expect
any collision.
> RU_MAX itself is 30000, the worst case repeat is after 7500 numbers.
> The average block contains 12000 numbers, so after that you start
> getting a chance of a collision with the block before it.
> On average 150 numbers into a block there is a 50% chance of a repeat
> in the last 150 numbers of the block before the last.
>
> Practically you have to assume repeats after 12000 numbers.
I have no idea where you are getting these numbers from.
Niels.
Ps: Obviously, I am biased in this discussion, as Itojun is my
declared open-source hero.