[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lartc
Subject:    [LARTC] Re: Questin regarding HTB
From:       "Vlad LUPESCU" <vlad.lupescu () actualbvt ! ro>
Date:       2005-06-28 13:57:48
Message-ID: 003401c57be9$5fbaa0f0$07b27ec2 () bvt1
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Yes sure here they are:
The first one that i have received 2day and does not work almost at all:

#!/bin/bash

ETH_IN="eth1"
ETH_OUT="eth0"
BANDA_TOTALA="2Mbit"
# pentru neclasificati ar trebui sa fie banda minima  - 1k  - aici ar trebui
sa ajunga trafic necunoscut,
# care nu e organizat in shape-uri
BANDA_NECLASIFICATI="8kbit"

#Shape generale
/sbin/tc qdisc del dev $ETH_IN root
/sbin/tc qdisc del dev $ETH_OUT root
/sbin/tc qdisc add dev $ETH_IN root handle 1 htb default 10 r2q 2
/sbin/tc qdisc add dev $ETH_OUT root handle 1 htb default 10 r2q 2
/sbin/tc class add dev $ETH_IN parent 1: classid 1:2 htb rate $BANDA_TOTALA
/sbin/tc class add dev $ETH_OUT parent 1: classid 1:2 htb rate $BANDA_TOTALA
/sbin/tc class add dev $ETH_IN parent 1:2 classid 1:10 htb rate
$BANDA_NECLASIFICATI prio 4
/sbin/tc class add dev $ETH_OUT parent 1:2 classid 1:10 htb rate
$BANDA_NECLASIFICATI prio 4

#Shape client 1 - IP 194.126.178.1 si 194.126.179.0/28
/sbin/tc class add dev $ETH_IN parent 1:2 classid 1:101 htb rate 1024kbit
ceil 1100kbit quantum 65000 prio 4 burst 10k
/sbin/tc class add dev $ETH_OUT parent 1:2 classid 1:101 htb rate 1024kbit
ceil 1100kbit quantum 65000 prio 4 burst 10k
/sbin/tc filter add dev $ETH_IN parent 1:0 protocol ip prio 100 u32 match ip
dst 194.126.178.1/32 classid 1:101
/sbin/tc filter add dev $ETH_OUT parent 1:0 protocol ip prio 100 u32 match
ip src 194.126.178.1/32 classid 1:101
/sbin/tc filter add dev $ETH_IN parent 1:0 protocol ip prio 100 u32 match ip
dst 194.126.179.0/28 classid 1:101
/sbin/tc filter add dev $ETH_OUT parent 1:0 protocol ip prio 100 u32 match
ip src 194.126.179.0/28 classid 1:101


#Shapeclient 2 - IP 194.126.178.128/25
#/sbin/tc class add dev $ETH_IN parent 1:2 classid 1:102 htb rate 15Mbit
ceil 15Mbit quantum 65000 prio 4 burst 10k
#/sbin/tc class add dev $ETH_OUT parent 1:2 classid 1:102 htb rate 20Mbit
ceil 30Mbit quantum 65000 prio 4 burst 10k
#/sbin/tc filter add dev $ETH_IN parent 1:0 protocol ip prio 100 u32 match
ip dst 194.126.178.128/25 classid 1:102
#/sbin/tc filter add dev $ETH_OUT parent 1:0 protocol ip prio 100 u32 match
ip src 194.126.178.128/25 classid 1:102

They`ve told me that this one limits band only for extern but is FALSE it
limits ALL the bandwidth :(


The other one it works but also on entire bandwidth though i can make
guarantees individually. here is a pice of it (they are 512 IPs so .. :) )

#!/bin/sh
# kbps = kilobytes and kbit = kilobits
# 1kbps=8kbit. Don't forget it !

I="/sbin/iptables"
TC="/sbin/tc"

echo "";echo -e "`date +'%b %d %k:%M:%S'` \033[40m\033[1;32mStarting Traffic
Shaper Script...\033[0m"

#Reset everything to a known state (cleared)
$TC qdisc del dev eth0 root 2>/dev/null
$TC qdisc del dev eth0 ingress 2>/dev/null
$TC qdisc del dev eth1 root 2>/dev/null
$TC qdisc del dev eth1 ingress 2>/dev/null

$I -F -t mangle
$I -X -t mangle
$I -Z -t mangle

/root/mod.probe

#Setting rules
#-------------
#default class
$TC qdisc add dev eth0 root handle 1: htb
$TC qdisc add dev eth1 root handle 1:0 htb default 10

#root class
$TC class add dev eth0 parent 1: classid 1:1 htb rate 100Mbit
$TC class add dev eth1 parent 1: classid 1:1 htb rate 100Mbit

#trafic total server --> internet - upload
$TC class add dev eth0 parent 1:1 classid 1:10 htb rate 50Mbit prio 2
$TC qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
$TC class add dev eth1 parent 1:1 classid 1:10 htb rate 50Mbit prio 2
$TC qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10

#trafic LAN
$TC class add dev eth1 parent 1:1 classid 1:10 htb rate 10Mbit ceil 50Mbit
$TC qdisc add dev eth1 parent 1:10 handle 1: sfq perturb 10
$TC filter add dev eth1 parent 1: protocol ip handle 1 fw classid 1:10

#trafic forward ip_local --> server --> internet - upload
$TC class add dev eth0 parent 1:1 classid 1:10 htb rate 50Mbit prio 2
$TC qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
$TC class add dev eth1 parent 1:1 classid 1:10 htb rate 50Mbit prio 2
$TC qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10

#trafic LAN
$TC class add dev eth1 parent 1:1 classid 1:10 htb rate 10Mbit ceil 50Mbit
$TC qdisc add dev eth1 parent 1:10 handle 1: sfq perturb 10
$TC filter add dev eth1 parent 1: protocol ip handle 1 fw classid 1:10

#trafic forward ip_local --> server --> internet - upload
$TC class add dev eth0 parent 1:1 classid 1:20 htb rate 2Mbit ceil 20Mbit
$TC class add dev eth0 parent 1:20 classid 1:200 htb rate 2Mbit ceil 20Mbit
prio 2

#trafic forward internet --> server --> ip_local - download
$TC class add dev eth1 parent 1:1 classid 1:20 htb rate 9Mbit ceil 80Mbit
$TC qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
$TC class add dev eth1 parent 1:20 classid 1:200 htb rate 9Mbit ceil 80Mbit
prio 2


echo "";echo -e "`date +'%b %d %k:%M:%S'` \033[40m\033[1;32mLimitare Clasa
194.126.178.0/24\033[0m"
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||
#                                           194.126.178.2
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||
$TC class add dev eth1 parent 1:200 classid 1:202 htb rate 32kbit ceil 9Mbit
prio 2                             #download
$TC qdisc add dev eth1 parent 1:202 handle 202: sfq perturb 6
#download
$I -t mangle -A FORWARD -o eth1 -d 194.126.178.2 -j MARK --set-mark 2
#download
$TC filter add dev eth1 parent 1: prio 2 protocol ip handle 2 fw flowid
1:202                                   #download
#---------------------------------------------------------------------------
---------------------
$TC class add dev eth0 parent 1:200 classid 1:202 htb rate 32kbit ceil 6Mbit
prio 2                             #upload
$TC qdisc add dev eth0 parent 1:202 handle 202: sfq perturb 6
#upload
$I -t mangle -A FORWARD -o eth0 -s 194.126.178.2 -j MARK --set-mark 602
#upload
$TC filter add dev eth0 parent 1: prio 2 protocol ip handle 602 fw flowid
1:202                                 #upload


#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||
#                                           194.126.178.3
#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|||||||||||||||||||||
$TC class add dev eth1 parent 1:200 classid 1:203 htb rate 128kbit ceil
9Mbit prio 2                            #download
$TC qdisc add dev eth1 parent 1:203 handle 203: sfq perturb 6
#download
$I -t mangle -A FORWARD -o eth1 -d 194.126.178.3 -j MARK --set-mark 3
#download
$TC filter add dev eth1 parent 1: prio 2 protocol ip handle 3 fw flowid
1:203                                   #download
#---------------------------------------------------------------------------
---------------------
$TC class add dev eth0 parent 1:200 classid 1:203 htb rate 10Mbit ceil
16Mbit prio 2                            #upload
$TC qdisc add dev eth0 parent 1:203 handle 203: sfq perturb 6
#upload
$I -t mangle -A FORWARD -o eth0 -s 194.126.178.3 -j MARK --set-mark 603
#upload
$TC filter add dev eth0 parent 1: prio 2 protocol ip handle 603 fw flowid
1:203

on this one i can give what value i want for rate and ceil and works BUT
it`s using iptables and mangle and also its effect is on entire bandwidth

So...??


----- Original Message ----- 
From: "Kiruthika Selvamani" <kiruthika.selvamani@gmail.com>
To: "Vlad LUPESCU" <vlad.lupescu@actualbvt.ro>
Sent: Tuesday, June 28, 2005 4:48 PM
Subject: Re: [LARTC] Question regarding HTB


Can you post the HTB scripts you are using - that way it will be
easier to understand what you are trying to do
On 6/28/05, Vlad LUPESCU <vlad.lupescu@actualbvt.ro> wrote:
>
> Ok,
> So I am from Romania where we have this tiny problem. The IP clases are
> split in 2: metropolitan and extern (worldwide). We have 2 types of
> guaranteed band: metro and extern. Now.. the link comes into my gw. I have
> an IP which my ISP gave it to me which is eth0. I have 2 other PI clasess
> 194.126.178.0/23. What I want to do is this: make a HTB script which can
> limit the bandwidth on each PI individual (ex. on 178.7 i want to have
> 256kbits extern with 2Mbits metro, on 179.3 i want 128kb with 8mb and so
> on). All of HTB scripts that my friends gave it to me can limit ALL the
> bandwidth (extern+metro) and I don`t want that. I have all metro routes in
a
> file called 'clases' if this is important. If anyone can help me pls do
i`m
> desperate!!!!!!!
>
> 10q
> Vlad
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
>
>

-----------------------------------------
Vlad Lupescu

Network Admin
S.C. Actual BVT S.R.L.
www.actualbvt.ro
-----------------------------------------
[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1505" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>Yes sure here 
they are:<BR>The first one that i have received 2day and does not work almost at 
all:<BR><BR>#!/bin/bash<BR><BR>ETH_IN="eth1"<BR>ETH_OUT="eth0"<BR>BANDA_TOTALA="2Mbit"<BR># \
 pentru neclasificati ar trebui sa fie banda minima&nbsp; - 1k&nbsp; - aici ar 
trebui<BR>sa ajunga trafic necunoscut,<BR># care nu e organizat in 
shape-uri<BR>BANDA_NECLASIFICATI="8kbit"<BR><BR>#Shape generale<BR>/sbin/tc 
qdisc del dev $ETH_IN root<BR>/sbin/tc qdisc del dev $ETH_OUT root<BR>/sbin/tc 
qdisc add dev $ETH_IN root handle 1 htb default 10 r2q 2<BR>/sbin/tc qdisc add 
dev $ETH_OUT root handle 1 htb default 10 r2q 2<BR>/sbin/tc class add dev 
$ETH_IN parent 1: classid 1:2 htb rate $BANDA_TOTALA<BR>/sbin/tc class add dev 
$ETH_OUT parent 1: classid 1:2 htb rate $BANDA_TOTALA<BR>/sbin/tc class add dev 
$ETH_IN parent 1:2 classid 1:10 htb rate<BR>$BANDA_NECLASIFICATI prio 
4<BR>/sbin/tc class add dev $ETH_OUT parent 1:2 classid 1:10 htb 
rate<BR>$BANDA_NECLASIFICATI prio 4<BR><BR>#Shape client 1 - IP 194.126.178.1 si 
194.126.179.0/28<BR>/sbin/tc class add dev $ETH_IN parent 1:2 classid 1:101 htb 
rate 1024kbit<BR>ceil 1100kbit quantum 65000 prio 4 burst 10k<BR>/sbin/tc class 
add dev $ETH_OUT parent 1:2 classid 1:101 htb rate 1024kbit<BR>ceil 1100kbit 
quantum 65000 prio 4 burst 10k<BR>/sbin/tc filter add dev $ETH_IN parent 1:0 
protocol ip prio 100 u32 match ip<BR>dst 194.126.178.1/32 classid 
1:101<BR>/sbin/tc filter add dev $ETH_OUT parent 1:0 protocol ip prio 100 u32 
match<BR>ip src 194.126.178.1/32 classid 1:101<BR>/sbin/tc filter add dev 
$ETH_IN parent 1:0 protocol ip prio 100 u32 match ip<BR>dst 194.126.179.0/28 
classid 1:101<BR>/sbin/tc filter add dev $ETH_OUT parent 1:0 protocol ip prio 
100 u32 match<BR>ip src 194.126.179.0/28 classid 1:101<BR><BR><BR>#Shapeclient 2 
- IP 194.126.178.128/25<BR>#/sbin/tc class add dev $ETH_IN parent 1:2 classid 
1:102 htb rate 15Mbit<BR>ceil 15Mbit quantum 65000 prio 4 burst 10k<BR>#/sbin/tc 
class add dev $ETH_OUT parent 1:2 classid 1:102 htb rate 20Mbit<BR>ceil 30Mbit 
quantum 65000 prio 4 burst 10k<BR>#/sbin/tc filter add dev $ETH_IN parent 1:0 
protocol ip prio 100 u32 match<BR>ip dst 194.126.178.128/25 classid 
1:102<BR>#/sbin/tc filter add dev $ETH_OUT parent 1:0 protocol ip prio 100 u32 
match<BR>ip src 194.126.178.128/25 classid 1:102<BR><BR>They`ve told me that 
this one limits band only for extern but is FALSE it<BR>limits ALL the bandwidth 
> (<BR><BR><BR>The other one it works but also on entire bandwidth though i can 
make<BR>guarantees individually. here is a pice of it (they are 512 IPs so .. :) 
)<BR><BR>#!/bin/sh<BR># kbps = kilobytes and kbit = kilobits<BR># 1kbps=8kbit. 
Don't forget it !<BR><BR>I="/sbin/iptables"<BR>TC="/sbin/tc"<BR><BR>echo "";echo 
-e "`date +'%b %d %k:%M:%S'` \033[40m\033[1;32mStarting Traffic<BR>Shaper 
Script...\033[0m"<BR><BR>#Reset everything to a known state (cleared)<BR>$TC 
qdisc del dev eth0 root 2&gt;/dev/null<BR>$TC qdisc del dev eth0 ingress 
2&gt;/dev/null<BR>$TC qdisc del dev eth1 root 2&gt;/dev/null<BR>$TC qdisc del 
dev eth1 ingress 2&gt;/dev/null<BR><BR>$I -F -t mangle<BR>$I -X -t mangle<BR>$I 
-Z -t mangle<BR><BR>/root/mod.probe<BR><BR>#Setting 
rules<BR>#-------------<BR>#default class<BR>$TC qdisc add dev eth0 root handle 
1: htb<BR>$TC qdisc add dev eth1 root handle 1:0 htb default 10<BR><BR>#root 
class<BR>$TC class add dev eth0 parent 1: classid 1:1 htb rate 100Mbit<BR>$TC 
class add dev eth1 parent 1: classid 1:1 htb rate 100Mbit<BR><BR>#trafic total 
server --&gt; internet - upload<BR>$TC class add dev eth0 parent 1:1 classid 
1:10 htb rate 50Mbit prio 2<BR>$TC qdisc add dev eth0 parent 1:10 handle 10: sfq 
perturb 10<BR>$TC class add dev eth1 parent 1:1 classid 1:10 htb rate 50Mbit 
prio 2<BR>$TC qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 
10<BR><BR>#trafic LAN<BR>$TC class add dev eth1 parent 1:1 classid 1:10 htb rate 
10Mbit ceil 50Mbit<BR>$TC qdisc add dev eth1 parent 1:10 handle 1: sfq perturb 
10<BR>$TC filter add dev eth1 parent 1: protocol ip handle 1 fw classid 
1:10<BR><BR>#trafic forward ip_local --&gt; server --&gt; internet - 
upload<BR>$TC class add dev eth0 parent 1:1 classid 1:10 htb rate 50Mbit prio 
2<BR>$TC qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10<BR>$TC class 
add dev eth1 parent 1:1 classid 1:10 htb rate 50Mbit prio 2<BR>$TC qdisc add dev 
eth1 parent 1:10 handle 10: sfq perturb 10<BR><BR>#trafic LAN<BR>$TC class add 
dev eth1 parent 1:1 classid 1:10 htb rate 10Mbit ceil 50Mbit<BR>$TC qdisc add 
dev eth1 parent 1:10 handle 1: sfq perturb 10<BR>$TC filter add dev eth1 parent 
1: protocol ip handle 1 fw classid 1:10<BR><BR>#trafic forward ip_local --&gt; 
server --&gt; internet - upload<BR>$TC class add dev eth0 parent 1:1 classid 
1:20 htb rate 2Mbit ceil 20Mbit<BR>$TC class add dev eth0 parent 1:20 classid 
1:200 htb rate 2Mbit ceil 20Mbit<BR>prio 2<BR><BR>#trafic forward internet 
--&gt; server --&gt; ip_local - download<BR>$TC class add dev eth1 parent 1:1 
classid 1:20 htb rate 9Mbit ceil 80Mbit<BR>$TC qdisc add dev eth1 parent 1:20 
handle 20: sfq perturb 10<BR>$TC class add dev eth1 parent 1:20 classid 1:200 
htb rate 9Mbit ceil 80Mbit<BR>prio 2<BR><BR><BR>echo "";echo -e "`date +'%b %d 
%k:%M:%S'` \033[40m\033[1;32mLimitare 
Clasa<BR>194.126.178.0/24\033[0m"<BR>#|||||||||||||||||||||||||||||||||||||||||||||||| \
|||||||||||||||||||||||||||<BR>|||||||||||||||||||||<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 194.126.178.2<BR>#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<BR>|||||||||||||||||||||<BR>$TC \
 class add dev eth1 parent 1:200 classid 1:202 htb rate 32kbit ceil 9Mbit<BR>prio 
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  \
#download<BR>$TC qdisc add dev eth1 parent 1:202 handle 202: sfq perturb  \
                6<BR>#download<BR>$I -t mangle -A FORWARD -o eth1 -d 194.126.178.2 -j \
                MARK 
--set-mark 2<BR>#download<BR>$TC filter add dev eth1 parent 1: prio 2 protocol 
ip handle 2 fw 
flowid<BR>1:202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 #download<BR>#---------------------------------------------------------------------------<BR>---------------------<BR>$TC \
 class add dev eth0 parent 1:200 classid 1:202 htb rate 32kbit ceil 6Mbit<BR>prio 
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  \
#upload<BR>$TC qdisc add dev eth0 parent 1:202 handle 202: sfq perturb  \
                6<BR>#upload<BR>$I -t mangle -A FORWARD -o eth0 -s 194.126.178.2 -j \
                MARK 
--set-mark 602<BR>#upload<BR>$TC filter add dev eth0 parent 1: prio 2 protocol 
ip handle 602 fw 
flowid<BR>1:202&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 #upload<BR><BR><BR>#||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| \
||||||||||<BR>|||||||||||||||||||||<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 194.126.178.3<BR>#|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||<BR>|||||||||||||||||||||<BR>$TC \
 class add dev eth1 parent 1:200 classid 1:203 htb rate 128kbit ceil<BR>9Mbit 
prio 
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 #download<BR>$TC qdisc add dev eth1 parent 1:203 handle 203: sfq perturb 
6<BR>#download<BR>$I -t mangle -A FORWARD -o eth1 -d 194.126.178.3 -j MARK 
--set-mark 3<BR>#download<BR>$TC filter add dev eth1 parent 1: prio 2 protocol 
ip handle 3 fw 
flowid<BR>1:203&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 #download<BR>#---------------------------------------------------------------------------<BR>---------------------<BR>$TC \
 class add dev eth0 parent 1:200 classid 1:203 htb rate 10Mbit ceil<BR>16Mbit 
prio 
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
 #upload<BR>$TC qdisc add dev eth0 parent 1:203 handle 203: sfq perturb 
6<BR>#upload<BR>$I -t mangle -A FORWARD -o eth0 -s 194.126.178.3 -j MARK 
--set-mark 603<BR>#upload<BR>$TC filter add dev eth0 parent 1: prio 2 protocol 
ip handle 603 fw flowid<BR>1:203<BR><BR>on this one i can give what value i want 
for rate and ceil and works BUT<BR>it`s using iptables and mangle and also its 
effect is on entire bandwidth<BR><BR>So...??<BR><BR><BR>----- Original Message 
----- <BR>From: "Kiruthika Selvamani" &lt;</FONT><A 
href="mailto:kiruthika.selvamani@gmail.com"><FONT face="Times New Roman" 
size=3>kiruthika.selvamani@gmail.com</FONT></A><FONT face="Times New Roman" 
size=3>&gt;<BR>To: "Vlad LUPESCU" &lt;</FONT><A 
href="mailto:vlad.lupescu@actualbvt.ro"><FONT face="Times New Roman" 
size=3>vlad.lupescu@actualbvt.ro</FONT></A><FONT face="Times New Roman" 
size=3>&gt;<BR>Sent: Tuesday, June 28, 2005 4:48 PM<BR>Subject: Re: [LARTC] 
Question regarding HTB<BR><BR><BR>Can you post the HTB scripts you are using - 
that way it will be<BR>easier to understand what you are trying to do<BR>On 
6/28/05, Vlad LUPESCU &lt;</FONT><A 
href="mailto:vlad.lupescu@actualbvt.ro"><FONT face="Times New Roman" 
size=3>vlad.lupescu@actualbvt.ro</FONT></A><FONT face="Times New Roman" 
size=3>&gt; wrote:<BR>&gt;<BR>&gt; Ok,<BR>&gt; So I am from Romania where we 
have this tiny problem. The IP clases are<BR>&gt; split in 2: metropolitan and 
extern (worldwide). We have 2 types of<BR>&gt; guaranteed band: metro and 
extern. Now.. the link comes into my gw. I have<BR>&gt; an IP which my ISP gave 
it to me which is eth0. I have 2 other PI clasess<BR>&gt; 194.126.178.0/23. What 
I want to do is this: make a HTB script which can<BR>&gt; limit the bandwidth on 
each PI individual (ex. on 178.7 i want to have<BR>&gt; 256kbits extern with 
2Mbits metro, on 179.3 i want 128kb with 8mb and so<BR>&gt; on). All of HTB 
scripts that my friends gave it to me can limit ALL the<BR>&gt; bandwidth 
(extern+metro) and I don`t want that. I have all metro routes in<BR>a<BR>&gt; 
file called 'clases' if this is important. If anyone can help me pls 
do<BR>i`m<BR>&gt; desperate!!!!!!!<BR>&gt;<BR>&gt; 10q<BR>&gt; Vlad<BR>&gt; 
_______________________________________________<BR>&gt; LARTC mailing 
list<BR>&gt; </FONT><A href="mailto:LARTC@mailman.ds9a.nl"><FONT 
face="Times New Roman" size=3>LARTC@mailman.ds9a.nl</FONT></A><BR><FONT 
face="Times New Roman" size=3>&gt; </FONT><A 
href="http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc"><FONT 
face="Times New Roman" 
size=3>http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc</FONT></A><BR><FONT 
face="Times New Roman" size=3>&gt;<BR>&gt;<BR>&gt;</FONT><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>-----------------------------------------<BR>Vlad 
Lupescu</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Network Admin<BR>S.C. Actual BVT S.R.L.<BR><A 
href="http://www.actualbvt.ro">www.actualbvt.ro</A><BR>-----------------------------------------</FONT></DIV></BODY></HTML>




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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic