From owner-freebsd-net Fri Apr 13 6:37:58 2001 Delivered-To: freebsd-net@freebsd.org Received: from earth.inco.com.lb (earth.inco.com.lb [193.188.135.5]) by hub.freebsd.org (Postfix) with ESMTP id 8D11437B496; Fri, 13 Apr 2001 06:37:47 -0700 (PDT) (envelope-from djt2000@inco.com.lb) Received: from hamster ([194.126.31.148]) by earth.inco.com.lb (8.11.1/8.11.1) with SMTP id f3DDdGK19337; Fri, 13 Apr 2001 11:39:17 -0200 (GMT) Message-ID: <000901c0c422$bd356860$941f7ec2@hamster> From: "Toni SOUEID" To: Cc: Subject: Problem in TCP initialisation of cwnd Date: Fri, 13 Apr 2001 16:05:02 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello, My name is Toni Soueid and I'm currently working on a project in which I have to analyse the behavior of FreeBSD TCP. I'm running FreeBSD 4.2-STABLE (which I got from a Magazine CD), and I'm analysing the TCP with various tools. One thing that shocked me is that a TCP connection in FreeBSD (at least on my machines) doesn't begin with a slow start but rather sends a huge amount of packets to the other end (this huge amount only seems to be limited either by the receiver window or by the local machine's send buffer). It seems that cwnd isn't initialised. To investigate things further I employed ttcp and trpt. ttcp allows me to send data in a controlled manner and enable socket debugging. the trace buffer that is recorder is viewed with trpt. I've modified the trpt.c file by including in the section inside if(sflag) : printf("\t snd_cwnd %lu snd_ssthresh %lu\n", tp->snd_cwnd, tp->snd_ssthresh); on one machine I'd type : ttcp -r on the machine which I want to observe its TCP i'd type : ttcp -t -d and then type in some lines and close the connection. then i'd type : trpt -s and obtain that in fact cwnd is being initialised to a huge value. Here's the trpt -s output : ---------------------------------------------------------------------------- ------ c456c2e0: 265 SYN_SENT:output [59c75d82..59c75d6e)@0(win=4000) -> SYN_SENT rcv_nxt 0 rcv_wnd 0 snd_una 59c75d82 snd_nxt 59c75d83 snd_max 59c75d83 snd_wl1 0 snd_wl2 0 snd_wnd 0 snd_cwnd 1073725440 snd_ssthresh 1073725440 265 CLOSED:user CONNECT -> SYN_SENT rcv_nxt 0 rcv_wnd 0 snd_una 59c75d82 snd_nxt 59c75d83 snd_max 59c75d83 snd_wl1 0 snd_wl2 0 snd_wnd 0 snd_cwnd 1073725440 snd_ssthresh 1073725440 265 SYN_SENT:input b22eb37c@59c75d83(win=4470) -> ESTABLISHED rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d83 snd_nxt 59c75d83 snd_max 59c75d83 snd_wl1 b22eb37d snd_wl2 59c75d83 snd_wnd 4470 snd_cwnd 95681100 snd_ssthresh 1073725440 265 ESTABLISHED:output [59c75d83..59c75d6f)@b22eb37d(win=4470) -> ESTABLISHED rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d83 snd_nxt 59c75d83 snd_max 59c75d83 snd_wl1 b22eb37d snd_wl2 59c75d83 snd_wnd 4470 snd_cwnd 95681100 snd_ssthresh 1073725440 939 ESTABLISHED:output [59c75d83..59c75d6f)@b22eb37d(win=4470) -> ESTABLISHED rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d83 snd_nxt 59c75d89 snd_max 59c75d89 snd_wl1 b22eb37d snd_wl2 59c75d83 snd_wnd 4470 snd_cwnd 95681100 snd_ssthresh 1073725440 939 ESTABLISHED:user SEND -> ESTABLISHED rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d83 snd_nxt 59c75d89 snd_max 59c75d89 snd_wl1 b22eb37d snd_wl2 59c75d83 snd_wnd 4470 snd_cwnd 95681100 snd_ssthresh 1073725440 301 FIN_WAIT_1:output [59c75d89..59c75d75)@b22eb37d(win=4470) -> FIN_WAIT_1 rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d89 snd_nxt 59c75d8a snd_max 59c75d8a snd_wl1 b22eb37d snd_wl2 59c75d83 snd_wnd 4470 snd_cwnd 95681100 snd_ssthresh 1073725440 301 ESTABLISHED:user DISCONNECT -> FIN_WAIT_1 rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d89 snd_nxt 59c75d8a snd_max 59c75d8a snd_wl1 b22eb37d snd_wl2 59c75d83 snd_wnd 4470 snd_cwnd 95681100 snd_ssthresh 1073725440 301 FIN_WAIT_1:user DETACH -> FIN_WAIT_1 rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d89 snd_nxt 59c75d8a snd_max 59c75d8a snd_wl1 b22eb37d snd_wl2 59c75d83 snd_wnd 4470 snd_cwnd 95681100 snd_ssthresh 1073725440 301 FIN_WAIT_1:input b22eb37d@59c75d8a(win=4470) -> FIN_WAIT_2 rcv_nxt b22eb37d rcv_wnd 4470 snd_una 59c75d8a snd_nxt 59c75d8a snd_max 59c75d8a snd_wl1 b22eb37d snd_wl2 59c75d8a snd_wnd 4470 snd_cwnd 65535 snd_ssthresh 1073725440 301 FIN_WAIT_2:input b22eb37d@59c75d8a(win=4470) -> TIME_WAIT rcv_nxt b22eb37e rcv_wnd 4470 snd_una 59c75d8a snd_nxt 59c75d8a snd_max 59c75d8a snd_wl1 b22eb37d snd_wl2 59c75d8a snd_wnd 4470 snd_cwnd 65535 snd_ssthresh 1073725440 301 TIME_WAIT:output [59c75d8a..59c75d76)@b22eb37e(win=4470) -> TIME_WAIT rcv_nxt b22eb37e rcv_wnd 4470 snd_una 59c75d8a snd_nxt 59c75d8a snd_max 59c75d8a snd_wl1 b22eb37d snd_wl2 59c75d8a snd_wnd 4470 snd_cwnd 65535 snd_ssthresh 1073725440 ---------------------------------------------------------------------------- ------ I don't know if the problem is a mistake in my observations or is a bug in my own kernel or anything else please if anyone knows anything let me know asap. tanx Toni Soueid djt2000@inco.com.lb To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message