* [LARTC] Question on FW and htb
@ 2002-08-05 3:28 Cheng Kwok Wing, William
2002-08-05 18:03 ` Stef Coene
0 siblings, 1 reply; 2+ messages in thread
From: Cheng Kwok Wing, William @ 2002-08-05 3:28 UTC (permalink / raw)
To: lartc
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/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [LARTC] Question on FW and htb
2002-08-05 3:28 [LARTC] Question on FW and htb Cheng Kwok Wing, William
@ 2002-08-05 18:03 ` Stef Coene
0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2002-08-05 18:03 UTC (permalink / raw)
To: lartc
On Monday 05 August 2002 05:28, Cheng Kwok Wing, William wrote:
What shows
tc -s -d class show dev eth
> 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
Why do you attach these filters to 1:1 ??
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] 2+ messages in thread
end of thread, other threads:[~2002-08-05 18:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-05 3:28 [LARTC] Question on FW and htb Cheng Kwok Wing, William
2002-08-05 18:03 ` 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.