All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Newbie HTB shaping question
@ 2003-12-09 11:37 rajkumars
  2003-12-09 12:51 ` Jan Gerritsen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rajkumars @ 2003-12-09 11:37 UTC (permalink / raw)
  To: lartc

[-- Attachment #1: Type: text/plain, Size: 1860 bytes --]

Hi,

I am following the HTB user manual and testing HTB on my local lan, using the rules given in the manual. I applied the rules in my eth0 and limited it to 100kbps, but when I tried to wget a file from another machine it came at 1mbps, Here are the commands and the settings. Did I do any thing stupid or is this supposed to work that way?

1. The commands

tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.3.90 match ip dport 8080 0xffff flowid 1:10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 192.168.3.92 flowid 1:11
tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5
tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5
tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10


2. wget output

raj@indus:~$ wget -O /dev/null http://penguin:8080/knoppix
--14:01:45--  http://penguin:8080/knoppix
           => `/dev/null'
Resolving penguin... done.
Connecting to penguin[192.168.3.90]:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 733,825,024 [text/plain]

 2% [>                                                                                    ] 16,952,192     1.03M/s    ETA 11:02


As you can see from the command and wget output i limited the outgoing bandwidth to 100kbps but i am still getting 1Mbps. Is this what I am supposed to get or did I do some thing really stupid?

I have attached the full logs as a text file also incase my mail client messes up the output.

Thanks in Advance,
raj



[-- Attachment #2: htb.log --]
[-- Type: application/octet-stream, Size: 3104 bytes --]

root@indus:~# cat htb.sh
#!/bin/sh
tc qdisc add dev eth0 root handle 1: htb default 12
tc class add dev eth0 parent 1: classid 1:1 htb rate 100kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 30kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 10kbps ceil 100kbps
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 60kbps ceil 100kbps
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.3.90 match ip dport 8080 0xffff flowid 1:10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 192.168.3.92 flowid 1:11
tc qdisc add dev eth0 parent 1:10 handle 20: pfifo limit 5
tc qdisc add dev eth0 parent 1:11 handle 30: pfifo limit 5
tc qdisc add dev eth0 parent 1:12 handle 40: sfq perturb 10


root@indus:~# tc -s -d qdisc show dev eth0
qdisc sfq 40: quantum 1514b limit 128p flows 128/1024 perturb 10sec
 Sent 84 bytes 2 pkts (dropped 0, overlimits 0)

qdisc pfifo 30: limit 5p
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)

qdisc pfifo 20: limit 5p
 Sent 2672006 bytes 40491 pkts (dropped 0, overlimits 0)

qdisc htb 1: r2q 10 default 12 direct_packets_stat 0 ver 3.13
 Sent 2672090 bytes 40493 pkts (dropped 0, overlimits 0)

root@indus:~# tc -s -d class show dev eth0
class htb 1:11 parent 1:1 leaf 30: prio 0 quantum 1024 rate 80Kbit ceil 800Kbit burst 1701b/8 mpu 0b cburst 2623b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 136159 ctokens: 20992

class htb 1:1 root rate 800Kbit ceil 800Kbit burst 2623b/8 mpu 0b cburst 2623b/8 mpu 0b level 7
 Sent 2672222 bytes 40495 pkts (dropped 0, overlimits 0)
 rate 224bps 3pps
 lended: 0 borrowed: 0 giants: 0
 tokens: 18694 ctokens: 18694

class htb 1:10 parent 1:1 leaf 20: prio 0 quantum 3072 rate 240Kbit ceil 800Kbit burst 1906b/8 mpu 0b cburst 2623b/8 mpu 0b level 0
 Sent 2672006 bytes 40491 pkts (dropped 0, overlimits 0)
 rate 224bps 3pps
 lended: 40493 borrowed: 0 giants: 0
 tokens: 33830 ctokens: 18694

class htb 1:12 parent 1:1 leaf 40: prio 0 quantum 6144 rate 480Kbit ceil 800Kbit burst 2213b/8 mpu 0b cburst 2623b/8 mpu 0b level 0
 Sent 84 bytes 2 pkts (dropped 0, overlimits 0)
 lended: 2 borrowed: 0 giants: 0
 tokens: 28986 ctokens: 20673

root@indus:~# tc -s -d filter show dev eth0
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:10
  match c0a8035a/ffffffff at 16
  match 00001f90/0000ffff at 20
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:11
  match c0a8035c/ffffffff at 12

raj@indus:~$ wget -O /dev/null http://penguin:8080/knoppix
--14:01:45--  http://penguin:8080/knoppix
           => `/dev/null'
Resolving penguin... done.
Connecting to penguin[192.168.3.90]:8080... connected.
HTTP request sent, awaiting response... 200 OK
Length: 733,825,024 [text/plain]

 2% [>                                                                                    ] 16,952,192     1.03M/s    ETA 11:02


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-12-09 19:59 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-09 11:37 [LARTC] Newbie HTB shaping question rajkumars
2003-12-09 12:51 ` Jan Gerritsen
2003-12-09 15:43 ` Rajkumar S
2003-12-09 16:15 ` Artūras Šlajus
2003-12-09 16:34 ` Rajkumar S
2003-12-09 16:35 ` Martin A. Brown
2003-12-09 17:19 ` Rajkumar S
2003-12-09 19:59 ` Darryl Miles

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.