[LARTC] HTB & GRED
With reference to the following post: http://mailman.ds9a.nl/pipermail/lartc/2002q1/002410.html Was anybody able to create GRED virtual queues inside HTB? Regards, Amit -- I'm an angel!!! Honest! The horns are just there to hold the halo up straight. ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Amit Kucheria EECS Grad. Research Assistant University of Kansas @ Lawrence (R): +1-785-830-8521 ||| (C): +1-785-760-2871 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Is TC flow-aware?
On Thu, 22 Aug 2002, George J. Jahchan wrote: > Is TC flow-aware for individual flows (sessions) within a given class of > traffic? No, TC isnt flow-aware. If all the flows fall into the same class, packets will be dropped on a "need-to-drop" basis. Also the greedy flow will be able to hog bandwidth unless it is policed at the edge of the traffic control network. But you could use something like Diffserv which has various drop probabilities and thus control which flows have more drop probability. -Amit -- I'm an angel!!! Honest! The horns are just there to hold the halo up straight. ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Amit Kucheria EECS Grad. Research Assistant University of Kansas @ Lawrence (R): +1-785-830-8521 ||| (C): +1-785-760-2871 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Is TC flow-aware?
Is TC flow-aware for individual flows (sessions) within a given class of traffic? For example, assuming 100Kbps allocated to a class and 100 simultaneous active flows within that class. Will each flow get approx. 1K, or will the greedier flows capture the lion's share of the 100K, leaving the others struggling to go through? Conversely, when a queue fills up and packets from that queue must be drop- ped, will TC drop packets from the greedier flows (that are most likely causing the congestion) or does it not distinguish between flows? In the latter case, which rules determine the packets that get dropped? ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Traffic Shaping Script to Optimize FPS Game Performance
I have several kids and, to keep them happy and myself busy, I run 6 Windows boxes behind a Linux box that firewalls and SNAT's. Our internet connection is ADSL with nominal line speeds of 128 kbit up and 1400 kbit down. Everything has worked well except when one person is playing a first person shooter like Q3, CS, RTCW, etc. and someone else is downloading, uploading, sending mail with large attachments, etc. Whenever this occurs, shouting and disharmony usually results. To fix this, I recently dug through the Linux Advanced Routing & Traffic Control HOWTO, along with several other references, and I have been able to address all of the issues: Typical game pings now do not change at all during heavy downloads, and increase only slightly (~10 - 20 msec) during heavy uploads. The cost of this is about an 15% decrease in download bandwidth, and about a 30% decrease in upload bandwidth, which I have found to be more than acceptable. I started with the HTB version of the "Ultimate Traffic Conditioner" script in the HOWTO and then tweaked it a bit to reduce game traffic latency even further, including the addition of a trivial bit of policy routing to send all non-game packets through a default route with a very small per-route MTU. I have attached a script of my implementation below. I've done this a) for the benefit of anyone searching the mailing list archive, and b) on the chance that someone might know of a way to improve upon my results! :) Questions, comments, and suggestions are all welcome. My thanks to the authors of this excellent HOWTO! Bill Powers [EMAIL PROTECTED] #!/bin/sh # # GameScript This script establishes policy routing and traffic #control rules to minimize latency for game packets #in the presence of other traffic. # # Besides this script, there is one other thing that must be done. # Assuming that iproute2 is already installed, edit the file # /etc/iproute2/rt_tables and add the following line at the bottom: # "100 Small_MTU" # *** # DEFINES * # *** # Change these values as required to reflect your setup # Addresses and Interfaces LAN_IP_RANGE="192.168.1.0/24" LAN_IP="192.168.0.1" LAN_INTERFACE="eth0" LOCALHOST_IP="127.0.0.1/32" INTERNET_IP_RANGE="123.123.123.0/24" INTERNET_IP="123.123.123.123" INTERNET_GATEWAY="123.123.123.1" INTERNET_INTERFACE="eth1" # Executables IPTABLES="/sbin/iptables" TC="/sbin/tc" IP="/sbin/ip" # Information used to identify game traffic. # add more as required HOST1="192.168.0.2" HOST1_GAME_PORT="27661" # Packet marks (arbitrary) GAME_PACKET="1" # For traffic shaping: # # The numbers below were arrived at by test on a DSL # line with nominal line speeds of 128 kbit up and # 1400 kbit down. Actual measured throughput was # about 90 kbit up and 1150 kbit down. # # A note regarding MTU: Standard ethernet MTU is 1500 # bytes, which which resulted in unacceptable single # packet xmit waits of 1500 x 8 / 90,000 = 133 msec. # Lowering the interface MTU changes the MTU in both # directions, which helped uplink latency but hurt # downlink throughput. Lowering the interface MTU to # 256 bytes resulted in a downlink throughput of less # than 500kbit. An interface MTU in the 400 - 500 byte # range provided an acceptable compromise, with single # packet xmit times of about 40 msec and downlink speeds # of about 700kbit. However, leaving the interface MTU # at 1500 bytes and setting a lower per-route MTU that # only affected non-game uplink traffic was the best # solution. An uplink MTU smaller than 256 bytes would # help latency even more, but tc and/or htb don't seem # to like mtu's below 256 and, besides, 256 results in a max # single packet xmit wait of around 25 msec, with # even better average behavior. STD_MTU="1500" TC_MTU="256" TC_MSS=$(( $STD_MTU - 40 )) TC_UPLINK_RATE="90" TC_DOWNLINK_RATE="1000" TC_GAME_RATE="30" TC_GAME_CEIL=$TC_UPLINK_RATE TC_OTHER_RATE=$(( $TC_UPLINK_RATE - $TC_GAME_RATE )) TC_OTHER_CEIL=$(( $TC_UPLINK_RATE - $TC_GAME_RATE )) # * # RULES * # * case "$1" in start) # *** # MANGLE Table PREROUTING Chain * # *** # Firewall packet marking TCP game traffic from Host1 $IPTABLES --table mangle \ --appendPREROUTING \ --protocol TCP \ --in-interface
[LARTC] Re: LARTC digest, Vol 1 #731 - 11 msgs
Text Item Description: Binary data I will be out of the office from 8/19 until 8/23. I will be returning on Monday afternoon, 8/26, and will reply then. Thank you, Michael Pellegrino Softerware, Inc. ___ Subject: LARTC digest, Vol 1 #731 - 11 msgs From: [EMAIL PROTECTED] Date: 08/22/02 01:27:51 This item was automatically created and contains MIME Information.
[LARTC] Usermode Linux & bandwidth limit
Hi, Would the bandwith limiter work between the virtual machine and the host machine? [Internet]---[host's eth0]---[virt. machine]---[host's eth1]---[internal] I'd like to limit the bandwidth for the traffic going from the virtual machine to a daemon running on the host (a Squid that serves an internal network). Thanks in advance, Oki ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] CBQ bounded & isolated
I am trying to reproduce Stef's CBQ tests from www.docum.org My setup is very simple : testbed43 > testbed44 ---> testbed45 (src) (CBQ) (sink) 192.168.10.2in: 192.168.10.254 192.168.100.2 out: 192.168.100.254 I have 2 isolated classes (2:2 and 2:3) which need to share the bandwidth. I have only one traffic source at the moment whose traffic is sent into 2:2, but *doesnot* get limited to the rate specified in 2:2. Any clues would be welcome. TIA. ciao, Amit p.s. Stef - You 'tests' page is down. The script follows: - #!/bin/sh -x # Script to see the working of bounded and isolated TC="/usr/bin/tc" DEV="dev eth1" AVPKT="avpkt 1514" BW="bandwidth 10Mbit" MAXBURST="maxburst 200" MPU="mpu 64" CELL="cell 8" ALLOT="allot 1514" #RATE1="rate 6Mbit weight 600Kbit" #RATE2="rate 4Mbit weight 400Kbit" RATE1="rate 150Kbit weight 150Kbit" RATE2="rate 200Kbit weight 200Kbit" # Root qdisc (10 Mbit) $TC qdisc add $DEV root handle 1:0 cbq $BW $AVPKT $CELL # Root class (10Mbit) $TC class add $DEV parent 1:0 classid 1:1 cbq $BW $CELL \ prio 3 rate 10Mbit $ALLOT $MAXBURST $AVPKT \ bounded # Enclosing qdisc (10 Mbit) $TC qdisc add $DEV parent 1:1 handle 2:0 cbq $BW $AVPKT $CELL # Enclosing class (10 Mbit) $TC class add $DEV parent 2:0 classid 2:1 cbq $BW $CELL \ prio 3 rate 10Mbit $ALLOT $MAXBURST $AVPKT # Real-time class (6Mbit) $TC class add $DEV parent 2:1 classid 2:2 cbq $BW $CELL \ prio 3 $RATE1 $ALLOT $MAXBURST $AVPKT \ isolated # Best-effort class (4Mbit) $TC class add $DEV parent 2:1 classid 2:3 cbq $BW $CELL \ prio 3 $RATE2 $ALLOT $MAXBURST $AVPKT \ isolated # Dummy filter (qdisc 1:0 to class 1:1) $TC filter add $DEV parent 1:0 protocol ip prio 2 u32 match ip tos 0x00 0x00 flowid 1:1 # RSVP filter to send RT traffic from 2:0 to 2:2 $TC filter add $DEV parent 2:0 protocol ip prio 2 rsvp \ ipproto udp session 192.168.100.2/9001 flowid 2:2 - -- I'm an angel!!! Honest! The horns are just there to hold the halo up straight. ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Amit Kucheria EECS Grad. Research Assistant University of Kansas @ Lawrence (R): +1-785-830-8521 ||| (C): +1-785-760-2871 ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB equivalent for 'bounded' and 'isolated' in CBQ
> > Total : 100 > > class1 rate 20 ceil 20 > > class2 rate 40 ceil 80 > > class3 rate 40 ceil 80 > > > > class 1 is isolated like in cbq. It can not use more then it's > > rate/ceil and class2 and class3 will never use bandwidth from class1, > > only from each other. Just like the definition of isolated :) > > What happens when there is no traffic in class 1? Will class 2 and 3 > share class 1's bandwidth then? No traffic in class 1 means that class2 and class3 will share the same bandwidth, but only 80 as maximum. So the bandwidth of class1 (20) is isolated like you can set with cbq. Htb is straight forward. Each class will get's his rate as a minimum. The remaining bandwidth is devided according to the rate (and lowest priority gets first choice) and this with a maximum of the ceil. > The reason I am asking these questions is because I am trying to see if > HTB can be used in place of CBQ in Diffserv. Has anybody tried something > like this? I didn't tried, but I think htb will do fine (or even better). Stef -- [EMAIL PROTECTED] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] iproute and iptables
On Wednesday 21 August 2002 00:21, James Ma wrote: > Dear all, > > I am newbie. However, I tried iptables recently and succeeded. I don't > understand the relationship between iptables and iproute2, is iproute used > to replace iptables? iptables is to create firewall chains iproute2 contains 2 programs : ip : For setting/changing all the ip configuration and routing tc : For manipulating the bandwidth managing part of the kernel But iptables and iproute can work together. You can mark packets with iptables and use that mark to route packets or use that mark in the filters you can add with tc. More info about the iproute2 utility can be found on www.lartc.org. Stef -- [EMAIL PROTECTED] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB problem (yet another one?)
> endeavour:~# tc qdisc add dev imq0 root handle 1 htb ttt > What is "ttt"? > Usage: ... qdisc add ... htb [default N] [r2q N] > default number of class to which unclassified packets are sent {1} > Why do you have that "ttt" option? If you remove ttt from the command, does it work? > - > And the PROBLEM: > > When i try to add qdisc to the imq device.. a get: > > endeavour:~# tc qdisc add dev imq0 root handle 1 htb default 20 r2q 10 > RTNETLINK answers: Invalid argument > - > > BTW: Adding CBQ qdisc to imq0 works fine... Any suggestions ? What if you add a htb qdisc with no options ? tc qdisc add dev imq0 root handle 1 htb Stef -- [EMAIL PROTECTED] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB problem (yet another one?)
Hello I have a small (maybe typical?) problem with HTB. Present configuration is: Kernel: 2.4.20-pre4 (with HTB, IMQ) endeavour:/var/log# tc -V tc utility, iproute2-ss010824 Which should support HTB because writes help for it ;-) endeavour:~# tc qdisc add dev imq0 root handle 1 htb ttt What is "ttt"? Usage: ... qdisc add ... htb [default N] [r2q N] default number of class to which unclassified packets are sent {1} endeavour:~# ip link show 1: lo: mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: mtu 1500 qdisc pfifo_fast qlen 100 link/ether 00:50:ba:d4:9d:50 brd ff:ff:ff:ff:ff:ff 3: eth1: mtu 1500 qdisc pfifo_fast qlen 100 link/ether 00:48:54:55:54:d1 brd ff:ff:ff:ff:ff:ff 4: eth2: mtu 1500 qdisc pfifo_fast qlen 100 link/ether 00:a0:24:d5:ae:33 brd ff:ff:ff:ff:ff:ff 5: ppp0: mtu 1656 qdisc pfifo_fast qlen 3 link/ppp 6: ppp1: mtu 1656 qdisc pfifo_fast qlen 3 link/ppp 7: imq0: mtu 1500 qdisc pfifo_fast qlen 30 link/void I should have all the needed modules also: endeavour:~# lsmod Module Size Used byNot tainted ipt_IMQ 760 1 (autoclean) sch_htb18048 0 (autoclean) (unused) imq 1864 1 cls_route 4088 0 (unused) cls_u32 4540 0 cls_fw 2360 0 (unused) sch_prio2368 0 (unused) sch_sfq 3520 0 (unused) sch_tbf 2432 0 sch_cbq11744 0 ipt_MARK 792 73 (autoclean) iptable_mangle 2196 1 (autoclean) ipt_REDIRECT 824 3 (autoclean) ipt_nth 1280 2 (autoclean) ipt_REJECT 2840 2 (autoclean) iptable_filter 1672 1 (autoclean) ppp_deflate 2904 2 (autoclean) zlib_inflate 18436 0 (autoclean) [ppp_deflate] zlib_deflate 17720 0 (autoclean) [ppp_deflate] bsd_comp3992 0 (autoclean) 3c59x 24560 1 ip_nat_ftp 2864 0 (unused) iptable_nat14040 2 [ipt_REDIRECT ip_nat_ftp] ip_conntrack_ftp3760 1 ip_conntrack 16448 2 [ipt_REDIRECT ip_nat_ftp iptable_nat ip_conntrack_ftp] ip_tables 10552 10 [ipt_IMQ ipt_MARK iptable_mangle ipt_REDIRECT ipt_nth ipt_REJECT iptable_filter iptable_nat] - And the PROBLEM: When i try to add qdisc to the imq device.. a get: endeavour:~# tc qdisc add dev imq0 root handle 1 htb default 20 r2q 10 RTNETLINK answers: Invalid argument - BTW: Adding CBQ qdisc to imq0 works fine... Any suggestions ? -- regards, Marcin 'Yans' Bazarnik [EMAIL PROTECTED] ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] HTB and bridge...
On Tue, 20 Aug 2002, zain arrifa'i wrote: > does anyone know about HTB shaping in a bridging > machine? > I currently run my shaper box as bridge and something > is going strange, such as a class cannot send at rate > it supposed to. > I mean if anyone know something about bridging and its > htb shaping behavior. > thanks in advance. I don't know about HTB but I had such configuration: ,--. |,-- eth0 -+--> Seg1 INET +-> ppp0 -- ROUTER --+ (bridge)| | (fwall) `-- eth1 -+--> Seg2 `--' and I succeded in firewalling and shaping one of the segments with CBQ (just limiting to some rate, in this example INET=192kbit, seg1=64kbit). It just worked, of course after applying the correct patches fr bridge firewalling into the kernel... -- ## # | p0wer| # # __ |GG#1877248 | # # (oo) | [EMAIL PROTECTED] | # # / \/ \ Go away or I will replace you # # `V__V' with a very small shell script. # ## ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] QOs with ipv6
Hallo , i want to create qdisc with u32 by using tc. my question is how to compare ipv6 header Class field with cbq or tbf.. can some body give me some little example with ipv6 ..header checking queue. Aoun raza. __ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] Multi Routing Problem.
hi again, :) i tried again & now am succesfull.. :) this is my script #!/bin/sh ipr="/sbin/ip" NetExtA="...6.64/26" IPExtA="6.106" GtExtA="6.70" NetExtB="...9.0/25" IPExtB="9.124" GtExtB="9.1" Netlcl="172.31.13.0/24" IPlcl="172.31.13.1" NetgrpA="172.31.13.10/31" NetgrpB="172.31.13.20/31" NetgrpC="172.31.13.30/31" $ipr rule del prio 99 from $NetExtA $ipr rule del prio 98 from $NetgrpA $ipr rule del prio 74 from $NetExtB $ipr rule del prio 73 from $NetgrpB $ipr rule del prio 49 from $NetgrpC # $ipr rule del prio 48 echo 100 EXTnA >> /etc/iproute2/rt_tables echo 75 EXTnB >> /etc/iproute2/rt_tables echo 50 BALANCE >> /etc/iproute2/rt_tables $ipr rule add prio 99 from $NetExtA table EXTnA $ipr rule add prio 98 from $NetgrpA table EXTnA $ipr rule add prio 74 from $NetExtB table EXTnB $ipr rule add prio 73 from $NetgrpB table EXTnB $ipr rule add prio 49 from $NetgrpC table BALANCE # $ipr rule add prio 48 table BALANCE $ipr route add default table EXTnB via $GtExtB dev eth1 src $IPExtB $ipr route add $NetgrpB via $IPlcl dev eth2 table EXTnB $ipr route add default table EXTnA via $GtExtA dev eth0 src $IPExtA $ipr route add $NetgrpA via $IPlcl dev eth2 table EXTnB $ipr route add default table BALANCE nexthop via $GtExtB dev eth1 nexthop via $GtExtA dev eth0 $ipr route add $NetgrpC via $IPlcl dev eth2 table EXTnB things work fine from the client's end, and follows the routing/balancing as defined.. but when i use **2 append ** ip route commands to table BALANCE--viz ip route append default via $GtExtB dev eth1 ta BALANCE ip route append default via $GtExtA dev eth0 ta BALANCE then everything **STOPS**... WHY julian u wrote in ur mail about adding >>>ip rule add prio 5 ta main & i also saw it in the docs too but i couldnt understand the importance.. more so coz there was no routing attached to this prio.. will the default route of ta main(32766) be carried to table main (prio 5) ??.. can u please tell me more about it ?... awaitng a reply thanking u in advance A.H Julian Anastasov wrote: > Hello, > > On Mon, 19 Aug 2002, Arindam Haldar wrote: > > >>& applied julian's patch to kernel 2.4.19 & have gone thru the docs at >>the site... i have defined basically 3 groups for clients--> cache, >>cisco, balance.. the name specifies the importance.. this is the details >>of what i did--> > > > Carefully analyze the docs... > > >>[root@Lr1 root]# ip rule ls >>0: from all lookup local > > > # direct communications are first priority > ip rule add prio 5 table main > ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/