Hi Guys After reading http://lartc.org/lartc.html#LARTC.QDISC http://www.docum.org/docum.org/ http://tldp.org/HOWTO/Traffic-Control-HOWTO/ http://www.opalsoft.net/qos/DS-21.htm and a wonderful figure from: http://www.opalsoft.net/qos/ds-lb-214.gif I have a newbie question. Suposse next figure: <--- up 128K internet ----- dsl ---------------------eth1 -Linux Qos- eth0 ------ LAN ---> down 450k If I want "shape" traffic to my LAN ( sharing equally download for all users) I have to insert a rule like this tc qdisc add dev eth0 root handle 1:0 htb tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit and ....other rules and If I want "shape" traffic to Internet ( not allowing a single user to destroy upload) I have to insert a rule like this: tc qdisc add dev eth1 root handle 1:0 htb tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit and ...other rules Is it correct?? or it is better to use IMQ or dummy to shape in both directions ?? thanks in advanced -- Paulo Ricardo Bruck - consultor _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Paulo Ricardo Bruck wrote:> > <--- up 128K > internet ----- dsl ---------------------eth1 -Linux Qos- eth0 ------ LAN > ---> down 450k > > > If I want "shape" traffic to my LAN ( sharing equally download for all > users) I have to insert a rule like this > > tc qdisc add dev eth0 root handle 1:0 htb > tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit > and ....other rules > > and If I want "shape" traffic to Internet ( not allowing a single user > to destroy upload) I have to insert a rule like this: > > tc qdisc add dev eth1 root handle 1:0 htb > tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit > and ...other rules > > > Is it correct??Yes. That''s the way to do it. Don''t forget to add some filters (tc filter add ...) to send traffic into those queues. -Corey
Em Qui, 2005-04-07 às 10:22 -0700, Corey Hickey escreveu:> Paulo Ricardo Bruck wrote: > > > > > <--- up 128K > > internet ----- dsl ---------------------eth1 -Linux Qos- eth0 ------ LAN > > ---> down 450k > > > > > > If I want "shape" traffic to my LAN ( sharing equally download for all > > users) I have to insert a rule like this > > > > tc qdisc add dev eth0 root handle 1:0 htb > > tc class add dev eth0 parent 1:0 classid 1:1 htb rate 400kbit > > and ....other rules > > > > and If I want "shape" traffic to Internet ( not allowing a single user > > to destroy upload) I have to insert a rule like this: > > > > tc qdisc add dev eth1 root handle 1:0 htb > > tc class add dev eth1 parent 1:0 classid 1:1 htb rate 100kbit > > and ...other rules > > > > > > Is it correct?? > > Yes. That''s the way to do it. Don''t forget to add some filters (tc > filter add ...) to send traffic into those queues. >Yes I''ll not forget 8) thanks for quickly answer Corey Just another question related w/ shapping at some documents it''s describe the use of IMQ and some other the use of dummy device. What''s the best method ? From what I''ve read we use dummy to shape both lan and wan using dummy device. It''s correct? If it''s correct why does we use dummy insted shape at LAn and Wan Interfaces ? I intend use TC + iptables + debian sarge, but I''m not sure about using dummy device.... thanks in advance> -Corey-- Paulo Ricardo Bruck - consultor _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Paulo Ricardo Bruck wrote:> > at some documents it''s describe the use of IMQ and some other the use of > dummy device. What''s the best method ? From what I''ve read we use dummy > to shape both lan and wan using dummy device. It''s correct? If it''s > correct why does we use dummy insted shape at LAn and Wan Interfaces ? >I''ve never used a dummy device. This looks interesting, though it doesn''t apply to your setup. http://article.gmane.org/gmane.linux.network/21224 Were you reading something different? If so, post the link(s). IMQ probably doesn''t apply to you either. You might have come across documents describing ingress shaping, which deals with traffic coming into an interface rather than the usual methods of shaping traffic as it leaves an interface. For a router setup, like yours, ingress shaping is unnecessary because all traffic (except a little bit for the router itself) can be shaped normally as it leaves one interface or the other. To shape upstream traffic, attach a qdisc to your Internet-side interface; to shape downstream traffic, attach a qdisc to your LAN-side interface.> I intend use TC + iptables + debian sargeThat''s what I use. -Corey
Em Sex, 2005-04-08 às 11:06 +0200, lartc-request@mailman.ds9a.nl escreveu: Hy people and Corey> You might have come across documents describing ingress shaping, which > deals with traffic coming into an interface rather than the usual > methods of shaping traffic as it leaves an interface.Yes a lot of documents including lartc..8)> For a router setup, like yours, ingress shaping is unnecessary > because all traffic > (except a little bit for the router itself) can be shaped normally as > it > leaves one interface or the other. > > To shape upstream traffic, attach a qdisc to your Internet-side > interface; to shape downstream traffic, attach a qdisc to your > LAN-side > interface. >all right . Let me insert more details about it. ( sorry I started w/ a single scenario just to understand things easier )> > > > <--- up 128K __________ > internet ---- dsl -------------------eth1 -Linux Qos- eth0 --- LAN > > ---> down 450k ---------- > >At Linux Qos I have: debian sarge ( iptables + squid + ntop + psad + apache (only for reports) + acid + snort) Sometimes I use 2 links to ISP ( providing load balance) BTW nice work at lartc. w/ this session about it. 80) It means that at Linux QoS I have not only linux as a router, but Linux serving some applications and QoS too. Again sorry for make things not so clear at my first e-mail. Then should I use only TC + iptables ?> > I intend use TC + iptables + debian sarge > > That''s what I use.-- Paulo Ricardo Bruck - consultor _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Paulo Ricardo Bruck wrote:> all right . Let me insert more details about it. ( sorry I started w/ a > single scenario just to understand things easier ) >> At Linux Qos I have: > debian sarge ( iptables + squid + ntop + psad + apache (only for > reports) + acid + snort) > > Sometimes I use 2 links to ISP ( providing load balance) > BTW nice work at lartc. w/ this session about it. 80) > > It means that at Linux QoS I have not only linux as a router, but Linux > serving some applications and QoS too. > > Again sorry for make things not so clear at my first e-mail. > > > Then should I use only TC + iptables ? >If you want to shape traffic as it comes from the Internet, then you will have to use IMQ or dummy, which gets beyond my area of expertise. I used IMQ for a little while several months ago and it worked very nicely for ingress shaping, but the machine kept hard-locking and I gave up on it. I don''t mean to spread FUD about IMQ -- it may be more stable now -- but be wary. -Corey