Ive read up a bit on traffic shaping the last days, but not only on linux TC, but also on dummynet and altq for freebsd. My seemingly biggest problem is that I dont want to specify manually every "class", but I want the filtering to automatically regard each IP as a different class. I might have misunderstood classes though. Instead, Ill explain what I want to achieve: 1) I want to deploy a box in bridge mode first of all. 2) I would _want_ to traffic shape based on mac, not IP, but this doesnt seem possible. It isnt vital for me though, ip will work. 3) I want each ip (well, preferrably MAC, but...) to have 3 mbit of bandwidth. Is this possible with linux TC ? My problem is I dont know each and every IP-address that will be used. With dummynet in freebsd, you can specify "filters" on ip-dest/src and so on, and whats left after the filter is used as a ID, where each ID get a identical "pipe", effectively a bandwidth-cap. Thats suiting me perfectly, though I would want a bit more functionality. Basically, dummynet wouldnt let the individual streams to go above their 3mbit even when our connection isnt being fully utilized. I hope I made some sense. --- John Bäckstrand
On Wed, 10 Jul 2002, [iso-8859-1] John Bckstrand wrote: [snip]> 2) I would _want_ to traffic shape based on mac, not > IP, but this doesnt seem possible. It isnt vital for me > though, ip will work.Actually, it is possible, using netfilter and fwmarks. Netfilter can actually match based on MAC address. Problem is that you can''t have it without specifying shit yourself. You could conceivably write a script to take a list of MAC addresses to shape and generate the corresponding tc calls... and then seed that from your ARP table. That would be the closest to automatic you can get. Doei, Arthur. -- /\ / | arthurvl@sci.kun.nl | Work like you don''t need the money /__\ / | A friend is someone with whom | Love like you have never been hurt / \/__ | you can dare to be yourself | Dance like there''s nobody watching
> Is this possible with linux TC ? My problem is I dont > know each and every IP-address that will be used.Just wanted to let everyone know that I think I found my solution: http://wipl-wrr.sourceforge.net It automatically creates a classes based on either IP or MAC. --- John Bäckstrand
> From: =?iso-8859-1?Q?John_B=E4ckstrand?= <sandos@home.se>> 1) I want to deploy a box in bridge mode first of all. > 2) I would _want_ to traffic shape based on mac, not > IP, but this doesnt seem possible. It isnt vital for me > though, ip will work. > 3) I want each ip (well, preferrably MAC, but...) to > have 3 mbit of bandwidth. On one level this makes no sense. What if you have more clients than bandwidth? Clearly you want to lower the 3MB to bandwidth/#clients. What if you have extra bandwidth? You probably want to share the excess rather than waste the bandwidth. In fact you probably want to share the bandwidth dynamically among the active clients. All of this is just what''s done by SFQ, except that you want to alter it to use source MAC, which is easy enough. I think there''s already a version out there that uses only source IP if you want to try that first. In order to use source MAC you probably do have to change the kernel to store the source MAC when the packet arrives. Otherwise it''s gone by the time you forward.
> > 1) I want to deploy a box in bridge mode first ofall.> > 2) I would _want_ to traffic shape based on mac,not> > IP, but this doesnt seem possible. It isnt vitalfor me> > though, ip will work. > > 3) I want each ip (well, preferrably MAC, but...)to> > have 3 mbit of bandwidth. > On one level this makes no sense.Well, I was a bit unclear, or rather unsure of what I really wanted. I actually want clients that use more bandwidth to have less priority, which is what wrr can do.>What if you have more clients than > bandwidth? Clearly you want to lower the 3MB tobandwidth/#clients.> What if you have extra bandwidth? You probably wantto share the> excess rather than waste the bandwidth. In fact youprobably want to> share the bandwidth dynamically among the activeclients.> All of this is just what''s done by SFQInteresting. But would SFQ for example, result in low latency on a heavily used connection for clients that doesnt use much bandwidth? --- John Bäckstrand
=?iso-8859-1?Q?John_B=E4ckstrand?= writes: > Interesting. But would SFQ for example, result in low > latency on a heavily used connection for clients that > doesnt use much bandwidth? Yes. SFQ is basically round robin among connections, which you''ll change to round robin among clients. In general the latency for the first packet sent by a new client is proportional to the number of clients in the queue regardless of the amount of data the other clients have in the queue.