All of lore.kernel.org
 help / color / mirror / Atom feed
From: Esteban <listas@dejawu.com.ar>
To: lartc@vger.kernel.org
Subject: [LARTC] dont know why htb is not working
Date: Sun, 18 May 2003 06:53:50 +0000	[thread overview]
Message-ID: <marc-lartc-105324107830528@msgid-missing> (raw)

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/

             reply	other threads:[~2003-05-18  6:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-18  6:53 Esteban [this message]
2003-05-18  8:18 ` [LARTC] dont know why htb is not working Stef Coene
2003-05-18  8:30 ` Esteban
2003-05-18  8:42 ` Stef Coene

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-105324107830528@msgid-missing \
    --to=listas@dejawu.com.ar \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.