On Wed, 23 Feb 2005 16:28:04 +1300, Matthew Strickland wrote:
> Hey all,
>
> Is there a tool to deliberately slow down network speed, add latency, reduce
> bandwidth etc? Wanting to run it on a test server for reliability and sample
> field testing of database going to be used in a WAN enviroment.
theres a thread about this on comp.unix.bsd.openbsd.misc
(although I'm willing to bet OpenBSD isnt your OS)
I'll copy and paste the relevant bits anyway
<Q>
The user of this machine often sends large emails (often 3 meg
or more) and when this happens , the rest of the network chokes. is
there a way I can limit the upload speed of a particular machine to
say 4k/s max? Does PF have some feature for this?!?
Yes. altq is what you are looking for.
If all you want to do is limit the bandwidth for a simgle machine, you
can set up a default queue with total bandwidth equal to total outgoing
capacity, then set up a subqueue with the max bandwidth you want that
machine to use, then write one or more rules which pass the traffic from
that machine on the smaller queue. Let the rest of the traffic you pass
use the default queue.
Whether you NAT or not should not affect your queueing. Your pass rule will
be something like
pass from $bandwidth_hogger to any port $allowed_ports \
keep state queue thin_pipe
pass from $rest_of_lan to any port $allowed_ports \
keep state queue big_pipe
- assuming of course you have defined bandwidth_hogger, allowed_ports,
rest_of_lan and the queues thin_pipe, big_pipe already.
My PF tutorial (
http://www.bgnett.no/~peter/pf/en/) contains a few
reasonably clear examples lifted from real world use which are slightly
less complex than the ones in the excellent PF user guide.
HTH
--
Hardware, n.: The parts of a computer system that can be kicked