From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arkadiusz Miskiewicz Date: Sun, 11 Aug 2002 10:41:35 +0000 Subject: Re: [LARTC] bnig number of interfaces and upstream limit Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Arkadiusz Miskiewicz writes: > Hi, >=20 > The problem is: I have PPPoE (ppp over eth) server and 100 clients. > For each client new pppX interface is created. >=20 > Now I want to limit max speed on each interface to different > values. For example > ppp0 - downstream 256kbit, upstream 128kbit > ppp1 - downstream 512kbit, upstream 512kbit > ... >=20 > Downstream is easy - I just add htb rule on user pppX interface > and that's all. 100 rules for 100 clients. >=20 > Upstream seems be big problem because AFAIK htb (cbq, too) must > be attached to outgoing interface which means that in my > case for each client there is 99 potential outgoing interfaces. Uhm, it was so easy ;) part of my python script now os.system("tc qdisc del root dev %s 2> /dev/null" % ppp_iface) os.system("tc qdisc del dev %s ingress 2> /dev/null" % ppp_iface) =20 # downstream os.system("tc qdisc add dev %s root tbf rate %skbit latency 50ms burst = 1540" % (ppp_iface, speed_down)) =20 # upstream os.system("tc qdisc add dev %s handle ffff: ingress" % ppp_iface) os.system("tc filter add dev %s parent ffff: protocol ip prio 50 u32 ma= tch ip src 0.0.0.0/0 police rate %skbit burst 10k drop flowid :1" % (ppp_if= ace, speed_up)) --=20 Arkadiusz Mi=B6kiewicz IPv6 ready PLD Linux at http://www.pld.org.pl misiek(at)pld.org.pl AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PWr _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/