Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2015 21:04:27 +0200
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Sami Halabi <sodynet1@gmail.com>
Cc:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>
Subject:   Re: traffic prioritize
Message-ID:  <CA%2BhQ2%2BjbmQiWVed9ZSBt2gKjh%2Bc8yx3_Ra=qjQM=eGpgAC=1tw@mail.gmail.com>
In-Reply-To: <CAEW%2BogbCaEPef1Q3Fw1EtbvOs1Z5jKrzjve7XNprrkn7SM63HA@mail.gmail.com>
References:  <CAEW%2BogbZUEYvqCr9gOdwdYujgd8u8ym6nWHjDCP43y2n-cPKvw@mail.gmail.com> <CAEW%2BogbrR4tpBe2C-1ZQsByZwPTk91TbnikdD%2B90yaiFvC1oew@mail.gmail.com> <CAEW%2BogbCaEPef1Q3Fw1EtbvOs1Z5jKrzjve7XNprrkn7SM63HA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 17, 2015 at 4:38 PM, Sami Halabi <sodynet1@gmail.com> 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)
-----------------------------------------+-------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2BjbmQiWVed9ZSBt2gKjh%2Bc8yx3_Ra=qjQM=eGpgAC=1tw>