Bandwidth shaping on the local machine HELP!

Bandwidth shaping on the local machine HELP!

Post by Graeme Hinchliff » Sun, 07 Sep 2003 00:27:34



Hiya
        I would like to know if anyone can help me with a problem RE bandwidth
shaping.

        The situation is this.  We have a backup server which backs up our
servers via ethernet.  Now the server could quite easily saturate the port
on one of the client machines, so we have had to throttle it back in the
software, this however means that when backing up 30 machines the thottle
applies across the whole group and not per machine.  So the backup server
isn't using all of the availible bandwidth.

        Idealy we want to be able to throttle per machine, but this functionality
will not be availible until somewhere like 2004 or 2005.

        I came up with the idea of using the linux kernel to do the bandwidth
shaping on the machines and have been looking into this.  What I want to
do, is have a script that will shape the INBOUND traffic to the box, so
hold back the incomming data (drop packets whatever) before it gets to the
backup software, and hence throttling back the server.  As the data comes
from the clients this is the neatest way I can see of doing it, not all
clients are capable of QoS and not all are linux (unfortunately).

        I have had a play with CBQ.init but this seems to only work on outbound
traffic from the machine, which is great but in the wrong direction.

Does anyone know of a nice way that I could throttle bandwidth on INBOUND
connections, and ideally apply a hierachy, or at least apply the throttle
to multiple IP addresses or an entire subnet.

Many thanks

Graeme

 
 
 

Bandwidth shaping on the local machine HELP!

Post by Horst Knobloc » Sun, 07 Sep 2003 01:43:08



[Traffic shaping on inbound traffic]

Quote:

> I have had a play with CBQ.init but this seems to only work on outbound
> traffic from the machine, which is great but in the wrong direction.
> Does anyone know of a nice way that I could throttle bandwidth on INBOUND
> connections [...]

If you want to shape inbound traffic you need to deploy the
Immediate Queueing Device (IMQ). More information at
http://lartc.org/howto/lartc.imq.html
http://trash.net/~kaber/imq/

I don't know whether there are good ready-to-go scripts utilizing
this and allow INBOUND shaping. In the worst case you need to
write your own. :-(

HTH

Ciao, Horst
--
?When pings go wrong (It hurts me too)? E.Clapton/E.James/P.Tscharn

 
 
 

Bandwidth shaping on the local machine HELP!

Post by Alexander Cloute » Sun, 07 Sep 2003 09:15:21




> [Traffic shaping on inbound traffic]

>> I have had a play with CBQ.init but this seems to only work on outbound
>> traffic from the machine, which is great but in the wrong direction.
>> Does anyone know of a nice way that I could throttle bandwidth on INBOUND
>> connections [...]

> If you want to shape inbound traffic you need to deploy the
> Immediate Queueing Device (IMQ). More information at
> http://lartc.org/howto/lartc.imq.html
> http://trash.net/~kaber/imq/

> I don't know whether there are good ready-to-go scripts utilizing
> this and allow INBOUND shaping. In the worst case you need to
> write your own. :-(

me me me me me

/me steps into the limelight as the audience leaves....

http://digriz.org.uk/jdg-qos-script/

Regards

Alex

 
 
 

Bandwidth shaping on the local machine HELP!

Post by Denn » Sat, 13 Sep 2003 12:25:35





> > [Traffic shaping on inbound traffic]

> >> I have had a play with CBQ.init but this seems to only work on outbound
> >> traffic from the machine, which is great but in the wrong direction.
> >> Does anyone know of a nice way that I could throttle bandwidth on INBOUND
> >> connections [...]

> > If you want to shape inbound traffic you need to deploy the
> > Immediate Queueing Device (IMQ). More information at
> > http://lartc.org/howto/lartc.imq.html
> > http://trash.net/~kaber/imq/

> > I don't know whether there are good ready-to-go scripts utilizing
> > this and allow INBOUND shaping. In the worst case you need to
> > write your own. :-(

> me me me me me

> /me steps into the limelight as the audience leaves....

> http://digriz.org.uk/jdg-qos-script/

> Regards

> Alex

You just need 1 box in between and you can control traffic in either
direction with a commercial add-on to linux. You'll spend more in time
than it costs trying to cobble together stuff that works half as well.
You'll even be able to manage the aggregate (ie set dynamic limits
based on how many servers are active or based on the other traffic on
the network).

www.etinc.com

 
 
 

1. Howto redirect traffic from local machine to internet back to local machine?

Hi!

I have the following problem:
A program (malware) is running on my linux box and i want to check what it
does.
This program sends a lot of traffic to different IP addresses on the internet.
I know the destination port(s), but i do not know the IP in advance.

How can i redirect all traffic (with known dest port) originating from my
local box to the internet back to my local machine?

To make it clearer:
Assume i want to redirect all connection attempts to external mail-servers
coming from my local machine back to my own box.

This is what i tried so far (my box has IP 192.168.100.182):
# cat fw.sh

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -F
iptables -t nat -A PREROUTING -p tcp -d ! 192.168.100.0/24 --dport 25 \
         -j DNAT --to 127.0.0.1:25

but unfortunately, it does not work:
$ telnet mail.gmx.net 25
Trying 213.165.64.20...
Connected to mail.gmx.net.     <---- of course, that's not my machine
Escape character is '^]'.
220 {mp033} GMX Mailservices ESMTP

The same happens with
iptables -t nat -A PREROUTING -p tcp -d ! 192.168.100.182 --dport 25 \
         -j DNAT --to 127.0.0.1:25

Why does this not work?

Can any kind soul please help me?

Thanks in advance!

Regards
Martin.

2. Escaping "a multiword arugment" into sh

3. Shape Ups,Men's Shape Ups,Men's Skechers Shape Ups - new styles!

4. HD partitioning

5. Help needed with packet filtering / bandwidth shaping

6. Home page for Harvest

7. Inbound bandwidth shaping ideas?

8. Question? Diamond video & Linux

9. bandwidth throttling/shaping

10. packet shaping / bandwidth throttling

11. Need Custom App for Linux - Bandwidth shaping

12. Traffic shaping / bandwidth throttling with Linux

13. bandwidth shaping traffic from/to specific subnet