Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Apr 2001 16:05:02 +0200
From:      "Toni SOUEID" <djt2000@inco.com.lb>
To:        <freebsd-bugs@freebsd.org>
Cc:        <freebsd-net@freebsd.org>
Subject:   Problem in TCP initialisation of cwnd
Message-ID:  <000901c0c422$bd356860$941f7ec2@hamster>

next in thread | raw e-mail | index | archive | help
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> -> 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)<SYN,ACK> -> 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)<ACK> ->
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)<ACK,PUSH> ->
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)<ACK,FIN> ->
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)<ACK> -> 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)<ACK,FIN> -> 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)<ACK> ->
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-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000901c0c422$bd356860$941f7ec2>