Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Oct 2001 13:15:11 +0200
From:      "Patrick O'Reilly" <patrick@mip.co.za>
To:        "Kenneth Wayne Culver" <culverk@wam.umd.edu>, <freebsd-questions@FreeBSD.ORG>
Subject:   RE: dummynet configured.
Message-ID:  <NDBBIMKICMDGDMNOOCAICEBIDLAA.patrick@mip.co.za>
In-Reply-To: <Pine.GSO.4.21.0110152009320.15839-100000@rac3.wam.umd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
What I have done is simple, but it places a permanent restriction on FTP etc
in favour of interactive things like ssh.  It goes something like this:

(Note that I put % values in place of bandwidth figures.  This is not legal
syntax - it's for explanation purposes.  You must do the math on your line!)

-------------------
ipfw pipe 1 config bw 100%
ipfw pipe 2 config bw 75%

ipfw add queue 1 tcp from any 22 to x.x.x.x/24 in  via de0   (ssh
connections are caught here)
ipfw add queue 1 tcp from x.x.x.x/24 to any 22 out via de0   (ssh
connections are caught here)
ipfw queue 1 config pipe 1 weight 30 mask dst-ip 0x000000ff  (ssh
connections may use 100% of available bandwidth)

ipfw add queue 2 ip from any to x.x.x.x/24 in via de0        (The rest is
caught here)
ipfw queue 2 config pipe 2 weight 30 mask dst-ip 0x000000ff  (ftp, http, etc
may only ever hog a max of 75% bandwidth)
-------------------

This is a rough example, but it demonstrates the idea.  You can fiddle with
the rules and pipes to reserve bandwidth for the various protocols.  The
only down-side, as mentioned before, is that you will effectively reduce
your FTP bandwidth to 75% of your line, even when no-one needs the other 25%
for anything!

I have found this scheme useful in keeping SMTP and POP below the radar too.
Previously we often had problems with line saturation while large mails were
sent/received, but now these transmissions trickle in/out at 25% of total
bandwidth, and no-one notices the impact of interactive performance at all.

I have added cron entries which adjust the pipe configs so that during the
day we preserve more bandwidth for ssh, but at night when downloads are
scheduled to run we give the ftp pipe more bandwidth.

Hope this is useful.

Patrick.

> -----Original Message-----
> From: owner-freebsd-questions@FreeBSD.ORG
> [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Kenneth Wayne
> Culver
> Sent: 16 October 2001 02:15
> To: freebsd-questions@FreeBSD.ORG
> Subject: dummynet configured.
>
>
> alright, I've got dummynet configured and it seems to give each user
> his/her fair share of bandwidth on my limited ADSL connection, but now
> I've got one more problem. I would like to also give certain interactive
> services a dedicated amount of bandwidth when it's needed. Things like dns
> and ssh are still jumpy at best (however if multiple downloads to
> different machines are running, they work great). Can anyone help me out
> here?
>
> here are my current dummynet settings (which seem to be working fine with
> ipfilter and ipnat running as my firewall and nat, all actual ip's are
> represented by x.x.x.x)
>
> ipfw add queue 1 ip from any to x.x.x.x/24 in via de0
> ipfw pipe 1 config bw 608Kbit/s
> ipfw queue 1 config pipe 1 weight 30 mask dst-ip 0x000000ff
>
> Thanks.
>
> Ken
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


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




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