Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jan 2006 17:59:19 +0700
From:      budsz <budiyt@gmail.com>
To:        freebsd-ipfw@freebsd.org
Subject:   Need help for dummynet
Message-ID:  <4d4dc3640601020259k770175d4l5b07343e185a0b2c@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi,

I hope you give me some advice or explaination about Dummynet.
I've googling/experiment for three a month to get the right answer how
to use WF2Q+ with Dummynet. I've a small internet cafe and after 4
years using FreeBSD+Dummynet with hardlink limiting policy. Here for
WF2Q+ implementation
in my internet cafe:

In /etc/rc.firewall look like:

# IP Address variable
ip_cl_01=3D"192.168.0.1/32"
ip_cl_10=3D"192.168.0.10/32"
ip_cl_11=3D"192.168.0.11/32"
ip_cl_12=3D"192.168.0.12/32"
ip_cl_13=3D"192.168.0.13/32"
ip_cl_14=3D"192.168.0.14/32"
ip_cl_50=3D"192.168.0.50/32"

# Bandwidth variable
bw_share=3D"152Kbit/s"

${fwcmd} add 104 queue 1 ip from ${ip_cl_01} to any via ${eth_1}
${fwcmd} add 105 queue 1 ip from any to ${ip_cl_01} via ${eth_1}
${fwcmd} add 106 queue 2 ip from ${ip_cl_10} to any via ${eth_1}
${fwcmd} add 107 queue 2 ip from any to ${ip_cl_10} via ${eth_1}
${fwcmd} add 108 queue 3 ip from ${ip_cl_11} to any via ${eth_1}
${fwcmd} add 109 queue 3 ip from any to ${ip_cl_11} via ${eth_1}
${fwcmd} add 110 queue 4 ip from ${ip_cl_12} to any via ${eth_1}
${fwcmd} add 111 queue 4 ip from any to ${ip_cl_12} via ${eth_1}
${fwcmd} add 112 queue 5 ip from ${ip_cl_13} to any via ${eth_1}
${fwcmd} add 113 queue 5 ip from any to ${ip_cl_13} via ${eth_1}
${fwcmd} add 114 queue 6 ip from ${ip_cl_14} to any via ${eth_1}
${fwcmd} add 115 queue 6 ip from any to ${ip_cl_14} via ${eth_1}
${fwcmd} add 116 queue 7 ip from ${ip_cl_50} to any via ${eth_1}
${fwcmd} add 117 queue 7 ip from any to ${ip_cl_50} via ${eth_1}
${fwcmd} queue 1  config pipe 3 weight 3 mask all
${fwcmd} queue 2  config pipe 3 weight 3 mask all
${fwcmd} queue 3  config pipe 3 weight 3 mask all
${fwcmd} queue 4  config pipe 3 weight 3 mask all
${fwcmd} queue 5  config pipe 3 weight 3 mask all
${fwcmd} queue 6  config pipe 3 weight 3 mask all
${fwcmd} queue 7  config pipe 3 weight 1 mask all
${fwcmd} pipe  3  config bw ${bw_share}

With that rule I want to limit every client (IN/OUT) with ratio:
for ex: client-01 =3D> 3/19 * 152 Kbit/s =3D 24 Kbit/s
          client-10 =3D> 3/19 * 153 Kbit/s =3D 24 Kbit/s
          etc..

I assume all of my client already active using internet. But sometime
"client-11" always get 100 Kbit/s. Does my rule is OK? if not, would
you give me example the right rule for this situation, of couse with
clarification (step by step).

FYI, I use FreeBSD 4.10-RELEASE & FreeBSD 4.11-STABLE.


Thanks You.

--
budsz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4d4dc3640601020259k770175d4l5b07343e185a0b2c>