Hello, I would like to achieve this: HTB qdisc with many classes. One class shouldn''t have guaranteed bandwidth, only ceil bandwidth -> if there is available bandwidth, the this class can use it, but if everybody uses the whole bandwidth it should get any bandwidth. I tryed this with HTB to set rate to 0 and ceil to the max value (rate 0kbit ceil 1920kbit) - unfortunately I got error message :( Is it possible to have this configuration? Thanks in advance, Thomas _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Thomas Jalsovsky wrote: | Hello, | | I would like to achieve this: | HTB qdisc with many classes. One class shouldn''t have guaranteed | bandwidth, only ceil bandwidth -> if there is available bandwidth, the | this class can use it, but if everybody uses the whole bandwidth it should | get any bandwidth. | I tryed this with HTB to set rate to 0 and ceil to the max value | (rate 0kbit ceil 1920kbit) - unfortunately I got error message :( | | Is it possible to have this configuration? Seems you have no choice other than set your rate equal with 1Kbit. I''ve made some tests to configure such a bandwidth, and that was the small rate that I could get it. - -- Catalin Bucur mailto:cata@geniusnet.ro NOC @ Genius Network SRL - Galati - Romania -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+Hu6MpDe20wwI9oIRAlcIAJ9gwT7iYxUZTuswHRZmxQZF0ZEiLACeOLvB KH8kSqsoN2yFJq6d54hq3bE=IXVr -----END PGP SIGNATURE----- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
OK, I will use rate 1kbit. Therefore r2q should be 1, right? Thanks, Thomas On Fri, 10 Jan 2003, Catalin Bucur wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Thomas Jalsovsky wrote: > | Hello, > | > | I would like to achieve this: > | HTB qdisc with many classes. One class shouldn''t have guaranteed > | bandwidth, only ceil bandwidth -> if there is available bandwidth, the > | this class can use it, but if everybody uses the whole bandwidth it should > | get any bandwidth. > | I tryed this with HTB to set rate to 0 and ceil to the max value > | (rate 0kbit ceil 1920kbit) - unfortunately I got error message :( > | > | Is it possible to have this configuration? > > Seems you have no choice other than set your rate equal with 1Kbit. I''ve > made some tests to configure such a bandwidth, and that was the small > rate that I could get it. > > - -- > Catalin Bucur mailto:cata@geniusnet.ro > NOC @ Genius Network SRL - Galati - Romania > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.0.6 (GNU/Linux) > Comment: For info see http://www.gnupg.org > > iD8DBQE+Hu6MpDe20wwI9oIRAlcIAJ9gwT7iYxUZTuswHRZmxQZF0ZEiLACeOLvB > KH8kSqsoN2yFJq6d54hq3bE> =IXVr > -----END PGP SIGNATURE----- >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello , I am trying to use tc to do the following ..on the interface(eth0) I want to give priority to to packets coming from a specific IP address 1.2.3.4 over packets from IP address 1.2.3.5 . I would like to know if the following setup would work with PRIO qdisc. tc qdisc add dev eth0 root handle 10 : prio tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip src 1.2.3.4/32 flowid 10:1 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.4/32 flowid 10:1 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip src 1.2.3.5/32 flowid 10:2 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.5/32 flowid 10:2 Can I test this setup by using flooding ping from 1.2.3.4 and 1.2.3.5 to the machine configured with tc ? I expected that pings from 1.2.3.5 will be dropped giving priority to 1.2.3.4 Looking forward to your input, Andreas. --------------------------------- With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs
Normally, either src or dst from an internal ip alone will be effective on an interface as we can shape only outgoing traffic. Thus if eth0 is the internal LAN interface for 1.2.3.x network, only dst will be effective. If eth0 is the gateway to the other side with say eth1 as the internal interface to 1.2.3.x LAN, then src will be effective. You will need to apply src and dst to different interfaces to achieve what you want. e.g. eth0 is WAN side and eth1 is LAN side then tc qdisc add dev eth0 root handle 10: prio tc class add dev eth0 parent 10: classid 10:1 htb rate 512kbit ceil 1Mbit tc class add dev eth0 parent 10:1 classid 10:10 htb rate 512kbit ceil 1Mbit tc class add dev eth0 parent 10: classid 10:20 htb rate 2kbit ceil 1Mbit tc filter add dev eth0 parent 10:1 protocol ip prio 1 u32 \ match ip src 1.2.3.4/32 flowid 10:10 tc filter add dev eth0 parent 10:1 protocol ip prio 1 u32 \ match ip src 1.2.3.5/32 flowid 10:20 tc qdisc add dev eth1 root handle 11: prio tc class add dev eth1 parent 11: classid 11:1 htb rate 512kbit ceil 1Mbit tc class add dev eth1 parent 11:1 classid 11:10 htb rate 512kbit ceil 1Mbit tc class add dev eth1 parent 11:1 classid 11:20 htb rate 2kbit ceil 1Mbit tc filter add dev eth1 parent 11:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.4/32 flowid 11:10 tc filter add dev eth1 parent 11:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.5/32 flowid 11:20 You had not mentioned classes earlier. These are needed and filters will assign traffic to classes. Thus traffic to and from 1.2.3.5/24 has 2kbit borrowable upto a max of 1Mbit while 1.2.3.4/24 has 512kbit borrowable upto 1Mbit. Thus 1.2.3.4 will get 512/514 portion of the bandwidth always. if no traffic comes from 1.2.3.4, 1.2.3.5 will get full bandwidth. I gave rate as 512 and ceil as 1mbit assuming WAN is a 1Mbit interface reserving 512 for ingress and 512 for egress. In case incoming traffic does not take 512, the outgoing traffic can borrow that bandwidth upto max link capacity. HTH Mohan -----Original Message----- From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl]On Behalf Of Andreas Wright Sent: 20 January 2003 14:30 To: LARTC@mailman.ds9a.nl Subject: [LARTC] Help Needed with TC qdisc and filters Hello , I am trying to use tc to do the following ..on the interface(eth0) I want to give priority to to packets coming from a specific IP address 1.2.3.4 over packets from IP address 1.2.3.5 . I would like to know if the following setup would work with PRIO qdisc. tc qdisc add dev eth0 root handle 10 : prio tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip src 1.2.3.4/32 flowid 10:1 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.4/32 flowid 10:1 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip src 1.2.3.5/32 flowid 10:2 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.5/32 flowid 10:2 Can I test this setup by using flooding ping from 1.2.3.4 and 1.2.3.5 to the machine configured with tc ? I expected that pings from 1.2.3.5 will be dropped giving priority to 1.2.3.4 Looking forward to your input, Andreas. With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi Thomas! The smallest rate you can use with r2q=1 is mtu*8 kbit (12kbit in most cases). You can skip r2q and use quantum=125 bytes, but that is probably not such a good idea...> OK, I will use rate 1kbit. Therefore r2q should be 1, right? > > Thanks, > Thomas > > On Fri, 10 Jan 2003, Catalin Bucur wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > Thomas Jalsovsky wrote: > > | Hello, > > | > > | I would like to achieve this: > > | HTB qdisc with many classes. One class shouldn''t have guaranteed > > | bandwidth, only ceil bandwidth -> if there is available bandwidth, the > > | this class can use it, but if everybody uses the whole bandwidth it should > > | get any bandwidth. > > | I tryed this with HTB to set rate to 0 and ceil to the max value > > | (rate 0kbit ceil 1920kbit) - unfortunately I got error message :( > > | > > | Is it possible to have this configuration? > > > > Seems you have no choice other than set your rate equal with 1Kbit. I''ve > > made some tests to configure such a bandwidth, and that was the small > > rate that I could get it. > > > > - -- > > Catalin Bucur mailto:cata@geniusnet.ro > > NOC @ Genius Network SRL - Galati - Romania > > > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v1.0.6 (GNU/Linux) > > Comment: For info see http://www.gnupg.org > > > > iD8DBQE+Hu6MpDe20wwI9oIRAlcIAJ9gwT7iYxUZTuswHRZmxQZF0ZEiLACeOLvB > > KH8kSqsoN2yFJq6d54hq3bE> > =IXVr > > -----END PGP SIGNATURE----- > > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/-- Regards Abraham Getting the job done is no excuse for not following the rules. Corollary: Following the rules will not get the job done. ___________________________________________________ Abraham vd Merwe [ZR1BBQ] - Frogfoot Networks P.O. Box 3472, Matieland, Stellenbosch, 7602 Cell: +27 82 565 4451 Http: http://www.frogfoot.net/ Email: abz@frogfoot.net
Hello I was thinking Prio qdisc has 3 classes by default.Hence it should be possible to enque the packets into one of these classes using tc filters as shown below.Can anyone clarify this Regards, Anil From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl]On Behalf Of Andreas Wright Sent: 20 January 2003 14:30 To: LARTC@mailman.ds9a.nl Subject: [LARTC] Help Needed with TC qdisc and filters Hello , I am trying to use tc to do the following ..on the interface(eth0) I want to give priority to to packets coming from a specific IP address 1.2.3.4 over packets from IP address 1.2.3.5 . I would like to know if the following setup would work with PRIO qdisc. tc qdisc add dev eth0 root handle 10 : prio tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip src 1.2.3.4/32 flowid 10:1 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.4/32 flowid 10:1 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip src 1.2.3.5/32 flowid 10:2 tc filter add dev eth0 parent 10:0 protocol ip prio 1 u32 \ match ip dst 1.2.3.5/32 flowid 10:2 Can I test this setup by using flooding ping from 1.2.3.4 and 1.2.3.5 to the machine configured with tc ? I expected that pings from 1.2.3.5 will be dropped giving priority to 1.2.3.4 Looking forward to your input, Andreas. With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs --------------------------------- With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Abraham van der Merwe wrote: | Hi Thomas! | | The smallest rate you can use with r2q=1 is mtu*8 kbit (12kbit in most | cases). You can skip r2q and use quantum=125 bytes, but that is probably not | such a good idea... | |>OK, I will use rate 1kbit. Therefore r2q should be 1, right? |> |> Thanks, |> Thomas The HTB FAQ page from Devik''s site says that you should use at least 4kbit for realiable operation of HTB. So it''s hard to say what could be the best minimal quantum value in this case. It''s not a good ideea to use a value smaller than 1500 bytes, so leave the quantum at this value and ignore the warning messages from syslog, or use the patch against 2.4.20 to skip these type of errors. - -- Catalin Bucur mailto:cata@geniusnet.ro NOC @ Genius Network SRL - Galati - Romania -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE+LDU2pDe20wwI9oIRAp/lAJ9OSmRNbHWjFNWIFPZO/S0YfW/LzwCfTygk m2ZZ6Dx+vp8c9UO//LVcwyE=jvbk -----END PGP SIGNATURE----- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Monday 20 January 2003 18:43, Catalin Bucur wrote:> Abraham van der Merwe wrote: > | Hi Thomas! > | > | The smallest rate you can use with r2q=1 is mtu*8 kbit (12kbit in most > | cases). You can skip r2q and use quantum=125 bytes, but that is > > probably not > > | such a good idea... > | > |>OK, I will use rate 1kbit. Therefore r2q should be 1, right? > |> > |> Thanks, > |> Thomas > > The HTB FAQ page from Devik''s site says that you should use at least > 4kbit for realiable operation of HTB. So it''s hard to say what could be > the best minimal quantum value in this case. It''s not a good ideea to > use a value smaller than 1500 bytes, so leave the quantum at this value > and ignore the warning messages from syslog, or use the patch against > 2.4.20 to skip these type of errors.Quantum must be > 1500 so the internal caculations of htb are good. And 60.000 is the maximum hard coded in htb. So try to take r2q so smallest_rate/r2q > 1500 biggest_rate/r2q < 60000 Quatum is only used if you have a parent class that''s has remaining bandwidth. I don''t know if this is the case in your situation. 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/