Subject: Re: ports beeing reused too fast

From: Octavian Purdila <[email-masked]>
Date: Sat, 9 May 2009 22:41:41 +0300

On Saturday 09 May 2009 22:31:35 Bill Fink wrote:

> > Normally, the client machine should not reuse a port during the TIME_WAIT
> > duration (TCP_TIMEWAIT_LEN being 60 seconds on linux). Port selection
> > being random or sequential, it should avoid all ports recently used.
> >
> > Maybe this firewall has a longer TIME_WAIT enforcement (something like 2
> > minutes)
>
> But he had 19 ports being reused after only 1000 connect()s, which
> with his stated ~360 (I'm assuming per second) connection rate,
> would only take about 3 seconds.
>

Time-wait doesn't apply in this case, because connections are closed by the 
server, thus they don't have to go through the time-wait state.

Thanks,
tavi