possible classifier problem..

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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=1500

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=128kbit
P2_EIR=512kbit

P1_CIR=64kbit
P1_EIR=384kbit

$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@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux