From owner-freebsd-ipfw@FreeBSD.ORG Fri Nov 26 10:16:19 2010 Return-Path: Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A90DB1065670 for ; Fri, 26 Nov 2010 10:16:19 +0000 (UTC) (envelope-from john@traktor.dnepro.net) Received: from smtp-out.dnepro.net (smtp-out.dnepro.net [195.24.131.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2C0828FC14 for ; Fri, 26 Nov 2010 10:16:18 +0000 (UTC) Received: from traktor.dnepro.net (localhost [127.0.0.1]) by traktor.dnepro.net (8.14.3/8.14.3) with ESMTP id oAQ9dDlR071917 for ; Fri, 26 Nov 2010 11:39:14 +0200 (EET) (envelope-from john@traktor.dnepro.net) Received: (from john@localhost) by traktor.dnepro.net (8.14.3/8.14.3/Submit) id oAQ9dDjt071916 for freebsd-ipfw@freebsd.org; Fri, 26 Nov 2010 11:39:13 +0200 (EET) (envelope-from john) Date: Fri, 26 Nov 2010 11:39:13 +0200 From: Eugene Perevyazko To: freebsd-ipfw@freebsd.org Message-ID: <20101126093913.GA68982@traktor.dnepro.net> Mail-Followup-To: freebsd-ipfw@freebsd.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Subject: Re: two questions:1 relationship between dummynet and wireshark 2 how to add latency for each packet to be sent X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2010 10:16:19 -0000 On Thu, Nov 25, 2010 at 03:31:16PM +0000, nangergong wrote: > > 2 how to add latency for each packet to be sent > > I want to vary the delays(latencies) for different packets. So, is there a > way to add latency for for each packet to be sent. For example, bind one > pipe to one packet. Thank you! If you need to add random delays you could try several pipes with different delay and "prob" option of ipfw. Like add 1000 prob 0.2 pipe 1 add 1010 prob 0.2 pipe 2 add 1020 prob 0.1 pipe 3 etc... Then you should take into account that with one_pass=1 probability for a packet to match 1010 in that case would be (1.0-0.2)*0.2 and to match 1020 (1.0-0.2)*(1.0-0.2)*0.1 -- Eugene Perevyazko