This is a multi-part message in MIME format. ------=_NextPart_000_001A_01C1BFDD.B0493570 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Please please help, i've lost lots of sleep over this. Here's my set-up: 4 computers on a LAN in my house, having IPs 192.168.0.7, 192.168.0.50, = 192.168.0.52, 192.168.0.58. A router/linux-box (which runs the shaping/tc_commands), which is the = default gateway of the 4 machines: 192.168.0.1. It masquerades the = internet connection. Internet connection: ADSL PPPoE. The ADSL modem is connected to eth0 of = the router, and PPPoE makes ppp0. eth1 is the LAN. Yes, kernel is = compiled correctly (has advanced router option, patched with HTB, etc). = Here's my script. Essentially what I want to do is give each of the 4 = ppl a fourth of the bandwidth, giving myself a higher ceiling because I = use more bandwidth than they do. =20 --------------------------------- tc qdisc add dev eth1 root handle 1: htb default 14 tc class add dev eth1 parent 1: classid 1:1 htb rate 12kbps ceil 12kbps tc class add dev eth1 parent 1:1 classid 1:10 htb rate 4kbps ceil 10kbps = burst 1k prio 1 tc class add dev eth1 parent 1:1 classid 1:11 htb rate 4kbps ceil 7kbps = burst 1k prio 2 tc class add dev eth1 parent 1:1 classid 1:12 htb rate 4kbps ceil 7kbps = burst 1k prio 2 tc class add dev eth1 parent 1:1 classid 1:13 htb rate 4kbps ceil 7kbps = burst 1k prio 2 tc class add dev eth1 parent 1:1 classid 1:14 htb rate 1kbps ceil 10kbps = burst 1k prio 2 # use SFQ (stochastic fair queueing) for everything tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev eth1 parent 1:11 handle 11: sfq perturb 10 tc qdisc add dev eth1 parent 1:12 handle 12: sfq perturb 10 tc qdisc add dev eth1 parent 1:13 handle 13: sfq perturb 10 tc qdisc add dev eth1 parent 1:14 handle 14: sfq perturb 10 # matchings tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src = 192.168.0.7/32 flowid 1:10 tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src = 192.168.0.58/32 flowid 1:11 tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src = 192.168.0.50/32 flowid 1:12 tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src = 192.168.0.52/32 flowid 1:13 -------------------------------------- The PROBLEM: no matter how hard I try, NO packets EVER get onto any flow = but the default, 1:14. Eg. my computer (192.168.0.7) can send many = packets thru the gateway, and none of them get put on flow 1:10 like = they should, they all go onto 1:14, the default. Why? Add'l QUESTIONS: Which interface should I be using?! Ideally i'd like to = use ppp0, but I guess I can't because i'm masquerading? Therefore I = should use eth1, the internal lan-side ethernet card? Also, have I got = the SFQ tied in right? Perhaps my matchings/filters should use = 10:something instead of 1:10 etc? ... I've tried MARKing packets with = IPtables, that doesn't work either. Is that a better method ? (I feel = that it isn't, right now...) Lots of questions eh?! All answers appreciated! Thanks, Tim Carr ------=_NextPart_000_001A_01C1BFDD.B0493570 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Diso-8859-1"> <META content=3D"MSHTML 6.00.2713.1100" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Please please help, i've lost lots of = sleep over=20 this.</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Here's my set-up:</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>4 computers on a LAN in my house, = having IPs=20 192.168.0.7, 192.168.0.50, 192.168.0.52, 192.168.0.58.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>A router/linux-box (which runs the=20 shaping/tc_commands), which is the default gateway of the 4 machines:=20 192.168.0.1. It masquerades the internet connection.</FONT></DIV> <DIV><FONT face=3DArial size=3D2>Internet connection: ADSL PPPoE. The = ADSL modem is=20 connected to eth0 of the router, and PPPoE makes ppp0. eth1 is the = LAN. =20 Yes, kernel is compiled correctly (has advanced router option, patched = with HTB,=20 etc). </FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Here's my script. Essentially what I = want to do is=20 give each of the 4 ppl a fourth of the bandwidth, giving myself a higher = ceiling=20 because I use more bandwidth than they do. </FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial = size=3D2>---------------------------------</FONT></DIV> <DIV><FONT face=3DArial size=3D2>tc qdisc add dev eth1 root handle 1: = htb default=20 14</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>tc class add dev eth1 parent 1: classid = 1:1 htb=20 rate 12kbps ceil 12kbps</FONT></DIV> <DIV><FONT face=3DArial size=3D2>tc class add dev eth1 parent 1:1 = classid 1:10 htb=20 rate 4kbps ceil 10kbps burst 1k prio 1</FONT></DIV> <DIV><FONT face=3DArial size=3D2>tc class add dev eth1 parent 1:1 = classid 1:11 htb=20 rate 4kbps ceil 7kbps burst 1k prio 2</FONT></DIV> <DIV><FONT face=3DArial size=3D2>tc class add dev eth1 parent 1:1 = classid 1:12 htb=20 rate 4kbps ceil 7kbps burst 1k prio 2</FONT></DIV> <DIV><FONT face=3DArial size=3D2>tc class add dev eth1 parent 1:1 = classid 1:13 htb=20 rate 4kbps ceil 7kbps burst 1k prio 2</FONT></DIV> <DIV><FONT face=3DArial size=3D2>tc class add dev eth1 parent 1:1 = classid 1:14 htb=20 rate 1kbps ceil 10kbps burst 1k prio 2</FONT></DIV> <DIV><FONT face=3DArial size=3D2><BR># use SFQ (stochastic fair = queueing) for=20 everything<BR>tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb = 10<BR>tc=20 qdisc add dev eth1 parent 1:11 handle 11: sfq perturb 10<BR>tc qdisc add = dev=20 eth1 parent 1:12 handle 12: sfq perturb 10<BR>tc qdisc add dev eth1 = parent 1:13=20 handle 13: sfq perturb 10<BR>tc qdisc add dev eth1 parent 1:14 handle = 14: sfq=20 perturb 10</DIV> <DIV> </DIV> <DIV># matchings<BR>tc filter add dev eth1 parent 1:0 protocol ip prio 1 = u32=20 match ip src 192.168.0.7/32 flowid 1:10<BR>tc filter add dev eth1 parent = 1:0=20 protocol ip prio 1 u32 match ip src 192.168.0.58/32 flowid 1:11<BR>tc = filter add=20 dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src 192.168.0.50/32 = flowid=20 1:12<BR>tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match = ip src=20 192.168.0.52/32 flowid 1:13</DIV> <DIV>--------------------------------------</DIV> <DIV> </DIV> <DIV>The PROBLEM: no matter how hard I try, NO packets EVER get onto any = flow=20 but the default, 1:14. Eg. my computer (192.168.0.7) can send many = packets thru=20 the gateway, and none of them get put on flow 1:10 like they should, = they all go=20 onto 1:14, the default. Why?</DIV> <DIV> </DIV> <DIV>Add'l QUESTIONS: Which interface should I be using?! Ideally i'd = like to=20 use ppp0, but I guess I can't because i'm masquerading? Therefore I = should use=20 eth1, the internal lan-side ethernet card? Also, have I got the SFQ tied = in=20 right? Perhaps my matchings/filters should use 10:something instead of=20 1:10 etc? ... I've tried MARKing packets with IPtables, that = doesn't=20 work either. Is that a better method ? (I feel that it isn't, right=20 now...)</DIV> <DIV> </DIV> <DIV>Lots of questions eh?! All answers appreciated!</DIV> <DIV> </DIV> <DIV>Thanks,</DIV> <DIV> </DIV> <DIV>Tim Carr</DIV> <DIV></FONT> </DIV></BODY></HTML> ------=_NextPart_000_001A_01C1BFDD.B0493570--