Subject: Re: random ip_id must be configurable
To: Jun-ichiro itojun Hagino <itojun@itojun.org>
From: David Laight <david@l8s.co.uk>
List: tech-net
Date: 09/12/2003 11:13:50
On Fri, Sep 12, 2003 at 08:39:55AM +0900, Jun-ichiro itojun Hagino wrote:
> > > the generation of the same output value is 36000 calls.
> > > even after 36000 calls, it is highly unlikely that we see the same
> > > number generated from ip_randomid(). if you have concrete number
> > > please show me.
> > Ok you do you get to 36000?
> > From memory the worst case is about 4097.
>
> RU_MAX in sys/netinet/ip_id.c, times 2.
You need to:
a) read the code
b) understand what it it doing
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.
David
--
David Laight: david@l8s.co.uk