Hi, I have some interesting problem with htb , I set up root class and sub-classess: $TC qdisc add dev eth0 root handle 1: htb $TC class add dev eth0 parent 1: classid 1:1 htb rate 1990kbit ceil 2000kbit $TC class add dev eth0 parent 1:1 classid 1:10 htb rate 190kbit ceil 200kbit $TC class add dev eth0 parent 1:1 classid 1:11 htb rate 1400kbit ceil 1600kbit $TC class add dev eth0 parent 1:1 classid 1:12 htb rate 1000kbit ceil 1500kbit $TC class add dev eth0 parent 1:1 classid 1:13 htb rate 1000kbit ceil 1500kbit $TC class add dev eth0 parent 1:1 classid 1:14 htb rate 1000kbit ceil 1200kbit , filters and queuing disciplines : #filter $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 2 fw flowid 1:10 classid 1:10 $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 3 fw flowid 1:11 classid 1:11 $TC filter add dev eth0 protocol ip parent 1:0 prio 2 handle 4 fw flowid 1:12 classid 1:12 $TC filter add dev eth0 protocol ip parent 1:0 prio 3 handle 5 fw flowid 1:13 classid 1:13 $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 6 fw flowid 1:14 classid 1:14 (note the packet marking classifier) adequate lines from firewall script : [...] # ftp $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 21 -m state --state NEW,ESTABLISHED -t mangle -j MARK --set-mark 3 # ssh $$IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 22 -m state --state NEW,ESTABLISHED -t mangle -j MARK --set-mark 2 # smtp $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 25 -m state --state NEW,ESTABLISHED -t mangle -j MARK --set-mark 4 [...] #qdisc $TC qdisc add dev eth0 parent 1:10 handle 20: sfq perturb 10 $TC qdisc add dev eth0 parent 1:11 handle 30: sfq perturb 10 $TC qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10 $TC qdisc add dev eth0 parent 1:13 handle 50: sfq perturb 10 $TC qdisc add dev eth0 parent 1:14 handle 60: sfq perturb 10 the problem is - all the traffic goes only through root class ''1:'' #tc -s qdisc ls dev eth0 qdisc sfq 60: quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc pfifo 50: limit 5p Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc pfifo 40: limit 5p Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc pfifo 30: limit 5p Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc pfifo 20: limit 5p Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 0 direct_packets_stat 671 Sent 392890 bytes 671 pkts (dropped 0, overlimits 0) I''d be very grateful , if you could help me with this. thanks in advance. Ratel .at. aonet.pl _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
do you have two nics? the 2megas internet is eth0 right? so you are tc''ing packets going out of interface eth0. paquets are comming from eth1 for example? in such case you coutlf -t mangle -I PREROUTING -i eth1 -j MARK --set-mark {1|2|4|} ?? so packets going from internal (eth1) going out (eth0) are previusly marked. im pretty sure about this. hope it helps, good luck. Quoting Ratel <ratel@aonet.pl>:> Hi, > > I have some interesting problem with htb , I set up root class and > sub-classess: > > $TC qdisc add dev eth0 root handle 1: htb > $TC class add dev eth0 parent 1: classid 1:1 htb rate 1990kbit ceil 2000kbit > $TC class add dev eth0 parent 1:1 classid 1:10 htb rate 190kbit ceil 200kbit > $TC class add dev eth0 parent 1:1 classid 1:11 htb rate 1400kbit ceil > 1600kbit > $TC class add dev eth0 parent 1:1 classid 1:12 htb rate 1000kbit ceil > 1500kbit > $TC class add dev eth0 parent 1:1 classid 1:13 htb rate 1000kbit ceil > 1500kbit > $TC class add dev eth0 parent 1:1 classid 1:14 htb rate 1000kbit ceil > 1200kbit > > , filters and queuing disciplines : > #filter > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 2 fw flowid > 1:10 classid 1:10 > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 3 fw flowid > 1:11 classid 1:11 > $TC filter add dev eth0 protocol ip parent 1:0 prio 2 handle 4 fw flowid > 1:12 classid 1:12 > $TC filter add dev eth0 protocol ip parent 1:0 prio 3 handle 5 fw flowid > 1:13 classid 1:13 > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 6 fw flowid > 1:14 classid 1:14 > (note the packet marking classifier) > > adequate lines from firewall script : > [...] > # ftp > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 21 -m state --state > NEW,ESTABLISHED -t mangle -j MARK --set-mark 3 > # ssh > $$IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 22 -m state --state > NEW,ESTABLISHED -t mangle -j MARK --set-mark 2 > # smtp > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 25 -m state --state > NEW,ESTABLISHED -t mangle -j MARK --set-mark 4 > [...] > > #qdisc > $TC qdisc add dev eth0 parent 1:10 handle 20: sfq perturb 10 > $TC qdisc add dev eth0 parent 1:11 handle 30: sfq perturb 10 > $TC qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10 > $TC qdisc add dev eth0 parent 1:13 handle 50: sfq perturb 10 > $TC qdisc add dev eth0 parent 1:14 handle 60: sfq perturb 10 > > the problem is - all the traffic goes only through root class ''1:'' > > #tc -s qdisc ls dev eth0 > qdisc sfq 60: quantum 1514b perturb 10sec > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc pfifo 50: limit 5p > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc pfifo 40: limit 5p > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc pfifo 30: limit 5p > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc pfifo 20: limit 5p > Sent 0 bytes 0 pkts (dropped 0, overlimits 0) > > qdisc htb 1: r2q 10 default 0 direct_packets_stat 671 > Sent 392890 bytes 671 pkts (dropped 0, overlimits 0) > > > I''d be very grateful , if you could help me with this. > > thanks in advance. > > Ratel .at. aonet.pl > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 12 June 2003 21:21, Ratel wrote:> Hi, > > I have some interesting problem with htb , I set up root class and > sub-classess: > > $TC qdisc add dev eth0 root handle 1: htb > $TC class add dev eth0 parent 1: classid 1:1 htb rate 1990kbit ceil > 2000kbit $TC class add dev eth0 parent 1:1 classid 1:10 htb rate 190kbit > ceil 200kbit $TC class add dev eth0 parent 1:1 classid 1:11 htb rate > 1400kbit ceil 1600kbit > $TC class add dev eth0 parent 1:1 classid 1:12 htb rate 1000kbit ceil > 1500kbit > $TC class add dev eth0 parent 1:1 classid 1:13 htb rate 1000kbit ceil > 1500kbit > $TC class add dev eth0 parent 1:1 classid 1:14 htb rate 1000kbit ceil > 1200kbitThe sum of the rates of the childs should be <= rate of parent. In your case 1400 + 1000 + 1000 + 1000 = 4400 and your parent rate is 1990. It''s not needed, but I recommend it.> , filters and queuing disciplines : > #filter > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 2 fw flowid > 1:10 classid 1:10 > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 3 fw flowid > 1:11 classid 1:11 > $TC filter add dev eth0 protocol ip parent 1:0 prio 2 handle 4 fw flowid > 1:12 classid 1:12 > $TC filter add dev eth0 protocol ip parent 1:0 prio 3 handle 5 fw flowid > 1:13 classid 1:13 > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 6 fw flowid > 1:14 classid 1:14 > (note the packet marking classifier)And I also note the different prios. That''s not needed. Prio determines the order the filters are checked. In your case it doesn''t matter.> adequate lines from firewall script : > [...] > # ftp > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 21 -m state --state > NEW,ESTABLISHED -t mangle -j MARK --set-mark 3 > # ssh > $$IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 22 -m state --state > NEW,ESTABLISHED -t mangle -j MARK --set-mark 2 > # smtp > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 25 -m state --state > NEW,ESTABLISHED -t mangle -j MARK --set-mark 4 > [...]Mhh. Can you check with iptables -L -v -n that your packets are marked? And can you tell us what''s your setup ? I mean wich nic is connected to the internet, what do you want to shape, is this also a firewall? And try marking in the PREROUTING tables. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> -----Original Message----- > From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl] On > Behalf Of Stef Coene > Sent: 12. juni 2003 21:35 > To: Ratel; lartc@mailman.ds9a.nl > Subject: Re: [LARTC] htb problem > > > adequate lines from firewall script : > > [...] > > # ftp > > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 21 -m state --state > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 3 > > # ssh > > $$IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 22 -m state --state > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 2 > > # smtp > > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 25 -m state --state > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 4 > > [...] > Mhh. Can you check with iptables -L -v -n that your packets are marked? > And > can you tell us what''s your setup ? I mean wich nic is connected to the > internet, what do you want to shape, is this also a firewall? And try > marking in the PREROUTING tables.I have the same problem. According to iptables the packets are marked but all the traffic goes to the root htb class. -- Morten Isaksen misak@aub.dk - http://www.aub.dk/~misak _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 12 June 2003 22:04, Morten Isaksen wrote:> > -----Original Message----- > > From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl] On > > Behalf Of Stef Coene > > Sent: 12. juni 2003 21:35 > > To: Ratel; lartc@mailman.ds9a.nl > > Subject: Re: [LARTC] htb problem > > > > > adequate lines from firewall script : > > > [...] > > > # ftp > > > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 21 -m state --state > > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 3 > > > # ssh > > > $$IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 22 -m state --state > > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 2 > > > # smtp > > > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 25 -m state --state > > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 4 > > > [...] > > > > Mhh. Can you check with iptables -L -v -n that your packets are marked? > > And > > can you tell us what''s your setup ? I mean wich nic is connected to the > > internet, what do you want to shape, is this also a firewall? And try > > marking in the PREROUTING tables. > > I have the same problem. According to iptables the packets are marked but > all the traffic goes to the root htb class.Mhh. Some commands that works for me : tc filter add dev eth0 parent 1: protocol ip handle 1 fw classid 1:100 iptables -A OUTPUT -t mangle -p tcp --dport 2000 -j MARK --set-mark 1 Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 12 June 2003 21:46, Esteban wrote:> Stef! please explain me this: > When i use traffic shaper, i apply the root to the innterface i want to > controll the packets that are leaving right?Yes.> The sum of classes "should" > not be greater than the root one. > Supossing i have 2 nics. One for internal (eth1) and other for internet > (eth0). i can mangle packets: > -t mangle -I PREROUTING -i eth1 -j MARK --set-mark 1 > > and then filter them all on the eth0 device with: > tc filter add dev $DEV protocol ip parent 1:0 prio 1 handle 0x1 fw flowid > 1:20 is this okay?Yes.> Cause for me, is not working. > jeje..i see packets accounting on the right class, but they dont go to the > speed i want (i see that in that class are much packets "lended")..that > might be that that class is asking for BW to greater classes? if you can > would be a great help to clear out this doubts!So your filters are working. The lended packets are not important. For your htb setup, have you read the docs I collected on www.docum.org ? Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 12 June 2003 23:08, Esteban wrote:> my set up is like this: > > #!/bin/bash > DEV=eth1 > > tc qdisc del dev $DEV root 2> /dev/null > /dev/null > tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null > > tc qdisc add dev $DEV root handle 1: htb > > tc class add dev $DEV parent 1: classid 1:1 htb rate 512kbit burst 6k > tc class add dev $DEV parent 1:1 classid 1:10 htb rate 512kbit burst 6k > prio 1 tc class add dev $DEV parent 1:1 classid 1:20 htb rate 50kbit burst > 6k prio 3 > > tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 > tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 > > tc filter add dev $DEV protocol ip parent 1:0 prio 1 handle 0x1 fw flowid > 1:20 > > > iptables -t mangle -A FORWARD -i eth1 -j MARK --set-mark 1 > > os?? any idea?Remove burst and prio parameter from your commands. And make sure the sum of child rates <= parent rate. In your case 512 + 50 >> 512. And all non-classified packets have to go somewhere. This can be done with the default parameter if you add the htb root disc or a catch all filter rule. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hey I hve the same problem. My packets are marked, my classes are OK my filters are set OK and all packets are passing through the root class!! I think that this is a big problem. A know 1 more person that has the same problem!<br><br> ------------------- изпратено от mail.bG<br> <li>Силна Анти-спам защита <li>12MB Място за поща <li>SMS за нов емeйл и към двата оператора! <li>POP3/WAP Достъп<br> _________________________________________<br> <a target=''_blank'' href="/ads/adclick.php?bannerid=671&zoneid=13&source=&dest=http%3A%2F%2Fmail.bg%2F&ismap=">HOB БEЗПЛATEH AДPEC</a> _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Saturday 14 June 2003 23:46, terahz@mail.bg wrote:> Hey I hve the same problem. My packets are marked, my classes are OK > my filters are set OK > and all packets are passing through the root class!! > I think that this is a big problem. A know 1 more person that has the same > problem!Ok. I don''t understand. I do all my test using iptables and fw filter. This works for me : tc filter add dev eth0 parent 1: protocol ip handle 1 fw classid 1:100 iptables -A OUTPUT -t mangle -p tcp --dport 2000 -j MARK --set-mark 1 This is on a simple pc. No router, no bridge, no firewall. It''s only used to shape outgoing locally bandwidth. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Thx a lot for help , I finally managed to rebuild my firewall script, for people who have same problem as I had, I can say that the problem lies in propper packet marking (iptables) , sample lines from my firewall script : iptables -t mangle -I PREROUTING -i eth0 -p tcp --dport 21 -j MARK --set-mark 2 iptables -t mangle -I PREROUTING -i eth0 -p tcp --dport 443 -j MARK --set-mark 3 it''s ofcourse not the only way to mark them, http://www.docum.org/stef.coene/qos/kptd/ is very useful with that. regards, Ratel <ratel@aonet.pl> ----- Original Message ----- From: "Stef Coene" <stef.coene@docum.org> To: "Ratel" <ratel@aonet.pl>; <lartc@mailman.ds9a.nl> Sent: Thursday, June 12, 2003 9:35 PM Subject: Re: [LARTC] htb problem> On Thursday 12 June 2003 21:21, Ratel wrote: > > Hi, > > > > I have some interesting problem with htb , I set up root class and > > sub-classess: > > > > $TC qdisc add dev eth0 root handle 1: htb > > $TC class add dev eth0 parent 1: classid 1:1 htb rate 1990kbit ceil > > 2000kbit $TC class add dev eth0 parent 1:1 classid 1:10 htb rate 190kbit > > ceil 200kbit $TC class add dev eth0 parent 1:1 classid 1:11 htb rate > > 1400kbit ceil 1600kbit > > $TC class add dev eth0 parent 1:1 classid 1:12 htb rate 1000kbit ceil > > 1500kbit > > $TC class add dev eth0 parent 1:1 classid 1:13 htb rate 1000kbit ceil > > 1500kbit > > $TC class add dev eth0 parent 1:1 classid 1:14 htb rate 1000kbit ceil > > 1200kbit > The sum of the rates of the childs should be <= rate of parent. In yourcase> 1400 + 1000 + 1000 + 1000 = 4400 and your parent rate is 1990. It''s not > needed, but I recommend it. > > > , filters and queuing disciplines : > > #filter > > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 2 fw flowid > > 1:10 classid 1:10 > > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 3 fw flowid > > 1:11 classid 1:11 > > $TC filter add dev eth0 protocol ip parent 1:0 prio 2 handle 4 fw flowid > > 1:12 classid 1:12 > > $TC filter add dev eth0 protocol ip parent 1:0 prio 3 handle 5 fw flowid > > 1:13 classid 1:13 > > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 6 fw flowid > > 1:14 classid 1:14 > > (note the packet marking classifier) > And I also note the different prios. That''s not needed. Prio determinesthe> order the filters are checked. In your case it doesn''t matter. > > > adequate lines from firewall script : > > [...] > > # ftp > > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 21 -m state --state > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 3 > > # ssh > > $$IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 22 -m state --state > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 2 > > # smtp > > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 25 -m state --state > > NEW,ESTABLISHED -t mangle -j MARK --set-mark 4 > > [...] > Mhh. Can you check with iptables -L -v -n that your packets are marked?And> can you tell us what''s your setup ? I mean wich nic is connected to the > internet, what do you want to shape, is this also a firewall? And try > marking in the PREROUTING tables. > > > Stef > > -- > > stef.coene@docum.org > "Using Linux as bandwidth manager" > http://www.docum.org/ > #lartc @ irc.oftc.net > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello, I have a problem with my htb in linux gateway machine. Wana make this borrow to and from internet: every user must be shaped to 32Kbit,max number of users are 6 in one subnet /29 and all subnet must be shaped to 92Kbit,e.i every user will download with 32Kbit,but when all 6 user download do not over 92Kbit! I make some classes /attache them/ but every user download with 32Kbit and over many up 92Kbit. The script: tc qdisc add dev eth1 root handle 1: htb default 2 tc class add dev eth1 parent 1: classid 1:2 htb rate 100Mbit ceil 100Mbit burst 1k tc class add dev eth1 parent 1:2 classid 1:11 htb rate 92Kbit ceil 92Kbit burst 1k tc qdisc add dev eth1 parent 1:11 handle 11 sfq perturb 10 tc class add dev eth1 parent 1:11 classid 1:30 htb rate 32Kbit ceil 32Kbit burst 1k tc qdisc add dev eth1 parent 1:30 handle 30 sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.17 classid 1:30 tc class add dev eth1 parent 1:11 classid 1:40 htb rate 32Kbit ceil 32Kbit burst 1k tc qdisc add dev eth1 parent 1:40 handle 40 sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.18 classid 1:40 ........ tc class add dev eth1 parent 1:11 classid 1:80 htb rate 32Kbit ceil 32Kbit burst 1k tc qdisc add dev eth1 parent 1:80 handle 80 sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.22 classid 1:80 May be there is mistake but where.....? Please help and thanks! Reagrds _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 24 July 2003 16:26, Delcho wrote:> Hello, > I have a problem with my htb in linux gateway machine. > Wana make this borrow to and from internet: > every user must be shaped to 32Kbit,max number of users are 6 in one > subnet /29 > and all subnet must be shaped to 92Kbit,e.i every user will download > with 32Kbit,but when > all 6 user download do not over 92Kbit! I make some classes /attache > them/ but every user download with 32Kbit and over many up 92Kbit. > The script: > > tc qdisc add dev eth1 root handle 1: htb default 2 > tc class add dev eth1 parent 1: classid 1:2 htb rate 100Mbit > ceil 100Mbit burst 1k > tc class add dev eth1 parent 1:2 classid 1:11 htb rate > 92Kbit ceil 92Kbit burst 1k > tc qdisc add dev eth1 parent 1:11 handle 11 sfq perturb 10 > tc class add dev eth1 parent 1:11 classid 1:30 htb rate > 32Kbit ceil 32Kbit burst 1k > tc qdisc add dev eth1 parent 1:30 handle 30 sfq perturb 10 > tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 > match ip dst 192.168.1.17 classid 1:30 > tc class add dev eth1 parent 1:11 classid 1:40 htb rate > 32Kbit ceil 32Kbit burst 1k > tc qdisc add dev eth1 parent 1:40 handle 40 sfq perturb 10 > tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 > match ip dst 192.168.1.18 classid 1:40 > ........ > tc class add dev eth1 parent 1:11 classid 1:80 htb rate > 32Kbit ceil 32Kbit burst 1k > tc qdisc add dev eth1 parent 1:80 handle 80 sfq perturb 10 > tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 > match ip dst 192.168.1.22 classid 1:80 > > May be there is mistake but where.....?Take a look at the faq pages on docum.org. There is a section with htb rules. The problem is that the rate is a minium and the parent ceil is not respected if the child classes are asking more then the ceil. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/