Hi In the introduction of IMQ ( http://luxik.cdi.cz/~patrick/imq/ ) it sais: Quote start. "This allows you to treat network devices as classes and distribute bandwidth among them as well as doing real ingress traffic control using egress qdiscs" quote stop. Where and how exactly do I tell that a HTB class should use which phy. dev.? I fail to see where this is done in the example at the ref. link over. Kjell _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Sunday 02 March 2003 11:51, Kjell Chris Flor wrote:> Hi > > In the introduction of IMQ ( http://luxik.cdi.cz/~patrick/imq/ ) > it sais: > > Quote start. > "This allows you to treat network devices > as classes and distribute bandwidth among > them as well as doing real ingress traffic > control using egress qdiscs" > quote stop. > > Where and how exactly do I tell that a HTB > class should use which phy. dev.?You can do this with iptables + fw filter. Mark the packets coming from each interface with a different mark and put the packets with the fw filter in it''s own class. 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 > > > > In the introduction of IMQ ( http://luxik.cdi.cz/~patrick/imq/ ) > > it sais: > > > > Quote start. > > "This allows you to treat network devices > > as classes and distribute bandwidth among > > them as well as doing real ingress traffic > > control using egress qdiscs" > > quote stop. > > > > Where and how exactly do I tell that a HTB > > class should use which phy. dev.? > You can do this with iptables + fw filter. Mark the packets coming fromeach> interface with a different mark and put the packets with the fw filter in > it''s own class.But why do I need IMQ for this? Kjell _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Fri, 21 Mar 2003 23:38:17 +0100 "Kjell Chris. Flor" <kjell@mastercad.se> wrote: [ cut ]> > > Where and how exactly do I tell that a HTB > > > class should use which phy. dev.? > > You can do this with iptables + fw filter. Mark the packets coming from > each > > interface with a different mark and put the packets with the fw filter in > > it''s own class. > > But why do I need IMQ for this?Because it serves as sort of a virtual bucket (literally), in which you are collecting packets, comming from the physical devices, once you "-j IMQ"-ed them whith iptables. Hth, Nickola
>>>> Where and how exactly do I tell that a HTB >>>> class should use which phy. dev.? >>> You can do this with iptables + fw filter. Mark the packets coming from >>> each interface with a different mark and put the packets with the fwfilter>>> in it''s own class. >> >> But why do I need IMQ for this? > >Because it serves as sort of a virtual bucket (literally), in which you are >collecting packets, comming from the physical devices, once you "-j IMQ"-edthem>whith iptables.I''ve got three ADSL lines. ADSL1, ADSL2 and ADSL3. When packets arrives I mark them in IPtables with 1, 2 or 3 so I can know in my LAN interface what interface each packet arrived on at the INTERNET interfaces, so each packet can be put into a HTB class that represent each ADSL bandwidth. In addition to this I also match for dest IP in LAN, and put each IP in a different HTB class with different rates, ceil and prio. Also I use SFQ in HTB. This is it for shaping incoming packets from Internet on ADSL 1-3, to my single LAN. Now I want to shape what is coming from LAN going out on Internet''s ADSL lines. This I do by making three HTB qdiscs, one for each ADSL line. As my LAN is NATed I don''t know from whom I got a packet, so I use mark in IPtables to identify an LAN IP with a HTB class. This is how I shape. I don''t know what is more clever, and I don''t know how IMQ could help me to do this neater, but I really would like to know. regards, Kjell _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Sat, 22 Mar 2003 04:03:22 +0100 "Kjell Chris. Flor" <kjell@mastercad.se> wrote: Hello, Chris, [ cut ]> >Because it serves as sort of a virtual bucket (literally), in which you are > >collecting packets, comming from the physical devices, once you "-j IMQ"-ed > them > >whith iptables. > > I''ve got three ADSL lines. ADSL1, ADSL2 and ADSL3. > When packets arrives I mark them in IPtables with 1, 2 or 3 so I can > know in my LAN interface what interface each packet arrived on at > the INTERNET interfaces, so each packet can be put into a HTB class > that represent each ADSL bandwidth. > In addition to this I also match for dest IP in LAN, and put each IP > in a different HTB class with different rates, ceil and prio. Also I > use SFQ in HTB. > > This is it for shaping incoming packets from Internet on ADSL 1-3, > to my single LAN.This is nice example of egress traffic control.> Now I want to shape what is coming from LAN going out on Internet''s > ADSL lines. This I do by making three HTB qdiscs, one for each ADSL > line. As my LAN is NATed I don''t know from whom I got a packet, > so I use mark in IPtables to identify an LAN IP with a HTB class. > > This is how I shape. I don''t know what is more clever, and I don''t know > how IMQ could help me to do this neater, but I really would like to know.Well, if this is working for you, there''s absolutely no need to use the IMQ device, I think. :)) But nevertheless, you could use just one HTB, instead of three fo each ADSL, if you use iptrables -j IMQ for packets coming from your LAN and going out to the Internet, no matter to which line they''re destined. LAN | ETH | IMQ | 3xADSL or sorta. :))) I really dont know if I made myself clear, but this is the idea of using IMQ. In fact you''ll be doing traffic control in a single point. Hth, Nickola