Shaping only the interface bandwith
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 / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines · Osgaldo Suanzes
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)
Quoted 9 lines
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.
Quoted 6 lines
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
Signature · 8 lines
[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/
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 1user0% , 2
usersP%each 3users3,3% each ....so on.
I cant use Iptables to mark Packets, and I have no information on Ipaddresses(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" <[email protected]>
To: "Osgaldo Suanzes" <[email protected]>
Sent: Monday, May 19, 2003 8:43 PM
Subject: Re: [LARTC] Shaping only the interface bandwith
Quoted 9 lines · Osgaldo Suanzes
Quoted 8 lines
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 how
do I
Quoted 2 lines
Quoted 2 lines
Shape Interface Eth1 down to 512kb?
I read on man tc-sfq , that this is a non-shaping (work
conserving)
Quoted 2 lines
Quoted 1 line
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 create
class
Quoted 4 lines
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.
Quoted 9 lines
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/
Quoted 8 lines · Osgaldo Suanzes
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
Remove the burst parameter so htb calculates the minimum burst for you. 2k is too low for burst.
Quoted 4 lines
#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 ?
Quoted 2 lines
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
Signature · 8 lines
[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/