From owner-freebsd-net Fri Nov 23 4:51:26 2001 Delivered-To: freebsd-net@freebsd.org Received: from ns.sirena2000.ru (ns.sirena2000.ru [194.84.25.34]) by hub.freebsd.org (Postfix) with ESMTP id C297D37B416 for ; Fri, 23 Nov 2001 04:51:13 -0800 (PST) Received: from sirena2000.ru (chek.network.sirena2000.ru [10.1.9.71]) by ns.sirena2000.ru (8.9.3/8.9.3) with ESMTP id PAA03434 for ; Fri, 23 Nov 2001 15:51:05 +0300 (MSK) (envelope-from serg@sirena2000.ru) Message-ID: <3BFE4622.DA72E0D5@sirena2000.ru> Date: Fri, 23 Nov 2001 15:50:42 +0300 From: Chemisov X-Mailer: Mozilla 4.72 [en] (X11; I; SCO_SV 3.2 i386) X-Accept-Language: ru, en MIME-Version: 1.0 To: freebsd-net@FreeBSD.ORG Subject: decreasing TIME_WAIT duration(T/TCP?) Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Hello! It is important to me to have duration of TIME_WAIT state of TCP connection as short time as possible. It is because Server identifies its Clients by C_IP:C_PORT(which permanent for one Client). In FreeBSD 3.4 I have been edited netinet sources to decrease interval for TIME_WAIT -only(!!!) (TCPTV_MSL(60sec) -> TCPTV_MSL_MY(10sec))- for example(tcp_input.c): switch (tp->t_state) { case TCPS_SYN_RECEIVED: ........................ case TCPS_ESTABLISHED: ..................... case TCPS_FIN_WAIT_1: ................. /* * In FIN_WAIT_2 state enter the TIME_WAIT state, * starting the time-wait timer, turning off the other * standard timers. */ case TCPS_FIN_WAIT_2: tp->t_state = TCPS_TIME_WAIT; tcp_canceltimers(tp); /* Shorten TIME_WAIT [RFC-1644, p.28] */ if (tp->cc_recv != 0 && tp->t_duration < TCPTV_MSL_MY) { /* TCPTV_MSL_MY = 10sec for me!!!*/ tp->t_timer[TCPT_2MSL] = tp->t_rxtcur * TCPTV_TWTRUNC; /* For transaction client, force ACK now. */ tp->t_flags |= TF_ACKNOW; } else tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL_MY; /* TCPTV_MSL_MY = 10sec for me!!!*/ soisdisconnected(so); break; /* * In TIME_WAIT state restart the 2 MSL time_wait timer. */ case TCPS_TIME_WAIT: tp->t_timer[TCPT_2MSL] = 2 * TCPTV_MSL_MY; break; } As I know FreeBSD 4.x can calculate MSL depending on data transmission's speed. How to turn on this calculation for 4.x ? It seems that sysctl whith net.inet.tcp.rfc1323 (and .1644) does not work for me. May be I must use T/TCP ? Serg. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message