Trying understand the HTB
Hi!
I am studying HTB. I used the topology showed below:
10.1.0.1 ------ 10.1.14.25 (eth1) / 192.168.10.10 (eth0) ----- 192.168.10.11
(host 1) (router)
(host 2)
All machines use Debian Etch. Has a Iptables masquerading rule to eth1 in the router machine . The NICs are 100 Mb/s. The host 1 has Apache 2 and a file with 670 MB (CD ISO image) to download.
When I used wget to get http://10.1.0.1/file.iso from 192.168.10.11. Without tc the speed showed by wget was 9.15 M/s (= 73.2 Mbits/s). The iptraf confirmed it. Then I used these lines to control the traffic:
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 40 tc class add dev eth1 root classid 1:0 htb rate 10mbit tc class add dev eth1 parent 1:0 classid 1:40 htb rate 500kbit
After tc rules, when I got file.iso, the speed showed by wget was 2.77 M/s (= 22.16 Mbits/s). But I used 500kbit (= 62.5 KB/s) in default class.
My question is: why tc default class was configured with 500 Kb/s and the real speed (confirmed by wget and Iptraf) was 22.16 Mb/s?
Thanks in advance.
Eriberto - Brazil
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
The commands work but the structure doesn't seem right to me.
Try this ...
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 40 tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit tc class add dev eth1 parent 1:1 classid 1:40 htb rate 500kbit
Jon Flechsenhaar
Boeing WNW Team
Network Services
(714)-762-1231
202-E7
-----Original Message-----
From: Eriberto [mailto:[email protected]]
Sent: Monday, August 13, 2007 7:11 PM
To: [email protected]
Subject: [LARTC] Trying understand the HTB
Hi!
I am studying HTB. I used the topology showed below:
10.1.0.1 ------ 10.1.14.25 (eth1) / 192.168.10.10 (eth0) ----- 192.168.10.11
(host 1) (router)
(host 2)
All machines use Debian Etch. Has a Iptables masquerading rule to eth1 in the router machine . The NICs are 100 Mb/s. The host 1 has Apache 2 and a file with 670 MB (CD ISO image) to download.
When I used wget to get http://10.1.0.1/file.iso from 192.168.10.11. Without tc the speed showed by wget was 9.15 M/s (= 73.2 Mbits/s). The iptraf confirmed it. Then I used these lines to control the traffic:
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 40 tc class add dev eth1 root classid 1:0 htb rate 10mbit tc class add dev eth1 parent 1:0 classid 1:40 htb rate 500kbit
After tc rules, when I got file.iso, the speed showed by wget was 2.77 M/s (= 22.16 Mbits/s). But I used 500kbit (= 62.5 KB/s) in default class.
My question is: why tc default class was configured with 500 Kb/s and the real speed (confirmed by wget and Iptraf) was 22.16 Mb/s?
Thanks in advance.
Eriberto - Brazil
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Hi! Thanks for your response. I used your suggestion but the traffic was 2.71 MB/s (21.680 Kb/s). I need 500 Kb/s. What is the error???
Thanks in advance.
Regards,
Eriberto - Brazil
2007/8/14, Flechsenhaar, Jon J <[email protected]>:
Quoted 7 lines
The commands work but the structure doesn't seem right to me.
Try this ...
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 40 tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit tc class add dev eth1 parent 1:1 classid 1:40 htb rate 500kbit
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
To limit bandwidth to your 192.168.10.11 host, you need to be rate limiting on the eth0 interface not the eth1 interface if I understand how your router is plugged in.
tc limits bandwidth leaving an interface. So right now as the rules are written, you are limiting to 500kbit the bandwidth you can UPLOAD to 10.1.0.1.
Quoted 107 lines
------------------------------
Message: 2
Date: Tue, 14 Aug 2007 10:06:10 -0700
From: "Flechsenhaar, Jon J" <[email protected]>
Subject: RE: [LARTC] Trying understand the HTB
To: "Eriberto" <[email protected]>, <[email protected]> Message-ID:<0E24ED2A7F9AA349A8633E6A56A64BE0027A8425@XCH-SW-2V1.sw.nos.boeing.com>
Content-Type: text/plain; charset="us-ascii"
The commands work but the structure doesn't seem right to me.
Try this ...
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 40 tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit tc class add dev eth1 parent 1:1 classid 1:40 htb rate 500kbitJon Flechsenhaar
Boeing WNW Team
Network Services
(714)-762-1231
202-E7-----Original Message-----
From: Eriberto [mailto:[email protected]]
Sent: Monday, August 13, 2007 7:11 PM
To: [email protected]
Subject: [LARTC] Trying understand the HTBHi!
I am studying HTB. I used the topology showed below:
10.1.0.1 ------ 10.1.14.25 (eth1) / 192.168.10.10 (eth0) ----- 192.168.10.11
(host 1) (router)(host 2)All machines use Debian Etch. Has a Iptables masquerading rule to eth1 in the router machine . The NICs are 100 Mb/s. The host 1 has Apache 2 and a file with 670 MB (CD ISO image) to download.
When I used wget to get http://10.1.0.1/file.iso from 192.168.10.11. Without tc the speed showed by wget was 9.15 M/s (= 73.2 Mbits/s). The iptraf confirmed it. Then I used these lines to control the traffic:
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 40 tc class add dev eth1 root classid 1:0 htb rate 10mbit tc class add dev eth1 parent 1:0 classid 1:40 htb rate 500kbitAfter tc rules, when I got file.iso, the speed showed by wget was 2.77 M/s (= 22.16 Mbits/s). But I used 500kbit (= 62.5 KB/s) in default class.
My question is: why tc default class was configured with 500 Kb/s and the real speed (confirmed by wget and Iptraf) was 22.16 Mb/s?
Thanks in advance.
Eriberto - Brazil
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc------------------------------
Message: 3
Date: Tue, 14 Aug 2007 18:27:05 -0300
From: Eriberto <[email protected]>
Subject: Re: [LARTC] Trying understand the HTB
To: "Flechsenhaar, Jon J" <[email protected]>
Cc: [email protected]
Message-ID:<[email protected]>Content-Type: text/plain; charset=ISO-8859-1
Hi! Thanks for your response. I used your suggestion but the traffic was 2.71 MB/s (21.680 Kb/s). I need 500 Kb/s. What is the error???
Thanks in advance.
Regards,
Eriberto - Brazil
2007/8/14, Flechsenhaar, Jon J <[email protected]>:
Quoted 7 lines
The commands work but the structure doesn't seem right to me.
Try this ...
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: htb default 40 tc class add dev eth1 parent 1: classid 1:1 htb rate 10mbit tc class add dev eth1 parent 1:1 classid 1:40 htb rate 500kbit------------------------------
Quoted 8 lines
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartcEnd of LARTC Digest, Vol 30, Issue 14
*************************************
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc