From owner-freebsd-net@FreeBSD.ORG Fri Apr 17 19:04:30 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8016E723 for ; Fri, 17 Apr 2015 19:04:30 +0000 (UTC) Received: from mail-lb0-x22d.google.com (mail-lb0-x22d.google.com [IPv6:2a00:1450:4010:c04::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05FB9DEB for ; Fri, 17 Apr 2015 19:04:30 +0000 (UTC) Received: by lbbuc2 with SMTP id uc2so90286515lbb.2 for ; Fri, 17 Apr 2015 12:04:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=NXnZCfGnvrU0QbluqHG+ZJUcBbiQwSl9OrAD9FtHVFI=; b=JNpqjXeHzAXikJjI7FwqQhKbBy3QtQ1MCSknlKtpAt2UZ/d4t6CG97w27tlXsEG459 J525JYIESHbinHfOPeBe573GDZERrVRkUqr3LALcWsynlHP2KLNRdmslZwknW+3K5XPw 1TQLSjz3i+mEpRAZFivNK+gM3h3T4bS3qr7n4IM0L2MdL0X2cKhmuXW2bOtid+hxVdhs vBILyMC0jK1fEEV1gST1vHRXjs9C77shmIwj06EPDpm11hTasED1q+gDZDyiyih4CTHE DEoMNRLheRba2HHqASDrGVEAqvwKPdFwj32Sb6QVP8D04mlW7nEO79UoHYp+RnWJWoT/ E8Jw== MIME-Version: 1.0 X-Received: by 10.112.218.40 with SMTP id pd8mr5437091lbc.71.1429297467594; Fri, 17 Apr 2015 12:04:27 -0700 (PDT) Sender: rizzo.unipi@gmail.com Received: by 10.114.180.4 with HTTP; Fri, 17 Apr 2015 12:04:27 -0700 (PDT) In-Reply-To: References: Date: Fri, 17 Apr 2015 21:04:27 +0200 X-Google-Sender-Auth: g2Er7ocudhg9UDY5hG8AS_i-Jh0 Message-ID: Subject: Re: traffic prioritize From: Luigi Rizzo To: Sami Halabi Cc: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Apr 2015 19:04:30 -0000 On Fri, Apr 17, 2015 at 4:38 PM, Sami Halabi wrote: > hi, > I need to set some QoS on traffic. > I use ipfw & dummynet, all my search to cane to use queue with weight, > however its said that this method not prioritize traffic rather that > splitting the pipe according to the weights (if i read correctly should sum > to 100). > > Any other method or corrected method would be appreciated. > > my current config is: > one_pass=0 > em0 is my uplink 100Mbit link > the traffic is stuck on queue rules and not forwarded. > ============================== > ipfw pipe 123 config bw 100Mbit > ipfw queue 1 config pipe 123 weight 40 > ipfw queue 2 config pipe 123 weight 30 > ipfw queue 3 config pipe 123 weight 29 > ipfw queue 4 config pipe 123 weight 1 > > ipfw add 1000 queue 1 tcp from any 5060-5061 to any recv em0 > ipfw add 2000 queue 2 tcp from any 80,443,21 to any recv em0 > ipfw add 3000 queue 3 all from any 53 to any recv em0 > ipfw add 4000 queue 4 all from any to any recv em0 > ipfw add 5000 allow all from any to any > Sami hi, there is no need for the sum of weights to be 100. Surely you need one_pass=1 otherwise traffic ripples from queue to queue. As MIchael says, you need to make the pipe's capacity slightly less than the uplink's bandwidth or otherwise queueing does not occur on the pipe but on the upstream link (and dummynet does not account for framing and mac headers, so that's at least 38 bytes or 304 bits per packet). Also you won't have queueing unless traffic exceeds the pipe's bandwidth. cheers luigi > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" -- -----------------------------------------+------------------------------- Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione http://www.iet.unipi.it/~luigi/ . Universita` di Pisa TEL +39-050-2217533 . via Diotisalvi 2 Mobile +39-338-6809875 . 56122 PISA (Italy) -----------------------------------------+-------------------------------