Date: Sat, 23 Jul 2005 01:42:48 +0200 From: Jeremie Le Hen <jeremie@le-hen.org> To: Jone Jas <jas_arlerr@yahoo.com.cn> Cc: freebsd-ipfw@freebsd.org Subject: Re: ipfw+dummynet bandwidth control for multi-ip jail Message-ID: <20050722234248.GZ39292@obiwan.tataz.chchile.org> In-Reply-To: <20050722162332.53720.qmail@web15010.mail.cnb.yahoo.com> References: <20050722162332.53720.qmail@web15010.mail.cnb.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, > I have a jail with 4 ips, say 10.10.1.1-4, the net interface is lnc0. > I would like to use ipfw(8) and dummynet to control the bandwidth of the > jail, also the different ips. I know that only limit the jail's inbound and > outbound bandwidth is very simple. But for the multi-ip jail, I guess that > I should use the dynamic queue rules of ipfw(8). > My idea is like this: configure the jail's pipe for given bandwidth, > while the 4 ips with 4 queues with different weights. The jail's pipe is > the 4 queues' parent pipe. They share the pipe's bandwidth. The 4 > queues can be created using the "mask" option in ipfw(8) rule. Is this > feasible? > I've read the ipfw(8) man page, but found ALMOST nothing about the > jail related configuration. I also googled the Internet, few things helpful. I > am not very familiar with ipfw and dummynet. Any one with any hints or > directions is appreciated! What's wrong with : %%% # Upload ipfw pipe 1 config 100KBits/s ipfw queue 1 config pipe 1 weight 25 mask src-ip 0xfffffff # Download ipfw pipe 2 config 100KBits/s ipfw queue 2 config pipe 2 weight 25 mask dst-ip 0xfffffff ipfw add queue 1 any from any to any xmit lnc0 ipfw add queue 2 any from any to any recv lnc0 %%% Note that I didn't tested, this comes from my memory. Regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050722234248.GZ39292>