Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2006 23:29:28 +0700
From:      budsz <budiyt@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Help about dynamic rule dummynet
Message-ID:  <4d4dc3640609220929u5e43300fk8d61eaaa1edad5c3@mail.gmail.com>

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

I've old problem with dynamic rule dummynet. I've internet cafe and of
couse they could using download accelerator for download large file
from HTTP/FTP server. In this case they use Freshget or something like
that.  In /etc/rc.firewall I have rule like:

# Downstream for client
ipcl="192.168.0.0/24{1,10,11,12,13,14,50}"
bwdown="68Kbit/s"
${fwcmd} add 52 queue 1 ip from any to ${ipcl} out via ${ifint}
${fwcmd} queue 1 config weight 5 pipe 2 mask dst-ip 0x000000ff
${fwcmd} pipe 2 config bw ${bwdown}

# Upstream for client
bwup="36Kbit/s"
${fwcmd} add 53 queue 2 ip from ${ipcl} to any in via ${ifint}
${fwcmd} queue 2 config weight 5 pipe 3 mask src-ip 0x000000ff
${fwcmd} pipe 3 config bw ${bwup}

My LAN using private ip address block C (192.168.0.0/24), my client's
ip address 192.168.0.1, 192.168.0.10 - 192.168.0.14, ${ifint} is
inside interface, also I use  4.10-STABLE FreeBSD.

This illustration with output iftop:
www.yahoo.com        <=> client10.example.com      1.91Kb  1.93Kb  1.82Kb
www.hotmail.com      <=> client11.example.com      1.90Kb  1.91Kb  1.80Kb
www.friendster.com   <=> client12.example.com      1.50Kb  1.52Kb  1.51Kb
www.geocities.com    <=> client13.example.com      1.60Kb  1.64Kb  1.61Kb
www.geocities.com    <=> client14.example.com      1.54Kb  1.57Kb  1.53Kb

ftp.freebsd.org      <=> client01.example.com     10.92Kb 10.90Kb 10.89Kb
ftp.freebsd.org      <=> client01.example.com     11.87Kb 11.91Kb 11.90Kb
ftp.freebsd.org      <=> client01.example.com     12.88Kb 12.91Kb 12.89Kb
ftp.freebsd.org      <=> client01.example.com     10.70Kb 10.72Kb 10.71Kb
ftp.freebsd.org      <=> client01.example.com     10.75Kb 10.78Kb 10.77Kb

If 192.168.0.1 using accelerator to download large file and splited to
5 file simultantly, the client's (192.168.0.10 - 192.168.0.14) will
exhausted bandwidht.

How to resolve this problem, any suggestion?

TIA

-- 
budsz



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