All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] dont know why htb is not working
@ 2003-05-18  6:53 Esteban
  2003-05-18  8:18 ` Stef Coene
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Esteban @ 2003-05-18  6:53 UTC (permalink / raw)
  To: lartc

Stef or any "qos" guru!!: 

hi, im managing a 1 mega connection for a company...i use debian, kernel 2.4.20.
my idea is to priorice all www traffic..but i dont know some stuff about matching with the u32 filter.
can anyone give me some idea of what is goinng worng here?
about kazza, bseiides filtering the out, should filter the ingress too?

well, thanks for your time

mi script is this: 

DOWNLINK\x1024
UPLINK\x1024
DEV=eth0

tc qdisc del dev $DEV root    2> /dev/null > /dev/null
tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null

tc qdisc add dev $DEV root handle 1: htb default 20 

tc class add dev $DEV parent 1: classid 1:1 htb rate 1024kbit burst 6k
tc class add dev $DEV parent 1:1 classid 1:10 htb rate 450kbit ceil 1024kbit burst 6k prio 1 
tc class add dev $DEV parent 1:1 classid 1:20 htb rate 500kbit ceil 1024kbit burst 6k prio 2
# for people i dont want to browse...
tc class add dev $DEV parent 1:1 classid 1:30 htb rate 74kbit ceil 110kbit burst 6k prio 3

tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10
tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10

#this is not working!! he downloads at 32k all the time!!
tc filter add dev $DEV parent 1: protocol ip prio 1 u32 match ip src 200.69.147.69 flowid 1:30
tc filter add dev $DEV parent 1: protocol ip prio 1 u32 match ip dst 200.69.147.69 flowid 1:30

# TOS Minimum Delay (ssh, NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip tos 0x10 0xff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip protocol 1 0xff flowid 1:10 
tc filter add dev $DEV parent 1: protocol ip prio 2 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowi
d 1:10

# icmp
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip protocol 1 0xff flowid 1:10

# IMPORTANT AND FAST! ALWAYS! (all related to web browsing)
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 80 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 8080 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 8080 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 443 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 80 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 443 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 1863 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 22 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 22 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 53 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 53 0xffff flowid 1:10 

# counter strike..low bw consumer
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 27015 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 27015 0xffff flowid 1:10 
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip sport 27005 0xffff flowid 1:10
tc filter add dev $DEV parent 1:0 protocol ip prio 2 u32 match ip dport 27005 0xffff flowid 1:10 

# kazaa and friends to the least posible bw and prio
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip sport 25 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dport 25 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip sport 21 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dport 21 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip sport 6346 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dport 6346 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip sport 4662 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dport 4662 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip sport 4661 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dport 4661 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip sport 1214 0xffff flowid 1:30
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dport 1214 0xffff flowid 1:30

# the rest, if need must wait and be shaped 
tc filter add dev $DEV parent 1: protocol ip prio 18 u32 match ip dst 0.0.0.0/0 flowid 1:20 

# download, not much to do right?
tc qdisc add dev $DEV handle ffff: ingress
tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate 1024kbit burst 10k drop flowid :1


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

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

* Re: [LARTC] dont know why htb is not working
  2003-05-18  6:53 [LARTC] dont know why htb is not working Esteban
@ 2003-05-18  8:18 ` Stef Coene
  2003-05-18  8:30 ` Esteban
  2003-05-18  8:42 ` Stef Coene
  2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2003-05-18  8:18 UTC (permalink / raw)
  To: lartc

On Sunday 18 May 2003 08:53, Esteban wrote:
> Stef or any "qos" guru!!:
Hi.

> hi, im managing a 1 mega connection for a company...i use debian, kernel
> 2.4.20. my idea is to priorice all www traffic..but i dont know some stuff
> about matching with the u32 filter. can anyone give me some idea of what is
> goinng worng here?
Remove the burst and the prio parameters from your htb classes.  The burst is 
too low to get some good shaping.  And different prio's can introduce high 
delays.

> #this is not working!! he downloads at 32k all the time!!
> tc filter add dev $DEV parent 1: protocol ip prio 1 u32 match ip src
> 200.69.147.69 flowid 1:30
> tc filter add dev $DEV parent 1: protocol ip prio 1 u32 match ip dst
> 200.69.147.69 flowid 1:30
And why do you have the same filter for source and destination ????

> # the rest, if need must wait and be shaped
> tc filter add dev $DEV parent 1: protocol ip prio 18 u32 match ip dst
> 0.0.0.0/0 flowid 1:20
This is not needed because 1:20 is the default htb 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/

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

* Re: [LARTC] dont know why htb is not working
  2003-05-18  6:53 [LARTC] dont know why htb is not working Esteban
  2003-05-18  8:18 ` Stef Coene
@ 2003-05-18  8:30 ` Esteban
  2003-05-18  8:42 ` Stef Coene
  2 siblings, 0 replies; 4+ messages in thread
From: Esteban @ 2003-05-18  8:30 UTC (permalink / raw)
  To: lartc

but if i remove the prio, i wont get the packet priorization as i wanted..and as i read, htb know thrug the prio who can "lend" BW....is it like that?

i put src and dst because im not sure how to match the packet

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

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

* Re: [LARTC] dont know why htb is not working
  2003-05-18  6:53 [LARTC] dont know why htb is not working Esteban
  2003-05-18  8:18 ` Stef Coene
  2003-05-18  8:30 ` Esteban
@ 2003-05-18  8:42 ` Stef Coene
  2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2003-05-18  8:42 UTC (permalink / raw)
  To: lartc

On Sunday 18 May 2003 10:30, Esteban wrote:
> but if i remove the prio, i wont get the packet priorization as i
> wanted..and as i read, htb know thrug the prio who can "lend" BW....is it
> like that?
Not really.  Each class can send it's rate.  If the parent has more bandwidth 
left, prio is used.  And the lowest prio class will also have the lowest 
delays.  BUT if you send more data then the rate in a low prio class, the 
latency can bevery high.

> i put src and dst because im not sure how to match the packet
Ok.

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/

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

end of thread, other threads:[~2003-05-18  8:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-18  6:53 [LARTC] dont know why htb is not working Esteban
2003-05-18  8:18 ` Stef Coene
2003-05-18  8:30 ` Esteban
2003-05-18  8:42 ` Stef Coene

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.