So I have been playing around a while with Tc, and something start to ring a bell. I managed to shape traffic for 5 Users on my Lan each with 24Kb download rate. (using HTB) Now my question is: Can I limit the bandwidth on ETH1 to 512k without specifying any end Users Ip or port (www,or smtp traffic)?. So that the first person conecting its Laptop to the Lan gets full Bandwidth, the next user conecting gets 50% and so on... I read that SFQ should do the trick but the Examples I have seen are based on match known Ip adresses so that it can fair qeue the request and everybody gets the same amount of bandwitdh Is there a workaround on SFQ for what I need? And if not what other ways do I have, CBQ, HTB, SFQ, ESFQ ??? I need this because I need to implement this on different office where I dont know the Ip adresses of the people, But I have been asked to shape traffic to a specific amount of KB without carry much about who is using it, Is that possible? If so can someone point me to somewhere? Im quite desperate. Thanks Osgaldo- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Friday 16 May 2003 03:05, Osgaldo Suanzes wrote:> So I have been playing around a while with Tc, and something start to ring > a bell. > I managed to shape traffic for 5 Users on my Lan each with 24Kb download > rate. (using HTB) > > Now my question is: Can I limit the bandwidth on ETH1 to 512k without > specifying any end Users Ip or port (www,or smtp traffic)?. > So that the first person conecting its Laptop to the Lan gets full > Bandwidth, the next user conecting gets 50% and so on... > I read that SFQ should do the trick but the Examples I have seen are > based on match known Ip adresses so that it can fair qeue the request and > everybody gets the same amount of bandwitdh > Is there a workaround on SFQ for what I need? > And if not what other ways do I have, CBQ, HTB, SFQ, ESFQ ???You can use the esfq qdisc (see the faq page on www.docum.org for a link). It works like a sfq, but you can specify how it split the data in different queues. In your case, you can use the ip-address as hash key. So each ip-addess has his own little queue.> I need this because I need to implement this on different office where > I dont know the Ip adresses of the people, > But I have been asked to shape traffic to a specific amount of KB > without carry much about who is using it, Is that possible? > > If so can someone point me to somewhere? Im quite desperate.Or you can create a script that parses the ip-address from the router, determines the network address and creates a htb class for each possible ip-address. Not so difficult to do. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi again. Sorry for bugging you so much! But Im unable to add ESFQ to a HTB Class. #tc qdisc add dev eth1 root handle 1: htb #tc class add dev eth1 parent 1: classid 1:1 htb rate 512kbit ceil 512kbit burst 2k #tc qdisc add dev eth1 parent 1:1 handle 10: esfq The last line "is" probably completly Wrong!(dont know about the others) But I cant find an example on the net for this. I maybe need to add a filter, but how? and without matching Ip addresses. I would appreciate If you could write me down a few lines on how it has to look like, or correct the lines above. The Problem Description again: Need to shape traffic on Interface Eth1 (lan users) to 512 kbit, using Htb and Esfq.(or something else) So that every user gets a fair download bandwidth 1user=100% , 2 users=50%each 3users=33,3% each ....so on. I cant use Iptables to mark Packets, and I have no information on Ip addresses(Mac, etc) of the Users on that Lan. (this maybe a problem because I dont know how to add a filter if I dont know what(IP,Mac,) to match? Maybe there is a way to match "all" traffic and send it to a class??) Thanls for all your patient Osgaldo. ---------------------------------------------------------------------------- --------------------------------------------------------------------------- ----- Original Message ----- From: "Stef Coene" <stef.coene@docum.org> To: "Osgaldo Suanzes" <osgaldo@tiscali.es> Sent: Monday, May 19, 2003 8:43 PM Subject: Re: [LARTC] Shaping only the interface bandwith> On Monday 19 May 2003 16:26, Osgaldo Suanzes wrote: > > Hi Stef. > > > > Thanks a lot for your comments , otherwise my english is to bad to > > understand well the docs. > > Indeed it works quite well. > > I typed > > # tc qdisc add dev eth1 root esfq > > Every conection was treated "fairly" , the issue I have is howdo I> > Shape Interface Eth1 down to 512kb? > > I read on man tc-sfq , that this is a non-shaping (workconserving)> > qdisc. So how do I define something like "rate" to it? > You have to use htb or cbq for that. With htb or cbq, you can createclass> witj a limited bandwidth. You can add the esfq to that class. So all > traffic is limited with htb or cbq and esfq is used to distribute that > traffic. > > Stef > > -- > > stef.coene@docum.org > "Using Linux as bandwidth manager" > http://www.docum.org/ > #lartc @ irc.oftc.net >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Tuesday 20 May 2003 01:01, Osgaldo Suanzes wrote:> Hi again. > > Sorry for bugging you so much! > But Im unable to add ESFQ to a HTB Class. > > #tc qdisc add dev eth1 root handle 1: htb > #tc class add dev eth1 parent 1: classid 1:1 htb rate 512kbit ceil > 512kbit burst 2kRemove the burst parameter so htb calculates the minimum burst for you. 2k is too low for burst.> #tc qdisc add dev eth1 parent 1:1 handle 10: esfq > > The last line "is" probably completly Wrong!(dont know about the > others) But I cant find an example on the net for this.I think the line is ok. Did you get any errors ?> I maybe need to add a filter, but how? and without matching Ip > addresses.If you want to put all traffic in 1:1 you can add default 1 if you add the htb qdisc. This will redirect all non-classified traffic to clas 1:1. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/