Hi all, I have an installation where each user on subnet 192.168.1.0/24 is connected via a multiplexer. The problem is that if any client uses more than about 48Kb/s, the multiplexer crashes. I need to limit each client to under this rate, say 32Kb/s. I have seen examples on creating a class per host but is there a simple way of saying "any host from 192.168.1.0/24" so I dont have 253 rules? Many thanks. stuart -- | http://www.opusvl.com | T: 08717 50 40 02 | F: 08717 50 40 03 | E: sm@opusvl.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
~From: Stuart Mackintosh <sm@opusvl.com> ~Date: 12 May 2003 17:08:10 +0100 ~Subject: [LARTC] Limit bandwidth per client ~Hi all, ~I have an installation where each user on subnet 192.168.1.0/24 is ~connected via a multiplexer. ~The problem is that if any client uses more than about 48Kb/s, the ~multiplexer crashes. ~I need to limit each client to under this rate, say 32Kb/s. I have ~seen ~examples on creating a class per host but is there a simple way of ~saying "any host from 192.168.1.0/24" so I dont have 253 rules? Yeah, I think I can answer this :-). Upload mark iptables -t mangle -A FORWARD -s 192.168.0.0/24 -j MARK --set-mark 4 Download mark iptables -t mangle -A POSTROUTING -s ! 192.168.0.0/24 -d 192.168.0.0/24 -j MARK --set-mark 5 Then if you are using htb: just make your root qdisk, classes, filters, and then the qdisk. James ~Many thanks. ~stuart ~-- ~ | http://www.opusvl.com ~ | T: 08717 50 40 02 ~ | F: 08717 50 40 03 ~ | E: sm@opusvl.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
That is the best, detailed, straight-forward howto on tc I''ve ever seen! (There are probablly others out there, and no offense to authors of any that I just haven''t seen). Thanks! I have been off and on trying to get my squid transparent proxy/cache server to do tc for me, but it just doesn''t seem to work, and I wonder if you can offer any advice. My network looks just like you''ve described below, except that your ''router1'' is my ''transparent cache'', running as a bridge, where eth0 and eth1 are bridge interfaces (br0). I am beginning to draw the conclusion that I cannot do tc with a bridge, and that I must route. Do you have any suggestions? Thanks, dave -----Original Message----- From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl] On Behalf Of Stuart Mackintosh Sent: Monday, May 12, 2003 10:08 AM To: lartc@mailman.ds9a.nl Subject: [LARTC] Limit bandwidth per client Hi all, I have an installation where each user on subnet 192.168.1.0/24 is connected via a multiplexer. The problem is that if any client uses more than about 48Kb/s, the multiplexer crashes. I need to limit each client to under this rate, say 32Kb/s. I have seen examples on creating a class per host but is there a simple way of saying "any host from 192.168.1.0/24" so I dont have 253 rules? Many thanks. stuart -- | http://www.opusvl.com | T: 08717 50 40 02 | F: 08717 50 40 03 | E: sm@opusvl.com _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Tuesday 13 May 2003 16:32, David Reoch wrote:> That is the best, detailed, straight-forward howto on tc I''ve ever seen! > (There are probablly others out there, and no offense to authors of any > that I just haven''t seen). Thanks! > > I have been off and on trying to get my squid transparent proxy/cache > server to do tc for me, but it just doesn''t seem to work, and I wonder > if you can offer any advice.The problem is that squid is a local running app. And tc does not know if sqiud is using it''s cache to server the objects. Ideally, you should be able to mark the packets within squid like you can with iptables.> My network looks just like you''ve described below, except that your > ''router1'' is my ''transparent cache'', running as a bridge, where eth0 and > eth1 are bridge interfaces (br0). > > I am beginning to draw the conclusion that I cannot do tc with a bridge, > and that I must route. Do you have any suggestions?Shaping on a bridge is possible. If you use the u32 filter, you can get in some trouble that can be solve with a kernel patch : http://www.docum.org/stef.coene/qos/faq/cache/41.html 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/