All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Phill" <PedroPhill@seznam.cz>
To: lartc@vger.kernel.org
Subject: [LARTC] HTB - shaping services and IP
Date: Thu, 18 Sep 2003 06:47:15 +0000	[thread overview]
Message-ID: <marc-lartc-106386774113974@msgid-missing> (raw)

[-- Attachment #1: Type: text/plain, Size: 3136 bytes --]

Hello all,
    I am trying to solve this problem for more than a month and can not still find a way how to do it. 
If you could please help me and many other people interested in the same problem.

Lets say, I got this configuration
_____________________________________________      160kbps/96kbps    _____
|imq0(eth1, eth2) Linux router with NAT>ppp0|------------------------|ISP|
---------------------------------------------                        -----
    +|Roman| - 192.168.1.10 on eth1
    +|Phill| - 192.168.2.10 on eth2
        + ...

The point is, that I want to shape the speed of each client 
and I want to shape the speed of the services the client uses.
I don't use iptables to mark the packets, because the use of IMQ, 
but I know that there is a patch for this.

So for ex. I want to do if the user is downloading something from FTP, 
that he would be able to use the other services like websurfing 
or playing games at the same speed as if he didn't download.

Roman -  Rate 80 Ceil 160
   +FTP Rate 1 Ceil 160
   +Other Traffic Rate 79 Ceil 160

Then I got Phill  with the same settings, 
but that if Roman is downloading something from FTP it will slow down 
while Phill is surfing the web. 
There will be some clients, whoose services I dont want to shape, 
that's why I want to do it this way.

Please help me any way, I tried almost everything to get this working

Thank you very much,
    Phill

---This is my latest idea---

LOCAL="imq0"
NET="ppp0" 

IPT=/sbin/iptables 

modprobe imq numdevs=1
ip link set imq0 up 
$IPT -t mangle -A PREROUTING -i ppp0 -j IMQ 

tc qdisc add dev $LOCAL root handle 1: htb default 999

tc class add dev $LOCAL parent 1:0  classid 1:1  htb rate 160kbit ceil 160kbit

#Roman
    tc class add dev $LOCAL parent 1:1 classid 1:110 htb rate 80kbit ceil 160kbit
        tc class add dev $LOCAL parent 1:110 classid 1:1101 htb rate rate 79kbit ceil 160kbit
        tc class add dev $LOCAL parent 1:110 classid 1:1102 htb rate 1kbit ceil 160kbit
    tc filter add dev $LOCAL parent 1:0 protocol ip u32 match ip dst 192.168.1.10 flowid 1:110
        tc filter add dev $LOCAL parent 1:110 protocol ip u32 match ip dst 192.168.1.10 flowid 1:1101
        tc filter add dev $LOCAL parent 1:110 protocol ip u32 match ip dport 20 0xffff flowid 1:1102 
        tc filter add dev $LOCAL parent 1:110 protocol ip u32 match ip dport 21 0xffff flowid 1:1102 
#Phill
    tc class add dev $LOCAL parent 1:1 classid 1:210 htb rate 80kbit ceil 160kbit 
        tc class add dev $LOCAL parent 1:210 classid 1:2101 htb rate rate 79kbit ceil 160kbit
        tc class add dev $LOCAL parent 1:210 classid 1:2102 htb rate 1kbit ceil 160kbit
    tc filter add dev $LOCAL parent 1:0 protocol ip u32 match ip dst 192.168.1.10 flowid 1:210
        tc filter add dev $LOCAL parent 1:210 protocol ip u32 match ip dst 192.168.1.10 flowid 1:2101
        tc filter add dev $LOCAL parent 1:210 protocol ip u32 match ip dport 20 0xffff flowid 1:2102 
        tc filter add dev $LOCAL parent 1:210 protocol ip u32 match ip dport 21 0xffff flowid 1:2102  

[-- Attachment #2: Type: text/html, Size: 6159 bytes --]

             reply	other threads:[~2003-09-18  6:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-18  6:47 Phill [this message]
2003-09-19  4:56 ` [LARTC] HTB - shaping services and IP Martin A. Brown
2003-09-19  6:49 ` Phill
2003-09-19  6:57 ` Phill
2003-09-21  5:22 ` Martin A. Brown
2003-09-21  6:25 ` Phill

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-106386774113974@msgid-missing \
    --to=pedrophill@seznam.cz \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.