Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: skoylu@gizemcafe.net
To: lartc@vger.kernel.org
Subject: [LARTC] possible classifier problem..
Date: Thu, 23 Oct 2003 09:25:41 +0000	[thread overview]
Message-ID: <marc-lartc-106690295613151@msgid-missing> (raw)

I'm using MDK 9.1 with stock kernel (2.4.21) and tc/iproute2 tools from
distro CD..

I create a simple script for bandwith shaping:

#!/bin/bash
INET_DEV=eth0
MTU\x1500

ifconfig $INET_DEV mtu $MTU

# root qdisc
tc qdisc del dev eth0 root

tc qdisc add dev $INET_DEV root handle 1:0 htb default 0

# leased lines pool

tc class add dev $INET_DEV parent 1:0 classid 1:1 htb rate 1mbit burst 64k

# shared pool #1

tc class add dev $INET_DEV parent 1:0 classid 1:1000 htb rate 128kbit
burst 32k

# leased lines for pool #1
TC="tc class add dev $INET_DEV parent 1:1 classid"
P2_CIR\x128kbit
P2_EIRQ2kbit

P1_CIRdkbit
P1_EIR84kbit

$TC 1:10 htb rate $P2_CIR ceil $P2_EIR
$TC 1:20 htb rate $P2_CIR ceil $P2_EIR
$TC 1:30 htb rate $P2_CIR ceil $P2_EIR
$TC 1:40 htb rate $P1_CIR ceil $P1_EIR
$TC 1:50 htb rate $P1_CIR ceil $P1_EIR
$TC 1:60 htb rate $P1_CIR ceil $P1_EIR
$TC 1:70 htb rate $P1_CIR ceil $P1_EIR
$TC 1:80 htb rate $P1_CIR ceil $P1_EIR
$TC 1:90 htb rate $P1_CIR ceil $P1_EIR
$TC 1:100 htb rate $P1_CIR ceil $P1_EIR

for i in 1 2 3 4 5 6 7 8 9 10; do
    tc qdisc add dev $INET_DEV parent 1:${i}0 handle ${i}0: sfq perturb 10
done

FILTER="tc filter add dev $INET_DEV parent 1:0 protocol ip prio 1 u32
match ip src"
$FILTER 212.175.109.80/28 flowid 1:10
$FILTER 212.174.154.130/32 flowid 1:10
$FILTER 212.175.109.192/30 flowid 1:40
$FILTER 212.175.109.196/30 flowid 1:20
$FILTER 212.175.109.200/30 flowid 1:30
$FILTER 212.175.109.204/30 flowid 1:50
$FILTER 212.175.109.208/30 flowid 1:60
$FILTER 212.175.109.212/30 flowid 1:70
$FILTER 212.175.109.216/30 flowid 1:80
$FILTER 212.175.109.220/30 flowid 1:90
$FILTER 212.175.109.224/30 flowid 1:100

Script run OK. No problem (for first run, tc qdisc del.. a small problem,
but this normal situation (?))

This pools and IP blocks always used. For 3-5 minutes later, "tc -s -d
qdisc  show" output :

qdisc sfq 100: quantum 590b limit 128p flows 128/1024 perturb 10sec
 Sent 162 bytes 3 pkts (dropped 0, overlimits 0)

 qdisc sfq 90: quantum 590b limit 128p flows 128/1024 perturb 10sec
 Sent 162 bytes 3 pkts (dropped 0, overlimits 0)

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

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

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

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

 qdisc sfq 40: quantum 590b limit 128p flows 128/1024 perturb 10sec
 Sent 162 bytes 3 pkts (dropped 0, overlimits 0)

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

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

 qdisc sfq 10: quantum 590b limit 128p flows 128/1024 perturb 10sec
 Sent 162 bytes 3 pkts (dropped 0, overlimits 0)

 qdisc htb 1: r2q 10 default 0 direct_packets_stat 136364 ver 3.7
 Sent 53087429 bytes 136376 pkts (dropped 0, overlimits 0)

I'm refused !. I tried original HTB/LARTC documentation samples, but this
samples show same output: classifiers don't run..

I'm can completely failed or tc filter (qdisc/filter/class etc..) failed..

Thanks and excuse me for poor english..



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

                 reply	other threads:[~2003-10-23  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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-106690295613151@msgid-missing \
    --to=skoylu@gizemcafe.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox