Help needed with traffic control script.

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.

I am having shaping traffic using tc, I have been trying for a very long
time, and I just didn't get it to work the way I want it.

I will really appriciate it if you experts will have a look at my script
and tell me what I do wrong.

First, I`ll describe my envornment, than my requirements.

I run a small server on Debian etch with kernel version 2.6.7.

the server ip is 10.0.0.2

I have another machine in the lan, its ip is 10.0.0.1

I am connected to the internet via adsl model that acts as a router
(10.0.0.138, I set it to be the gateway for both machines).

my upload capacity is around 110 Kilo-bytes per second.


I want to control engress on the server.

my requrements:

1. I want the server to use no more than 100 Kbps when sending to the
internet.

2. I don't want to limit the upload at all to other machines in the
network (packets to the network gets free pass).

3. I want good download performence to the server. (prioritize ACK and
high TOS packets).

4. I want http traffic to the internet (not to the LAN) get at least
81Kbps (if it needs it).

5. I want other traffic to the internet get at least 9Kbps (if it needs it).

6. I want traffic http traffic to be shared fairly between connected ip
addresses, meaning if

  two clients connects, one opens many connections and one opens one
connection, I want them both to get approximatly

  the same bandwidth.


to do all this, I am trying to create a tree like this:


ROOT_QUEUE (HTB)

+- LAN_QUEUE (HTB, rate 100Mbit)

+- INET_QUEUE (HTB, rate 100Kbps)

    + INET_INTERACTIVE (HTB, rate 10Kbps, ceil 100Kbps, prio 2)

    + INET_DEFAULT  (HTB, rate 90Kbps, ceil 100Kbps, prio 1)

       + INET_HTTP  (HTB, rate 81Kbps, ceil 90Kbps)

          + SFQ

       + INET_UNCLASSIFIED (HTB, 9Kbps, ceil 90Kbps)

           +SFQ


attached is my script, which does not seem to work.

some of the problems with it currently are :

1. unclassified packets (not http) can get bandwidth even if http needs it

2. users with many connections opened to http gets more bandwidth than
users with few connections.


Thanks.








Attachment: tc_init.sh
Description: application/shellscript

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux