All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] HTB - default class is used only
@ 2003-12-31 14:14 Dan1
  2003-12-31 19:22 ` Martin A. Brown
  2003-12-31 19:38 ` Dan1
  0 siblings, 2 replies; 3+ messages in thread
From: Dan1 @ 2003-12-31 14:14 UTC (permalink / raw)
  To: lartc

Hello,

i have very simple script to control upload in network with 3 IP addresses.

Problem is, that rule for default class is used only and filtering by 
IPs doesn't work.

I have RH9 with kernel 2.4.20-24.9, htb script starts without errors, 
iproute-2.4.7-7.90.1 installed (shouldn't I uninstall iproute and 
install iproute2?)

Thanks for your help, Dan.



#!/bin/bash

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1:0 htb default 12

tc class add dev eth0 parent 1:0 classid 1:1 htb rate 96kbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 32kbit ceil 96kbit
tc class add dev eth0 parent 1:1 classid 1:11 htb rate 32kbit ceil 96kbit
tc class add dev eth0 parent 1:1 classid 1:12 htb rate 32kbit ceil 96kbit

tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 
192.168.1.14 flowid 1:10
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 
192.168.1.28 flowid 1:11
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip src 
192.168.1.27 flowid 1:12



tc -s -d class show dev eth0
==============

class htb 1:11 parent 1:1 prio 0 quantum 1000 rate 32Kbit ceil 96Kbit 
burst 1639b/8 mpu 0b cburst 1721b/8 mpu 0b level 0
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  lended: 0 borrowed: 0 giants: 0
  tokens: 327999 ctokens: 114799

class htb 1:1 root rate 96Kbit ceil 96Kbit burst 1721b/8 mpu 0b cburst 
1721b/8 mpu 0b level 7
  Sent 594260 bytes 1276 pkts (dropped 0, overlimits 0)
  rate 9656bps 17pps
  lended: 587 borrowed: 0 giants: 0
  tokens: -147083 ctokens: -147083

class htb 1:10 parent 1:1 prio 0 quantum 1000 rate 32Kbit ceil 96Kbit 
burst 1639b/8 mpu 0b cburst 1721b/8 mpu 0b level 0
  Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
  lended: 0 borrowed: 0 giants: 0
  tokens: 327999 ctokens: 114799

class htb 1:12 parent 1:1 prio 0 quantum 1000 rate 32Kbit ceil 96Kbit 
burst 1639b/8 mpu 0b cburst 1721b/8 mpu 0b level 0
  Sent 595490 bytes 1277 pkts (dropped 0, overlimits 0)
  rate 9796bps 18pps backlog 1p
  lended: 689 borrowed: 587 giants: 0
  tokens: -306121 ctokens: -147083


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-31 14:14 [LARTC] HTB - default class is used only Dan1
2003-12-31 19:22 ` Martin A. Brown
2003-12-31 19:38 ` Dan1

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.