Re: [LARTC] htb
Am Sunday 17 October 2004 14:08 schrieb James Lista: do you have a small script example to show me ? ... I don't know about the small part... My own script: http://www.metamorpher.de/fairnat/ HTH Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb
andreas, having one class per user seems cool... please buddy, have a sample script of that ? so, if i have 600kbit / 7 = 86kbit for each, is it that ??? if so, is it too few for a single user ? about something that i read that say borrowing, when a user borrow his spare band to a vampire, when will he gets it back when he needs it...? thanks again - Original Message - From: Andreas Klauer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, October 17, 2004 11:20 AM Subject: Re: [LARTC] htb Am Sunday 17 October 2004 15:02 schrieb James Lista: and about that you say take a look at ipp2p or l7-filter: errr, can they identify when a user changed edonkey or any other p2p default port and limit such packet even so They try to. I'm using IPP2P and it works okay for me. Although my shaping setup is a little different from what you want to do. I've got one class per user, so everyone gets the same share of bandwidth. This way it doesn't matter what kind of traffic a user generates, as it doesn't influence the others. Prioritization is then done within the user classes, the only effect of that is that a user can still have a lag free SSH connection while he's downloading stuff at the same time. So in my setup, if the user finds a way to trick the prioritization settings, he's only tricking himself, because he can't escape his user class :) Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB 2.6.8 works 2.4.27 does not!
Peter Huetmannsberger wrote: Hi again, I have also changed the things suggested by Stef earlier on: - HTB hysteries - PSCHED_CPU - QLENGTH in sfq Nothing seems to help. Kernel 2.4.27 distribution (RH9a) Are you SURE the correct modules are being loaded? ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB 2.6.8 works 2.4.27 does not!
Hi again, sorry to be such a bother. I got my setup to work with kernel 2.6.8.1, however the two machines where I need to implement the shaping are running a 2.4.27 kernel. I have applied the infamous June patch (htbfair.diff) already, and recompiled the modules. And I am using the tc that comes with htb3.6-020525.tgz. While I can see the packets going into the right class, it does not seem to have any effect. I am using the same scripts on both the 2.6.8.1 and the 2.4.27 machines, and it seems that it does not work at all with 2.4.27. Any idea what else I could try? Many thanks, .peter ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB 2.6.8 works 2.4.27 does not!
Hi again, I have also changed the things suggested by Stef earlier on: - HTB hysteries - PSCHED_CPU - QLENGTH in sfq Nothing seems to help. Kernel 2.4.27 distribution (RH9a) Thanks, .peter ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB
Hi all I'm new in this list and i hope to lear and to help if possible. But firt i need help :-( I have this messege in my syslog when my classes and qdiscs goes down. Can any one know what does it mean? Thnx in advance. Yannick Arrimadas Bot Oct 14 16:09:27 pototogorri kernel: HTB init, kernel part version 3.17 Oct 14 16:09:27 pototogorri kernel: Unable to handle kernel paging request at virtual address 00100100 Oct 14 16:09:27 pototogorri kernel: printing eip: Oct 14 16:09:27 pototogorri kernel: c0267fb4 Oct 14 16:09:27 pototogorri kernel: *pde = Oct 14 16:09:27 pototogorri kernel: Oops: [#1] Oct 14 16:09:27 pototogorri kernel: Modules linked in: cls_fw sch_sfq sch_htb ipt_MARK iptable_mangle ide_floppy ide_tape sg sr_mod ide_cd cd Oct 14 16:09:27 pototogorri kernel: CPU:0 Oct 14 16:09:27 pototogorri kernel: EIP:0060:[c0267fb4]Not tainted Oct 14 16:09:27 pototogorri kernel: EFLAGS: 00010206 (2.6.8.1) Oct 14 16:09:27 pototogorri kernel: EIP is at qdisc_lookup+0x34/0x50 Oct 14 16:09:27 pototogorri kernel: eax: 001000d4 ebx: 001000d4 ecx: dd3f7914 edx: 00100100 Oct 14 16:09:27 pototogorri kernel: esi: 0001 edi: 0001 ebp: c204dc38 esp: c204dc30 Oct 14 16:09:27 pototogorri kernel: ds: 007b es: 007b ss: 0068 Oct 14 16:09:27 pototogorri kernel: Process tc (pid: 22899, threadinfo=c204c000 task=c80219d0) Oct 14 16:09:27 pototogorri kernel: Stack: ddeca290 dd3f7800 c204dc80 c0268a62 dd3f7800 0001 d1a8873c Oct 14 16:09:27 pototogorri kernel:05c8 ddb15800 000a dd3f7800 ddb15800 Oct 14 16:09:27 pototogorri kernel:0010 dce34a40 0048 c204dcb0 c204dcfc c0262297 dce34a40 ddeca280 Oct 14 16:09:27 pototogorri kernel: Call Trace: Oct 14 16:09:27 pototogorri kernel: [c010707b] show_stack+0x9b/0xb0 Oct 14 16:09:27 pototogorri kernel: [c01071cb] show_registers+0x11b/0x180 Oct 14 16:09:27 pototogorri kernel: [c0107310] die+0x50/0xb0 Oct 14 16:09:27 pototogorri kernel: [c0117280] do_page_fault+0x330/0x5b8 Oct 14 16:09:27 pototogorri kernel: [c0106cbd] error_code+0x2d/0x40 Oct 14 16:09:27 pototogorri kernel: [c0268a62] tc_modify_qdisc+0x102/0x450 Oct 14 16:09:27 pototogorri kernel: [c0262297] rtnetlink_rcv+0x347/0x3b0 Oct 14 16:09:27 pototogorri kernel: [c026c3c4] netlink_data_ready+0x54/0x60 Oct 14 16:09:27 pototogorri kernel: [c026baca] netlink_sendskb+0x6a/0x90 Oct 14 16:09:27 pototogorri kernel: [c026c0a9] netlink_sendmsg+0x1f9/0x2c0 Oct 14 16:09:27 pototogorri kernel: [c0253078] sock_sendmsg+0x88/0xb0 Oct 14 16:09:27 pototogorri kernel: [c0254696] sys_sendmsg+0x196/0x210 Oct 14 16:09:27 pototogorri kernel: [c0254960] sys_socketcall+0x80/0x1a0 Oct 14 16:09:27 pototogorri kernel: [c0105c79] sysenter_past_esp+0x52/0x79 Oct 14 16:09:27 pototogorri kernel: Code: 8b 40 2c 0f 18 00 90 39 ca 75 e6 31 c0 5b 5e 5d c3 8d 74 26 Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 10481 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 10482 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 10483 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 11041 is small. Consider r2q change. Oct 14 17:23:30 pototogorri kernel: HTB: quantum of class 11042 is small. Consider r2q change. Servicio ofrecido por www.systemwifi.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB
On Thursday 14 October 2004 14:23, sistemas wrote: Hi all I'm new in this list and i hope to lear and to help if possible. But firt i need help :-( I have this messege in my syslog when my classes and qdiscs goes down. Can any one know what does it mean? I used to have an Oops an awful lot like that. I upgraded to 2.6.9-rc3 and it resolved the problem. Yours could be something else, though. What `tc` configuration are you using? What's the simplest possible configuration you can create that consistently reproduces the problem? What specifically did you do to trigger this problem, if you know? Thanks. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB weird problem ....
if i remove the 1 packet ... it would be again exceed the ceiling ... thanks ill try r u referring to this faq in docum??!?!?! http://www.docum.org/docum.org/faq/cache/40.html the file linux/include/net/sched/pkt_sched.h does not have #define PSCHED_CLOCK_SOURCE PSCHED_CPU im using 2.4.20-22 kernel, maybel ill try 2.4.27 oh well i think i just have to check it out on monday ...thanks so much :D --- Andy Furniss [EMAIL PROTECTED] wrote: Drink Linux wrote: hello Andy , i think they are right for 256kbps = 2048kbit ... ahh I see. I just tried your setup on my eth0 and it works OK. Though HTB's stats don't seem too accurate - I used wget/ftp to judge rates. You may need to patch HTB/use a newer kernel - there was a patch posted on this list a while back which may affect you. Also you may need to set Hz higher or use psched = CPU for timing. See www.docum.org . i have added a leaf pfifo with a limit of 1 packet per second, coz if i have 2-10 it wont work...viola !!! the ceiling rate for each class rule is now working... my problem is that you can reach the ceiling class only if you have 4-5 files getting through FTP, ex: 256kbps Ceil 1 file ftp download = 80-90 kbps max speed 4-5 files ftp download = almost 256kbps how can i make it work to 256kbps speed for 1 file alone ...? Get rid of the 1 packet pfifo :-) Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ Do you Yahoo!? Declare Yourself - Register online to vote today! http://vote.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB weird problem ....
Drink Linux wrote: if i remove the 1 packet ... it would be again exceed the ceiling ... thanks ill try When you fix HTB you won't need it. r u referring to this faq in docum??!?!?! http://www.docum.org/docum.org/faq/cache/40.html the file linux/include/net/sched/pkt_sched.h include/net/pkt_sched.h is the one I changed on a 2.4.24. does not have #define PSCHED_CLOCK_SOURCE PSCHED_CPU im using 2.4.20-22 kernel, maybel ill try 2.4.27 2.4.27 should fix things HTB has been patched since 2.4.20. If you have 8 Mbit wirless your ceil/master rates need to be a bit less to allow for overheads. Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB weird problem ....
On Friday 08 October 2004 10:58, Andy Furniss wrote: snip Also you may need to set Hz higher or use psched = CPU for timing. In 2.6.9 this looks like it'll be part of the `make config` process itself. :) -- Jason Boxman Perl Programmer / *NIX Systems Administrator Shimberg Center for Affordable Housing | University of Florida http://edseek.com/ - Linux and FOSS stuff ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB weird problem ....
Hello good day to all ... this is my setup 1 Linux Wireless Access Point, connected are 4 wireless gateway in which i needed to apply shaping ... ok here is the weird part... clients on each gateway download files from the Acess Point ... a 500 mb file through ftp on gateway 1 which is up to 64 kbps ... the result is from 60-64 kbps speed which is fine ... on gateway 2 which is 128 kbps ... the result is varying from 130 - 132 kbps (why does it exceed)? but it is acceptable nevertheless on gateway 3 which is up to 256 kbps ... the result is the lowest rate clients can get is up to 285-286 above limit ?!?!! why did that happen... on gateway 4 .. which is up to 512 kbps ... the rate of the client is up to 600+ kbps ... why is that so ?! anyway here is my script for anyone who can help ...thanks one thing is when i ftp 2 files ... the speed is higher than the ceiling limit kernel is 2.4.22 ... with QoS enabled tc qdisc add dev wlan0 root handle 1:0 htb tc class add dev wlan0 parent 1:0 classid 1:1 htb rate 1024kbps ceil 1024kbps tc class add dev wlan0 parent 1:1 classid 1:10 htb rate 1kbps ceil 64kbps tc class add dev wlan0 parent 1:1 classid 1:20 htb rate 1kbps ceil 128kbps tc class add dev wlan0 parent 1:1 classid 1:30 htb rate 1kbps ceil 256kbps tc class add dev wlan0 parent 1:1 classid 1:40 htb rate 1kbps ceil 512kbps tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.245 flowid 1:10 tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.246 flowid 1:20 tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.247 flowid 1:30 tc filter add dev wlan0 parent 1:0 protocol ip u32 match ip dst 10.40.40.248 flowid 1:40 __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB and Openvpn
Hi! I have just started with traffic shaping, and after hours of reading websites, man pages asf. I am still stumped at one problem I have. The interface eth0 is attached to the outside world, and I have an openvpn tunnel to another part of the organization using eth0 and port 5001. The idea was that all traffic going through the tunnel would have top priority and the rest share what's left. Sounded simple enough. Here's what I did: tc qdisc add dev eth0 root handle 1: htb default 30 tc class add dev eth0 parent 1: classid 1:1 htb rate 10mbit burst 15k tc class add dev eth0 parent 1:1 classid 1:10 htb rate 700kbit ceil 1mbit burst 15k prio 0 tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1kbit ceil 28800 burst 15k tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1kbit ceil 1mbit burst 15k prio 1 tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10 U32=tc filter add dev eth0 protocol ip parent 1:0 prio 0 u32 $U32 match ip dport 5001 0x match ip protocol 17 0xff flowid 1:10 $U32 match ip sport 5001 0x match ip protocol 17 0xff flowid 1:10 $U32 match ip dport 5001 0x match ip protocol 6 0xff flowid 1:10 $U32 match ip sport 5001 0x match ip protocol 6 0xff flowid 1:10 As openvpn uses UDP on port 5001 I tried to use the protocol filter with the port filter. What happens though is that still about two thirds of the traffic goes through 1:30 (default), even though a tcpdump -i eth0 only shows UDP traffic on port 5001. Thus I loose 2/3rds of the traffic to the default qdisc and have no guaranteed bandwidth. 1:20 is only for testing purposes and nothing goes over that one. Any idea where I could be wrong? I am sure a lot of this is redundant, but as I said, I have only just started with this particular subject. Many thanks in advance Peter Huetmannsberger Admin Center for Contemporary Art, Linz ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB and Openvpn
Peter Huetmannsberger wrote: The idea was that all traffic going through the tunnel would have top priority and the rest share what's left. Sounded simple enough. You could use a prio queue for that. Tunnel on band 0, rest on band 1. Downside is that there may be nothing left for the rest to share. :-) tc class add dev eth0 parent 1: classid 1:1 htb rate 10mbit burst 15k Why make a 10mbit class when it's not used? I find it hard to tell what will happen when the rates don't add up properly. tc class add dev eth0 parent 1:1 classid 1:10 htb rate 700kbit ceil 1mbit burst 15k prio 0 Since the parent has 10mbit which is never fully used, this class will most likely always borrow as much as it can. So although it says 700kbit it's really a 1mbit class. tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1kbit ceil 28800 burst 15k This class does not seem to be used at all, why does it exist? tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1kbit ceil 1mbit burst 15k prio 1 Another 1mbit class. The parent has 10mbit, so there's no reason why it shouldn't be able to borrow another mbit, no matter what the actual priority of that class is. Am I wrong? :) Any idea where I could be wrong? Guesswork: The logic of your class structure is flawed. How fast is your connection to the outside world? I guess it's 1mbit, because you set the ceil of your VPN/rest class to 1mbit? However, the parent class of those two is a 10mbit class, so both borrow one 1mbit from that (they don't share the same one single mbit). In that case, no proper shaping is done at all. 10mbit then would be your LAN? Then how about this class setup: 1:1 10mbit (LAN interface) | \--- 1:2 09mbit (LAN only traffic) \--- 1:3 01mbit (Outside world traffic) | \--- 1:31 700kbit (VPN) \--- 1:32 300kbit (Rest) This is (about) the kind of setup I use at home. Make sure your rates add up. If you intend to give your (Rest) class 1kbit only, throw HTB away and use PRIO instead. If (Rest) doesn't need any bandwidth at all, you can as well let it starve completely by using prio. And that's much less complicated than HTB. Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB and Openvpn
Hi, many thanks for your help. I have changed my setup accordingly now, however there are still packets showing up on the default qdisc when I go through the tunnel, about half the packets don't seem to match. Did you see anything wrong with the filter rules. Openvpn uses port 5001 on both ends, and tcpdump -i eth0 shows udp packets going back and forth on port 5001 and no other traffic, yet the default counter goes up along with the 1:10 qdisc. Thanks again. .peter ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB and Openvpn
Peter Huetmannsberger wrote: I have changed my setup accordingly now, however there are still packets showing up on the default qdisc when I go through the tunnel, about half the packets don't seem to match. If there really only is udp traffic on port 5001, I don't see why your rules should match that only partially. If they were wrong, they'd either match everything or nothing at all, wouldn't they? Did you see anything wrong with the filter rules. Openvpn uses port 5001 on both ends, and tcpdump -i eth0 shows udp packets going back and forth on port 5001 and no other traffic, yet the default counter goes up along with the 1:10 qdisc. I don't know tcpdump - when debugging filter rules, I usually adapt these rules to iptables and use iptables log with different prefixes to distinct which packets matched which rules (and which didn't match at all). If nothing shows up this way, then I too am clueless as to what might be wrong. Maybe someone else has a suggestion. :) I don't have any experience with OpenVPN myself, so I don't know what's the best way to match OpenVPN traffic. Using port criteria alone, might not be waterproof enough, as long as anyone can use these ports for anything. Matching both IP and Port would probably be more reliable. Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB problem...
Dnia poniedziaek 06 wrzesie 2004 23:56, Cow napisa: Hi folks. Let's say I would like to make some bandwidth control on my network using HTB. I have 2 clients: [...] I think a script as i described, could be very complex to write, therefore i ask, whoever is here, for help. Thank you all in advance. Hello all, my first post here, maybe even I will help someone;) I assume that you want somethink like: data from server to LAN (PC1,PC2) unshaped (full 100mbit) data from Internet to LAN shaped Then all you need to do is make classes with source 192.168.0.1 and destination 192.168.0.2(3) and 100mbit rate and then make classes with destination 192.168.0.2(3) with download rate. I believe that you understand what I am thinkig of. Or you can use iptables and mark traffic going from server to LAN, and other mark for traffic in FORWARD chain. (iptables -t mangle -A FORWARD -j MARK --set-mark SOME_MARK) When using iptables you will be able to shape upload speed, just mark traffic in forward going from PC1/2 with output interface eth2 (-o eth2) - it will be hosts upload. I won't write you full script, make it yourself, visit LARTC and firstly try htb.init for simple class creation. Good fun! -- .: Jakub Gazik (zytek) .: email:[EMAIL PROTECTED] .: JID:[EMAIL PROTECTED] .: http://www.misiaj.sie.pl [obsolete] ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB problem...
I've tryed to make a script, some of you, who thinks it looks ok? DEV=eth2 DOWNLINK=1024 UPLINK=512 DOWN1=768 UP1=384 DOWN2=256 UP2=128 tc qdisc add dev $DEV root handle 1: htb default 20 tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \ burst 6k prio 1 tc class add dev $DEV parent 1:1 classid 1:20 htb rate ${UP1}kbit \ burst 6k prio 2 tc class add dev $DEV parent 1:1 classid 1:30 htb rate ${UP2}kbit \ burst 6k prio 2 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 qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ match ip src 192.168.0.2 flowid 1:20 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \ match ip src 192.168.0.3 flowid 1:30 Not tested yet... If it works, feel free to letting me know, how to make something like this, just for download rate. If it doesn't work, please let me know, what you think is wrong. - Rune Johannesen ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB Problem...
You might want to check out this script http://www.geocities.com/jame_sj I just noticed a bug (that I need to figure out...) in it but this should give a start.. Looks nice, want to share the bug with me? :-) James ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB problem...
by zytek Hello all, my first post here, maybe even I will help someone;) I assume that you want somethink like: data from server to LAN (PC1,PC2) unshaped (full 100mbit) data from Internet to LAN shaped Correct. Then all you need to do is make classes with source 192.168.0.1 and destination 192.168.0.2(3) and 100mbit rate and then make classes with destination 192.168.0.2(3) with download rate. I believe that you understand what I am thinkig of. I do, but could you write an example please, so i have something to make it from? :-) Or you can use iptables and mark traffic going from server to LAN, and other mark for traffic in FORWARD chain. (iptables -t mangle -A FORWARD -j MARK --set-mark SOME_MARK) When using iptables you will be able to shape upload speed, just mark traffic in forward going from PC1/2 with output interface eth2 (-o eth2) - it will be hosts upload. Again, an example would be nice.. i have no idea on how to use MARK command with iptables, even i know a great deal about iptables in general. I won't write you full script, make it yourself, visit LARTC and firstly try htb.init for simple class creation. Good fun! Fair enough, i wouldn't exspect anyone to write a full script for me, but i would exspect someone to make me an example for instance, how i can shape PC1's download/upload rate to 256/128 KBit, so i atleast have something to help me going. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB problem...
Am Tuesday 07 September 2004 23:18 schrieb Cow: zytec: (?) I assume that you want somethink like: data from server to LAN (PC1,PC2) unshaped (full 100mbit) data from Internet to LAN shaped Correct. Not really an example, but you may have a look at my script [1]. It solves the 100Mbit LAN vs internet traffic by using a class setup which looks like [2], which reminds me that I did a modification to wondershaper once [3] that does the same. I think this modification was reported to work, however I haven't tested it nor do I support it. Maybe it serves as an example... I'm using a fat HTB class which knows the true interface bandwidth (100MBit isn't actually right, you should measure what rates you really get). Then there's a child class for the internet traffic and one for the actual LAN traffic. If HTB works correctly, this way you get full speed for LAN-only transfers, without letting them interfere with the internet traffic. The script [1] is the one I'm (more or less) actively working on; it doesn't support custom rates per user yet, but that's something that'll be added for sure in one of the next releases. HTH Andreas [1] http://www.metamorpher.de/fairnat/ [2] http://www.metamorpher.de/files/wshaper-over-lan.png [3] http://www.metamorpher.de/files/wshaper-over-lan.htb ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB problem...
Hi folks. Let's say I would like to make some bandwidth control on my network using HTB. I have 2 clients: PC1: 192.168.100.2 PC2: 192.168.100.3 Server: 192.168.100.1 This has 2 NIC's eth1 is local and eth2 is connected to the internet. It could be nice to have a script, where you could specify, how much bandwidth you want for a specific host on a network, like, PC1 has 10/100 MBit network, but only has 256/128, when surfing the net. PC2 has the same network ofc, but 768/384 when surfing/downloading assuming the shared connection is 1024/512. I am currently running wondershaper1.1a which works prefectly, but i wish, it could be more specific. Could also be nice, if it would be someway possible to check on the clients IP or MAC address to verify, if it's really them. Like it's only PC1 and PC2 who have access to the server in the 192.168.*.* segment. Hope i make myself clear. My server runs redhat 9 in cmd mode/no GUI. Iptables installed script, as firewall. I think a script as i described, could be very complex to write, therefore i ask, whoever is here, for help. Thank you all in advance. Regards Rune Johannesen Denmark ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB prio question
Hi all. I have a bridge running Linux 2.4.24 that I use as a bandwidth manager on a broadband wireless network. I'm using HTB and SFQ to prioritize that share bandwidth on a per-cell basis. My IP tables rules divide the traffic based on IPand traffic type (using layer-7 filter and ipp2p). My goal is to make sure that p2p traffic on the network doesn't sink all of the bandwidth and affect the performance of high-priority commercial customers. For the most part it works very well, but I'm not getting the kind of prioritization I'm expecting. I'm not seeing p2p traffic go down on my graphs as higher-priority traffic goes up. Consequently, my high-priority traffic suffers. I am able to control the p2p but putting it into a very small bitrate queue but would rather late the shaper do the work based on priority. What am I missing? My rules are posted below. Thanks, Michael Eck Sorry if these are a bit long ### # Root qdisc ### /sbin/tc qdisc add dev eth0 root handle 1: htb default 5 # Parent Classes # The Entire Interface /sbin/tc class add dev eth0 parent 1: classid 1:1 htb rate 102401kbit ceil 102401kbit quantum 2 # Default Class /sbin/tc class add dev eth0 parent 1:1 classid 1:5 htb rate 100864kbit ceil 100864kbit prio 1 quantum 2 /sbin/tc qdisc add dev eth0 parent 1:5 handle 5: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 5 fw flowid 1:5 # Low Prio p2p class - This is only here for uses that get out of control /sbin/tc class add dev eth0 parent 1:5 classid 1:53 htb rate 56kbit ceil 56kbit prio 4 quantum 1501 /sbin/tc qdisc add dev eth0 parent 1:53 handle 5: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 53 fw flowid 1:53 # Parent class for VL AU - Retel /sbin/tc class add dev eth0 parent 1:1 classid 1:3 htb rate 1536kbit ceil 1536kbit # Zero Rate High Priority Class - seldom used /sbin/tc class add dev eth0 parent 1:3 classid 1:30 htb rate 1kbit ceil 1536kbit prio 1 quantum 1501 burst 1501 cburst 1501 /sbin/tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 30 fw flowid 1:30 # Commercial Class for VL - Retel /sbin/tc class add dev eth0 parent 1:3 classid 1:31 htb rate 1152kbit ceil 1536kbit prio 2 /sbin/tc qdisc add dev eth0 parent 1:31 handle 31: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 31 fw flowid 1:31 # Residential Class for VL - Retel /sbin/tc class add dev eth0 parent 1:3 classid 1:32 htb rate 384kbit ceil 1536kbit prio 3 /sbin/tc qdisc add dev eth0 parent 1:32 handle 32: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 32 fw flowid 1:32 # Zero Rate Low Priority Class - VL - Retel - All p2p traffic for this sector goes through here /sbin/tc class add dev eth0 parent 1:3 classid 1:33 htb rate 1kbit ceil 56kbit prio 4 quantum 1501 burst 1501 cburst 1501 /sbin/tc qdisc add dev eth0 parent 1:33 handle 33: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 33 fw flowid 1:33 # Parent class for VL AU - WHOT /sbin/tc class add dev eth0 parent 1:1 classid 1:4 htb rate 1536kbit ceil 1536kbit # Zero Rate High Priority Class /sbin/tc class add dev eth0 parent 1:4 classid 1:40 htb rate 1kbit ceil 1536kbit prio 1 quantum 1501 burst 1501 cburst 1501 /sbin/tc qdisc add dev eth0 parent 1:40 handle 40: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 40 fw flowid 1:40 # Commercial Class for VL - WHOT /sbin/tc class add dev eth0 parent 1:4 classid 1:41 htb rate 1152kbit ceil 1536kbit prio 2 /sbin/tc qdisc add dev eth0 parent 1:41 handle 41: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 41 fw flowid 1:41 # Residential Class for VL - WHOT /sbin/tc class add dev eth0 parent 1:4 classid 1:42 htb rate 384kbit ceil 1536kbit prio 3 /sbin/tc qdisc add dev eth0 parent 1:42 handle 42: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 42 fw flowid 1:42 # Zerio Rate Low Priority Class - VL - WHOT Abusers All p2p traffic for this sector goes through here /sbin/tc class add dev eth0 parent 1:4 classid 1:43 htb rate 1kbit ceil 56kbit prio 4 quantum 1501 burst 1501 cburst 1501 /sbin/tc qdisc add dev eth0 parent 1:43 handle 43: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 43 fw flowid 1:43 # Parent class for ChilAU /sbin/tc class add dev eth0 parent 1:1 classid 1:6 htb rate 1536kbit ceil 1536kbit # Zero Rate High Priority Class - /sbin/tc class add dev eth0 parent 1:6 classid 1:60 htb rate 1kbit ceil 1536kbit prio 1 quantum 1501 burst 1501 cburst 1501 /sbin/tc qdisc add dev eth0 parent 1:60 handle 60: sfq perturb 10 /sbin/tc filter add dev eth0 parent 1:0 prio 1 protocol ip handle 60 fw flowid 1:60 # Commercial Class for ChilAU /sbin/tc class add dev eth0 parent 1:6 classid 1:61 htb rate 1152kbit ceil 1536kbit
[LARTC] HTB kernel panic crash!
(list admin, please cancel the same post from my other email address -- forgot to change it on first submission) I need to setup QoS on a linux router/firewall I maintain. I spent 10 hours reading everything I could find on QoS/HTB/iproute2 and came up with what I thought made sense for my situation. So I deployed it and BOOM! KERNEL PANIC! Not what I was expecting... now the debugging begins. I reproduced the panic twice on two different (yet almost identically configured) machines. I can reproduce the panic on demand by doing a specific set of actions. First, my setup: I have 2 machines at different locations connected via internet. Both machines are stock Fedora Core 1 kernel 2.4.22-1.2179.nptl. I run free/SWAN (stock FC binary rpm's) between the 2 machines for ipsec VPN. I run VoIP, VNC and all other inter-office traffic through the VPN. The internet connection is ADSL with 400kbits/s up and 1500 or so down. VoIP is routed but not MASQ'd. VNC is MASQ'd (neither the originating nor destination machines are the linux boxes themseleves). Second, my goals: Give a fixed minimum bandwidth and high priority to VoIP through VPN. Same, but less so, for VNC through VPN. Give the VPN high enough allocation for VoIP and VNC to get through ok. Less important little tweaks for rarely-used outside (non IPSEC) VNC and ssh access. My situation seems different from the examples I've seen because *I believe* I need to have 2 completely separate qdiscs, 1 for ppp0 (the DSL) and 1 for ipsec0 (the freeSWAN VPN). Yet ipsec0 eventually goes over ppp0 so they are intertwined. I have a funny feeling this is where the crash is coming from. See my setup script near the bottom of this email (excuse the wrapping). Everything seemed to go great until I tried VNC'ing in from one office to the other. The VNC screen would pop up, do a first draw, then completely freeze. From that point on the remote linux router is frozen -- kernel panic. Strange that the bug would only trigger AFTER sending the 100-200kB of the initial VNC screen. Looking at my config, I will note a couple of questions I had while writing it that weren't answered in the docs I found: 1. The tc filter add ... protocol ip thing confused me. What exactly is the protocol ip for? I originally though that it should read protocol 50 for the ipsec stuff, but that didn't seem to catch the packets, so I switched it back to ip. Weird, while testing with it set to 50 (and having no packets match the rule) there were no crashes. 2. The iptables mangle rules will in the case of VNC and ssh *over VPN* match two rules. I *assume* the last executing MARK will overwrite the previous MARK. If for some reason the marks are ANDed or something, perhaps that is causing the crash (filtering 1 packet into 2 buckets?). 3. As I mentioned above, the fact that one qdisc will feed a separate qdisc, because ipsec0 eventually goes out over ppp0, may be a problem? I wish I had seen some examples of this type of setup. 4. I chose HTB instead of CBQ as it seemed simpler (always a good thing) and more suited to my exact needs. Not sure if the bug is in HTB itself or the general QoS stuff. my setup script: $iext=ppp0 $isec=ipsec0 $ivoi=eth3 $qosbw=380 # VNC iptables -t mangle -A PREROUTING -p tcp --sport 5900 -j MARK --set-mark 11 iptables -t mangle -A PREROUTING -p tcp --dport 5900 -j MARK --set-mark 11 iptables -t mangle -A PREROUTING -i $ivoi -j MARK --set-mark 10 iptables -t mangle -A OUTPUT -p 50 -j MARK --set-mark 10 iptables -t mangle -A OUTPUT -p 51 -j MARK --set-mark 10 iptables -t mangle -A OUTPUT -o $iext -p tcp --sport ssh -j MARK --set-mark 12 tc qdisc del dev $isec root /dev/null 21 tc qdisc add dev $isec root handle 1:0 htb default 13 tc class add dev $isec parent 1:0 classid 1:1 htb rate $qosbwkbit ceil $qosbwkbit tc class add dev $isec parent 1:1 classid 1:10 htb rate 160kbit ceil $qosbwkbit tc class add dev $isec parent 1:1 classid 1:11 htb rate 210kbit ceil $qosbwkbit tc class add dev $isec parent 1:1 classid 1:13 htb rate 010kbit ceil $qosbwkbit tc qdisc add dev $isec parent 1:10 handle 110:0 sfq perturb 10 tc qdisc add dev $isec parent 1:11 handle 111:0 sfq perturb 10 tc qdisc add dev $isec parent 1:13 handle 113:0 sfq perturb 10 tc filter add dev $isec parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev $isec parent 1:0 protocol ip handle 11 fw flowid 1:11 tc qdisc del dev $iext root /dev/null 21 tc qdisc add dev $iext root handle 1:0 htb default 13 tc class add dev $iext parent 1:0 classid 1:1 htb rate $qosbwkbit ceil $qosbwkbit tc class add dev $iext parent 1:1 classid 1:10 htb rate 300kbit ceil $qosbwkbit tc class add dev
[LARTC] HTB mpu and overhead settings for PPPoE ADSL?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I'm using HTB to shape my outgoing traffic over a ADSL-link with PPPoE with a nominal bandwidth of 128kbit/s. My goal is to favour small packets like ACKs and interactive services like ssh; in other words, I want to achieve low lantency. If there are some big packets going over the wire, everything works fine. But if there are many small packets saturating my uplink, I get pings of 1000ms and above. To minimize this effect I've set the HTB qdisc rate to 100kbit/s. But even now, throttling my uplink to lower than 80% of physical bandwidth, pings go up to 800ms in some cases. Today I've noticed, that two additional parameters have been added recently to the HTB-shaper: mpu and overhead. Are this new parameters suitable for solving my problem? Which are smart values for this two settings? I'm shaping the ppp-device directly, not the ethernet-device on which the dsl-modem is connected and I'm using the kernel pppoe driver (if this is important for you to know). Thanks Stefan - -- In a free world nobody needs Windows and Gates. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBEmkKFdd7dooRJzsRAi/3AJ9KZYVoJVSZSYTGsUAtC3xLLyZrBQCeOZ34 byc+vxTFy5pYTEhZXejYGmk= =Ovk/ -END PGP SIGNATURE- ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] htb and fw problems
Dear All, I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywhere tcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhere MARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhere MARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here's my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 20: limit 128p quantum 1514b perturb 10sec Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) qdisc sfq 10: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) tc -s -d filter show dev eth1 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 filter parent 1: protocol ip pref 49152 fw filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 tc -s class show dev eth1 class htb 1:1 root rate 520Kbit ceil 520Kbit burst 2264b cburst 2264b Sent
Re: [LARTC] htb and fw problems
- Original Message - From: [EMAIL PROTECTED] To: Ing Isianto Istiadi [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 1:40 PM Subject: Re: [LARTC] htb and fw problems hi! your default class must not have rate grater than your desired speed rate. If you have 64kbps your class shoud have 60kbps or less. Without this htb will not work as you except! tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps - Original Message - From: Ing Isianto Istiadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 11:00 AM Subject: [LARTC] htb and fw problems Dear All, I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywheretcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhereMARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhereMARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here's my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 20: limit 128p quantum 1514b perturb 10sec Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) qdisc sfq 10: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) tc -s -d filter show dev eth1 filter
Re: [LARTC] htb and fw problems
Dear, I have change tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps to tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbps ceil 60kbps still with the same result any other tips? On Wed, 4 Aug 2004 13:41:34 +0200 [EMAIL PROTECTED] wrote: - Original Message - From: [EMAIL PROTECTED] To: Ing Isianto Istiadi [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 1:40 PM Subject: Re: [LARTC] htb and fw problems hi! your default class must not have rate grater than your desired speed rate. If you have 64kbps your class shoud have 60kbps or less. Without this htb will not work as you except! tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps - Original Message - From: Ing Isianto Istiadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 11:00 AM Subject: [LARTC] htb and fw problems Dear All, I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywheretcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhereMARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhereMARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here's my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes
Re: [LARTC] htb and fw problems
Hello, On Wednesday 04 August 2004 11:00, Ing Isianto Istiadi wrote: I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 Well, it's just a wild guess, but do you really have a 64 k-byte/second leased line or could it be a 64 k-bit/second line? If it's the latter you should try: tc class add dev eth1 parent 1: classid 1:1 htb rate 64kbit ceil 64kbit and see if that works out. I'd also highly recommend reading http://www.docum.org/docum.org/faq/cache/74.html rgds, Arno ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb and fw problems
Dear Isianto Istiadi, Here are your class creation statements: : [ snip ] 1: classid 1:1 htb rate 65kbps ceil 65kbps : [ snip ] 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 : [ snip ] 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 : [ snip ] 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 : [ snip ] 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 : [ snip ] 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 You are configuring HTB to guarantee exactly 64kbps to the children classes. - Leaf class rate is guaranteed. HTB does not check parent classes. This may be non-intuitive or even counter-intuitive. - Your rates, then total 64kbps: 20 + 5 + 8 + 23 + 8 = 64 Perhaps you could try dropping the guaranteed bandwidth (sum of rates of leaf classes) below 60kbps. -Martin -- Martin A. Brown --- SecurePipe, Inc. --- [EMAIL PROTECTED] ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb and fw problems
only short answer test sorry - Original Message - From: Ing Isianto Istiadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 3:11 PM Subject: Re: [LARTC] htb and fw problems Dear, I have change tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps to tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbps ceil 60kbps still with the same result any other tips? On Wed, 4 Aug 2004 13:41:34 +0200 [EMAIL PROTECTED] wrote: - Original Message - From: [EMAIL PROTECTED] To: Ing Isianto Istiadi [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 1:40 PM Subject: Re: [LARTC] htb and fw problems hi! your default class must not have rate grater than your desired speed rate. If you have 64kbps your class shoud have 60kbps or less. Without this htb will not work as you except! tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps - Original Message - From: Ing Isianto Istiadi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 11:00 AM Subject: [LARTC] htb and fw problems Dear All, I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywheretcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhereMARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhereMARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination
Re: [LARTC] htb and fw problems
Ok, here's my new htb config #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 debug 333 tc class add dev eth1 parent 1: classid 1:1 htb rate 60kbit ceil 60kbit tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbit ceil 65kbit prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 10kbit ceil 15kbit prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 5kbit ceil 11kbit prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 20kbit ceil 23kbit prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 5kbit ceil 10kbit prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 1 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 2 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 3 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 4 fw flowid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 whith the same effect. Thanks for pointing out the parent's rate. it's my mistakes ^_^ Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywheretcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhereMARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhereMARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here's my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 20: limit 128p quantum 1514b perturb 10sec Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) qdisc sfq 10: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) tc -s -d filter show dev eth1 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x28 classid 1:40 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x1e classid 1:30 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x14 classid 1:20 filter parent 1: protocol ip pref 49152 fw filter parent 1: protocol ip pref 49152 fw handle 0xa classid 1:10 tc -s class
Re: [LARTC] htb and fw problems
it looks like you might have a problem with your marking with the FW. #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 From Looking at this I see the first commented link that as the mark in hex, Don't all the marks need to be written this way? 0x80 0x40 0x20 ? This is just a guess I don't really know. Ing Isianto Istiadi ([EMAIL PROTECTED]) wrote: Dear All, I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywhere tcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhere MARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhere MARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here's my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 20: limit 128p quantum 1514b perturb 10sec Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) qdisc sfq 10: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) tc -s -d filter show dev eth1 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip
Re: [LARTC] htb and fw problems
On Wed, 04 Aug 2004 14:31:06 + [EMAIL PROTECTED] wrote: it looks like you might have a problem with your marking with the FW. That's what I thought, but I can't troubleshoot any other way. I tried both ways 0x80, 80 to the same affect. The strange problem is if I omitted the source ip part, so iptables -A OUTPUT -p tcp -t mangle --dport www -j MARK --set-mark 40 it works I'm out of my head ^_^ From Looking at this I see the first commented link that as the mark in hex, Don't all the marks need to be written this way? 0x80 0x40 0x20 ? This is just a guess I don't really know. Ing Isianto Istiadi ([EMAIL PROTECTED]) wrote: Dear All, I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywhere tcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhere MARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhere MARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here's my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 20: limit 128p quantum 1514b perturb 10sec Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) qdisc sfq 10: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 80
Re: [LARTC] htb and fw problems
I can see the counter works in iptables, but in the htb, it doesn't go to the right class Please write what commands do you use to see the counter and what counter do you mean? I think counter for ip packets isn't it? You can try to see my problem in LARTC archive: HTB 3.13 please help. In my opinion you have bad configured packet marking. See my configuration of packet marking. I included it with archive posts in HTB 3.13 please help - Dear All, I'm using the kernel 2.6.6, iproute2-2.4.7.20020116, iptables v1.2.9, and gentoo. I have a leased-line 64 kbps. I can see the counter works in iptables, but in the htb, it doesn't go to the right class (it always go to the default class). Any help will be appreciated here's my htb conf #!/bin/bash tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: htb default 80 tc class add dev eth1 parent 1: classid 1:1 htb rate 65kbps ceil 65kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 20kbps ceil 35kbps prio 3 tc class add dev eth1 parent 1:1 classid 1:20 htb rate 5kbps ceil 10kbps prio 0 tc class add dev eth1 parent 1:1 classid 1:30 htb rate 8kbps ceil 11kbps prio 2 tc class add dev eth1 parent 1:1 classid 1:40 htb rate 23kbps ceil 40kbps prio 1 tc class add dev eth1 parent 1:1 classid 1:80 htb rate 8kbps ceil 10kbps prio 4 tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:80 handle 80: sfq perturb 10 tc filter add dev eth1 parent 1:0 protocol ip handle 10 fw flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip handle 20 fw flowid 1:20 tc filter add dev eth1 protocol ip parent 1:0 handle 30 fw flowid 1:30 tc filter add dev eth1 parent 1:0 protocol ip handle 40 fw classid 1:40 tc filter add dev eth1 protocol ip parent 1:0 handle 80 fw flowid 1:80 Here's my iptables rules*mangle :PREROUTING ACCEPT [1061:863210] :INPUT ACCEPT [1022:857788] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [947:201743] :POSTROUTING ACCEPT [947:201743] -N personal -N others -N personal1 #-A OUTPUT -p tcp -m tcp --sport 3128 -j MARK --set-mark 0x2 -A OUTPUT -p tcp -m tcp --sport 3128 --destination 192.168.1.145 -j personal #-A OUTPUT -p tcp -m tcp --dport 80 -j MARK --set-mark 20 -A OUTPUT -p tcp -m tcp --dport 80 -j others -A personal -j MARK --set-mark 40 -A others -j MARK --set-mark 20 Here's my iptables -L -v -t mangle -x output Chain PREROUTING (policy ACCEPT 580535 packets, 176796832 bytes) pkts bytes target prot opt in out source destination Chain INPUT (policy ACCEPT 573475 packets, 174919251 bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 5656 packets, 1810367 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 598621 packets, 392036436 bytes) pkts bytes target prot opt in out source destination 11105 14785525 personal tcp -- anyany anywhere 192.168.1.145 tcp spt:webcache 28465 2233910 others tcp -- anyany anywhere anywheretcp dpt:www Chain POSTROUTING (policy ACCEPT 604295 packets, 393851150 bytes) pkts bytes target prot opt in out source destination Chain others (1 references) pkts bytes target prot opt in out source destination 28465 2233910 MARK all -- anyany anywhere anywhereMARK set 0x14 Chain personal (1 references) pkts bytes target prot opt in out source destination 11105 14785525 MARK all -- anyany anywhere anywhereMARK set 0x28 Chain personal1 (0 references) pkts bytes target prot opt in out source destination Here's my /sbin/tc -s qdisc show dev eth1 qdisc sfq 80: limit 128p quantum 1514b perturb 10sec Sent 386 bytes 5 pkts (dropped 0, overlimits 0) qdisc sfq 40: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 30: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc sfq 20: limit 128p quantum 1514b perturb 10sec Sent 12272 bytes 72 pkts (dropped 0, overlimits 0) qdisc sfq 10: limit 128p quantum 1514b perturb 10sec Sent 0 bytes 0 pkts (dropped 0, overlimits 0) qdisc htb 1: r2q 10 default 80 direct_packets_stat 0 Sent 12658 bytes 77 pkts (dropped 0, overlimits 0) tc -s -d filter show dev eth1 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x50 classid 1:80 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x28
Re: [LARTC] HTB classifying
Martin Brown has right but his answer is not full. I see at least one error in your script. I see you arew shaping on wlan0. You must know that you can only shape outgoing traffic so if your node is downloading by ftp i'ts ok, but if the node start to upload shaping on wlan0 won't work. In that case you must shape on eth0. And second thing: Because you shape towards 192.168.2.224 you can not write ...ip src 192.168.2.224/32. You must write ...ip dst 192.168.2.224. /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \ match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 Take some more reading :) Good luck. - Original Message - From: Mpourtounis Dimitris [EMAIL PROTECTED] To: lartc [EMAIL PROTECTED] Sent: Saturday, July 24, 2004 11:39 PM Subject: Re: [LARTC] HTB classifying Ok then... BOX with 2 ifaces eth0 : 192.168.1.3/24 , NAT 192.168.2.0/24 wlan0:192.168.2.3/24 , gw 192.168.1.1(it is an adsl mode in fact) All i want to do is make sure that a)node 192.168.2.224 doesnt get more than 50 bits/sec b)its ssh,sftp (port 22) traffic is limited at 30 bits/sec and c)add more shaped nodes in my script. When i start downloading from node, its http taffic for examle is really shaped at 50. When i start downloading via sftp (port 22), its sftp traffic is really shaped at 30. But, if when there is an http as well as an sftp session at the same time, total bandwidth is at 80. Thanks in advance (and sorry for being so short, i will get used to explaining my problems briefly...) #My.notworking.script /sbin/tc qdisc add dev wlan0 root handle 1:0 htb r2q 100 /sbin/tc class add dev wlan0 parent 1: classid 1:10 htb rate 50 /sbin/tc class add dev wlan0 parent 1:10 classid 1:11 htb rate 30 /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \ match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 /sbin/tc class add dev wlan0 parent 1:10 classid 1:12 htb rate 50 /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 match \ ip src 192.168.2.224/32 classid 1:12 - Original Message - From: [EMAIL PROTECTED] To: lartc [EMAIL PROTECTED]; Mpourtounis Dimitris [EMAIL PROTECTED] Sent: Friday, January 24, 2003 2:13 AM Subject: Re: [LARTC] HTB classifying OK what's the address of eth0? Is the BOX with NAT ? I think you could send a bit of your true script and describe a bit of your network especially the part when this situation is happeniing . If you really afraid of smth like hack attack change IP adressess. Although i have done so ,you are right. I should have included this too in my (e-mail) configuration... BTW,Any idea of the situation - Original Message - From: [EMAIL PROTECTED] To: lartc [EMAIL PROTECTED]; Mpourtounis Dimitris [EMAIL PROTECTED] Sent: Friday, January 24, 2003 1:21 AM Subject: Re: [LARTC] HTB classifying Maybe it's my oversight but shoudn't you have tc qdisc add dev eth0 root handle 1:0 htb before rest of your instructions ?? I am trying to shape a client (somewhat advanced). This is my target: Client is 192.168.2.224. I would like to allow him to download with 50 bits/sec in general. But, for a specific port(say 22), i would like him to download with 30 bit/sec only. The problem is that my configuration (maybe wrong) allows him to download with 80 bit/sec. (50 generally + 30 on port 22) I thought that having classes 1:11 and 1:12 being children of a class with rate 50, 50 would be the maximum... Can htb to this? Can another queue do this? /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50 /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 classid 1:12 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB classifying
I am trying to shape a client (somewhat advanced). This is my target: Client is 192.168.2.224. I would like to allow him to download with 50 bits/sec in general. But, for a specific port(say 22), i would like him to download with 30 bit/sec only. The problem is that my configuration (maybe wrong) allows him to download with 80 bit/sec. (50 generally + 30 on port 22) I thought that having classes 1:11 and 1:12 being children of a class with rate 50, 50 would be the maximum... Can htb to this? Can another queue do this? /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50 /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 classid 1:12 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB classifying
Maybe it's my oversight but shoudn't you have tc qdisc add dev eth0 root handle 1:0 htb before rest of your instructions ?? I am trying to shape a client (somewhat advanced). This is my target: Client is 192.168.2.224. I would like to allow him to download with 50 bits/sec in general. But, for a specific port(say 22), i would like him to download with 30 bit/sec only. The problem is that my configuration (maybe wrong) allows him to download with 80 bit/sec. (50 generally + 30 on port 22) I thought that having classes 1:11 and 1:12 being children of a class with rate 50, 50 would be the maximum... Can htb to this? Can another queue do this? /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50 /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 classid 1:12 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB classifying
OK what's the address of eth0? Is the BOX with NAT ? I think you could send a bit of your true script and describe a bit of your network especially the part when this situation is happeniing . If you really afraid of smth like hack attack change IP adressess. Although i have done so ,you are right. I should have included this too in my (e-mail) configuration... BTW,Any idea of the situation - Original Message - From: [EMAIL PROTECTED] To: lartc [EMAIL PROTECTED]; Mpourtounis Dimitris [EMAIL PROTECTED] Sent: Friday, January 24, 2003 1:21 AM Subject: Re: [LARTC] HTB classifying Maybe it's my oversight but shoudn't you have tc qdisc add dev eth0 root handle 1:0 htb before rest of your instructions ?? I am trying to shape a client (somewhat advanced). This is my target: Client is 192.168.2.224. I would like to allow him to download with 50 bits/sec in general. But, for a specific port(say 22), i would like him to download with 30 bit/sec only. The problem is that my configuration (maybe wrong) allows him to download with 80 bit/sec. (50 generally + 30 on port 22) I thought that having classes 1:11 and 1:12 being children of a class with rate 50, 50 would be the maximum... Can htb to this? Can another queue do this? /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50 /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 classid 1:12 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB classifying
Ok then... BOX with 2 ifaces eth0 : 192.168.1.3/24 , NAT 192.168.2.0/24 wlan0:192.168.2.3/24 , gw 192.168.1.1(it is an adsl mode in fact) All i want to do is make sure that a)node 192.168.2.224 doesnt get more than 50 bits/sec b)its ssh,sftp (port 22) traffic is limited at 30 bits/sec and c)add more shaped nodes in my script. When i start downloading from node, its http taffic for examle is really shaped at 50. When i start downloading via sftp (port 22), its sftp traffic is really shaped at 30. But, if when there is an http as well as an sftp session at the same time, total bandwidth is at 80. Thanks in advance (and sorry for being so short, i will get used to explaining my problems briefly...) #My.notworking.script /sbin/tc qdisc add dev wlan0 root handle 1:0 htb r2q 100 /sbin/tc class add dev wlan0 parent 1: classid 1:10 htb rate 50 /sbin/tc class add dev wlan0 parent 1:10 classid 1:11 htb rate 30 /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \ match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 /sbin/tc class add dev wlan0 parent 1:10 classid 1:12 htb rate 50 /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 match \ ip src 192.168.2.224/32 classid 1:12 - Original Message - From: [EMAIL PROTECTED] To: lartc [EMAIL PROTECTED]; Mpourtounis Dimitris [EMAIL PROTECTED] Sent: Friday, January 24, 2003 2:13 AM Subject: Re: [LARTC] HTB classifying OK what's the address of eth0? Is the BOX with NAT ? I think you could send a bit of your true script and describe a bit of your network especially the part when this situation is happeniing . If you really afraid of smth like hack attack change IP adressess. Although i have done so ,you are right. I should have included this too in my (e-mail) configuration... BTW,Any idea of the situation - Original Message - From: [EMAIL PROTECTED] To: lartc [EMAIL PROTECTED]; Mpourtounis Dimitris [EMAIL PROTECTED] Sent: Friday, January 24, 2003 1:21 AM Subject: Re: [LARTC] HTB classifying Maybe it's my oversight but shoudn't you have tc qdisc add dev eth0 root handle 1:0 htb before rest of your instructions ?? I am trying to shape a client (somewhat advanced). This is my target: Client is 192.168.2.224. I would like to allow him to download with 50 bits/sec in general. But, for a specific port(say 22), i would like him to download with 30 bit/sec only. The problem is that my configuration (maybe wrong) allows him to download with 80 bit/sec. (50 generally + 30 on port 22) I thought that having classes 1:11 and 1:12 being children of a class with rate 50, 50 would be the maximum... Can htb to this? Can another queue do this? /sbin/tc class add dev eth0 parent 1: classid 1:10 htb rate 50 /sbin/tc class add dev eth0 parent 1:10 classid 1:11 htb rate 30 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 \ match ip sport 80 0x classid 1:11 /sbin/tc class add dev eth0 parent 1:10 classid 1:12 htb rate 50 /sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.2.224/32 classid 1:12 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB classifying
Hello Mpourtounis, : When i start downloading from node, its http taffic for examle is : really shaped at 50. When i start downloading via sftp (port 22), : its sftp traffic is really shaped at 30. But, if when there is an : http as well as an sftp session at the same time, total bandwidth is at : 80. You are missing one key piece in your understanding of HTB and that is the difference between using rate and using ceil. : /sbin/tc qdisc add dev wlan0 root handle 1:0 htb r2q 100 : /sbin/tc class add dev wlan0 parent 1: classid 1:10 htb rate 50 : : /sbin/tc class add dev wlan0 parent 1:10 classid 1:11 htb rate 30 : /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 \ : match ip src 192.168.2.224/32 \ : match ip sport 80 0x classid 1:11 : : /sbin/tc class add dev wlan0 parent 1:10 classid 1:12 htb rate 50 : /sbin/tc filter add dev wlan0 parent 1:0 protocol ip prio 100 u32 match \ : ip src 192.168.2.224/32 classid 1:12 You have a class structure which looks roughly like this: class 1:10, rate 50 [ ceil 50 ] | +-class 1:11, rate 30 [ ceil 30 ] (rate M) \ class 1:12, rate 50 [ ceil 50 ] (rate L) Because you have specified a rate in each leaf class (1:11 and 1:12), your two leaf classes are getting the guaranteed 'rate'. You have guaranteed rate M, 30 (units???) (seems to be 37500bps with my tc) to your class 1:11. You have guaranteed rate L to your class 1:12. HTB will dequeue packets entering this class until rate without examining any other parent class. Because each class is getting its guaranteed rate, HTB is effectively transmitting (dequeuing) packets at 80 (30 + 50). I believe you wish to do the following. Note that I have used the same ratios, but have eliminated some zeroes and changed the units, but simply for readability. class 1:10, rate 500 kbps, ceil 500 kbps | +-class 1:11, rate 100 kbps, ceil 300 kbps \ class 1:12, rate 400 kbps, ceil 500 kbps Thes means that classes 1:11 and 1:12 can transmit up to rates 100 kbps and 400 kbps respectively before HTB starts to calculate borrowing. For more on the borrowing model, see [0], [1] and [2]. The rule you are unwittingly violating is this rule [3]. In short, since HTB will not check any rates or perform any shaping or borrowing until rate is met (exceeded), you must make sure that the sum of the rates of your leaf classes does not exceed the parent classes. As a final note, if you wish to limit your total outgoing bandwidth to only 50 and let HTB help a bit with the borrowing, I would recommend the following model: class 1:10, rate 50, ceil 50 | +-class 1:11, rate 10, ceil 30 \ class 1:12, rate 20, ceil 50 Best of luck, -Martin [0] http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#hsharing [1] http://tldp.org/HOWTO/Traffic-Control-HOWTO/classful-qdiscs.html#qc-htb-borrowing [2] http://opalsoft.net/qos/DS-28.htm [3] http://www.docum.org/docum.org/faq/cache/13.html P.S. Just a reminder that with the command line tc, kbps means kilobytes per second. If you want to talk about kilobits per second, use kbit. -- Martin A. Brown --- SecurePipe, Inc. --- [EMAIL PROTECTED] ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB tc
Hi, I'm trying to make run a simple shaping *through HTB*. I have compiled a new kernel 2.4.21. First command from http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm said: # tc qdisc add dev eth0 root handle 1: htb default 12 RTNETLINK answers: Invalid argument I tryed both standard tc from Debian stable and http://luxik.cdi.cz/~devik/qos/htb/v2/tc.gz this one... I tryed htb.init-v0.8.5 from SourceForge with htb-lartc.tar.gz configuration from the same site. The script doesn't report any error, but : skatach:~/bin# ./htb.init-v0.8.5 start skatach:~/bin# tc filter show dev eth0 skatach:~/bin# tc class show dev eth0 skatach:~/bin# tc qdisc show As I guess, it means, that there isn't any class. It isn't, what I want :( Any ideas, where the problem can be? Many thanks. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB tc
OT: Dudes, why i have to reedit To field and delete CC field, gmail see this as spam Now, make sure you compiled the kernel with htb, latest stable kernel is 2.4.26 or 2.6.7 On Thu, 22 Jul 2004 19:58:40 +0200, Antonin Karasek [EMAIL PROTECTED] wrote: Hi, I'm trying to make run a simple shaping *through HTB*. I have compiled a new kernel 2.4.21. First command from http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm said: # tc qdisc add dev eth0 root handle 1: htb default 12 RTNETLINK answers: Invalid argument I tryed both standard tc from Debian stable and http://luxik.cdi.cz/~devik/qos/htb/v2/tc.gz this one... I tryed htb.init-v0.8.5 from SourceForge with htb-lartc.tar.gz configuration from the same site. The script doesn't report any error, but : skatach:~/bin# ./htb.init-v0.8.5 start skatach:~/bin# tc filter show dev eth0 skatach:~/bin# tc class show dev eth0 skatach:~/bin# tc qdisc show As I guess, it means, that there isn't any class. It isn't, what I want :( Any ideas, where the problem can be? Many thanks. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB tc
Check if you have HTB support in your kernel. it must be in kernel/net/sched - Original Message - From: Antonin Karasek [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 22, 2004 6:58 PM Subject: [LARTC] HTB tc Hi, I'm trying to make run a simple shaping *through HTB*. I have compiled a new kernel 2.4.21. First command from http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm said: # tc qdisc add dev eth0 root handle 1: htb default 12 RTNETLINK answers: Invalid argument I tryed both standard tc from Debian stable and http://luxik.cdi.cz/~devik/qos/htb/v2/tc.gz this one... I tryed htb.init-v0.8.5 from SourceForge with htb-lartc.tar.gz configuration from the same site. The script doesn't report any error, but : skatach:~/bin# ./htb.init-v0.8.5 start skatach:~/bin# tc filter show dev eth0 skatach:~/bin# tc class show dev eth0 skatach:~/bin# tc qdisc show As I guess, it means, that there isn't any class. It isn't, what I want :( Any ideas, where the problem can be? Many thanks. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] : HTB - Really Big problem
I've found that i have messagess like this in /var/log/messages: Jul 20 20:11:26 (none) last message repeated 9 times Jul 20 20:11:30 (none) kernel: NET: 173 messages suppressed. Jul 20 20:11:30 (none) kernel: dst cache overflow Jul 20 20:12:59 (none) kernel: NET: 14 messages suppressed. - Original Message - From: [EMAIL PROTECTED] To: lartc [EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 6:28 PM Subject: Re: [LARTC] Fw: HTB - Really Big problem Here are the stats. If you want full stats please write then i'll send as attachment but it is 0,5MB. tc qdisc show qdisc sfq 3: dev eth0 quantum 1514b perturb 10sec qdisc sfq 138: dev eth0 quantum 1514b perturb 10sec qdisc sfq 53: dev eth0 quantum 1514b perturb 10sec qdisc sfq 54: dev eth0 quantum 1514b perturb 10sec qdisc sfq 140: dev eth0 quantum 1514b perturb 10sec qdisc sfq 137: dev eth0 quantum 1514b perturb 10sec .. qdisc sfq 11: dev eth0 quantum 1514b perturb 10sec qdisc sfq 10: dev eth0 quantum 1514b perturb 10sec qdisc sfq 9: dev eth0 quantum 1514b perturb 10sec qdisc htb 2: dev eth0 r2q 1 default 4 direct_packets_stat 0 qdisc sfq 3: dev eth1 quantum 1514b perturb 10sec qdisc sfq 138: dev eth1 quantum 1514b perturb 10sec . qdisc sfq 10: dev eth1 quantum 1514b perturb 10sec qdisc sfq 9: dev eth1 quantum 1514b perturb 10sec qdisc htb 1: dev eth1 r2q 1 default 2 direct_packets_stat 2 EOF tc filter show dev eth1: filter parent 1: protocol ip pref 49151 u32 filter parent 1: protocol ip pref 49151 u32 fh 831: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 831::800 order 2048 key ht 831 bkt 0 flowid 1:3 match c0a80502/ at 16 filter parent 1: protocol ip pref 49151 u32 fh 830: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 830::800 order 2048 key ht 830 bkt 0 flowid 1:138 match 3e57c18a/ at 16 filter parent 1: protocol ip pref 49151 u32 fh 82f: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 82f::800 order 2048 key ht 82f bkt 0 flowid 1:53 match c0a80235/ at 16 filter parent 1: protocol ip pref 49151 u32 fh 82e: ht divisor 1 filter parent 1: protocol ip pref 49151 u32 fh 82e::800 order 2048 key . #many lines filter parent 1: protocol ip pref 49152 u32 fh 802: ht divisor 1 filter parent 1: protocol ip pref 49152 u32 fh 802::800 order 2048 key ht 802 bkt 0 flowid 1:11 match c0a8010b/ at 16 filter parent 1: protocol ip pref 49152 u32 fh 801: ht divisor 1 filter parent 1: protocol ip pref 49152 u32 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:10 match c0a8010a/ at 16 filter parent 1: protocol ip pref 49152 u32 fh 800: ht divisor 1 filter parent 1: protocol ip pref 49152 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:9 match c0a80109/ at 16 tc filter show dev eth0: tc filter show dev eth0 filter parent 2: protocol ip pref 1 fw filter parent 2: protocol ip pref 1 fw handle 0x3 classid 2:3 filter parent 2: protocol ip pref 1 fw handle 0x8 classid 2:8 filter parent 2: protocol ip pref 1 fw handle 0x9 classid 2:9 filter parent 2: protocol ip pref 1 fw handle 0xa classid 2:10 filter parent 2: protocol ip pref 1 fw handle 0xb classid 2:11 filter parent 2: protocol ip pref 1 fw handle 0xc classid 2:12 filter parent 2: protocol ip pref 1 fw handle 0xf classid 2:15 filter parent 2: protocol ip pref 1 fw handle 0x11 classid 2:17 ...#many lines filter parent 2: protocol ip pref 1 fw handle 0x97 classid 2:151 filter parent 2: protocol ip pref 1 fw handle 0x98 classid 2:152 filter parent 2: protocol ip pref 1 fw handle 0xbd classid 2:189 tc class show dev eth1: class htb 1:11 parent 1:1 leaf 11: prio 0 rate 17Kbit ceil 250Kbit burst 1620b cburst 1919b class htb 1:22 parent 1:1 leaf 22: prio 0 rate 17Kbit ceil 250Kbit burst 1620b ... class htb 1:189 parent 1:1 leaf 189: prio 0 rate 17Kbit ceil 128Kbit burst 1620b cburst 1762b class htb 1:1 root rate 900Kbit ceil 900Kbit burst 2751b cburst 2751b class htb 1:10 parent 1:1 leaf 10: prio 0 rate 17Kbit ceil 250Kbit burst 1620b cburst 1919b class htb 1:23 parent 1:1 leaf 23: prio 0 rate 17Kbit ceil 250Kbit burst 1620b cburst 1919b class htb 1:32 parent 1:1 leaf 32: prio 0 rate 17Kbit ceil 250Kbit burst 1620b cburst 1919b class htb 1:54 parent 1:1 leaf 54: prio 0 rate 17Kbit ceil 64Kbit burst 1620b cburst 1680b class htb 1:2 parent 1:1 prio 0 rate 10Kbit ceil 10Kbit burst 1611b cburst 1611b class htb 1:20 parent 1:1 leaf 20: prio 0 rate 17Kbit ceil 250Kbit burst 1620b cburst 1919b class htb 1:64 parent 1:1 leaf 64: prio 0 rate 17Kbit ceil 250Kbit burst 1620b class htb 1:59 parent 1:1 leaf 59: prio 0 rate 17Kbit ceil 250Kbit burst 1620b cburst 1919b class htb 1:58 parent 1:1 leaf 58: prio 0 rate 17Kbit ceil 250Kbit burst 1620b cburst 1919b tc class show dev eth0: class htb 2:11 parent 2:1 leaf 11: prio 0 rate 15Kbit ceil 100Kbit burst 1618b cburst 1727b class htb 2:22 parent 2:1 leaf 22: prio 0 rate
[LARTC] htb quantum/r2q problem/question
hello, i have a config that is with a large domain of rate, from 2kb to 40Mb and i have some problems with i don't know how to deal with. so here are some classes 2 with q=1000, one with q 20 and one with q=6400, all have been calculated by htb, in the code i speficien just rate,ceil, no quantum, no r2q, no bursts ($tc class add $IF_INT parent 1:2 classid 1:21 htb rate ${eth1_web_r}kbit prio 1) class htb 1:199 parent 1:10 leaf 1990: prio 2 quantum 20 rate 23000Kbit ceil 47040Kbit burst 10Kb/8 mpu 0b cburst 61800b/8 mpu 0b level 0 class htb 1:2 parent 1:20 prio 1 quantum 1000 rate 48Kbit ceil 48Kbit burst 10Kb/8 mpu 0b cburst 1660b/8 mpu 0b level 0 class htb 1:12 parent 1:10 prio 1 quantum 1000 rate 50Kbit ceil 48000Kbit burst 10Kb/8 mpu 0b cburst 63025b/8 mpu 0b level 0 class htb 1:15 parent 1:10 prio 1 quantum 6400 rate 500Kbit ceil 48000Kbit burst 10Kb/8 mpu 0b cburst 63025b/8 mpu 0b level 0 and in the logs o get: kernel: HTB init, kernel part version 3.17 kernel: HTB: quantum of class 10001 is big. Consider r2q change. kernel: HTB: quantum of class 10002 is small. Consider r2q change. kernel: HTB: quantum of class 10012 is small. Consider r2q change. kernel: HTB: quantum of class 10199 is big. Consider r2q change. for now i put manualy 1500 to all, but more logicaly how do i set the quantum, what are the considerations primus:/etc# uname -a Linux primus 2.4.26 #3 Sun Jul 4 16:58:02 EEST 2004 i686 unknown primus:/etc# tc -V tc utility, iproute2-ss020116 primus:/etc# C ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB Bdw Guarantee
Referencing: http://mailman.ds9a.nl/pipermail/lartc/2004q3/013076.html (the bullet'ed items are what he wrote) * NET * 1024/256 ADSL * ||eth1 * Linux Firewall * eth0 * ||LAN 10.a.a.a * * I want to GUARANTEE for an IP (10.x.y.z) a 800kbit * bandwidth for HTTP download. * But When 10.x.y.z does no HTTP download, other trafic * must get the whole bandwidth, of course. OK. * BUT :-(( * When I * [EMAIL PROTECTED] wget ftp.fr.debian.org/debian/ls-lR * (...) * 21% [==] 4,984,704106.39K/s * [EMAIL PROTECTED] * * It goes at ~100 Ko, as expected when no other trafic * is generated. * But if I * [EMAIL PROTECTED] wget ftp://ftp.fr.debian.org/debian/ls-lR * * after the beginning of the HTTP download, the latter * goes dooown, and if I run a second wget ftp://..., * the HTTP download goes UNDER (really under) the 800 * kbits...??!! * It seems like there's no difference whether the * shaping is done or not. Dude.. If you want to shape HTTP traffic, why the heck are you going for ftp download?? If you look at your connections (eg: tcptrack -i eth0, you'll see you're initiating port 20/21 and not port 80 as you wanted.) * Is this only because one can't shape incoming trafic ? Yes. That is true. but in your case, since you're pushing out to eth0 (from eth1) you theoretically is allready introducing outgoing traffic (from eth1 to eth0) So you can shape on that. * Could Ingress solve my pb ? I don't think so, as * Ingress seems to limit the WHOLE bandwidth... You can use an ingress filter and then use a filter against the FWmarks or in your case sport . (Though I've never did that successfully. I prefer fwmarks) * Is it a prio question ? Not sure. Check this out. See if it helps you. http://www.redhat.com/archives/fedora-list/2004-July/msg01764.html http://my-opensource.org/howto/qostrafficshaping-shorewall-wondershaper-howto.html -- Ow Mun Heng Fedora GNU/Linux Core 2 on D600 1.4Ghz CPU kernel 2.6.7-2.jul1-interactive Neuromancer 16:55:59 up 8:02, 5 users, load average: 1.38, 1.00, 1.02 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB BDW Guarantee
On Saturday 10 July 2004 05:54, toto toto wrote: Hello, I have problems setting up HTB. This is my setup : NET 1024/256 ADSL eth1 Linux Firewall eth0 LAN 10.a.a.a I want to GUARANTEE for an IP (10.x.y.z) a 800kbit bandwidth for HTTP download. But When 10.x.y.z does no HTTP download, other trafic must get the whole bandwidth, of course. The script I use (see below) is quite the same as presented at (the grat page) : http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm, the only difference is that I use only 2 classes (HTTP trafic vs other) BUT :-(( When I [EMAIL PROTECTED] wget ftp.fr.debian.org/debian/ls-lR (...) 21% [==] 4,984,704106.39K/s [EMAIL PROTECTED] It goes at ~100 Ko, as expected when no other trafic is generated. But if I [EMAIL PROTECTED] wget ftp://ftp.fr.debian.org/debian/ls-lR I completely disagree with the way you performed the test. Debian.Org is not on your local network isnt it ?? How far from your host until it reach Debian.Org as destination host ? Are you sure your ISP or Debian.Org ISP or perhaps Debian.Org itself doesnt perform traffic per session management, or any QoS ? My suggestion is to test the performance of your HTB using your own local network. Because you know completely your network condition and you can analyze it perfectly. Regards, Rio Martin. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB Packet Scheduling for Linux 2.4.14 kernel
yes but I'm not sure if RB three lib is in 2.4.14 On Wed, 7 Jul 2004 [EMAIL PROTECTED] wrote: Hi All, Can I backport 2.4.20 kernel version's HTB related changes to 2.4.14 ? Will this work w/o any issues ? Please consider this urgent and replay asap. Thanks in advance, Reema. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB Packet Scheduling for Linux 2.4.14 kernel
Hi All, Can I backport 2.4.20 kernel version's HTB related changes to 2.4.14 ? Will this work w/o any issues ? Please consider this urgent and replay asap. Thanks in advance, Reema. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb: class 10007 isn't work conserving ?!
On Fri, 2 Jul 2004, Glen Mabey wrote: I'm getting the following error/warning at some point in my config script, and I'm not sure which class it is referring to. htb: class 10007 isn't work conserving ?! What qdisc is attached to this class? I [think I] understand that htb is a non-work-conserving qdisc, and I [think I] have configured things so that every htb qdisc I instantiate limits the bandwidth, so I don't understand why this situation would invoke a warning message. Also -- is there some way to correlate this identifier 10007 with a classid? Thank you, Glen Mabey -- ** Glen W. Mabey [EMAIL PROTECTED] http://mabeys.homelinux.com/glen/ ** ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ --- Catalin(ux aka Dino) BOIE catab at deuroconsult.ro http://kernel.umbrella.ro/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
RE: [LARTC] htb: class 10007 isn't work conserving ?!
Hi all, Our ISP has given us 5 static IP address plus one router IP address and I was wondering if I could get rid of their stupid EN5861 router and set up the linux machine to handle all the static addresses and routing. I figured I'd have to set up alises for other IP addresses eg ifconfig eth0:0 xx.xx.xx.193 but once I've done that I've found out I cant use ip route to configure it eg ip route add default dev eth0:0 table server. Whats the best way to go about this? Cheers. By the way I'm running redhat 9 with two adsl connections, on is a speedtouch USB modem and the other is the EN5861 router. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb: class 10007 isn't work conserving ?!
Our ISP has given us 5 static IP address plus one router IP address and I was wondering if I could get rid of their stupid EN5861 router and set up the linux machine to handle all the static addresses and routing. I figured I'd have to set up alises for other IP addresses eg ifconfig eth0:0 xx.xx.xx.193 but once I've done that I've found out I cant use ip route to configure it eg ip route add default dev eth0:0 table server. Whats the best way to go about this? Cheers. By the way I'm running redhat 9 with two adsl connections, on is a speedtouch USB modem and the other is the EN5861 router. I'm not quite sure why you tagged this on to the end of a thread about htb classes? As a result many people may not even read your question...? I have one of those EN5861 router things, and actually I find it pretty good. The biggest issue is that it's a bit of a timebomb, the powersupply dies after a few years, and unless you have a spare it's a bit of a weak link Do you need to do some particularly advanced routing that's stopping you just using the en5861? Good luck Ed W ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb: class 10007 isn't work conserving ?!
On Mon, Jul 05, 2004 at 09:18:11AM +0300, Catalin BOIE wrote: On Fri, 2 Jul 2004, Glen Mabey wrote: I'm getting the following error/warning at some point in my config script, and I'm not sure which class it is referring to. htb: class 10007 isn't work conserving ?! What qdisc is attached to this class? Yes, that's what I was trying to ask below. I'm still trying to figure out which class (in the qdisc:classid format) the error message is referring to. So, since I'm not sure which class it is (and I have several htb qdiscs; oh, I just realized that I neglected to mention that I'm using HTB), I'm not sure which qdisc this refers to. I [think I] understand that htb is a non-work-conserving qdisc, and I [think I] have configured things so that every htb qdisc I instantiate limits the bandwidth, so I don't understand why this situation would invoke a warning message. Also -- is there some way to correlate this identifier 10007 with a classid? I'm just starting back on working on this problem this morning, and I'll approach it via a process of elimination, but I just thought there surely must be some sort of deterministic mapping between the qdisc:classid label and this one given in the warning message. Thank you -- Glen -- ** Glen W. Mabey [EMAIL PROTECTED] http://mabeys.homelinux.com/glen/ ** ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb: class 10007 isn't work conserving ?!
Yes, that's what I was trying to ask below. I'm still trying to figure out which class (in the qdisc:classid format) the error message is referring to. It's about class 1:7. So, since I'm not sure which class it is (and I have several htb qdiscs; oh, I just realized that I neglected to mention that I'm using HTB), I'm not sure which qdisc this refers to. I [think I] understand that htb is a non-work-conserving qdisc, and I [think I] have configured things so that every htb qdisc I instantiate limits the bandwidth, so I don't understand why this situation would invoke a warning message. Also -- is there some way to correlate this identifier 10007 with a classid? I'm just starting back on working on this problem this morning, and I'll approach it via a process of elimination, but I just thought there surely must be some sort of deterministic mapping between the qdisc:classid label and this one given in the warning message. Thank you -- Glen -- ** Glen W. Mabey [EMAIL PROTECTED] http://mabeys.homelinux.com/glen/ ** --- Catalin(ux aka Dino) BOIE catab at deuroconsult.ro http://kernel.umbrella.ro/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] htb: class 10007 isn't work conserving ?!
I'm getting the following error/warning at some point in my config script, and I'm not sure which class it is referring to. htb: class 10007 isn't work conserving ?! I [think I] understand that htb is a non-work-conserving qdisc, and I [think I] have configured things so that every htb qdisc I instantiate limits the bandwidth, so I don't understand why this situation would invoke a warning message. Also -- is there some way to correlate this identifier 10007 with a classid? Thank you, Glen Mabey -- ** Glen W. Mabey [EMAIL PROTECTED] http://mabeys.homelinux.com/glen/ ** ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB and iptables statistics
On Wednesday 30 June 2004 19:13, Alexander Kotelnikov wrote: Hello. The problems are: 1. Using HTB I get negative values for tokens and ctokens in tc -s output, for example: This is perfectly possible. It depends on your configuration and the parent-child relation ship between the classes. If a class has a token, it can send a packet. But if a child class is sending a packet, a token of the parent class is also used. And a class can use it tokens even if the parent class has no tokens left. So it's possible to drag the tokens negative if the child class is more sending packets then the parent allows. But the parent can not forbid this. Stef -- [EMAIL PROTECTED] Using Linux as bandwidth manager http://www.docum.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB and iptables statistics
Am Thursday 01 July 2004 22:52 schrieb Stef Coene: So it's possible to drag the tokens negative if the child class is more sending packets then the parent allows. If I understand you right, it's only the parent classes that can get negative tokens this way. But I also have leaf classes with negative tokens. Does this mean there's something wrong? Are negative tokens a good thing, or rather a bad thing? Any way to prevent them? Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB and iptables statistics
Hello. The problems are: 1. Using HTB I get negative values for tokens and ctokens in tc -s output, for example: mich:~# tc -s -d class show dev eth0 class htb 1:11 parent 1:1 prio 1 quantum 1024 rate 8Kbit ceil 23Kbit burst 1609b/8 mpu 0b cburst 1628b/8 mpu 0b level 0 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 tokens: 1287999 ctokens: 453286 class htb 1:1 root rate 32Kbit ceil 32Kbit burst 1639b/8 mpu 0b cburst 1639b/8 mpu 0b level 7 Sent 2629492 bytes 29142 pkts (dropped 0, overlimits 0) rate 1777bps 19pps lended: 7716 borrowed: 0 giants: 0 tokens: 297600 ctokens: 297600 class htb 1:10 parent 1:1 prio 0 quantum 1024 rate 8Kbit ceil 23Kbit burst 1609b/8 mpu 0b cburst 1628b/8 mpu 0b level 0 Sent 160004 bytes 1252 pkts (dropped 0, overlimits 0) rate 281bps 2pps lended: 1252 borrowed: 0 giants: 0 tokens: 1236799 ctokens: 435478 class htb 1:13 parent 1:1 prio 7 quantum 1024 rate 8Kbit ceil 16Kbit burst 1609b/8 mpu 0b cburst 1619b/8 mpu 0b level 0 Sent 1266825 bytes 12307 pkts (dropped 20013, overlimits 0) rate 1301bps 14pps lended: 6340 borrowed: 5967 giants: 0 tokens: -492394 ctokens: 581313 class htb 1:12 parent 1:1 prio 2 quantum 1024 rate 8Kbit ceil 23Kbit burst 1609b/8 mpu 0b cburst 1628b/8 mpu 0b level 0 Sent 1202663 bytes 15583 pkts (dropped 0, overlimits 0) rate 245bps 3pps lended: 13834 borrowed: 1749 giants: 0 tokens: 1236799 ctokens: 435478 Actually, this values are not described at http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#stats but it looks confusing. 2. When I measure traffic marking any packet in POSTROUTING with 'iptables -A POSTROUTING -t mangle -o eth0 -j MARK --set-mark 12' and using bytes field of 'iptables -vL POSTROUTING -t mangle' output (I run the latter command once in a minute and divide the difference by 60) I get traffic speed up to 12kbs, even my uplink is no more than 32Kbit. How can this be? Thanks, -- Alexander Kotelnikov Saint-Petersburg, Russia ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB and iptables statistics
Am Wednesday 30 June 2004 19:13 schrieb Alexander Kotelnikov: Using HTB I get negative values for tokens and ctokens in tc -s output Can't help you there. class htb 1:13 parent 1:1 prio 7 quantum 1024 rate 8Kbit ceil 16Kbit [...] 12307 pkts (dropped 20013, overlimits 0) I get traffic speed up to 12kbs, even my uplink is no more than 32Kbit. How can this be? My guess: Not every packet that passes your IPTables rule does actually find it's way to the uplink. The 'dropped' counter of your 1:13 class indicates that many packets are just thrown away. Andreas ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB patch - fairness
Hi Devik, I played with your htbfair patch on 2.6.6 and found some diferences between 2.4 to 2.6 that cause problems when applying it. Diferences include rb_node that was rb_node_t and some other minor probs. After fixing those diff troubles I still get the following error compiling the kernel that I couldn't repair: make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/linux/compile.h CC net/sched/sch_htb.o net/sched/sch_htb.c:916: parse error before `*' net/sched/sch_htb.c:917: parse error before `rb_node' net/sched/sch_htb.c:918: warning: return-type defaults to `int' net/sched/sch_htb.c:918: warning: function declaration isn't a prototype net/sched/sch_htb.c: In function `htb_id_find_next_upper': net/sched/sch_htb.c:919: `rb_node' undeclared (first use in this function) net/sched/sch_htb.c:919: (Each undeclared identifier is reported only once net/sched/sch_htb.c:919: for each function it appears in.) net/sched/sch_htb.c:919: `r' undeclared (first use in this function) net/sched/sch_htb.c:920: `n' undeclared (first use in this function) net/sched/sch_htb.c:921: `prio' undeclared (first use in this function) net/sched/sch_htb.c:922: `id' undeclared (first use in this function) net/sched/sch_htb.c:931: warning: control reaches end of non-void function net/sched/sch_htb.c: In function `htb_lookup_leaf': net/sched/sch_htb.c:951: `pid' undeclared (first use in this function) net/sched/sch_htb.c:954: `q' undeclared (first use in this function) net/sched/sch_htb.c:959: warning: assignment from incompatible pointer type net/sched/sch_htb.c: In function `htb_dequeue_tree': net/sched/sch_htb.c:996: warning: passing arg 1 of `htb_lookup_leaf' from incompatible pointer type net/sched/sch_htb.c:996: warning: passing arg 2 of `htb_lookup_leaf' makes integer from pointer without a cast net/sched/sch_htb.c:996: warning: passing arg 3 of `htb_lookup_leaf' makes pointer from integer without a cast net/sched/sch_htb.c:996: too many arguments to function `htb_lookup_leaf' net/sched/sch_htb.c:1018: warning: passing arg 1 of `htb_lookup_leaf' from incompatible pointer type net/sched/sch_htb.c:1018: warning: passing arg 2 of `htb_lookup_leaf' makes integer from pointer without a cast net/sched/sch_htb.c:1018: warning: passing arg 3 of `htb_lookup_leaf' makes pointer from integer without a cast net/sched/sch_htb.c:1018: too many arguments to function `htb_lookup_leaf' net/sched/sch_htb.c:1034: warning: passing arg 1 of `htb_lookup_leaf' from incompatible pointer type net/sched/sch_htb.c:1034: warning: passing arg 2 of `htb_lookup_leaf' makes integer from pointer without a cast net/sched/sch_htb.c:1034: warning: passing arg 3 of `htb_lookup_leaf' makes pointer from integer without a cast net/sched/sch_htb.c:1034: too many arguments to function `htb_lookup_leaf' make[2]: *** [net/sched/sch_htb.o] Error 1 make[1]: *** [net/sched] Error 2 make: *** [net] Error 2 The fixed patch for 2.6.6 can be downloaded here: http://www.linuximq.net/testing/htbfair-2.6.6-testing.diff tks for the good work on HTB. cheers... Andre devik wrote: Witold Szczerba spent his time evaluating fairness of borrowing. His troubles inspired me enough to analyze the problem: When a class changes from yellow to green it disconnects itself from parent's feedlist. Unfortunately it resets feed pointer to the first child. I created a patch where the class uses classid to remember its position in the feedlist. The patch for 2.4.24 and hopefully others is at: http://luxik.cdi.cz/~devik/qos/htb/#changes PLEASE report me any problems with it ! --- Martin Devera aka devik Linux kernel QoS/HTB maintainer http://luxik.cdi.cz/~devik/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* confirmed?
pljosh wrote: Uytkownik Andy Furniss napisa: I just tried with 2 d/l and 3 classes - I see the same as you now. Andy. I am happy that there is finally confirmation of what I've seen :) But what now? I am just starting with traffic shaping and my question is: how is that - that so many people are using HTB for so long time and nobody noticed it is not fair? I suppose with more complex configurtions which are propably more common the fact that some part of HTB is not fair (borrowing I suppose) is blured and hard to notice some incorrect behavior. Does Devik work on HTB yet. Maybe he could look at this problem closer? Should I notice him about that? What do you think? I assume you saw the patch - and it's OK now? Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB patch - fairness
devik wrote: Witold Szczerba spent his time evaluating fairness of borrowing. His troubles inspired me enough to analyze the problem: When a class changes from yellow to green it disconnects itself from parent's feedlist. Unfortunately it resets feed pointer to the first child. I created a patch where the class uses classid to remember its position in the feedlist. The patch for 2.4.24 and hopefully others is at: http://luxik.cdi.cz/~devik/qos/htb/#changes PLEASE report me any problems with it ! I finally got this to work - I forgot to use gcc 2.59.3 to do the module - the one 3.3.3 made segfaulted and stopped tc and ifconfig from working thereafter. It works - It has fixed the problem pljosh described :-) Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] htb vs hsfc
HTB versus HFSC, both qdisc offer the same kind of service, if you want to see comparative test results, go to http://www.rawsoft.org at the line TEST RESULTS you will find the results for a sharing test and a burst test. You will see that both qdisc are good. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb vs hsfc
On Thursday 24 June 2004 13:21, Vincent Perrier wrote: HTB versus HFSC, both qdisc offer the same kind of service, if you want to see comparative test results, go to http://www.rawsoft.org at the line TEST RESULTS you will find the results for a sharing test and a burst test. You will see that both qdisc are good. Excellent information! Thanks! ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB patch - fairness
Andy Furniss wrote: I finally got this to work - I forgot to use gcc 2.59.3 to do the module - the one 3.3.3 made segfaulted and stopped tc and ifconfig from working thereafter. I tested and found that the same happens without the patch. It works - It has fixed the problem pljosh described :-) ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb vs hsfc
Vincent Perrier wrote: HTB versus HFSC, both qdisc offer the same kind of service, if you want to see comparative test results, go to http://www.rawsoft.org at the line TEST RESULTS you will find the results for a sharing test and a burst test. You will see that both qdisc are good. Nice comparision, very interesting. Note that you have a small misconfiguration in your HFSC setup. On page 8 you say The shaping is impacted by real time bursts. This is only because your real-time classes are not part of the link-sharing hierarchy. If you add link-share curves to the real-time classes which are equal to the real-time curves shaping won't be impacted. Regards Patrick ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* confirmed?
I assume you saw the patch - and it's OK now? Andy. Yes, I was the one who tested it before Devik made it public :) (and he wrote my name together with info about this patch) I wrote to him about that after you confirmed you can see the same behavior of htb. Now it works PERFECT! (three times 'hip-hip-hurray' for HTB :) -josh ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb filter
On Wednesday 23 June 2004 01:57, Svetozar Mihailov wrote: Shouldn't this: tc class add dev eth0 parent 2:0 classid 2:200 htb rate 100Mbit prio 10 be parent 2:? Ed W That change nothing. I have running system with 800 PC , 4 classes for each. There is no difference for me in using parent 2: vs parent 2:0. Both give same result. Exactly. 2: is simply a short hand for 2:0, for example. -- Jason Boxman Perl Programmer / *NIX Systems Administrator Shimberg Center for Affordable Housing | University of Florida http://edseek.com/ - Linux and FOSS stuff ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB: 3. Sharing hierarchy
On Tuesday 22 June 2004 06:19, Mike Mestnik wrote: On http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm... There is a nice explanation on how/why to setup a hierarchy with HTB. Howerver what is missing is how to setup finters for this case? For more information and examples: http://docum.org/ I had this working when I was using a seperat qdisc for each ?layer?, making each HTB only one level deep. Described in the attached qdisc.sh.GOOD. Not such a good idea. Described in the attached qdisc.sh is my current script, is my new config script. Described in the attached qdisc-undo.sh is the output of my ifup-mkundo.sh script, a reversed(read from the bottom up) list of del cmds for the given up script. The command tc qdisc del dev eth1 root is enough to delete everything. Stef -- [EMAIL PROTECTED] Using Linux as bandwidth manager http://www.docum.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB vs CBQ - is meaning of prio param the same?
Hi, I am looking working (!) qdisc that would guarantee preferential treatment to priority (ex voice traffic). It is supposed to work as LLQ (Cisco) which means it is PQ but with bandwidth limited for EF PHB traffic. I did lots of tests with CBQ and prio set to 1 for EF PHB and prio 2 for best effort. Although delay does not look like being guaranteed at all for priority traffic. Eventually I would like to compare HTB with prio's to CBQ with prio's set. But HTB site says prio is only used for competing for unused (underlimited) class bandwidths. So please clarify wheather prio parameter has realy different meaning for CBQ and HTB? I dont know if what i expect from HTB CBQ (with respect to acting like PRIO scheduler) comparison makes any sense. regards adam f ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB: 3. Sharing hierarchy
I finaly found why my filters woulden't work, I was using grouping maches up with quotation() chars. This caused tc to silently IGNORE thoes matches while letting other non-quotated matches to work normaly, within the same tc cmd. I reworked my whole script to use 10:0 as the parent for filters, where's b4 I was able to group all the port 8080 stuff into flowid 10:35 and then use that as a parent. I know that the docs say other-wise, but dose any one know if it's safe thing todo? http://www.technofoundry.com/cheako/ Has my tc modified scripts. __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB: 3. Sharing hierarchy
I finaly found why my filters woulden't work, I was using grouping maches up with quotation() chars. This caused tc to silently IGNORE thoes matches while letting other non-quotated matches to work normaly, within the same tc cmd. I reworked my whole script to use 10:0 as the parent for filters, where's b4 I was able to group all the port 8080 stuff into flowid 10:35 and then use that as a parent. I know that the docs say other-wise, but dose any one know if it's safe thing todo? http://www.technofoundry.com/cheako/ Has my tc modified scripts. __ Do you Yahoo!? New and Improved Yahoo! Mail - 100MB free storage! http://promotions.yahoo.com/new_mail ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] htb and 2.6.5 ?
does someone have expirience with HTB and kernel 2.6.5 and up... Does anyone have tested it with thousand of classes and filters.. How it behaves.. tia ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb and 2.6.5 ?
On Tue, 22 Jun 2004, [EMAIL PROTECTED] wrote: does someone have expirience with HTB and kernel 2.6.5 and up... Does anyone have tested it with thousand of classes and filters.. How it behaves.. Depends on how many filters/classes, how much traffic. If you have a lot of filters, you must use hashes. Basicaly, the 2.4 and 2.6 are the same regarding traffic control. At the network driver level there is NAPI but I think it is in 2.4 also. tia ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ --- Catalin(ux aka Dino) BOIE catab at deuroconsult.ro http://kernel.umbrella.ro/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] htb filter
Shouldn't this: tc class add dev eth0 parent 2:0 classid 2:200 htb rate 100Mbit prio 10 be parent 2:? Ed W ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB: Packet header size option.
--- On Wed, 05 May 2004 14:01:28 +0100 Andy Furniss Wrote: I forgot to say - if you use DSL tweaking uprate right upto the limit with bulk traffic may not be a good idea. There are atm overheads and thay are greater (as %) for small packets eg. htb counts empy ack as 40 bytes but it's 106 on wire. If people start gaming (30 small pps up each) things may fall apart. AFAIK there is no MPU for HTB like there is for CBQ. Andy. That is a missing feature, but don't you mean pktweight. As in the weight of each pkt header? I think the best a user can do is set rate at %80 of configured rate. I don't know what burst should be set too, but I would think that, after the 100hz CPU thing, you would be targeting the modems buffer size? __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB: 3. Sharing hierarchy
On http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm... There is a nice explanation on how/why to setup a hierarchy with HTB. Howerver what is missing is how to setup finters for this case? I had this working when I was using a seperat qdisc for each ?layer?, making each HTB only one level deep. Described in the attached qdisc.sh.GOOD. Described in the attached qdisc.sh is my current script, is my new config script. Described in the attached qdisc-undo.sh is the output of my ifup-mkundo.sh script, a reversed(read from the bottom up) list of del cmds for the given up script. Described in the attached tc-class.out and tc-qdisc.out is the output of these 'popular' tc cmds. Also attached is my 'popular' ifup-mkundo.sh script, ENJOY. __ Do you Yahoo!? Yahoo! Mail is new and improved - Check it out! http://promotions.yahoo.com/new_mail qdisc.sh Description: qdisc.sh qdisc.sh.GOOD Description: qdisc.sh.GOOD qdisc-undo.sh Description: qdisc-undo.sh tc-class.out Description: tc-class.out tc-qdisc.out Description: tc-qdisc.out ifup-mkundo.sh Description: ifup-mkundo.sh
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
pljosh wrote: HTB_HYSTERESIS 0 in net/sched/sch_htb.c. I did it, recompiled, launched... and i looks like it is even a little bit worser: user1 has almost twice as much BW as user3... I DO NOT GET IT IT LOOKS LIKE HTB WORKS FOR EVERYONE EXCEPT ME :( I tried with your rc.shape script on my LAN using scp. I couldn't get the bash to work - it looks to me like it will only set one user. But I hardcoded my settings in it and checked with tc -s class ls dev eth0 that my 2 classes existed. I SCPd a file from gateway to 2 PCs and thay were shaped OK and came in second perfect. It was the same for 500,1000 and 5000 ceils. The 500 test took 15 mins. So I don't really know whats going on for you. Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
Uytkownik Andy Furniss napisa: I tried with your rc.shape script on my LAN using scp. I couldn't get the bash to work - it looks to me like it will only set one user. But I Did you launch it passing argument in or ''? ./rc.shape 4 5 6 is quite far different than ./rc.shape 4 5 6 hardcoded my settings in it and checked with tc -s class ls dev eth0 that my 2 classes existed. I dont get it: you prepared two classes for two PCs which is equivalent to t5 on my graph which shows that HTB acts PERFECT in such conditions. I SCPd a file from gateway to 2 PCs and thay were shaped OK and came in second perfect. It was the same for 500,1000 and 5000 ceils. The 500 test took 15 mins. So I don't really know whats going on for you. Andy. Try the same using 3 classes and stress it with 2 PCs only (each class has rate=1/3 of max bw and ceil=max bw. You will se that first class will get from HTB almost TWICE as much as secound one one! -josh p.s. I made same test on other network with other PCs and different kernel version and it was the same... ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
pljosh wrote: Uytkownik Andy Furniss napisa: I tried with your rc.shape script on my LAN using scp. I couldn't get the bash to work - it looks to me like it will only set one user. But I Did you launch it passing argument in or ''? ./rc.shape 4 5 6 is quite far different than ./rc.shape 4 5 6 hardcoded my settings in it and checked with tc -s class ls dev eth0 that my 2 classes existed. I dont get it: you prepared two classes for two PCs which is equivalent to t5 on my graph which shows that HTB acts PERFECT in such conditions. Oops I was thinking less classes were worse - I should have reread the post. I'll try later with more. Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
p.s. I made same test on other network with other PCs and different kernel version and it was the same... Have you got something recent? Try a 2.6.5 or newer kernel perhaps - this has 1000Hz scheduling (I think) and presumably the latest HTB patches. I guess make sure your tc is up to date as well Of the wall, but you never know Ed W ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? Can someone correct me or maybe Devik's HTB has a bug?
HTB should give fifty-fifty to U1 and U3... but it is not... What is happening is that HTB gives about 350-380kbit for user3 and everything else(more than 600kbit) for user1... this period is marked as t1 on my graph... Hmm, interesting. Can you switch the order of your IP mappings around on this test so that you can prove that it is some feature of HTB that user1 always gets more bandwidth, and no something about that machine (ie if you swap ip's for user1 and 3 that it still remains (the new) user1 who gets all the b/w? Obviously this should not be so, just curious to eliminate other possibilities Ed W ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
Ed Wildgoose wrote: Hmm, interesting. Can you switch the order of your IP mappings around on this test so that you can prove that it is some feature of HTB that user1 always gets more bandwidth, and no something about that machine (ie if you swap ip's for user1 and 3 that it still remains (the new) user1 who gets all the b/w? Obviously this should not be so, just curious to eliminate other possibilities Ed W I did it already. When I set filter to direct 192.168.3.4 packets to 1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue is over red... The same switch happens when i set higher prio of 1:60... So it means than when two classes at the same level have same prio then class with lower minor id has higher priority than classes with lower minor id... So there is no possibility to set them to be equal when borrowing occurs. Now I am in trouble as I am writing my thesis and I wanted to show in my paper that HTB is excellent to share BW between users... what am I to write about this case? BTW: maybe someone could repeat my experiment? Maybe it is something wrong with my hadrware or some unbelievable coincidence? -josh ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
pljosh wrote: Ed Wildgoose wrote: Hmm, interesting. Can you switch the order of your IP mappings around on this test so that you can prove that it is some feature of HTB that user1 always gets more bandwidth, and no something about that machine (ie if you swap ip's for user1 and 3 that it still remains (the new) user1 who gets all the b/w? Obviously this should not be so, just curious to eliminate other possibilities Ed W I did it already. When I set filter to direct 192.168.3.4 packets to 1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue is over red... The same switch happens when i set higher prio of 1:60... So it means than when two classes at the same level have same prio then class with lower minor id has higher priority than classes with lower minor id... So there is no possibility to set them to be equal when borrowing occurs. Now I am in trouble as I am writing my thesis and I wanted to show in my paper that HTB is excellent to share BW between users... what am I to write about this case? BTW: maybe someone could repeat my experiment? Maybe it is something wrong with my hadrware or some unbelievable coincidence? Have a read through the dequeue code. Perhaps you can spot a problem - there are plenty of debug flags you can switch on If I had to guess, then I would suspect the following: When there is spare bandwidth available, then there is some kind of round robin scheduler which gives the spare stuff away by visiting each lower node in ascending priority order. However, I suspect that the order is deterministic and hence the first node with prio 1 effectively gets visited more often than the next node with prio1 and so on (makes sense from a computing implementation point of view - it's fast and efficient, etc) It would also imply that the spare bandwidth is only allocated on a per time slice point of view, ie there are no long term timers checking that node 1 is not getting a little more than node 2 and hence biasing the allocation to node 2. All that kind of code would add overhead and is presumably therefore justified in not being there...? This would be my hunch, but there is plenty of info on the HTB site on the theory, and I should think it worth checking the dequeue code with some debug statements to prove this (or not). Fixing it looks a little harder though... Ed W ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
Ed Wildgoose wrote: pljosh wrote: Ed Wildgoose wrote: Hmm, interesting. Can you switch the order of your IP mappings around on this test so that you can prove that it is some feature of HTB that user1 always gets more bandwidth, and no something about that machine (ie if you swap ip's for user1 and 3 that it still remains (the new) user1 who gets all the b/w? Obviously this should not be so, just curious to eliminate other possibilities Ed W I did it already. When I set filter to direct 192.168.3.4 packets to 1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue is over red... The same switch happens when i set higher prio of 1:60... So it means than when two classes at the same level have same prio then class with lower minor id has higher priority than classes with lower minor id... So there is no possibility to set them to be equal when borrowing occurs. Now I am in trouble as I am writing my thesis and I wanted to show in my paper that HTB is excellent to share BW between users... what am I to write about this case? BTW: maybe someone could repeat my experiment? Maybe it is something wrong with my hadrware or some unbelievable coincidence? Have a read through the dequeue code. Perhaps you can spot a problem - there are plenty of debug flags you can switch on If I had to guess, then I would suspect the following: When there is spare bandwidth available, then there is some kind of round robin scheduler which gives the spare stuff away by visiting each lower node in ascending priority order. However, I suspect that the order is deterministic and hence the first node with prio 1 effectively gets visited more often than the next node with prio1 and so on (makes sense from a computing implementation point of view - it's fast and efficient, etc) It would also imply that the spare bandwidth is only allocated on a per time slice point of view, ie there are no long term timers checking that node 1 is not getting a little more than node 2 and hence biasing the allocation to node 2. All that kind of code would add overhead and is presumably therefore justified in not being there...? OK, have a look at dequeue and htb_dequeue_tree. The algorithm is simply this: i = 0; while (some_spare_bw_available()) { queue = find_a_queue_with_given_prio_and_some_packets (i); if (queue) { Dequeue_one_packet(queue); } else { i++; } } So it finds a queue for a given priority, dequeues a packet and repeats until we have done eveything for that prio. What I can't quite see, but suspect, is that the find_a_queue function is supposed to rotate through each of the queues at a given prioriy each time, hence it *shouldn't* be biased towards any one queue... (see the htb_lookup_leaf function for details) Hope that helps... ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
Uytkownik Ed Wildgoose napisa: (see the htb_lookup_leaf function for details) Hope that helps... Hmm... My greatest C program was the most simple snmp client you can ever imagine - and I was writing it for 2 weeks to finish my classes... So I think it is not good idea for me to patch (or even to take a look at) HTB code :) -josh ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
pljosh wrote: Ed Wildgoose wrote: Hmm, interesting. Can you switch the order of your IP mappings around on this test so that you can prove that it is some feature of HTB that user1 always gets more bandwidth, and no something about that machine (ie if you swap ip's for user1 and 3 that it still remains (the new) user1 who gets all the b/w? Obviously this should not be so, just curious to eliminate other possibilities Ed W I did it already. When I set filter to direct 192.168.3.4 packets to 1:60 and 192.168.3.6 to 1:40 then lines on my graph switch: now blue is over red... The same switch happens when i set higher prio of 1:60... So it means than when two classes at the same level have same prio then class with lower minor id has higher priority than classes with lower minor id... So there is no possibility to set them to be equal when borrowing occurs. Now I am in trouble as I am writing my thesis and I wanted to show in my paper that HTB is excellent to share BW between users... what am I to write about this case? BTW: maybe someone could repeat my experiment? Maybe it is something wrong with my hadrware or some unbelievable coincidence? I just tested with my script and also see a 5-8% advantage for the lower handle class. I wouldn't call it a bug though - HTB is written for high traffic setups and trade off needs to be made between perfect behaviour and CPU usage and you say it gets better with more classes. Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
I just tested with my script and also see a 5-8% advantage for the lower handle class. I wouldn't call it a bug though - HTB is written for high traffic setups and trade off needs to be made between perfect behaviour and CPU usage and you say it gets better with more classes. Andy. Well - you had 5-8% while I noticed 50-80% difference! (user1 ~76kB/s and user3 ~45kB/s). Of course - as you can see on the graph I created: with more classes difference beteween u1u3 is smaller... Can you send me the script you used for your test which gave you only 5-8%? Maybe there is something wrong with the one of mine? -josh ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
pljosh wrote: I just tested with my script and also see a 5-8% advantage for the lower handle class. I wouldn't call it a bug though - HTB is written for high traffic setups and trade off needs to be made between perfect behaviour and CPU usage and you say it gets better with more classes. Andy. Well - you had 5-8% while I noticed 50-80% difference! (user1 ~76kB/s and user3 ~45kB/s). I did notice on the graph I looked at, that it was a bit higher - I only tested with wget. I was going to repeat properly and if you were still higher suggest that you set quantums to mtu, low bursts and set HTB_HYSTERESIS 0 in net/sched/sch_htb.c. I also have esfq attached to classes Of course - as you can see on the graph I created: with more classes difference beteween u1u3 is smaller... Hmm I only have 2+default shared by IP - but two more above. Can you send me the script you used for your test which gave you only 5-8%? Maybe there is something wrong with the one of mine? OK but it won't work for you - I guess. It needs connbytes a hacked IMQ and esfq. It's just a test evolved from digriz script really. I also have half your bandwidth - and it was set at 400kbit for the test. Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
Andy Furniss wrote: I also have half your bandwidth - and it was set at 400kbit for the test. I meant to say aswell, that if you are doing the tests on downloads you need to throttle to about 80% of your rate, so you can build up queues and have a bit of spare for latency. Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB is nor fair when 'borrowing? *bug* in HTB or some coincidence?
HTB_HYSTERESIS 0 in net/sched/sch_htb.c. I did it, recompiled, launched... and i looks like it is even a little bit worser: user1 has almost twice as much BW as user3... I DO NOT GET IT IT LOOKS LIKE HTB WORKS FOR EVERYONE EXCEPT ME :( ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB is nor fair when 'borrowing? Can someone correct me or maybe Devik's HTB has a bug?
Hello there! Yesterday I started my experiments with HTB. I configured it this way: 1: root HTB qdisc | 1:1 HTB class rate 1000kbit | /---+--\ 1:40 1:50 1:60 user1 user2 user3 rate 333 ceil 1000 for everyone. User2 is disconnected and user1 and user3 are downloading. For all the time (t1-t5) there are ONLY these two users downloading! HTB should give fifty-fifty to U1 and U3... but it is not... What is happening is that HTB gives about 350-380kbit for user3 and everything else(more than 600kbit) for user1... this period is marked as t1 on my graph... Tahe a look at this: http://www.icpnet.pl/~eniu/mgr/10170_600.png (Y-axis shows bytes/s) During my research I found that the more classes i create (each with rate=1000/no_of_users and ceil=1000) the more precise HTB is... When you look at my graph - in t1 there were 3 classes (1:40, 1:50, 1:60). Then I was relaunching my script with higher amount of classes - in t2 there were 4 classes:rate=250/ceil=1000 in t3 I prepared 5 classes and finally in t4 there were 6 or 7 classes. But even in t4 htb is not 100% fair (but it is acceptable). In t5 i created only two classes 1:40 and 1:60 - and then HTB is perfect! It is so precise you can see only one line - blue as the red one is behind it... For me it looks like HTB is very good when it doesnt have to borrow from other classes for more than one class. When two classes are fighting for BW abowe rate then HTB is not fair... BUT MAYBE I configured something not the way it should be and this is why I have what you can see...?? -josh p.s. I've uploaded the contents of my script's output for each of the periods so you can see how it was configured at each time. The script itself is also available. I am running debian sarge with 2.4.26. User1 has 192.168.3.4 User2 has 192.168.3.6 http://www.icpnet.pl/~eniu/mgr/t1 http://www.icpnet.pl/~eniu/mgr/t2 http://www.icpnet.pl/~eniu/mgr/t3 http://www.icpnet.pl/~eniu/mgr/t4 http://www.icpnet.pl/~eniu/mgr/t5 http://www.icpnet.pl/~eniu/mgr/rc.shape ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB theory?
Thanks very much, Devik and Andy, I had seminar today and I think it has some success, and (for now?) I do not feel like having unanswered questions. Dmitry On Sunday 13 June 2004 21:41, Martin Devera [EMAIL PROTECTED] wrote: 1. In order of priority, we satisfy all leaf classes' rates (while the class is ?green?) 2. When the leaf classes' rate is reached (all the leaf classes are ?yellow?), borrow the unused speed from parent classes if they have something to give (if they are not ?red?). In this case, each leaf class is equal to others until their ceil is met or until they will have no parent to borrow from... Or maybe their level matters? In both cases DRR is used to cycle classes to dequeue - this gives us fairness (weighted by quantums). I also think that: 1. Until all leaf classes' rate is met we even do not check anything else (including ceil of parent classes) correct 2. the root queue is unlimited feed for the classes which are attached to it directly yes One think I do not understand neither for SFQ nor for HTB (please explain for both) - how can we maintain fairness in case of differently-sizes packets. As I understand, one packet is atomic unit, and interface is requesting not more and not less than one packet. Now given a quantum for each leaf class in HTB or the same for SQF (are they different in this process?) of 1500 bytes - do they wait for more packets from one subclass (asking it once again in the next turn, of course, if they have nothing to send, we switch to the next...)? And if one subclass is providing 1500 packets in each turn, and another subclass is providing 800-byte packets - will they be equal on the amount of traffic they are allowed to send in case the real channel is smaller than the sum of their effective ceil values? both SFQ and HTB (and CBQ) uses DRR which uses BYTES as count not packets. Look into literature for leaky bucket description. To answer your last mail, cannonical HTB theory (v.3 = latest one) is: http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm. It is up to date - mainly because algorithm is the same since 2002. (I am preparing for a seminar in which I will tell people how it works, so I need to know this perfectly :))) ) Hmm I have talk at SUCON (http://www.suug.ch/sucon/04/speakers.html#7) so that I'll need to refresh it too :) devik ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB theory?
Dmitry Golubev wrote: snip One think I do not understand neither for SFQ nor for HTB (please explain for both) - how can we maintain fairness in case of differently-sizes packets. As I understand, one packet is atomic unit, and interface is requesting not more and not less than one packet. I don't know about HTB, but SFQ uses quantum (= MTU by default). When a packet is dequeued its length is taken away from a counter for the flow. If it's =0 then the next flow is set up for the next dequeue and credited with quantum bytes. If its 0 then it will be called again next dequeue. SFQ returns the skb for the dequeued packet - so HTB can look up its len, I don't know the HTB code - but that's the next level of documentation for you. Andy. ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB theory?
1. In order of priority, we satisfy all leaf classes' rates (while the class is ?green?) 2. When the leaf classes' rate is reached (all the leaf classes are ?yellow?), borrow the unused speed from parent classes if they have something to give (if they are not ?red?). In this case, each leaf class is equal to others until their ceil is met or until they will have no parent to borrow from... Or maybe their level matters? In both cases DRR is used to cycle classes to dequeue - this gives us fairness (weighted by quantums). I also think that: 1. Until all leaf classes' rate is met we even do not check anything else (including ceil of parent classes) correct 2. the root queue is unlimited feed for the classes which are attached to it directly yes One think I do not understand neither for SFQ nor for HTB (please explain for both) - how can we maintain fairness in case of differently-sizes packets. As I understand, one packet is atomic unit, and interface is requesting not more and not less than one packet. Now given a quantum for each leaf class in HTB or the same for SQF (are they different in this process?) of 1500 bytes - do they wait for more packets from one subclass (asking it once again in the next turn, of course, if they have nothing to send, we switch to the next...)? And if one subclass is providing 1500 packets in each turn, and another subclass is providing 800-byte packets - will they be equal on the amount of traffic they are allowed to send in case the real channel is smaller than the sum of their effective ceil values? both SFQ and HTB (and CBQ) uses DRR which uses BYTES as count not packets. Look into literature for leaky bucket description. To answer your last mail, cannonical HTB theory (v.3 = latest one) is: http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm. It is up to date - mainly because algorithm is the same since 2002. (I am preparing for a seminar in which I will tell people how it works, so I need to know this perfectly :))) ) Hmm I have talk at SUCON (http://www.suug.ch/sucon/04/speakers.html#7) so that I'll need to refresh it too :) devik ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB theory?
Hello, I have been searching for HTB theory documentation and found two interesting sources - Devik's page and docum.org FAQ. In some places they are contradictory which make me think that Devik's theoretic document (marked actual) is just too old and does not reflect the latest changes. After reading http://www.docum.org/docum.org/faq/cache/30.html and others, I feel that I do not understand anything ... Where can I find the current and actual documentation on how HTB3 is working (I am interested in in-depth theoretical material)? Please, help... Dmitry ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB theory?
On Saturday 12 June 2004 13:46, Dmitry Golubev wrote: Hello, I have been searching for HTB theory documentation and found two interesting sources - Devik's page and docum.org FAQ. In some places they are contradictory which make me think that Devik's theoretic document (marked actual) is just too old and does not reflect the latest changes. After reading http://www.docum.org/docum.org/faq/cache/30.html and others, I feel that I do not understand anything ... I know some information in the faq pages on docum.org is outdated. Some information is for htb2, other information changed in htb3 (like the max and min for quantum). I had a problem with my faq pages (memory problem with faqomatic), but they are working again. I'm checking and updating all pages (I also converted them all to php) and soon I will check the faq pages for errors. Where can I find the current and actual documentation on how HTB3 is working (I am interested in in-depth theoretical material)? Htb pages and htb sources. Stef -- [EMAIL PROTECTED] Using Linux as bandwidth manager http://www.docum.org/ ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB theory?
OK then, could you tell if I understand correctly and correct me if not? 1. In order of priority, we satisfy all leaf classes' rates (while the class is green) 2. When the leaf classes' rate is reached (all the leaf classes are yellow), borrow the unused speed from parent classes if they have something to give (if they are not red). In this case, each leaf class is equal to others until their ceil is met or until they will have no parent to borrow from... Or maybe their level matters? I also think that: 1. Until all leaf classes' rate is met we even do not check anything else (including ceil of parent classes) 2. the root queue is unlimited feed for the classes which are attached to it directly One think I do not understand neither for SFQ nor for HTB (please explain for both) - how can we maintain fairness in case of differently-sizes packets. As I understand, one packet is atomic unit, and interface is requesting not more and not less than one packet. Now given a quantum for each leaf class in HTB or the same for SQF (are they different in this process?) of 1500 bytes - do they wait for more packets from one subclass (asking it once again in the next turn, of course, if they have nothing to send, we switch to the next...)? And if one subclass is providing 1500 packets in each turn, and another subclass is providing 800-byte packets - will they be equal on the amount of traffic they are allowed to send in case the real channel is smaller than the sum of their effective ceil values? (I am preparing for a seminar in which I will tell people how it works, so I need to know this perfectly :))) ) Thanks, Dmitry On Saturday 12 June 2004 15:39, Stef Coene [EMAIL PROTECTED] wrote: On Saturday 12 June 2004 13:46, Dmitry Golubev wrote: Hello, I have been searching for HTB theory documentation and found two interesting sources - Devik's page and docum.org FAQ. In some places they are contradictory which make me think that Devik's theoretic document (marked actual) is just too old and does not reflect the latest changes. After reading http://www.docum.org/docum.org/faq/cache/30.html and others, I feel that I do not understand anything ... I know some information in the faq pages on docum.org is outdated. Some information is for htb2, other information changed in htb3 (like the max and min for quantum). I had a problem with my faq pages (memory problem with faqomatic), but they are working again. I'm checking and updating all pages (I also converted them all to php) and soon I will check the faq pages for errors. Where can I find the current and actual documentation on how HTB3 is working (I am interested in in-depth theoretical material)? Htb pages and htb sources. Stef ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB latency
tc qdisc add dev ethX parent HTBCLASS handle QDISC pfifo limit 10 Thanks guys, reducing the queue length to 10 packets the delay decreased from about 2600ms (2.6 seconds) to 80ms. That helps a lot! Regards -- Sie haben neue Mails! - Die GMX Toolbar informiert Sie beim Surfen! Jetzt aktivieren unter http://www.gmx.net/info ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB Bug report.
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, We got the following message on the console of one of our server: ~ HTB: dequeue bug (8,12140714,12140714), report it please ! The server is a Dell Poweredge with 2 CPUs running a 2.5.25 Kernel. It is used as a ppp gateway to server l2tp connections. The iproute2 package has the version [020116]. We set the filters using the handle as flowid. For example: ~ tc filter add dev eth1 protocol ip parent 1: prio 1 handle ::240 u32 match \ ip dst 172.23.98.5 flowid 1:240 ~ tc class add dev eth1 parent 1:1 classid 1:240 htb rate 10 ceil 10 We use this method instead of using the priority to differentiate the filters to not have the square amount of lines when doing a tc filter ls. What could be the consequence of this error message except from making us report it ;) - -- Thierry Coutelier No Patents on Software: http://www.linux.lu/epatent -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAwG/zPOfrcNNQX7oRArtJAJwMcnXUeM4OXphVfVUcWWCu1sUDdgCfcc2B LBVb/Hdl5WDvzD2VCQbtYbk= =mPCT -END PGP SIGNATURE- ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/