Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 3 Sep 2002 15:08:05 +0200
From:      "Casper Kamp" <Casper@Cee-Kay.net>
To:        <yazzy@yazzy.org>
Cc:        <freebsd-isp@freebsd.org>
Subject:   RE: Traffic shaping/bandwidth limiting
Message-ID:  <2A4A1394811294499711AA09D2025F0E01970F@gaea.home.dutchcentral.net>

next in thread | raw e-mail | index | archive | help
Okay thanks!

But I'm wondering...  All these HOWTOs I see are based on a router like
setup, ie sharing on internet link with several boxes and shape this.

But wat I'm looking for is shaping per box, for example:

One box has 100 virtual HTTP domains on it, and per domain we limit now
with MOD_BANDWIDTH the max bandwidth they can use: I understand that
this is the best way to do, since the virtual domains; so mainly when
you want to do bandwidth limiting on virtual stuff, you have to look for
a daemon (or module) that support this internaly.

But on the same box each customer can upload/download their website via
PROFTPD (MySQL Auth). How should I limit the (overal) FTP port
bandwidth?

And even more specific, we have some services running on, lets say, port
60000 and want to limit only this port on the box.

What I like to achieve is that we can shape every port of the several
boxes separate, but am wondering the overhead per box, disadvantages
etc. I understand that dummynet is the way to do this... Or not? And
if... How ... ;-)

Heck, I feel like a complete newbie right now on this specific base ....


Thanks again!

- Casper

-----Original Message-----
From: Marcin Jessa [mailto:yazzy@yazzy.org]=20
Sent: dinsdag 3 september 2002 14:10
To: Casper Kamp
Cc: andy@fud.org.nz; freebsd-isp@freebsd.org
Subject: RE: Traffic shaping/bandwidth limiting


Hi.

Yeah, there is one dummynet howto on bsdpro.com that makes things pretty
clear.
An example of my dummynet rules:


### Dummynet bandwith limiting :) #####
#All machines share evenly a single link - 1000Kbit/s
        $fwcmd $flags add pipe 1 ip from any to 192.168.64.0/24
        $fwcmd $flags add queue 1 ip from any to 192.168.64.0/24
        $fwcmd $flags queue 1 config weight 5 pipe 1 mask dst-ip
0x000000ff
        $fwcmd $flags pipe 1 config bw 1000Kbit/s
#Except for some boxes .... :)
#Servers:
        $fwcmd $flags add 6 skipto 2001 ip from any to 192.168.64.4/32
        $fwcmd $flags add 6 skipto 2001 ip from 192.168.64.4/32 to any
        $fwcmd $flags add 6 skipto 2001 ip from any to 192.168.64.5/32
        $fwcmd $flags add 6 skipto 2001 ip from 192.168.64.5/32 to any

I have an entry in /etc/sysctl.conf as well:

#walk through several pipes but not just one:
net.inet.ip.fw.one_pass=3D0

Good luck.
YazzY


Casper Kamp said:
> Andy and list,
>
> Thanks for the answer. We are using mod_bandwidth allready successful,
> but I was wondering if this one is 'robust' enough to handle heavy hit
> loads (ie. >150 hits/sec) on sites that have a relative small
bandwidth
> limit (ie. 1 Mbits/sec). Just want to know peoples experience with
this
> one, before running into problems ;)
>
> For the ipfw/dummynet, I found lot's of very clear HOWTOs for ipfw,
> with some little dummynet sections, but is there a HOWTO that describe
> all the in and outs of dummynet?
>
> Thanks again all!
>
> - Casper
>
> -----Original Message-----
> From: Andrew Thompson [mailto:andy@fud.org.nz]
> Sent: dinsdag 3 september 2002 3:43
> Cc: freebsd-isp@freebsd.org
> Subject: Re: Traffic shaping/bandwidth limiting
>
>
> Hi Casper,
>
>
> I would use mod_bandwidth for virtual webhosting and then
ipfw/dummynet
>  for ftp, etc.   mod_bandwidth isnt in ports, so you will need to
> compile
>
> yoursefl.
>
>
> --Andy
>
> Casper Kamp wrote:
>
>>List,
>>
>>We are starting up some hosting facilities, and want to run some
> virtual
>>webhostings on FreeBSD. But we want to be able to set max bandwidth
per
>>virtual (Apache) host and max bandwidth for complete services, like
> HTTP,
>>FTP, etc etc.
>>
>>Can someone please advice us what we should use and how?
>>
>>
>>Thanks,
>>
>>- Casper
>>
>>
>>To Unsubscribe: send mail to majordomo@FreeBSD.org
>>with "unsubscribe freebsd-isp" in the body of the message
>>
>>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message


--=20
Marcin M. Jessa
Software developer/System Administrator
Wireless Reading Systems ASA
 Skreddervn 9
 N-1537 Moss
 Norway
 http://www.wrs.no
 Phone: +47 69 27 96 88
 Cellular: +47 988 505 44

-----------
My opinions may have changed, but not the fact that I am right.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




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