From: "Roberto Scattini" Date: Wed, 12 Apr 2006 01:04:37 +0000 Subject: RE: [LARTC] Shaping per IP in PPPoE Message-Id: List-Id: References: <443BD009.4040502@idm.net.lb> In-Reply-To: <443BD009.4040502@idm.net.lb> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org hi, i use the roaringpenguin pppoe-server and limit the bandwidth per=20 interface with this script: (im using freeradius plugins too, thats the reason of the=20 /var/run/radattr.pppx file) (/etc/ppp/ip-up.d/0pppx_up) #!/bin/sh DOWN=3D`cat /var/run/radattr.$1 | grep 'RP-Downstream-Speed-Limit' | cut -d= '=20 ' -f 2` UP=3D`cat /var/run/radattr.$1 | grep 'RP-Upstream-Speed-Limit' | cut -d ' '= -f=20 2` # limit Download Bandwidth with a simple htb qdisc and class (add QoS=20 here?...) /sbin/tc qdisc add dev $1 root handle 1: htb default 1 /sbin/tc class add dev $1 parent 1: classid 1:1 htb rate ${DOWN}kbit ceil=20 ${DOWN}kbit burst 1540 /sbin/tc qdisc add dev $1 handle ffff: ingress /sbin/tc filter add dev $1 parent ffff: protocol ip prio 50 u32 \ match ip src 0.0.0.0/0 \ police rate ${UP}kbit burst 10k drop flowid :1 and have another script for deleting the rules=20 (/etc/ppp/ip-down.d/0pppx_down): #!/bin/sh /sbin/tc qdisc del dev $1 root /sbin/tc qdisc del dev $1 ingress ppp executes this scripts each time an interface gets up or down. hope it helps. Roberto Scattini From: Rani Ahmed To: lartc@mailman.ds9a.nl Subject: [LARTC] Shaping per IP in PPPoE Date: Tue, 11 Apr 2006 18:49:29 +0300 hi all. i am currently now serving PPPoE in my area. i had a script generated from tcng that worked perfectly before i started= =20 serving PPPoE. the issue is not in the script it self BUT in that "tc" code is not shapin= g=20 on the ethernet anymore BUT INSTEAD on the pppX devices. I tested it and talking jargon, what should i do? The issue is that for each PPPoE login, PPPoE-server creates on the server = a=20 pppX device. that is 10 logins means 10 ppp devices. from ppp0 till ppp9.=20 and one might die upon disconnection. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc _________________________________________________________________ Sabe m=E1s sobre la pr=F3xima generaci=F3n del MSN Messenger.=20 http://imagine-msn.com/minisites/messenger/default.aspx?locale=3Des-ar _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc