Modify

Opened 5 years ago

Last modified 4 years ago

#13373 new defect

Nested classes and traffic classification

Reported by: cheskyr@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: kernel Version:
Keywords: traffic, classification, iptables, tc Cc:

Description

Hello!

I'm using AA 12.09 r36088 and I've got a problem with the traffic classification. Here's the script:

TC=`which tc`
IPTABLES=`which iptables`

$TC qdisc add dev $DEV root handle 1: prio bands 3 priomap 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
$TC qdisc add dev $DEV parent 1:1 handle 11: pfifo
$TC qdisc add dev $DEV parent 1:2 handle 12: htb default 21
$TC class add dev $DEV parent 12:0 classid 12:1 htb rate 20mbit ceil 20mbit
$TC class add dev $DEV parent 12:1 classid 12:21 htb rate 4mbit ceil 20mbit
$TC qdisc add dev $DEV parent 12:21 handle 121: sfq perturb 5 limit 16
$TC filter add dev $DEV parent 121: handle 1221 protocol all flow hash keys dst divisor 512
$TC class add dev $DEV parent 12:1 classid 12:22 htb rate 16mbit ceil 20mbit
$TC qdisc add dev $DEV parent 12:22 handle 122: sfq perturb 5 limit 16
$TC filter add dev $DEV parent 122: handle 1222 protocol all flow hash keys dst divisor 512
$TC qdisc add dev $DEV parent 1:3 handle 13: pfifo

Now, neither

$IPTABLES -t mangle -A POSTROUTING -o $DEV -d $ip -j CLASSIFY --set-class 12:22

nor

$TC filter add dev $DEV parent 1: protocol ip prio 1 u32 \
match ip dst $ip flowid 12:22

can make selected traffic go to the htb class 12:22 (or 12:21). Instead it goes to the default prio class 1:3.
But if I use

$IPTABLES -t mangle -A POSTROUTING -o $DEV -d $ip -j CLASSIFY --set-class 1:2

or

$TC filter add dev $DEV parent 1: protocol ip prio 1 u32 \
match ip dst $ip flowid 1:2

then it goes to the prio class 1:2 and then to the htb class 12:21 (default htb class).

So it seems nested htb classes are somehow ignored.

Attachments (0)

Change History (1)

comment:1 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.