From owner-freebsd-net@FreeBSD.ORG  Mon Dec  5 12:45:51 2005
Return-Path: <owner-freebsd-net@FreeBSD.ORG>
X-Original-To: freebsd-net@freebsd.org
Delivered-To: freebsd-net@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 5F5F816A41F
	for <freebsd-net@freebsd.org>; Mon,  5 Dec 2005 12:45:51 +0000 (GMT)
	(envelope-from saurin@dcs.gla.ac.uk)
Received: from mr1.dcs.gla.ac.uk (mr1.dcs.gla.ac.uk [130.209.249.184])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 5031943D58
	for <freebsd-net@freebsd.org>; Mon,  5 Dec 2005 12:45:50 +0000 (GMT)
	(envelope-from saurin@dcs.gla.ac.uk)
Received: from ex1.ad.dcs.gla.ac.uk ([130.209.249.157]:25526)
	by mr1.dcs.gla.ac.uk with esmtp (Exim 4.42) id 1EjFj2-0005GL-De
	for freebsd-net@freebsd.org; Mon, 05 Dec 2005 12:45:48 +0000
Received: from [130.209.254.20] ([130.209.254.20]) by ex1.ad.dcs.gla.ac.uk
	over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); 
	Mon, 5 Dec 2005 12:45:48 +0000
Mime-Version: 1.0 (Apple Message framework v746.2)
Content-Transfer-Encoding: 7bit
Message-Id: <79336124-B4D5-43A3-88D2-9FE0D4A4D120@dcs.gla.ac.uk>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
To: freebsd-net@freebsd.org
From: Alvaro Saurin <saurin@dcs.gla.ac.uk>
Date: Mon, 5 Dec 2005 12:51:56 +0000
X-Mailer: Apple Mail (2.746.2)
X-OriginalArrivalTime: 05 Dec 2005 12:45:48.0331 (UTC)
	FILETIME=[D118E7B0:01C5F999]
Subject: Dummynet and fragments
X-BeenThere: freebsd-net@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: Networking and TCP/IP with FreeBSD <freebsd-net.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-net>
List-Post: <mailto:freebsd-net@freebsd.org>
List-Help: <mailto:freebsd-net-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-net>,
	<mailto:freebsd-net-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Dec 2005 12:45:51 -0000


Hi,

I was wondering if someone could help me with a small problem with  
dummynet. I have a typical dumbbell configuration where I have a  
FreeBSD 6.0 machine with dummynet. It is something like this:

                                                  *----- ubuntu6
                                                  |     10.10.3.6
                      10.10.1.3      10.10.1.4    |
   ubuntu2 ---[hub]--- ubuntu3------- BSD4------[hub]--- ubuntu5
  10.10.2.2     |     10.10.2.3      10.10.3.4          10.10.3.5
                |
   ubuntu1 -----*
  10.10.2.1

I want to set the delay, bandwidth, etc. limit in BSD4, using  
something like

 >        sudo ipfw add 3 pipe 3 all from ubuntu2 to ubuntu6
 >        sudo ipfw add 4 pipe 4 all from ubuntu6 to ubuntu2
 >        sudo ipfw pipe 3 config bw 12000Kbit/s queue 17500bytes  
delay 5ms
 >        sudo ipfw pipe 4 config bw 12000Kbit/s queue 17500bytes  
delay 5ms

for a limit between 'ubuntu2' and 'ubuntu6', leading to a new rule  
set like

 >        sudo ipfw -a list

00003      0        0 pipe 3 ip from 10.10.2.2 to 10.10.3.6
00004      0        0 pipe 4 ip from 10.10.3.6 to 10.10.2.2
00100   1862   144376 allow ip from any to any via lo0
00200      0        0 deny ip from any to 127.0.0.0/8
00300      0        0 deny ip from 127.0.0.0/8 to any
65000 118952 53165334 allow ip from any to any
65100      0        0 deny log logamount 5000 ip from any to any frag
65535      8      512 deny ip from any to any

 >        sudo ipfw pipe show

00003:  12.000 Mbit/s    5 ms  17 KB 0 queues (1 buckets) droptail
00004:  12.000 Mbit/s    5 ms  17 KB 0 queues (1 buckets) droptail

The problem comes here: if I 'ping'  between these two machines,  
everything is fine, but if I 'ping' with a packet size of, ie, 2000,  
no packets arrive at the receiver. Does it have to do with fragmented  
packets? Do I have to include any other rule for dealing with fragments?

And another question: why do I need to specify a 5ms delay for a  
total RTT of 40ms?

Thanks in advance

Alvaro

-- 
Alvaro Saurin <alvaro.saurin@gmail.com> <saurin@dcs.gla.ac.uk>