OPNsense Forum

Archive => 16.7 Legacy Series => Topic started by: smerhan on November 21, 2016, 11:31:22 pm

Title: Share bandwidth evenly don't work as expected
Post by: smerhan on November 21, 2016, 11:31:22 pm
Hi,

shaper config from section "Share bandwidth evenly" in https://docs.opnsense.org/manual/how-tos/shaper.html don't work as expected - bandwidth defined in pipe is reserved for each client instead of shared evenly between all clients.

My target is shaper setup of same type as MikroTik PCQ queue or pfSense setup from Ecnerwal here: https://forum.pfsense.org/index.php?topic=99529.msg555886#msg555886

Thanks.
Joe
Title: Re: Share bandwidth evenly don't work as expected
Post by: pingecho on November 23, 2016, 06:19:22 pm
Hi!
I've also noted that the shaper doesn't work as expected, but I have a fix for that.

Skip the configuration in GUI, Traffic shaper, settings. Delete all traffic shaper settings! This assumes you have WAN interface em0 and download bandwidth 50Mbit/s and upload bandwidth 20Mbit/s.

Log in via ssh and execute

/etc/rc.d/ipfw onestart

ipfw pipe 10 config bw 50Mbit
ipfw pipe 20 config bw 20Mbit

ipfw queue 10 config pipe 10 mask dst-ip 0xffffffff
ipfw queue 20 config pipe 20 mask src-ip 0xffffffff

ipfw add 160 queue 10 ip from any to any in via em0
ipfw add 170 queue 20 ip from any to any out via em0


Now this should work and traffic shaper status is working in the GUI.

Now the total bandwidth is devided evenly between hosts.


It's of course possible to put the config in a script so it survive reboots.