All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cheng Kwok Wing, William" <wing328@yahoo.com>
To: lartc@vger.kernel.org
Subject: [LARTC] Question on FW and htb
Date: Mon, 05 Aug 2002 03:28:18 +0000	[thread overview]
Message-ID: <marc-lartc-102851817522422@msgid-missing> (raw)

Hi,

I've try to use htb to limit outgoing traffic but it
seems that it doesn't work. I guess the probem is the
filter. Here is my script.


#!/bin/sh
echo "Add root qdisc, default traffic go to 1:30"
tc qdisc add dev eth1 root handle 1: htb default 30
tc class add dev eth1 parent 1: classid 1:1 htb rate
100mbit burst 15k

tc class add dev eth1 parent 1:1 classid 1:10 htb rate
2mbit ceil 2.5mbit burst 1m
tc class add dev eth1 parent 1:1 classid 1:20 htb rate
1mbit ceil 1.5mbit burst 1m

echo "SFQ for leaf"
tc qdisc add dev eth1 parent 1:10 handle 10: sfq
perturb 10
tc qdisc add dev eth1 parent 1:20 handle 20: sfq
perturb 10

echo "Add the filters which direct traffic to the
right classes:"
tc filter add dev eth1 parent 1:0 protocol ip prio 3
handle 1 fw classid 1:10
tc filter add dev eth1 parent 1:0 protocol ip prio 3
handle 2 fw classid 1:20

tc filter add dev eth1 parent 1:1 protocol ip prio 3
handle 1 fw classid 1:10
tc filter add dev eth1 parent 1:1 protocol ip prio 3
handle 2 fw classid 1:20

When I use the command "tc -s -d qdisc" to show all
qdisc, it seems that nothing pass through SFQ.

[root@localhost tc]# tc -s -d qdisc
qdisc sfq 20: dev eth1 quantum 1514b limit 128p flows
128/1024 perturb 10sec 
Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 

qdisc sfq 10: dev eth1 quantum 1514b limit 128p flows
128/1024 perturb 10sec 
Sent 0 bytes 0 pkts (dropped 0, overlimits 0) 

qdisc htb 1: dev eth1 r2q 10 default 30 dcache 0
deq_util 1/1000000 deq_rate 77 trials_per_deq 0
dcache_hits 0 direct_packets 12786
Sent 18636370 bytes 12786 pkts (dropped 0, overlimits
0)

What's the problem?? I'm pretty sure I've mark the
packet correctly as shown below:

[root@localhost tc]# iptables -L -n -v -t mangle
Chain PREROUTING (policy ACCEPT 489K packets, 285M
bytes)
 pkts bytes target     prot opt in     out     source 
             destination         
 3799  454K MARK       all  --  *      *      
0.0.0.0/0            10.0.0.0/8         MARK set 0x1 
 190K   12M MARK       all  --  *      *      
10.0.0.0/8           0.0.0.0/0          MARK set 0x1 
    0     0 MARK       all  --  *      *      
0.0.0.0/0            192.168.1.224/29   MARK set 0x2 
    0     0 MARK       all  --  *      *      
192.168.1.224/29     0.0.0.0/0          MARK set 0x2 

Please help.
Thanks,
William


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

             reply	other threads:[~2002-08-05  3:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-05  3:28 Cheng Kwok Wing, William [this message]
2002-08-05 18:03 ` [LARTC] Question on FW and htb 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-102851817522422@msgid-missing \
    --to=wing328@yahoo.com \
    --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.