All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Allan Gee" <Allang@equation.co.za>
To: lartc@vger.kernel.org
Subject: [LARTC] HTB Question
Date: Wed, 09 Apr 2003 18:06:43 +0000	[thread overview]
Message-ID: <marc-lartc-104991153513337@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101819226308335@msgid-missing>

Hi Stef,
	Sorry to write to you directly but my list membership is not working, I
receive the archive but cant send to the list, cant delete myself because I
don't exist and can't rejoin as they say I do exist, anyway hope you don't
mind

Can you tell me what the difference between these two scripts is please.

What I want to achieve is a high speed channel 1000kbit from port 3000 from
an application running on the box doing the shaping, while shaping the
traffic at 64kbit going thru the box to the network, WITHOUT affecting the
small 64kbit bandwidth.

In EXAMPLE 1 ALL traffic goes thru 1:1 but does not seem to affect the slow
channels 1:2,1:3 and 1:4
In EXAMPLE 2 the port 3000 traffic only goes thru 1:998 and 1:997 but it
shows "lended" packets in the "tc stats"
My feeling is EXAMPLE 2 is the right way but I would like your input



EXAMPLE 1:
tc qdisc del dev eth0 root handle 1: htb default 999
tc qdisc add dev eth0 root handle 1: htb default 999 r2q 1
tc class add dev eth0 parent 1: classid 1:1 htb rate 64kbit

tc class add dev eth0 parent 1: classid 1:998 htb rate 1000kbit
tc qdisc add dev eth0 parent 1:998 handle 1998: sfq perturb 10
tc class add dev eth0 parent 1:998 classid 1:997 htb rate 1000kbit ceil
1000kbit prio 0 quantum 15140
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 3000
0xffff flowid 1:997

tc class add dev eth0 parent 1:1 classid 1:999 htb rate 6kbit ceil 64kbit
prio 0 quantum 1514
tc qdisc add dev eth0 parent 1:999 handle 1999: sfq perturb 10
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 24kbit ceil 64kbit
prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 24kbit ceil 24kbit
prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:4 htb rate 10kbit ceil 64kbit
prio 0 quantum 1514
tc qdisc add dev eth0 parent 1:2 handle 200: sfq perturb 2
tc qdisc add dev eth0 parent 1:3 handle 300: sfq perturb 2
tc qdisc add dev eth0 parent 1:4 handle 400: sfq perturb 2
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80
0xffff flowid 1:2
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 25
0xffff flowid 1:3
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53
0xffff flowid 1:4
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53
0xffff match ip protocol 17 0xff flowid 1:4
END EXAMPLE 1

EXAMPLE 2:
tc qdisc del dev eth0 root handle 1: htb default 999
tc qdisc add dev eth0 root handle 1: htb default 999 r2q 1
tc class add dev eth0 parent 1: classid 1:1 htb rate 64kbit
tc class add dev eth0 parent 1:1 classid 1:999 htb rate 6kbit ceil 64kbit
prio 0 quantum 1514
tc qdisc add dev eth0 parent 1:999 handle 1999: sfq perturb 10
tc class add dev eth0 parent 1:1 classid 1:2 htb rate 24kbit ceil 64kbit
prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 24kbit ceil 24kbit
prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:4 htb rate 10kbit ceil 64kbit
prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:5 htb rate 1000kbit ceil 1000kbit
prio 0 quantum 15140
tc class add dev eth0 parent 1:5 classid 1:6 htb rate 1000kbit ceil 1000kbit
prio 0 quantum 15140
tc qdisc add dev eth0 parent 1:2 handle 200: sfq perturb 2
tc qdisc add dev eth0 parent 1:3 handle 300: sfq perturb 2
tc qdisc add dev eth0 parent 1:4 handle 400: sfq perturb 2
tc qdisc add dev eth0 parent 1:6 handle 600: sfq perturb 5
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80
0xffff flowid 1:2
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 25
0xffff flowid 1:3
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53
0xffff flowid 1:4
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53
0xffff match ip protocol 17 0xff flowid 1:4
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 3000
0xffff flowid 1:6
END EXAMPLE 2


Regards Allan Gee
Equation
021 4181777
www.equation.co.za

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

  parent reply	other threads:[~2003-04-09 18:06 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-07 15:09 [LARTC] HTB question Omer suat
2002-04-07 15:17 ` Martin Devera
2002-04-07 15:21 ` Stef Coene
2002-05-13 17:30 ` Pavlos Parissis
2003-04-09 18:06 ` Allan Gee [this message]
2003-05-23  9:56 ` Ruslan Spivak
2003-06-28 11:58 ` Lars Landmark
2003-06-28 16:09 ` Stoilis Giannis
2004-01-15 11:07 ` [LARTC] HTB Question hare ram
2006-09-13 14:47 ` [LARTC] HTB question doudouyam
  -- strict thread matches above, loose matches on Subject: below --
2003-06-04 20:27 [LARTC] HTB Question TeraHz
2003-06-04 20:46 ` 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-104991153513337@msgid-missing \
    --to=allang@equation.co.za \
    --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.