net.inet.ip.portrange.randomized=1 hurts

Barney Wolff barney at databus.com
Wed Jun 2 08:11:05 PDT 2004


On Wed, Jun 02, 2004 at 12:41:51PM +0200, Andre Oppermann wrote:
> > have 16383 non-repeated port numbers before the first repeat).
> 
> The random generator indeed works badly.  If it was truely random it
> should generate a collision only every (1/range) on average.  Maybe
> the arc4random function reuses the same or small number of initial vectors
> all over again leading to the same small set of 'randomized' ports.

I believe you're seeing the birthday paradox at work, and the expected
number before collision is sqrt(N), not N.

Is the problem that the two systems have different ideas of MSL?

-- 
Barney Wolff         http://www.databus.com/bwresume.pdf
I'm available by contract or FT, in the NYC metro area or via the 'Net.


More information about the freebsd-net mailing list